SAP CP_DT_SELECTION_FILL_LIST Function Module for Select sel. rec. from list for new list struct. according to obj. type
CP_DT_SELECTION_FILL_LIST is a standard cp dt selection fill list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Select sel. rec. from list for new list struct. according to obj. type 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 cp dt selection fill list FM, simply by entering the name CP_DT_SELECTION_FILL_LIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: CPDT
Program Name: SAPLCPDT
Main Program: SAPLCPDT
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CP_DT_SELECTION_FILL_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 'CP_DT_SELECTION_FILL_LIST'"Select sel. rec. from list for new list struct. according to obj. type.
EXPORTING
* FLG_OPR_SOP_IMP = 'X' "Treat equally operation and sub-op
* RC27I_ALLIG = 0 "temporary field (allignment proble
RC27I_IMP = "Index field string
TCA11_IMP = "Object field string
IMPORTING
FLG_NOT_FOUND = "Indicator: no appropriate data rec
FLG_NO_LIST = "Indicator: no appropriate list
OBJECT_HIER = "
OBJECT_HIER_EXP = "hierarchically higher-level object
RC27I_ALL = "temporary field (allignment proble
RC27I_ALLIG = "temporary field (allignment proble
RC27I_EXP = "Index field string (correct)
RCLST_EXP = "selected data record from dialog t
IMPORTING Parameters details for CP_DT_SELECTION_FILL_LIST
FLG_OPR_SOP_IMP - Treat equally operation and sub-op
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
RC27I_ALLIG - temporary field (allignment proble
Data type: SY-TABIXOptional: Yes
Call by Reference: No ( called with pass by value option)
RC27I_IMP - Index field string
Data type: RC27IOptional: No
Call by Reference: No ( called with pass by value option)
TCA11_IMP - Object field string
Data type: TCA11Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CP_DT_SELECTION_FILL_LIST
FLG_NOT_FOUND - Indicator: no appropriate data rec
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FLG_NO_LIST - Indicator: no appropriate list
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_HIER -
Data type: RCLST-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT_HIER_EXP - hierarchically higher-level object
Data type: RCLST-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
RC27I_ALL - temporary field (allignment proble
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
RC27I_ALLIG - temporary field (allignment proble
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
RC27I_EXP - Index field string (correct)
Data type: RC27IOptional: No
Call by Reference: No ( called with pass by value option)
RCLST_EXP - selected data record from dialog t
Data type: RCLSTOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CP_DT_SELECTION_FILL_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: | ||||
| lv_flg_not_found | TYPE STRING, " | |||
| lv_flg_opr_sop_imp | TYPE STRING, " 'X' | |||
| lv_flg_no_list | TYPE STRING, " | |||
| lv_rc27i_allig | TYPE SY-TABIX, " 0 | |||
| lv_rc27i_imp | TYPE RC27I, " | |||
| lv_object_hier | TYPE RCLST-OBJECT, " | |||
| lv_tca11_imp | TYPE TCA11, " | |||
| lv_object_hier_exp | TYPE RCLST-OBJECT, " | |||
| lv_rc27i_all | TYPE SY-TABIX, " | |||
| lv_rc27i_allig | TYPE SY-TABIX, " | |||
| lv_rc27i_exp | TYPE RC27I, " | |||
| lv_rclst_exp | TYPE RCLST. " |
|   CALL FUNCTION 'CP_DT_SELECTION_FILL_LIST' "Select sel. rec. from list for new list struct. according to obj. type |
| EXPORTING | ||
| FLG_OPR_SOP_IMP | = lv_flg_opr_sop_imp | |
| RC27I_ALLIG | = lv_rc27i_allig | |
| RC27I_IMP | = lv_rc27i_imp | |
| TCA11_IMP | = lv_tca11_imp | |
| IMPORTING | ||
| FLG_NOT_FOUND | = lv_flg_not_found | |
| FLG_NO_LIST | = lv_flg_no_list | |
| OBJECT_HIER | = lv_object_hier | |
| OBJECT_HIER_EXP | = lv_object_hier_exp | |
| RC27I_ALL | = lv_rc27i_all | |
| RC27I_ALLIG | = lv_rc27i_allig | |
| RC27I_EXP | = lv_rc27i_exp | |
| RCLST_EXP | = lv_rclst_exp | |
| . " CP_DT_SELECTION_FILL_LIST | ||
ABAP code using 7.40 inline data declarations to call FM CP_DT_SELECTION_FILL_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.| DATA(ld_flg_opr_sop_imp) | = 'X'. | |||
| "SELECT single TABIX FROM SY INTO @DATA(ld_rc27i_allig). | ||||
| "SELECT single OBJECT FROM RCLST INTO @DATA(ld_object_hier). | ||||
| "SELECT single OBJECT FROM RCLST INTO @DATA(ld_object_hier_exp). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_rc27i_all). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_rc27i_allig). | ||||
Search for further information about these or an SAP related objects