SAP K_KKHIE_HIERARCHY_SHOW Function Module for









K_KKHIE_HIERARCHY_SHOW is a standard k kkhie hierarchy show 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 k kkhie hierarchy show FM, simply by entering the name K_KKHIE_HIERARCHY_SHOW into the relevant SAP transaction such as SE37 or SE38.

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



Function K_KKHIE_HIERARCHY_SHOW 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 'K_KKHIE_HIERARCHY_SHOW'"
EXPORTING
* I_LEVEL = 1 "maximum output level during hierarchy display
* I_ANW = '0' "
* I_INIT = 'X' "
* I_HIE_FOCUS = "
* I_FORM = "
* I_PROGRAM = "
* I_ANZART = 'S' "
I_KOKRS = "

IMPORTING
E_FUNCTION = "
E_TABIX = "
E_HIE_FOCUS = "

TABLES
* T_EXCL_FUNC = "inactive functions (category CHAR4)
T_KKHIE = "hierarchy table to be output

EXCEPTIONS
INVALID_INPUT = 1 NO_HIERARCHY = 2
.



IMPORTING Parameters details for K_KKHIE_HIERARCHY_SHOW

I_LEVEL - maximum output level during hierarchy display

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

I_ANW -

Data type: SY-INPUT
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_INIT -

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

I_HIE_FOCUS -

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

I_FORM -

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

I_PROGRAM -

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

I_ANZART -

Data type: SY-INPUT
Default: 'S'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KOKRS -

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

EXPORTING Parameters details for K_KKHIE_HIERARCHY_SHOW

E_FUNCTION -

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

E_TABIX -

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

E_HIE_FOCUS -

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

TABLES Parameters details for K_KKHIE_HIERARCHY_SHOW

T_EXCL_FUNC - inactive functions (category CHAR4)

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

T_KKHIE - hierarchy table to be output

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

EXCEPTIONS details

INVALID_INPUT - incorrect input values

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

NO_HIERARCHY - empty hierarchy table

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

Copy and paste ABAP code example for K_KKHIE_HIERARCHY_SHOW 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_i_level  TYPE KKHIE-STUFE, "   1
lv_e_function  TYPE SY-TCODE, "   
lt_t_excl_func  TYPE STANDARD TABLE OF SY, "   
lv_invalid_input  TYPE SY, "   
lv_i_anw  TYPE SY-INPUT, "   '0'
lv_e_tabix  TYPE SY-TABIX, "   
lt_t_kkhie  TYPE STANDARD TABLE OF KKHIE, "   
lv_no_hierarchy  TYPE KKHIE, "   
lv_i_init  TYPE SY-INPUT, "   'X'
lv_e_hie_focus  TYPE KKHIE, "   
lv_i_hie_focus  TYPE KKHIE, "   
lv_i_form  TYPE KKHIE, "   
lv_i_program  TYPE SY-REPID, "   
lv_i_anzart  TYPE SY-INPUT, "   'S'
lv_i_kokrs  TYPE TKA01-KOKRS. "   

  CALL FUNCTION 'K_KKHIE_HIERARCHY_SHOW'  "
    EXPORTING
         I_LEVEL = lv_i_level
         I_ANW = lv_i_anw
         I_INIT = lv_i_init
         I_HIE_FOCUS = lv_i_hie_focus
         I_FORM = lv_i_form
         I_PROGRAM = lv_i_program
         I_ANZART = lv_i_anzart
         I_KOKRS = lv_i_kokrs
    IMPORTING
         E_FUNCTION = lv_e_function
         E_TABIX = lv_e_tabix
         E_HIE_FOCUS = lv_e_hie_focus
    TABLES
         T_EXCL_FUNC = lt_t_excl_func
         T_KKHIE = lt_t_kkhie
    EXCEPTIONS
        INVALID_INPUT = 1
        NO_HIERARCHY = 2
. " K_KKHIE_HIERARCHY_SHOW




ABAP code using 7.40 inline data declarations to call FM K_KKHIE_HIERARCHY_SHOW

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 STUFE FROM KKHIE INTO @DATA(ld_i_level).
DATA(ld_i_level) = 1.
 
"SELECT single TCODE FROM SY INTO @DATA(ld_e_function).
 
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_i_anw).
DATA(ld_i_anw) = '0'.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_e_tabix).
 
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_i_init).
DATA(ld_i_init) = 'X'.
 
 
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_program).
 
"SELECT single INPUT FROM SY INTO @DATA(ld_i_anzart).
DATA(ld_i_anzart) = 'S'.
 
"SELECT single KOKRS FROM TKA01 INTO @DATA(ld_i_kokrs).
 


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!