SAP HIERARCHY_EDIT_TOOL Function Module for









HIERARCHY_EDIT_TOOL is a standard hierarchy edit tool SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 hierarchy edit tool FM, simply by entering the name HIERARCHY_EDIT_TOOL into the relevant SAP transaction such as SE37 or SE38.

Function Group: KXHI
Program Name: SAPLKXHI
Main Program: SAPLKXHI
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HIERARCHY_EDIT_TOOL 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 'HIERARCHY_EDIT_TOOL'"
EXPORTING
* APPLCLASS = 'KC' "
* PARAM_STRUCTURE = ' ' "
* PARAM_TEXT = 'D' "
* PARAM_VALUES = 'X' "
* INIT_FLG = ' ' "
* EDIT_FLAG = ' ' "
HIERARCHY_DESCRIPTION = "
HIERARCHY_ID = "
* HIERARCHY_STATE = 'LIST' "
* HIERARCHY_TYPE = 1 "
* OUTPUT_FIELD = 32 "
* OUTPUT_TEXT = 40 "
* PARAM_DOUBLES = 0 "

TABLES
CALLBACK_TAB = "
EXCLUDE_TAB = "
HIERARCHY_TAB = "
VALUES_TAB = "

EXCEPTIONS
HIERARCHY_EMPTY = 1 USER_ABORT = 2
.



IMPORTING Parameters details for HIERARCHY_EDIT_TOOL

APPLCLASS -

Data type: RKB1D-APPLCLASS
Default: 'KC'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PARAM_STRUCTURE -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PARAM_TEXT -

Data type:
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PARAM_VALUES -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

INIT_FLG -

Data type: TKCHA-MFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EDIT_FLAG -

Data type: TKCHA-MFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

HIERARCHY_DESCRIPTION -

Data type: TKCHID
Optional: No
Call by Reference: No ( called with pass by value option)

HIERARCHY_ID -

Data type: V_TKCHH
Optional: No
Call by Reference: No ( called with pass by value option)

HIERARCHY_STATE -

Data type:
Default: 'LIST'
Optional: Yes
Call by Reference: No ( called with pass by value option)

HIERARCHY_TYPE -

Data type:
Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUTPUT_FIELD -

Data type:
Default: 32
Optional: Yes
Call by Reference: No ( called with pass by value option)

OUTPUT_TEXT -

Data type:
Default: 40
Optional: Yes
Call by Reference: No ( called with pass by value option)

PARAM_DOUBLES -

Data type:
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for HIERARCHY_EDIT_TOOL

CALLBACK_TAB -

Data type: TKCHP
Optional: No
Call by Reference: No ( called with pass by value option)

EXCLUDE_TAB -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

HIERARCHY_TAB -

Data type: TKCHA
Optional: No
Call by Reference: No ( called with pass by value option)

VALUES_TAB -

Data type: TKCHS
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

HIERARCHY_EMPTY -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

USER_ABORT -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for HIERARCHY_EDIT_TOOL 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_applclass  TYPE RKB1D-APPLCLASS, "   'KC'
lt_callback_tab  TYPE STANDARD TABLE OF TKCHP, "   
lv_hierarchy_empty  TYPE TKCHP, "   
lv_param_structure  TYPE TKCHP, "   SPACE
lv_param_text  TYPE TKCHP, "   'D'
lv_param_values  TYPE TKCHP, "   'X'
lv_init_flg  TYPE TKCHA-MFLAG, "   SPACE
lv_edit_flag  TYPE TKCHA-MFLAG, "   SPACE
lv_user_abort  TYPE TKCHA, "   
lt_exclude_tab  TYPE STANDARD TABLE OF TKCHA, "   
lt_hierarchy_tab  TYPE STANDARD TABLE OF TKCHA, "   
lv_hierarchy_description  TYPE TKCHID, "   
lt_values_tab  TYPE STANDARD TABLE OF TKCHS, "   
lv_hierarchy_id  TYPE V_TKCHH, "   
lv_hierarchy_state  TYPE V_TKCHH, "   'LIST'
lv_hierarchy_type  TYPE V_TKCHH, "   1
lv_output_field  TYPE V_TKCHH, "   32
lv_output_text  TYPE V_TKCHH, "   40
lv_param_doubles  TYPE V_TKCHH. "   0

  CALL FUNCTION 'HIERARCHY_EDIT_TOOL'  "
    EXPORTING
         APPLCLASS = lv_applclass
         PARAM_STRUCTURE = lv_param_structure
         PARAM_TEXT = lv_param_text
         PARAM_VALUES = lv_param_values
         INIT_FLG = lv_init_flg
         EDIT_FLAG = lv_edit_flag
         HIERARCHY_DESCRIPTION = lv_hierarchy_description
         HIERARCHY_ID = lv_hierarchy_id
         HIERARCHY_STATE = lv_hierarchy_state
         HIERARCHY_TYPE = lv_hierarchy_type
         OUTPUT_FIELD = lv_output_field
         OUTPUT_TEXT = lv_output_text
         PARAM_DOUBLES = lv_param_doubles
    TABLES
         CALLBACK_TAB = lt_callback_tab
         EXCLUDE_TAB = lt_exclude_tab
         HIERARCHY_TAB = lt_hierarchy_tab
         VALUES_TAB = lt_values_tab
    EXCEPTIONS
        HIERARCHY_EMPTY = 1
        USER_ABORT = 2
. " HIERARCHY_EDIT_TOOL




ABAP code using 7.40 inline data declarations to call FM HIERARCHY_EDIT_TOOL

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 APPLCLASS FROM RKB1D INTO @DATA(ld_applclass).
DATA(ld_applclass) = 'KC'.
 
 
 
DATA(ld_param_structure) = ' '.
 
DATA(ld_param_text) = 'D'.
 
DATA(ld_param_values) = 'X'.
 
"SELECT single MFLAG FROM TKCHA INTO @DATA(ld_init_flg).
DATA(ld_init_flg) = ' '.
 
"SELECT single MFLAG FROM TKCHA INTO @DATA(ld_edit_flag).
DATA(ld_edit_flag) = ' '.
 
 
 
 
 
 
 
DATA(ld_hierarchy_state) = 'LIST'.
 
DATA(ld_hierarchy_type) = 1.
 
DATA(ld_output_field) = 32.
 
DATA(ld_output_text) = 40.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!