SAP LINE_ITEM_DISPLAY Function Module for Possible entries for line layout variants
LINE_ITEM_DISPLAY is a standard line item display SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Possible entries for line layout variants processing and below is the pattern details for this FM, 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 line item display FM, simply by entering the name LINE_ITEM_DISPLAY into the relevant SAP transaction such as SE37 or SE38.
Function Group: F039
Program Name: SAPLF039
Main Program:
Appliation area:
Release date: 25-Feb-1994
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LINE_ITEM_DISPLAY 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 'LINE_ITEM_DISPLAY'"Possible entries for line layout variants.
EXPORTING
* DISPLAY = ' ' "Display without selection
* KOART = ' ' "Account type
LSTCL = "List category
IMPORTING
VARNR = "Line layout variant
VRBEZ = "Description of the line layout variant
EXCEPTIONS
LSTCL_NOT_VALID = 1 NOTHING_FOUND = 2
IMPORTING Parameters details for LINE_ITEM_DISPLAY
DISPLAY - Display without selection
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KOART - Account type
Data type: T020-KOARTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LSTCL - List category
Data type: T021Z-LSTCLOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LINE_ITEM_DISPLAY
VARNR - Line layout variant
Data type: T021V-VARNROptional: No
Call by Reference: No ( called with pass by value option)
VRBEZ - Description of the line layout variant
Data type: T021T-VRBEZOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
LSTCL_NOT_VALID - invalid list category
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOTHING_FOUND - no line layout variants are available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LINE_ITEM_DISPLAY 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_varnr | TYPE T021V-VARNR, " | |||
| lv_display | TYPE T021V, " SPACE | |||
| lv_lstcl_not_valid | TYPE T021V, " | |||
| lv_koart | TYPE T020-KOART, " SPACE | |||
| lv_vrbez | TYPE T021T-VRBEZ, " | |||
| lv_nothing_found | TYPE T021T, " | |||
| lv_lstcl | TYPE T021Z-LSTCL. " |
|   CALL FUNCTION 'LINE_ITEM_DISPLAY' "Possible entries for line layout variants |
| EXPORTING | ||
| DISPLAY | = lv_display | |
| KOART | = lv_koart | |
| LSTCL | = lv_lstcl | |
| IMPORTING | ||
| VARNR | = lv_varnr | |
| VRBEZ | = lv_vrbez | |
| EXCEPTIONS | ||
| LSTCL_NOT_VALID = 1 | ||
| NOTHING_FOUND = 2 | ||
| . " LINE_ITEM_DISPLAY | ||
ABAP code using 7.40 inline data declarations to call FM LINE_ITEM_DISPLAY
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 VARNR FROM T021V INTO @DATA(ld_varnr). | ||||
| DATA(ld_display) | = ' '. | |||
| "SELECT single KOART FROM T020 INTO @DATA(ld_koart). | ||||
| DATA(ld_koart) | = ' '. | |||
| "SELECT single VRBEZ FROM T021T INTO @DATA(ld_vrbez). | ||||
| "SELECT single LSTCL FROM T021Z INTO @DATA(ld_lstcl). | ||||
Search for further information about these or an SAP related objects