SAP Function Modules

RM_RC_REMOVE_HIERARCHY SAP Function module - RM: Auflösung der Hierarchie des Risikoträgers (flachklopfen)







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

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


Pattern for FM RM_RC_REMOVE_HIERARCHY - RM RC REMOVE HIERARCHY





CALL FUNCTION 'RM_RC_REMOVE_HIERARCHY' "RM: Auflösung der Hierarchie des Risikoträgers (flachklopfen)
* EXPORTING
*   type = 'X'                  " c             Steuerflag ('X' für xSFGDT, ' ' für SFGDT)
*   i_it_sfgdt =                " tvs_sfgdt_tab  Tabelle der Risikoträger
*   i_it_xsfgdt =               " rms_sfgdt_tab  Tabelle der erweiteretn Risikoträger
* TABLES
*   e_it_ko =                   " jbrdbko       Kopfinformation Risikoträger für DB
*   e_it_koet =                 " jbrdbkoet     Kopfinformation Elementartyp für DB
*   e_it_abest =                " jbrdbabest    ABEST für DB
*   e_it_opti =                 " jbrdbopti     OPTI für DB
*   e_it_beweg =                " jbrdbbeweg    BEWEG für DB
*   e_it_combeweg =             " jbrdbcombeweg  RM: DB Table BEWEG Extended Category of Primary Transaction
*   e_it_fml =                  " jbrdbfml
*   e_it_hier =                 " jbrdbhier     Hierarchiverschlüsselungstabelle für DB
*   error_itab =                " bapierr       Fehlertabelle (pro Risikoträger)
  EXCEPTIONS
    NO_INPUT = 1                "               keine Eingabedaten gefunden
    WRONG_TYPE_INPUT = 2        "               Type paßt nicht zum Input
    .  "  RM_RC_REMOVE_HIERARCHY

ABAP code example for Function Module RM_RC_REMOVE_HIERARCHY





The ABAP code below is a full code listing to execute function module RM_RC_REMOVE_HIERARCHY 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_e_it_ko  TYPE STANDARD TABLE OF JBRDBKO,"TABLES PARAM
wa_e_it_ko  LIKE LINE OF it_e_it_ko ,
it_e_it_koet  TYPE STANDARD TABLE OF JBRDBKOET,"TABLES PARAM
wa_e_it_koet  LIKE LINE OF it_e_it_koet ,
it_e_it_abest  TYPE STANDARD TABLE OF JBRDBABEST,"TABLES PARAM
wa_e_it_abest  LIKE LINE OF it_e_it_abest ,
it_e_it_opti  TYPE STANDARD TABLE OF JBRDBOPTI,"TABLES PARAM
wa_e_it_opti  LIKE LINE OF it_e_it_opti ,
it_e_it_beweg  TYPE STANDARD TABLE OF JBRDBBEWEG,"TABLES PARAM
wa_e_it_beweg  LIKE LINE OF it_e_it_beweg ,
it_e_it_combeweg  TYPE STANDARD TABLE OF JBRDBCOMBEWEG,"TABLES PARAM
wa_e_it_combeweg  LIKE LINE OF it_e_it_combeweg ,
it_e_it_fml  TYPE STANDARD TABLE OF JBRDBFML,"TABLES PARAM
wa_e_it_fml  LIKE LINE OF it_e_it_fml ,
it_e_it_hier  TYPE STANDARD TABLE OF JBRDBHIER,"TABLES PARAM
wa_e_it_hier  LIKE LINE OF it_e_it_hier ,
it_error_itab  TYPE STANDARD TABLE OF BAPIERR,"TABLES PARAM
wa_error_itab  LIKE LINE OF it_error_itab .

DATA(ld_type) = 'Check type of data required'.
DATA(ld_i_it_sfgdt) = 'Check type of data required'.
DATA(ld_i_it_xsfgdt) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_it_ko to it_e_it_ko.

"populate fields of struture and append to itab
append wa_e_it_koet to it_e_it_koet.

"populate fields of struture and append to itab
append wa_e_it_abest to it_e_it_abest.

"populate fields of struture and append to itab
append wa_e_it_opti to it_e_it_opti.

"populate fields of struture and append to itab
append wa_e_it_beweg to it_e_it_beweg.

"populate fields of struture and append to itab
append wa_e_it_combeweg to it_e_it_combeweg.

"populate fields of struture and append to itab
append wa_e_it_fml to it_e_it_fml.

"populate fields of struture and append to itab
append wa_e_it_hier to it_e_it_hier.

"populate fields of struture and append to itab
append wa_error_itab to it_error_itab. . CALL FUNCTION 'RM_RC_REMOVE_HIERARCHY' * EXPORTING * type = ld_type * i_it_sfgdt = ld_i_it_sfgdt * i_it_xsfgdt = ld_i_it_xsfgdt * TABLES * e_it_ko = it_e_it_ko * e_it_koet = it_e_it_koet * e_it_abest = it_e_it_abest * e_it_opti = it_e_it_opti * e_it_beweg = it_e_it_beweg * e_it_combeweg = it_e_it_combeweg * e_it_fml = it_e_it_fml * e_it_hier = it_e_it_hier * error_itab = it_error_itab EXCEPTIONS NO_INPUT = 1 WRONG_TYPE_INPUT = 2 . " RM_RC_REMOVE_HIERARCHY
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 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_type  TYPE C ,
it_e_it_ko  TYPE STANDARD TABLE OF JBRDBKO ,
wa_e_it_ko  LIKE LINE OF it_e_it_ko,
ld_i_it_sfgdt  TYPE TVS_SFGDT_TAB ,
it_e_it_koet  TYPE STANDARD TABLE OF JBRDBKOET ,
wa_e_it_koet  LIKE LINE OF it_e_it_koet,
ld_i_it_xsfgdt  TYPE RMS_SFGDT_TAB ,
it_e_it_abest  TYPE STANDARD TABLE OF JBRDBABEST ,
wa_e_it_abest  LIKE LINE OF it_e_it_abest,
it_e_it_opti  TYPE STANDARD TABLE OF JBRDBOPTI ,
wa_e_it_opti  LIKE LINE OF it_e_it_opti,
it_e_it_beweg  TYPE STANDARD TABLE OF JBRDBBEWEG ,
wa_e_it_beweg  LIKE LINE OF it_e_it_beweg,
it_e_it_combeweg  TYPE STANDARD TABLE OF JBRDBCOMBEWEG ,
wa_e_it_combeweg  LIKE LINE OF it_e_it_combeweg,
it_e_it_fml  TYPE STANDARD TABLE OF JBRDBFML ,
wa_e_it_fml  LIKE LINE OF it_e_it_fml,
it_e_it_hier  TYPE STANDARD TABLE OF JBRDBHIER ,
wa_e_it_hier  LIKE LINE OF it_e_it_hier,
it_error_itab  TYPE STANDARD TABLE OF BAPIERR ,
wa_error_itab  LIKE LINE OF it_error_itab.

ld_type = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_it_ko to it_e_it_ko.
ld_i_it_sfgdt = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_it_koet to it_e_it_koet.
ld_i_it_xsfgdt = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_it_abest to it_e_it_abest.

"populate fields of struture and append to itab
append wa_e_it_opti to it_e_it_opti.

"populate fields of struture and append to itab
append wa_e_it_beweg to it_e_it_beweg.

"populate fields of struture and append to itab
append wa_e_it_combeweg to it_e_it_combeweg.

"populate fields of struture and append to itab
append wa_e_it_fml to it_e_it_fml.

"populate fields of struture and append to itab
append wa_e_it_hier to it_e_it_hier.

"populate fields of struture and append to itab
append wa_error_itab to it_error_itab.

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