Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8451

Re: Mass Loading of Hierarchies into BW without multiple infopackages

$
0
0

Hi Siddhu,

 

You can achieve the same functionality in another way.

Step 1 and STEP2 are same. and in step3 &4 -Instead of BDC and BAPI. you can directly create hierachy and load hierachy to corresponding info object without creating info package. This step can be done by program. Below logic gives overview of this step.

 

data: L_R_HIER TYPE REF TO CL_RSSH_HIERARCHY_BASE.

*Fill your hieracrhy name, hier type, date to in l_s_dfhiesel, language, short text etc.. .into  *L_T_HIETXT.

 

CALL METHOD L_R_HIER->CREATE_HIERARCHY
    EXPORTING
      I_S_HIESEL = L_S_DFHIESEL
      I_T_HIETXT = L_T_HIETXT
*     I_LANGU    = SY-LANGU

      I_NEWONE   = L_NEWONE
    EXCEPTIONS
      CANCELLED  = 1
      OTHERS     = 2.
  IF SY-SUBRC <> 0.
    MESSAGE I000(RH).
  ENDIF.

 

Build hierarchy by filling all nodes, info objects, inetrval, nodeid etc..into htab and jtab and call set_hieracrhy method and then activate hierarchy.

 

 

CALL METHOD L_R_HIER->SET_HIERARCHY
    EXPORTING
*     I_S_HIEDIR    = l_s_hiedir
      I_T_HIEDIRT   = GT_HIEDIRT
      I_T_HTAB      = <GT_HTAB>
      I_T_JTAB      = GT_JTAB
      I_T_HIERNODET = GT_HIERNODET

      I_T_LEVEL     = GT_LEVEL
    EXCEPTIONS
      OTHERS        = 1.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

CALL METHOD L_R_HIER->SAVE_HIERARCHY.

CALL FUNCTION 'RSSH_HIERARCHY_ACTIVATE'

EXPORTING
        I_HIEID = L_S_HIEDIR-HIEID.

 

Srikanth.

 


Viewing all articles
Browse latest Browse all 8451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>