SAP Function Modules

RGRE_HIERARCHY_INIT_FBR SAP Function module







RGRE_HIERARCHY_INIT_FBR is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RGRE_HIERARCHY_INIT_FBR into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RGRE
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RGRE_HIERARCHY_INIT_FBR - RGRE HIERARCHY INIT FBR





CALL FUNCTION 'RGRE_HIERARCHY_INIT_FBR' "
* EXPORTING
*   i_rsthvkey =                " rsthvkey      Characteristic
*   i_sel = SPACE               "               Hierarchy
*   requester = SPACE           "
*   sellevel = SPACE            "
*   selmode = SPACE             "               Selection Type
*   with_texts = SPACE          "
*   compound = SPACE            "
* TABLES
*   i_rsthie =                  " rsthie        Hierarchy Table
*   i_rstint =                  " rstint
*   i_rsttyp =                  " rsttyp
*   i_rstadd =                  " rstadd
*   i_rsttxt =                  " rsttxt
*   i_chngid =                  "
*   i_edit_settings =           "
    .  "  RGRE_HIERARCHY_INIT_FBR

ABAP code example for Function Module RGRE_HIERARCHY_INIT_FBR





The ABAP code below is a full code listing to execute function module RGRE_HIERARCHY_INIT_FBR including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_i_rsthie  TYPE STANDARD TABLE OF RSTHIE,"TABLES PARAM
wa_i_rsthie  LIKE LINE OF it_i_rsthie ,
it_i_rstint  TYPE STANDARD TABLE OF RSTINT,"TABLES PARAM
wa_i_rstint  LIKE LINE OF it_i_rstint ,
it_i_rsttyp  TYPE STANDARD TABLE OF RSTTYP,"TABLES PARAM
wa_i_rsttyp  LIKE LINE OF it_i_rsttyp ,
it_i_rstadd  TYPE STANDARD TABLE OF RSTADD,"TABLES PARAM
wa_i_rstadd  LIKE LINE OF it_i_rstadd ,
it_i_rsttxt  TYPE STANDARD TABLE OF RSTTXT,"TABLES PARAM
wa_i_rsttxt  LIKE LINE OF it_i_rsttxt ,
it_i_chngid  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_i_chngid  LIKE LINE OF it_i_chngid ,
it_i_edit_settings  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_i_edit_settings  LIKE LINE OF it_i_edit_settings .

DATA(ld_i_rsthvkey) = 'Check type of data required'.
DATA(ld_i_sel) = 'some text here'.
DATA(ld_requester) = 'some text here'.
DATA(ld_sellevel) = 'some text here'.
DATA(ld_selmode) = 'some text here'.
DATA(ld_with_texts) = 'some text here'.
DATA(ld_compound) = 'some text here'.

"populate fields of struture and append to itab
append wa_i_rsthie to it_i_rsthie.

"populate fields of struture and append to itab
append wa_i_rstint to it_i_rstint.

"populate fields of struture and append to itab
append wa_i_rsttyp to it_i_rsttyp.

"populate fields of struture and append to itab
append wa_i_rstadd to it_i_rstadd.

"populate fields of struture and append to itab
append wa_i_rsttxt to it_i_rsttxt.

"populate fields of struture and append to itab
append wa_i_chngid to it_i_chngid.

"populate fields of struture and append to itab
append wa_i_edit_settings to it_i_edit_settings. . CALL FUNCTION 'RGRE_HIERARCHY_INIT_FBR' * EXPORTING * i_rsthvkey = ld_i_rsthvkey * i_sel = ld_i_sel * requester = ld_requester * sellevel = ld_sellevel * selmode = ld_selmode * with_texts = ld_with_texts * compound = ld_compound * TABLES * i_rsthie = it_i_rsthie * i_rstint = it_i_rstint * i_rsttyp = it_i_rsttyp * i_rstadd = it_i_rstadd * i_rsttxt = it_i_rsttxt * i_chngid = it_i_chngid * i_edit_settings = it_i_edit_settings . " RGRE_HIERARCHY_INIT_FBR
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_rsthvkey  TYPE RSTHVKEY ,
it_i_rsthie  TYPE STANDARD TABLE OF RSTHIE ,
wa_i_rsthie  LIKE LINE OF it_i_rsthie,
ld_i_sel  TYPE STRING ,
it_i_rstint  TYPE STANDARD TABLE OF RSTINT ,
wa_i_rstint  LIKE LINE OF it_i_rstint,
ld_requester  TYPE STRING ,
it_i_rsttyp  TYPE STANDARD TABLE OF RSTTYP ,
wa_i_rsttyp  LIKE LINE OF it_i_rsttyp,
ld_sellevel  TYPE STRING ,
it_i_rstadd  TYPE STANDARD TABLE OF RSTADD ,
wa_i_rstadd  LIKE LINE OF it_i_rstadd,
ld_selmode  TYPE STRING ,
it_i_rsttxt  TYPE STANDARD TABLE OF RSTTXT ,
wa_i_rsttxt  LIKE LINE OF it_i_rsttxt,
ld_with_texts  TYPE STRING ,
it_i_chngid  TYPE STANDARD TABLE OF STRING ,
wa_i_chngid  LIKE LINE OF it_i_chngid,
ld_compound  TYPE STRING ,
it_i_edit_settings  TYPE STANDARD TABLE OF STRING ,
wa_i_edit_settings  LIKE LINE OF it_i_edit_settings.

ld_i_rsthvkey = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_rsthie to it_i_rsthie.
ld_i_sel = 'some text here'.

"populate fields of struture and append to itab
append wa_i_rstint to it_i_rstint.
ld_requester = 'some text here'.

"populate fields of struture and append to itab
append wa_i_rsttyp to it_i_rsttyp.
ld_sellevel = 'some text here'.

"populate fields of struture and append to itab
append wa_i_rstadd to it_i_rstadd.
ld_selmode = 'some text here'.

"populate fields of struture and append to itab
append wa_i_rsttxt to it_i_rsttxt.
ld_with_texts = 'some text here'.

"populate fields of struture and append to itab
append wa_i_chngid to it_i_chngid.
ld_compound = 'some text here'.

"populate fields of struture and append to itab
append wa_i_edit_settings to it_i_edit_settings.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RGRE_HIERARCHY_INIT_FBR or its description.