SAP K_KKB_LIST_FOR_ITEM_SELECTION2 Function Module for List in dialog box for selecting one or more entries (or display only)









K_KKB_LIST_FOR_ITEM_SELECTION2 is a standard k kkb list for item selection2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for List in dialog box for selecting one or more entries (or display only) 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 k kkb list for item selection2 FM, simply by entering the name K_KKB_LIST_FOR_ITEM_SELECTION2 into the relevant SAP transaction such as SE37 or SE38.

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



Function K_KKB_LIST_FOR_ITEM_SELECTION2 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_KKB_LIST_FOR_ITEM_SELECTION2'"List in dialog box for selecting one or more entries (or display only)
EXPORTING
* I_TITLE = "Dialog box title
* I_LINEMARK_FIELDNAME = "
* I_SCROLL_TO_SEL_LINE = 'X' "Scroll to default selection if necessary
* I_SELECTION_OBLIGATORY = 'X' "Character Field Length 1
I_TABNAME = "Table name with chosen values
* I_STATUS = "
IT_FIELDCAT = "Field Catalog with Field Descriptions
* I_CALLBACK_PROGRAM = "
* I_CALLBACK_USER_COMMAND = "
* IT_EXCLUDING = "
* IS_PRIVATE = "
* I_SELECTION = 'X' "(X) = Selection possible, ( ) = Display
* I_ALLOW_NO_SELECTION = "Allow copy although nothing is selected
* I_ZEBRA = ' ' "Line output with alternating color
* I_SCREEN_START_COLUMN = 0 "Coordinates for list in dialog box
* I_SCREEN_START_LINE = 0 "Coordinates for list in dialog box
* I_SCREEN_END_COLUMN = 0 "Coordinates for list in dialog box
* I_SCREEN_END_LINE = 0 "Coordinates for list in dialog box
* I_CHECKBOX_FIELDNAME = "

IMPORTING
ES_SELFIELD = "Selection info for simple selection
E_EXIT = "'X' = Cancel by user

TABLES
T_OUTTAB = "Selection value table
.



IMPORTING Parameters details for K_KKB_LIST_FOR_ITEM_SELECTION2

I_TITLE - Dialog box title

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

I_LINEMARK_FIELDNAME -

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

I_SCROLL_TO_SEL_LINE - Scroll to default selection if necessary

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

I_SELECTION_OBLIGATORY - Character Field Length 1

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

I_TABNAME - Table name with chosen values

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

I_STATUS -

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

IT_FIELDCAT - Field Catalog with Field Descriptions

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

I_CALLBACK_PROGRAM -

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

I_CALLBACK_USER_COMMAND -

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

IT_EXCLUDING -

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

IS_PRIVATE -

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

I_SELECTION - (X) = Selection possible, ( ) = Display

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

I_ALLOW_NO_SELECTION - Allow copy although nothing is selected

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

I_ZEBRA - Line output with alternating color

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

I_SCREEN_START_COLUMN - Coordinates for list in dialog box

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

I_SCREEN_START_LINE - Coordinates for list in dialog box

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

I_SCREEN_END_COLUMN - Coordinates for list in dialog box

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

I_SCREEN_END_LINE - Coordinates for list in dialog box

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

I_CHECKBOX_FIELDNAME -

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

EXPORTING Parameters details for K_KKB_LIST_FOR_ITEM_SELECTION2

ES_SELFIELD - Selection info for simple selection

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

E_EXIT - 'X' = Cancel by user

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

TABLES Parameters details for K_KKB_LIST_FOR_ITEM_SELECTION2

T_OUTTAB - Selection value table

Data type: STANDARD TABLE
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for K_KKB_LIST_FOR_ITEM_SELECTION2 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_title  TYPE SY-TITLE, "   
lt_t_outtab  TYPE STANDARD TABLE OF STANDARD TABLE, "   
lv_es_selfield  TYPE KKBLO_SELFIELD, "   
lv_i_linemark_fieldname  TYPE KKBLO_FIELDNAME, "   
lv_i_scroll_to_sel_line  TYPE CHAR1, "   'X'
lv_i_selection_obligatory  TYPE CHAR1, "   'X'
lv_i_tabname  TYPE KKBLO_TABNAME, "   
lv_i_status  TYPE SY-PFKEY, "   
lv_it_fieldcat  TYPE KKBLO_T_FIELDCAT, "   
lv_i_callback_program  TYPE SY-REPID, "   
lv_i_callback_user_command  TYPE KKBLO_FORMNAME, "   
lv_it_excluding  TYPE KKBLO_T_EXTAB, "   
lv_is_private  TYPE SLIS_DATA_CALLER_EXIT, "   
lv_e_exit  TYPE CHAR1, "   
lv_i_selection  TYPE CHAR1, "   'X'
lv_i_allow_no_selection  TYPE CHAR1, "   
lv_i_zebra  TYPE CHAR1, "   ' '
lv_i_screen_start_column  TYPE I, "   0
lv_i_screen_start_line  TYPE I, "   0
lv_i_screen_end_column  TYPE I, "   0
lv_i_screen_end_line  TYPE I, "   0
lv_i_checkbox_fieldname  TYPE KKBLO_FIELDNAME. "   

  CALL FUNCTION 'K_KKB_LIST_FOR_ITEM_SELECTION2'  "List in dialog box for selecting one or more entries (or display only)
    EXPORTING
         I_TITLE = lv_i_title
         I_LINEMARK_FIELDNAME = lv_i_linemark_fieldname
         I_SCROLL_TO_SEL_LINE = lv_i_scroll_to_sel_line
         I_SELECTION_OBLIGATORY = lv_i_selection_obligatory
         I_TABNAME = lv_i_tabname
         I_STATUS = lv_i_status
         IT_FIELDCAT = lv_it_fieldcat
         I_CALLBACK_PROGRAM = lv_i_callback_program
         I_CALLBACK_USER_COMMAND = lv_i_callback_user_command
         IT_EXCLUDING = lv_it_excluding
         IS_PRIVATE = lv_is_private
         I_SELECTION = lv_i_selection
         I_ALLOW_NO_SELECTION = lv_i_allow_no_selection
         I_ZEBRA = lv_i_zebra
         I_SCREEN_START_COLUMN = lv_i_screen_start_column
         I_SCREEN_START_LINE = lv_i_screen_start_line
         I_SCREEN_END_COLUMN = lv_i_screen_end_column
         I_SCREEN_END_LINE = lv_i_screen_end_line
         I_CHECKBOX_FIELDNAME = lv_i_checkbox_fieldname
    IMPORTING
         ES_SELFIELD = lv_es_selfield
         E_EXIT = lv_e_exit
    TABLES
         T_OUTTAB = lt_t_outtab
. " K_KKB_LIST_FOR_ITEM_SELECTION2




ABAP code using 7.40 inline data declarations to call FM K_KKB_LIST_FOR_ITEM_SELECTION2

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 TITLE FROM SY INTO @DATA(ld_i_title).
 
 
 
 
DATA(ld_i_scroll_to_sel_line) = 'X'.
 
DATA(ld_i_selection_obligatory) = 'X'.
 
 
"SELECT single PFKEY FROM SY INTO @DATA(ld_i_status).
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_callback_program).
 
 
 
 
 
DATA(ld_i_selection) = 'X'.
 
 
DATA(ld_i_zebra) = ' '.
 
 
 
 
 
 


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!