SAP KAEPX_LINE_ITEM_HIERARCHY Function Module for









KAEPX_LINE_ITEM_HIERARCHY is a standard kaepx line item hierarchy 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 kaepx line item hierarchy FM, simply by entering the name KAEPX_LINE_ITEM_HIERARCHY into the relevant SAP transaction such as SE37 or SE38.

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



Function KAEPX_LINE_ITEM_HIERARCHY 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 'KAEPX_LINE_ITEM_HIERARCHY'"
EXPORTING
I_CALLING_REPORT = "
* IT_FREE_SELECTION_RANGE = "
* I_EXIT_SET_TITLE = "
* I_EXIT_USER_COMMAND = "
* I_SHOWNOZERO = "
* I_FIX_VARIANT = "
* I_ONLINE_MAXSEL = 10000 "
* IT_GROUPS = "
* I_CALLED_WITH_DATA = ' ' "
* I_CALLED_BY_RRI = ' ' "
* I_UPDATE = ' ' "
I_ITEM_GROUP = "
* IT_PD_SELECTION = "
* I_USEDB = 'X' "
* I_USEAR = ' ' "
* I_AROBJ = "
* I_TRANSFER_VERSIONS = 'X' "
* I_NO_DISPLAY = "
* I_USE_GRID = 'X' "
* I_TCODE = "
* I_TREE_DISPLAY = "
* I_HANA_ACTIVE = "
I_REP_OBJECT = "
* I_IMM_OUTPUT = "
* I_DBCON = "
* I_PAROB = "
* I_USPOB = "
* I_DISINT = ' ' "
* I_GROUP_OBJ = 'X' "
* I_DISPLAY_VARIANT = "
I_CO_AREA = "
* I_ACTUAL_VERSION = '000' "
IT_SELECTION = "
* IT_FIELDS = "
* IT_FREE_SELECTION = "

CHANGING
* IT_KAEPX_DATA_CARRIER = "

TABLES
* T_ARSEL = "
* IT_RSTHIE_PS = "
* IT_ELM_PS = "
* IT_RSTHIE = "

EXCEPTIONS
UNKNOWN_ITEM_GROUP = 1 NO_DATA_SELECTED = 2
.



IMPORTING Parameters details for KAEPX_LINE_ITEM_HIERARCHY

I_CALLING_REPORT -

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

IT_FREE_SELECTION_RANGE -

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

I_EXIT_SET_TITLE -

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

I_EXIT_USER_COMMAND -

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

I_SHOWNOZERO -

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

I_FIX_VARIANT -

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

I_ONLINE_MAXSEL -

Data type: KAEP_SETT-MAXSEL
Default: 10000
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_GROUPS -

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

I_CALLED_WITH_DATA -

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

I_CALLED_BY_RRI -

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

I_UPDATE -

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

I_ITEM_GROUP -

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

IT_PD_SELECTION -

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

I_USEDB -

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

I_USEAR -

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

I_AROBJ -

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

I_TRANSFER_VERSIONS -

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

I_NO_DISPLAY -

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

I_USE_GRID -

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

I_TCODE -

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

I_TREE_DISPLAY -

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

I_HANA_ACTIVE -

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

I_REP_OBJECT -

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

I_IMM_OUTPUT -

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

I_DBCON -

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

I_PAROB -

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

I_USPOB -

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

I_DISINT -

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

I_GROUP_OBJ -

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

I_DISPLAY_VARIANT -

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

I_CO_AREA -

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

I_ACTUAL_VERSION -

Data type: TKA09-VERSN
Default: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_SELECTION -

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

IT_FIELDS -

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

IT_FREE_SELECTION -

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

CHANGING Parameters details for KAEPX_LINE_ITEM_HIERARCHY

IT_KAEPX_DATA_CARRIER -

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

TABLES Parameters details for KAEPX_LINE_ITEM_HIERARCHY

T_ARSEL -

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

IT_RSTHIE_PS -

Data type: RSTHIE_M
Optional: Yes
Call by Reference: Yes

IT_ELM_PS -

Data type: ELM_PS
Optional: Yes
Call by Reference: Yes

IT_RSTHIE -

Data type: RSTHIE
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

UNKNOWN_ITEM_GROUP -

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

NO_DATA_SELECTED -

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

Copy and paste ABAP code example for KAEPX_LINE_ITEM_HIERARCHY 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_t_arsel  TYPE STANDARD TABLE OF RNG_ARCHIV, "   
lv_i_calling_report  TYPE SY-REPID, "   
lv_unknown_item_group  TYPE SY, "   
lv_it_kaepx_data_carrier  TYPE KAEPX_DATA_CARRIER_T, "   
lv_it_free_selection_range  TYPE RSDS_TRANGE, "   
lv_i_exit_set_title  TYPE KAEP_FORMNAME, "   
lv_i_exit_user_command  TYPE KAEP_FORMNAME, "   
lv_i_shownozero  TYPE KAEP_SETT-SHOWNOZERO, "   
lv_i_fix_variant  TYPE KAEP_SETT-FIXVAR, "   
lv_i_online_maxsel  TYPE KAEP_SETT-MAXSEL, "   10000
lv_it_groups  TYPE KAEP_T_GROUPS, "   
lv_i_called_with_data  TYPE KAEP_FLAG, "   SPACE
lv_i_called_by_rri  TYPE KAEP_FLAG, "   SPACE
lv_i_update  TYPE KAEP_FLAG, "   SPACE
lt_it_rsthie_ps  TYPE STANDARD TABLE OF RSTHIE_M, "   
lv_i_item_group  TYPE KAEP_ITEM_GROUP, "   
lv_no_data_selected  TYPE KAEP_ITEM_GROUP, "   
lv_it_pd_selection  TYPE KAEP_T_COSEL, "   
lv_i_usedb  TYPE DTINP-XUSEAR, "   'X'
lv_i_usear  TYPE DTINP-XUSEAR, "   SPACE
lv_i_arobj  TYPE ARCH_OBJ-OBJECT, "   
lv_i_transfer_versions  TYPE KAEP_FLAG, "   'X'
lv_i_no_display  TYPE C, "   
lv_i_use_grid  TYPE KAEP_SETT-USEGRD, "   'X'
lv_i_tcode  TYPE SY-TCODE, "   
lv_i_tree_display  TYPE C, "   
lv_i_hana_active  TYPE C, "   
lt_it_elm_ps  TYPE STANDARD TABLE OF ELM_PS, "   
lv_i_rep_object  TYPE KAEP_REP_OBJECT, "   
lv_i_imm_output  TYPE C, "   
lv_i_dbcon  TYPE DBCON_NAME, "   
lv_i_parob  TYPE C, "   
lv_i_uspob  TYPE C, "   
lv_i_disint  TYPE C, "   SPACE
lv_i_group_obj  TYPE C, "   'X'
lt_it_rsthie  TYPE STANDARD TABLE OF RSTHIE, "   
lv_i_display_variant  TYPE KAEP_DISVARIANT, "   
lv_i_co_area  TYPE TKA01-KOKRS, "   
lv_i_actual_version  TYPE TKA09-VERSN, "   '000'
lv_it_selection  TYPE KAEP_T_COSEL, "   
lv_it_fields  TYPE KAEP_T_COSEL, "   
lv_it_free_selection  TYPE RSDS_TWHERE. "   

  CALL FUNCTION 'KAEPX_LINE_ITEM_HIERARCHY'  "
    EXPORTING
         I_CALLING_REPORT = lv_i_calling_report
         IT_FREE_SELECTION_RANGE = lv_it_free_selection_range
         I_EXIT_SET_TITLE = lv_i_exit_set_title
         I_EXIT_USER_COMMAND = lv_i_exit_user_command
         I_SHOWNOZERO = lv_i_shownozero
         I_FIX_VARIANT = lv_i_fix_variant
         I_ONLINE_MAXSEL = lv_i_online_maxsel
         IT_GROUPS = lv_it_groups
         I_CALLED_WITH_DATA = lv_i_called_with_data
         I_CALLED_BY_RRI = lv_i_called_by_rri
         I_UPDATE = lv_i_update
         I_ITEM_GROUP = lv_i_item_group
         IT_PD_SELECTION = lv_it_pd_selection
         I_USEDB = lv_i_usedb
         I_USEAR = lv_i_usear
         I_AROBJ = lv_i_arobj
         I_TRANSFER_VERSIONS = lv_i_transfer_versions
         I_NO_DISPLAY = lv_i_no_display
         I_USE_GRID = lv_i_use_grid
         I_TCODE = lv_i_tcode
         I_TREE_DISPLAY = lv_i_tree_display
         I_HANA_ACTIVE = lv_i_hana_active
         I_REP_OBJECT = lv_i_rep_object
         I_IMM_OUTPUT = lv_i_imm_output
         I_DBCON = lv_i_dbcon
         I_PAROB = lv_i_parob
         I_USPOB = lv_i_uspob
         I_DISINT = lv_i_disint
         I_GROUP_OBJ = lv_i_group_obj
         I_DISPLAY_VARIANT = lv_i_display_variant
         I_CO_AREA = lv_i_co_area
         I_ACTUAL_VERSION = lv_i_actual_version
         IT_SELECTION = lv_it_selection
         IT_FIELDS = lv_it_fields
         IT_FREE_SELECTION = lv_it_free_selection
    CHANGING
         IT_KAEPX_DATA_CARRIER = lv_it_kaepx_data_carrier
    TABLES
         T_ARSEL = lt_t_arsel
         IT_RSTHIE_PS = lt_it_rsthie_ps
         IT_ELM_PS = lt_it_elm_ps
         IT_RSTHIE = lt_it_rsthie
    EXCEPTIONS
        UNKNOWN_ITEM_GROUP = 1
        NO_DATA_SELECTED = 2
. " KAEPX_LINE_ITEM_HIERARCHY




ABAP code using 7.40 inline data declarations to call FM KAEPX_LINE_ITEM_HIERARCHY

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 REPID FROM SY INTO @DATA(ld_i_calling_report).
 
 
 
 
 
 
"SELECT single SHOWNOZERO FROM KAEP_SETT INTO @DATA(ld_i_shownozero).
 
"SELECT single FIXVAR FROM KAEP_SETT INTO @DATA(ld_i_fix_variant).
 
"SELECT single MAXSEL FROM KAEP_SETT INTO @DATA(ld_i_online_maxsel).
DATA(ld_i_online_maxsel) = 10000.
 
 
DATA(ld_i_called_with_data) = ' '.
 
DATA(ld_i_called_by_rri) = ' '.
 
DATA(ld_i_update) = ' '.
 
 
 
 
 
"SELECT single XUSEAR FROM DTINP INTO @DATA(ld_i_usedb).
DATA(ld_i_usedb) = 'X'.
 
"SELECT single XUSEAR FROM DTINP INTO @DATA(ld_i_usear).
DATA(ld_i_usear) = ' '.
 
"SELECT single OBJECT FROM ARCH_OBJ INTO @DATA(ld_i_arobj).
 
DATA(ld_i_transfer_versions) = 'X'.
 
 
"SELECT single USEGRD FROM KAEP_SETT INTO @DATA(ld_i_use_grid).
DATA(ld_i_use_grid) = 'X'.
 
"SELECT single TCODE FROM SY INTO @DATA(ld_i_tcode).
 
 
 
 
 
 
 
 
 
DATA(ld_i_disint) = ' '.
 
DATA(ld_i_group_obj) = 'X'.
 
 
 
"SELECT single KOKRS FROM TKA01 INTO @DATA(ld_i_co_area).
 
"SELECT single VERSN FROM TKA09 INTO @DATA(ld_i_actual_version).
DATA(ld_i_actual_version) = '000'.
 
 
 
 


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!