CO Function module Used the same way in S/4HANA

K_LINE_ITEMS_SELECT_AND_LIST Select and List CO Line Items

It is the common selection and list module behind the CO line item reports (KSB1, KOB1, etc.); it reads line items for the given controlling area and object selection and shows them in an ALV. Custom reports can use it to open the standard line item list from their own selection screen, but it is not a released interface. Pass the item group and report object with the same values the standard reports use; if no data is found, the NO_DATA_SELECTED exception is raised.

Function group
KAEP
Remote-enabled (RFC)
No
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
I_CO_AREATKA01-KOKRSControlling areaYes
I_ITEM_GROUPKAEP_ITEM_GROUPLine item groupYes
I_REP_OBJECTKAEP_REP_OBJECTReport objectYes
I_CALLING_REPORTSY-REPIDCalling reportYes
IT_SELECTIONKAEP_T_COSELSelection criteriaYes
I_DISPLAY_VARIANTKAEP_DISVARIANTDisplay variant—
I_NO_DISPLAYCDo not display list (select only)—
IT_FREE_SELECTIONRSDS_TWHEREFree selections—
I_ACTUAL_VERSIONTKA09-VERSNActual version—

Changing parameters

ParameterTypeDescriptionRequired
ER_ALV_GRIDCL_GUI_ALV_GRIDALV grid object—
IT_KAEPX_DATA_CARRIERKAEPX_DATA_CARRIER_TData carrier table—

Tables parameters

ParameterTypeDescriptionRequired
T_ARSELRNG_ARCHIVArchive selection—

Exceptions

  • NO_DATA_SELECTED — No data selected
  • UNKNOWN_ITEM_GROUP — Unknown item group

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'K_LINE_ITEMS_SELECT_AND_LIST'
  EXPORTING
    i_co_area = lv_i_co_area
    i_item_group = lv_i_item_group
    i_rep_object = lv_i_rep_object
    i_calling_report = lv_i_calling_report
    it_selection = lv_it_selection
  CHANGING
    er_alv_grid = lv_er_alv_grid
    it_kaepx_data_carrier = lv_it_kaepx_data_carrier
  TABLES
    t_arsel = lt_t_arsel
  EXCEPTIONS
    no_data_selected = 1
    unknown_item_group = 2
    OTHERS = 3.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report