SAP Function Modules

RSSEMHIE_STRUCTURE_GET SAP Function module - Hierarchical structure in the NDI format







RSSEMHIE_STRUCTURE_GET 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 RSSEMHIE_STRUCTURE_GET into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RSSEMHIE
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM RSSEMHIE_STRUCTURE_GET - RSSEMHIE STRUCTURE GET





CALL FUNCTION 'RSSEMHIE_STRUCTURE_GET' "Hierarchical structure in the NDI format
* EXPORTING
*   i_s_hiekey =                " rsndi_s_hiekey
*   i_s_hiesel =                " rsndi_s_hiesel
*   i_no_nodenm_table = RS_C_FALSE  " rs_bool
  IMPORTING
    e_s_hiedir =                " rsndi_s_hiedir  Hierarchiekopinformationen NDI
    e_subrc =                   " sy-subrc
* TABLES
*   e_t_hiedirt =               " rshiedirt
*   e_t_hierstruc =             " rshierstruc
*   e_t_mhiernode =             " rsmhiernode
*   e_t_thiernode =             " rsthiernode
*   e_t_hierintvl =             " rshierintvl
*   e_t_nodenames =             " rssem_s_nodenm  Text and ext. name for nodes
*   e_t_message =               " rsndi_s_message
    .  "  RSSEMHIE_STRUCTURE_GET

ABAP code example for Function Module RSSEMHIE_STRUCTURE_GET





The ABAP code below is a full code listing to execute function module RSSEMHIE_STRUCTURE_GET 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:
ld_e_s_hiedir  TYPE RSNDI_S_HIEDIR ,
ld_e_subrc  TYPE SY-SUBRC ,
it_e_t_hiedirt  TYPE STANDARD TABLE OF RSHIEDIRT,"TABLES PARAM
wa_e_t_hiedirt  LIKE LINE OF it_e_t_hiedirt ,
it_e_t_hierstruc  TYPE STANDARD TABLE OF RSHIERSTRUC,"TABLES PARAM
wa_e_t_hierstruc  LIKE LINE OF it_e_t_hierstruc ,
it_e_t_mhiernode  TYPE STANDARD TABLE OF RSMHIERNODE,"TABLES PARAM
wa_e_t_mhiernode  LIKE LINE OF it_e_t_mhiernode ,
it_e_t_thiernode  TYPE STANDARD TABLE OF RSTHIERNODE,"TABLES PARAM
wa_e_t_thiernode  LIKE LINE OF it_e_t_thiernode ,
it_e_t_hierintvl  TYPE STANDARD TABLE OF RSHIERINTVL,"TABLES PARAM
wa_e_t_hierintvl  LIKE LINE OF it_e_t_hierintvl ,
it_e_t_nodenames  TYPE STANDARD TABLE OF RSSEM_S_NODENM,"TABLES PARAM
wa_e_t_nodenames  LIKE LINE OF it_e_t_nodenames ,
it_e_t_message  TYPE STANDARD TABLE OF RSNDI_S_MESSAGE,"TABLES PARAM
wa_e_t_message  LIKE LINE OF it_e_t_message .

DATA(ld_i_s_hiekey) = 'Check type of data required'.
DATA(ld_i_s_hiesel) = 'Check type of data required'.
DATA(ld_i_no_nodenm_table) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_t_hiedirt to it_e_t_hiedirt.

"populate fields of struture and append to itab
append wa_e_t_hierstruc to it_e_t_hierstruc.

"populate fields of struture and append to itab
append wa_e_t_mhiernode to it_e_t_mhiernode.

"populate fields of struture and append to itab
append wa_e_t_thiernode to it_e_t_thiernode.

"populate fields of struture and append to itab
append wa_e_t_hierintvl to it_e_t_hierintvl.

"populate fields of struture and append to itab
append wa_e_t_nodenames to it_e_t_nodenames.

"populate fields of struture and append to itab
append wa_e_t_message to it_e_t_message. . CALL FUNCTION 'RSSEMHIE_STRUCTURE_GET' * EXPORTING * i_s_hiekey = ld_i_s_hiekey * i_s_hiesel = ld_i_s_hiesel * i_no_nodenm_table = ld_i_no_nodenm_table IMPORTING e_s_hiedir = ld_e_s_hiedir e_subrc = ld_e_subrc * TABLES * e_t_hiedirt = it_e_t_hiedirt * e_t_hierstruc = it_e_t_hierstruc * e_t_mhiernode = it_e_t_mhiernode * e_t_thiernode = it_e_t_thiernode * e_t_hierintvl = it_e_t_hierintvl * e_t_nodenames = it_e_t_nodenames * e_t_message = it_e_t_message . " RSSEMHIE_STRUCTURE_GET
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_e_s_hiedir  TYPE RSNDI_S_HIEDIR ,
ld_i_s_hiekey  TYPE RSNDI_S_HIEKEY ,
it_e_t_hiedirt  TYPE STANDARD TABLE OF RSHIEDIRT ,
wa_e_t_hiedirt  LIKE LINE OF it_e_t_hiedirt,
ld_e_subrc  TYPE SY-SUBRC ,
ld_i_s_hiesel  TYPE RSNDI_S_HIESEL ,
it_e_t_hierstruc  TYPE STANDARD TABLE OF RSHIERSTRUC ,
wa_e_t_hierstruc  LIKE LINE OF it_e_t_hierstruc,
ld_i_no_nodenm_table  TYPE RS_BOOL ,
it_e_t_mhiernode  TYPE STANDARD TABLE OF RSMHIERNODE ,
wa_e_t_mhiernode  LIKE LINE OF it_e_t_mhiernode,
it_e_t_thiernode  TYPE STANDARD TABLE OF RSTHIERNODE ,
wa_e_t_thiernode  LIKE LINE OF it_e_t_thiernode,
it_e_t_hierintvl  TYPE STANDARD TABLE OF RSHIERINTVL ,
wa_e_t_hierintvl  LIKE LINE OF it_e_t_hierintvl,
it_e_t_nodenames  TYPE STANDARD TABLE OF RSSEM_S_NODENM ,
wa_e_t_nodenames  LIKE LINE OF it_e_t_nodenames,
it_e_t_message  TYPE STANDARD TABLE OF RSNDI_S_MESSAGE ,
wa_e_t_message  LIKE LINE OF it_e_t_message.

ld_i_s_hiekey = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_t_hiedirt to it_e_t_hiedirt.
ld_i_s_hiesel = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_t_hierstruc to it_e_t_hierstruc.
ld_i_no_nodenm_table = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_t_mhiernode to it_e_t_mhiernode.

"populate fields of struture and append to itab
append wa_e_t_thiernode to it_e_t_thiernode.

"populate fields of struture and append to itab
append wa_e_t_hierintvl to it_e_t_hierintvl.

"populate fields of struture and append to itab
append wa_e_t_nodenames to it_e_t_nodenames.

"populate fields of struture and append to itab
append wa_e_t_message to it_e_t_message.

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 RSSEMHIE_STRUCTURE_GET or its description.