SAP RTMATGRP_CREATE_HIER_MD Function Module for Generation of Article Hierarchy Master Data
RTMATGRP_CREATE_HIER_MD is a standard rtmatgrp create hier md SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generation of Article Hierarchy Master Data processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for rtmatgrp create hier md FM, simply by entering the name RTMATGRP_CREATE_HIER_MD into the relevant SAP transaction such as SE37 or SE38.
Function Group: RTMATGRP_HIER
Program Name: SAPLRTMATGRP_HIER
Main Program: SAPLRTMATGRP_HIER
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RTMATGRP_CREATE_HIER_MD pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'RTMATGRP_CREATE_HIER_MD'"Generation of Article Hierarchy Master Data.
EXPORTING
I_MATGRP_HIER = "Hierarchy Structure
* I_DELETE_STRUCT = "Language-Dependent Name of a Hierarchy Node
* I_INSERT_STRUC_BW = "BAPI CREATE Structure: Article Hierarchy
* I_INSERT_SKU_BW = "BAPI CREATE Structure: Article Hierarchy
* I_HIER_DATE = "Stichtag für Neuaufbau der Artikelhierarchie
* I_INSERT_STRUC = "Category Structure
* I_INSERT_MD_SKU = "Article Assignments Table
* I_INSERT_STRUCT = "Language-Dependent Name of a Hierarchy Node
* I_UPDATE_STRUC = "Category Structure
* I_UPDATE_MD_SKU = "Article Assignments Table
* I_UPDATE_STRUCT = "Language-Dependent Name of a Hierarchy Node
* I_DELETE_STRUC = "Category Structure
* I_DELETE_MD_SKU = "Article Assignments Table
IMPORTING
E_RETURN = "Return Value
CHANGING
* I_NODE_MOVE = "Checkbox
IMPORTING Parameters details for RTMATGRP_CREATE_HIER_MD
I_MATGRP_HIER - Hierarchy Structure
Data type: WRF_HIER_STYOptional: No
Call by Reference: Yes
I_DELETE_STRUCT - Language-Dependent Name of a Hierarchy Node
Data type: WRF_MATGRP_STRUCT_TTYOptional: Yes
Call by Reference: Yes
I_INSERT_STRUC_BW - BAPI CREATE Structure: Article Hierarchy
Data type: BAPI_WRF_HIER_CR_STRUC_TTYOptional: Yes
Call by Reference: Yes
I_INSERT_SKU_BW - BAPI CREATE Structure: Article Hierarchy
Data type: BAPI_WRF_HIER_CH_ITEMS_TTYOptional: Yes
Call by Reference: Yes
I_HIER_DATE - Stichtag für Neuaufbau der Artikelhierarchie
Data type: SY-DATUMOptional: Yes
Call by Reference: Yes
I_INSERT_STRUC - Category Structure
Data type: WRF_MATGRP_STRUC_TTYOptional: Yes
Call by Reference: Yes
I_INSERT_MD_SKU - Article Assignments Table
Data type: WRF_MATGRP_SKU_TTYOptional: Yes
Call by Reference: Yes
I_INSERT_STRUCT - Language-Dependent Name of a Hierarchy Node
Data type: WRF_MATGRP_STRUCT_TTYOptional: Yes
Call by Reference: Yes
I_UPDATE_STRUC - Category Structure
Data type: WRF_MATGRP_STRUC_TTYOptional: Yes
Call by Reference: Yes
I_UPDATE_MD_SKU - Article Assignments Table
Data type: WRF_MATGRP_SKU_TTYOptional: Yes
Call by Reference: Yes
I_UPDATE_STRUCT - Language-Dependent Name of a Hierarchy Node
Data type: WRF_MATGRP_STRUCT_TTYOptional: Yes
Call by Reference: Yes
I_DELETE_STRUC - Category Structure
Data type: WRF_MATGRP_STRUC_TTYOptional: Yes
Call by Reference: Yes
I_DELETE_MD_SKU - Article Assignments Table
Data type: WRF_MATGRP_SKU_TTYOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RTMATGRP_CREATE_HIER_MD
E_RETURN - Return Value
Data type: BAPIRET2Optional: No
Call by Reference: Yes
CHANGING Parameters details for RTMATGRP_CREATE_HIER_MD
I_NODE_MOVE - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for RTMATGRP_CREATE_HIER_MD Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_e_return | TYPE BAPIRET2, " | |||
| lv_i_node_move | TYPE XFELD, " | |||
| lv_i_matgrp_hier | TYPE WRF_HIER_STY, " | |||
| lv_i_delete_struct | TYPE WRF_MATGRP_STRUCT_TTY, " | |||
| lv_i_insert_struc_bw | TYPE BAPI_WRF_HIER_CR_STRUC_TTY, " | |||
| lv_i_insert_sku_bw | TYPE BAPI_WRF_HIER_CH_ITEMS_TTY, " | |||
| lv_i_hier_date | TYPE SY-DATUM, " | |||
| lv_i_insert_struc | TYPE WRF_MATGRP_STRUC_TTY, " | |||
| lv_i_insert_md_sku | TYPE WRF_MATGRP_SKU_TTY, " | |||
| lv_i_insert_struct | TYPE WRF_MATGRP_STRUCT_TTY, " | |||
| lv_i_update_struc | TYPE WRF_MATGRP_STRUC_TTY, " | |||
| lv_i_update_md_sku | TYPE WRF_MATGRP_SKU_TTY, " | |||
| lv_i_update_struct | TYPE WRF_MATGRP_STRUCT_TTY, " | |||
| lv_i_delete_struc | TYPE WRF_MATGRP_STRUC_TTY, " | |||
| lv_i_delete_md_sku | TYPE WRF_MATGRP_SKU_TTY. " |
|   CALL FUNCTION 'RTMATGRP_CREATE_HIER_MD' "Generation of Article Hierarchy Master Data |
| EXPORTING | ||
| I_MATGRP_HIER | = lv_i_matgrp_hier | |
| I_DELETE_STRUCT | = lv_i_delete_struct | |
| I_INSERT_STRUC_BW | = lv_i_insert_struc_bw | |
| I_INSERT_SKU_BW | = lv_i_insert_sku_bw | |
| I_HIER_DATE | = lv_i_hier_date | |
| I_INSERT_STRUC | = lv_i_insert_struc | |
| I_INSERT_MD_SKU | = lv_i_insert_md_sku | |
| I_INSERT_STRUCT | = lv_i_insert_struct | |
| I_UPDATE_STRUC | = lv_i_update_struc | |
| I_UPDATE_MD_SKU | = lv_i_update_md_sku | |
| I_UPDATE_STRUCT | = lv_i_update_struct | |
| I_DELETE_STRUC | = lv_i_delete_struc | |
| I_DELETE_MD_SKU | = lv_i_delete_md_sku | |
| IMPORTING | ||
| E_RETURN | = lv_e_return | |
| CHANGING | ||
| I_NODE_MOVE | = lv_i_node_move | |
| . " RTMATGRP_CREATE_HIER_MD | ||
ABAP code using 7.40 inline data declarations to call FM RTMATGRP_CREATE_HIER_MD
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single DATUM FROM SY INTO @DATA(ld_i_hier_date). | ||||
Search for further information about these or an SAP related objects