SAP K_LINE_ITEMS_SELECT_AND_LIST Function Module for









K_LINE_ITEMS_SELECT_AND_LIST is a standard k line items select and list 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 line items select and list FM, simply by entering the name K_LINE_ITEMS_SELECT_AND_LIST into the relevant SAP transaction such as SE37 or SE38.

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



Function K_LINE_ITEMS_SELECT_AND_LIST 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_LINE_ITEMS_SELECT_AND_LIST'"
EXPORTING
I_CALLING_REPORT = "Calling Program
* 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 = ' ' "
* IT_PD_SELECTION = "
I_ITEM_GROUP = "Line Item Type
* I_USEDB = 'X' "
* I_USEAR = ' ' "
* I_AROBJ = "Archiving Object
* I_TRANSFER_VERSIONS = 'X' "
* I_NO_DISPLAY = "
* I_USE_GRID = 'X' "Use ALV Grid as Output for Line Item Reports
* I_TCODE = "Current Transaction Code
* I_TREE_DISPLAY = "
* I_CONTAINER = "
* I_HANA_ACTIVE = "
I_REP_OBJECT = "Report Object
* I_TOP_OF_PAGE_CONTAINER = "
* I_GROUP_OBJ = 'X' "
* I_SOH_ACTIVE = "
* I_DISPLAY_VARIANT = "Layout
I_CO_AREA = "Controlling Area
* I_ACTUAL_VERSION = '000' "
IT_SELECTION = "
* IT_FREE_SELECTION = "
* IT_FREE_SELECTION_RANGE = "

CHANGING
* IT_KAEPX_DATA_CARRIER = "
* ER_ALV_GRID = "

TABLES
* T_ARSEL = "Archives

EXCEPTIONS
UNKNOWN_ITEM_GROUP = 1 NO_DATA_SELECTED = 2
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLKAEP_001 Line Item Reports in Actual: Customer-Specific Fields in Display Variant
EXIT_SAPLKAEP_002 Line Item Reports in Plan: Customer-Specific Fields in Display Variant
EXIT_SAPLKAEP_003 Line Item Reports in Commit.:Customer-Specific Fields in Display Variant
EXIT_SAPLKAEP_004 Line Item Reports Budget: Customer-Specific Fields in Display Variant
EXIT_SAPLKAEP_005 Line Item Reports in Actual: Customer-Specific Authorization Check
EXIT_SAPLKAEP_006 Line Item Reports in Plan: Customer-Specific Authorization Check
EXIT_SAPLKAEP_007 Line Item Reports in Commitment: Customer-Specific Authorization Check
EXIT_SAPLKAEP_008 Line Item Reports Budget: Customer-Specific Authorization Check
EXIT_SAPLKAEP_009 Line Item Reports: Customer-Specific Preparation of Lists

IMPORTING Parameters details for K_LINE_ITEMS_SELECT_AND_LIST

I_CALLING_REPORT - Calling Program

Data type: SY-REPID
Optional: No
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)

IT_PD_SELECTION -

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

I_ITEM_GROUP - Line Item Type

Data type: KAEP_ITEM_GROUP
Optional: No
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 - Archiving Object

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 - Use ALV Grid as Output for Line Item Reports

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

I_TCODE - Current Transaction Code

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_CONTAINER -

Data type: CL_GUI_CUSTOM_CONTAINER
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 - Report Object

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

I_TOP_OF_PAGE_CONTAINER -

Data type: CL_GUI_CUSTOM_CONTAINER
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_SOH_ACTIVE -

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

I_DISPLAY_VARIANT - Layout

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

I_CO_AREA - Controlling 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_FREE_SELECTION -

Data type: RSDS_TWHERE
Optional: Yes
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)

CHANGING Parameters details for K_LINE_ITEMS_SELECT_AND_LIST

IT_KAEPX_DATA_CARRIER -

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

ER_ALV_GRID -

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

TABLES Parameters details for K_LINE_ITEMS_SELECT_AND_LIST

T_ARSEL - Archives

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

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 K_LINE_ITEMS_SELECT_AND_LIST 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_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
lv_it_pd_selection  TYPE KAEP_T_COSEL, "   
lv_er_alv_grid  TYPE CL_GUI_ALV_GRID, "   
lv_i_item_group  TYPE KAEP_ITEM_GROUP, "   
lv_no_data_selected  TYPE KAEP_ITEM_GROUP, "   
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_container  TYPE CL_GUI_CUSTOM_CONTAINER, "   
lv_i_hana_active  TYPE C, "   
lv_i_rep_object  TYPE KAEP_REP_OBJECT, "   
lv_i_top_of_page_container  TYPE CL_GUI_CUSTOM_CONTAINER, "   
lv_i_group_obj  TYPE C, "   'X'
lv_i_soh_active  TYPE C, "   
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_free_selection  TYPE RSDS_TWHERE, "   
lv_it_free_selection_range  TYPE RSDS_TRANGE. "   

  CALL FUNCTION 'K_LINE_ITEMS_SELECT_AND_LIST'  "
    EXPORTING
         I_CALLING_REPORT = lv_i_calling_report
         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
         IT_PD_SELECTION = lv_it_pd_selection
         I_ITEM_GROUP = lv_i_item_group
         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_CONTAINER = lv_i_container
         I_HANA_ACTIVE = lv_i_hana_active
         I_REP_OBJECT = lv_i_rep_object
         I_TOP_OF_PAGE_CONTAINER = lv_i_top_of_page_container
         I_GROUP_OBJ = lv_i_group_obj
         I_SOH_ACTIVE = lv_i_soh_active
         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_FREE_SELECTION = lv_it_free_selection
         IT_FREE_SELECTION_RANGE = lv_it_free_selection_range
    CHANGING
         IT_KAEPX_DATA_CARRIER = lv_it_kaepx_data_carrier
         ER_ALV_GRID = lv_er_alv_grid
    TABLES
         T_ARSEL = lt_t_arsel
    EXCEPTIONS
        UNKNOWN_ITEM_GROUP = 1
        NO_DATA_SELECTED = 2
. " K_LINE_ITEMS_SELECT_AND_LIST




ABAP code using 7.40 inline data declarations to call FM K_LINE_ITEMS_SELECT_AND_LIST

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_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!