SAP SD_CUSTOMER_HIERARCHY_INIT Function Module for NOTRANSL: Kundenhierarchie-Daten für die allgemeine Hierarchieschnittstell
SD_CUSTOMER_HIERARCHY_INIT is a standard sd customer hierarchy init SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Kundenhierarchie-Daten für die allgemeine Hierarchieschnittstell 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 sd customer hierarchy init FM, simply by entering the name SD_CUSTOMER_HIERARCHY_INIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: V02H
Program Name: SAPLV02H
Main Program: SAPLV02H
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SD_CUSTOMER_HIERARCHY_INIT 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 'SD_CUSTOMER_HIERARCHY_INIT'"NOTRANSL: Kundenhierarchie-Daten für die allgemeine Hierarchieschnittstell.
EXPORTING
I_RSTHVKEY = "Not used
* I_SEL = "Transfer list for hierarchy type/date/sales area
* REQUESTER = ' ' "Not used
* SELLEVEL = ' ' "Not used
* SELMODE = '2' "Not used
* COMPOUND = "
* WITH_TEXTS = ' ' "Not used
TABLES
* I_RSTHIE = "Internal hierarchy table
* I_RSTINT = "Not used
* I_RSTTYP = "Not used
* I_RSTTXT = "Not used
* I_RSTADD = "Not used
EXCEPTIONS
HITYP_NOT_EXIST = 1 DATE_INVALID = 2
IMPORTING Parameters details for SD_CUSTOMER_HIERARCHY_INIT
I_RSTHVKEY - Not used
Data type: RSTHVKEYOptional: No
Call by Reference: No ( called with pass by value option)
I_SEL - Transfer list for hierarchy type/date/sales area
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
REQUESTER - Not used
Data type: RSTHDIVERS-REQUESTERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELLEVEL - Not used
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELMODE - Not used
Data type: RSTHDIVERS-SELMODEDefault: '2'
Optional: Yes
Call by Reference: No ( called with pass by value option)
COMPOUND -
Data type: RSTHDIVERS-COMPOUNDOptional: Yes
Call by Reference: No ( called with pass by value option)
WITH_TEXTS - Not used
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SD_CUSTOMER_HIERARCHY_INIT
I_RSTHIE - Internal hierarchy table
Data type: RSTHIEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RSTINT - Not used
Data type: RSTINTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RSTTYP - Not used
Data type: RSTTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RSTTXT - Not used
Data type: RSTTXTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RSTADD - Not used
Data type: RSTADDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
HITYP_NOT_EXIST - Hierarchy type already exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATE_INVALID - Date invalid
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SD_CUSTOMER_HIERARCHY_INIT 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: | ||||
| lt_i_rsthie | TYPE STANDARD TABLE OF RSTHIE, " | |||
| lv_i_rsthvkey | TYPE RSTHVKEY, " | |||
| lv_hityp_not_exist | TYPE RSTHVKEY, " | |||
| lv_i_sel | TYPE RSTHVKEY, " | |||
| lt_i_rstint | TYPE STANDARD TABLE OF RSTINT, " | |||
| lv_date_invalid | TYPE RSTINT, " | |||
| lt_i_rsttyp | TYPE STANDARD TABLE OF RSTTYP, " | |||
| lv_requester | TYPE RSTHDIVERS-REQUESTER, " SPACE | |||
| lt_i_rsttxt | TYPE STANDARD TABLE OF RSTTXT, " | |||
| lv_sellevel | TYPE RSTTXT, " SPACE | |||
| lv_selmode | TYPE RSTHDIVERS-SELMODE, " '2' | |||
| lt_i_rstadd | TYPE STANDARD TABLE OF RSTADD, " | |||
| lv_compound | TYPE RSTHDIVERS-COMPOUND, " | |||
| lv_with_texts | TYPE RSTHDIVERS. " SPACE |
|   CALL FUNCTION 'SD_CUSTOMER_HIERARCHY_INIT' "NOTRANSL: Kundenhierarchie-Daten für die allgemeine Hierarchieschnittstell |
| EXPORTING | ||
| I_RSTHVKEY | = lv_i_rsthvkey | |
| I_SEL | = lv_i_sel | |
| REQUESTER | = lv_requester | |
| SELLEVEL | = lv_sellevel | |
| SELMODE | = lv_selmode | |
| COMPOUND | = lv_compound | |
| WITH_TEXTS | = lv_with_texts | |
| TABLES | ||
| I_RSTHIE | = lt_i_rsthie | |
| I_RSTINT | = lt_i_rstint | |
| I_RSTTYP | = lt_i_rsttyp | |
| I_RSTTXT | = lt_i_rsttxt | |
| I_RSTADD | = lt_i_rstadd | |
| EXCEPTIONS | ||
| HITYP_NOT_EXIST = 1 | ||
| DATE_INVALID = 2 | ||
| . " SD_CUSTOMER_HIERARCHY_INIT | ||
ABAP code using 7.40 inline data declarations to call FM SD_CUSTOMER_HIERARCHY_INIT
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 REQUESTER FROM RSTHDIVERS INTO @DATA(ld_requester). | ||||
| DATA(ld_requester) | = ' '. | |||
| DATA(ld_sellevel) | = ' '. | |||
| "SELECT single SELMODE FROM RSTHDIVERS INTO @DATA(ld_selmode). | ||||
| DATA(ld_selmode) | = '2'. | |||
| "SELECT single COMPOUND FROM RSTHDIVERS INTO @DATA(ld_compound). | ||||
| DATA(ld_with_texts) | = ' '. | |||
Search for further information about these or an SAP related objects