SAP Function Modules

RSAR_HIER_SAVE SAP Function module - post processing for paket-wise hierarchy load







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

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


Pattern for FM RSAR_HIER_SAVE - RSAR HIER SAVE





CALL FUNCTION 'RSAR_HIER_SAVE' "post processing for paket-wise hierarchy load
  EXPORTING
    i_rnr =                     " rsrequnr      Request number for the data transfer
    i_logsys =                  " rsa_logsys    Source System
    i_tstpnm =                  " rststpnm      Last Changed By
    i_timestmp =                " rstimestmp    UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
    i_iobjnm =                  " rsiobjnm      InfoObject
    i_hienm =                   " rshienm       Hierarchy Name
    i_hietype = '1'             " rshietype
    i_version =                 " rsversion     Hierarchy Version
    i_dateto =                  " rsdateto      Valid-To Date
    i_datefrom =                " rsdatefrom    Valid-From Date
    i_oltpsource =              " rsoltpsourcer  OLTP Source
*   i_new_hienm =               " rshienmnew    New hierarchy name
*   i_chavl_check = RS_C_FALSE  " rs_bool       Chavl check is on?
*   i_subtree = RS_C_FALSE      " rs_bool       Hierarchy is subtree?
  IMPORTING
    e_error =                   " rs_bool       Boolean
    e_t_idocstate =             " rsarr_t_idocstate
  EXCEPTIONS
    METADATA_ERROR = 1          "               Metadata for hierarchy not found
    PROG_GEN_ERROR = 2          "               Errors in program generation
    PROG_DOESNT_EXIST_ERROR = 3  "              Generated form routine not found
    .  "  RSAR_HIER_SAVE

ABAP code example for Function Module RSAR_HIER_SAVE





The ABAP code below is a full code listing to execute function module RSAR_HIER_SAVE 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_error  TYPE RS_BOOL ,
ld_e_t_idocstate  TYPE RSARR_T_IDOCSTATE .

DATA(ld_i_rnr) = 'Check type of data required'.
DATA(ld_i_logsys) = 'Check type of data required'.
DATA(ld_i_tstpnm) = 'Check type of data required'.
DATA(ld_i_timestmp) = 'Check type of data required'.
DATA(ld_i_iobjnm) = 'Check type of data required'.
DATA(ld_i_hienm) = 'Check type of data required'.
DATA(ld_i_hietype) = 'Check type of data required'.
DATA(ld_i_version) = 'Check type of data required'.
DATA(ld_i_dateto) = 'Check type of data required'.
DATA(ld_i_datefrom) = 'Check type of data required'.
DATA(ld_i_oltpsource) = 'Check type of data required'.
DATA(ld_i_new_hienm) = 'Check type of data required'.
DATA(ld_i_chavl_check) = 'Check type of data required'.
DATA(ld_i_subtree) = 'Check type of data required'. . CALL FUNCTION 'RSAR_HIER_SAVE' EXPORTING i_rnr = ld_i_rnr i_logsys = ld_i_logsys i_tstpnm = ld_i_tstpnm i_timestmp = ld_i_timestmp i_iobjnm = ld_i_iobjnm i_hienm = ld_i_hienm i_hietype = ld_i_hietype i_version = ld_i_version i_dateto = ld_i_dateto i_datefrom = ld_i_datefrom i_oltpsource = ld_i_oltpsource * i_new_hienm = ld_i_new_hienm * i_chavl_check = ld_i_chavl_check * i_subtree = ld_i_subtree IMPORTING e_error = ld_e_error e_t_idocstate = ld_e_t_idocstate EXCEPTIONS METADATA_ERROR = 1 PROG_GEN_ERROR = 2 PROG_DOESNT_EXIST_ERROR = 3 . " RSAR_HIER_SAVE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here 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_error  TYPE RS_BOOL ,
ld_i_rnr  TYPE RSREQUNR ,
ld_e_t_idocstate  TYPE RSARR_T_IDOCSTATE ,
ld_i_logsys  TYPE RSA_LOGSYS ,
ld_i_tstpnm  TYPE RSTSTPNM ,
ld_i_timestmp  TYPE RSTIMESTMP ,
ld_i_iobjnm  TYPE RSIOBJNM ,
ld_i_hienm  TYPE RSHIENM ,
ld_i_hietype  TYPE RSHIETYPE ,
ld_i_version  TYPE RSVERSION ,
ld_i_dateto  TYPE RSDATETO ,
ld_i_datefrom  TYPE RSDATEFROM ,
ld_i_oltpsource  TYPE RSOLTPSOURCER ,
ld_i_new_hienm  TYPE RSHIENMNEW ,
ld_i_chavl_check  TYPE RS_BOOL ,
ld_i_subtree  TYPE RS_BOOL .

ld_i_rnr = 'Check type of data required'.
ld_i_logsys = 'Check type of data required'.
ld_i_tstpnm = 'Check type of data required'.
ld_i_timestmp = 'Check type of data required'.
ld_i_iobjnm = 'Check type of data required'.
ld_i_hienm = 'Check type of data required'.
ld_i_hietype = 'Check type of data required'.
ld_i_version = 'Check type of data required'.
ld_i_dateto = 'Check type of data required'.
ld_i_datefrom = 'Check type of data required'.
ld_i_oltpsource = 'Check type of data required'.
ld_i_new_hienm = 'Check type of data required'.
ld_i_chavl_check = 'Check type of data required'.
ld_i_subtree = 'Check type of data required'.

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