SAP C0_DM_LST_CTR_READ_BY_LSTNR Function Module for Read loop indexes for list number
C0_DM_LST_CTR_READ_BY_LSTNR is a standard c0 dm lst ctr read by lstnr SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read loop indexes for list number 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 c0 dm lst ctr read by lstnr FM, simply by entering the name C0_DM_LST_CTR_READ_BY_LSTNR into the relevant SAP transaction such as SE37 or SE38.
Function Group: C0DM
Program Name: SAPLC0DM
Main Program: SAPLC0DM
Appliation area: M
Release date: 04-Nov-1992
Mode(Normal, Remote etc): Normal Function Module
Update:

Function C0_DM_LST_CTR_READ_BY_LSTNR 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 'C0_DM_LST_CTR_READ_BY_LSTNR'"Read loop indexes for list number.
EXPORTING
LSTNR_IMP = "List number
IMPORTING
ENTRIES_EXP = "Number of the entries in the list
INDEX_AUF_EXP = "Index on 1st entry of the current
INDEX_END_EXP = "Index on last entry of the list
INDEX_STA_EXP = "Index on 1st entry of the list
PHYKEY_EXP = "Key to which list was set up
RCLSC_EXP = "Record from list control table
TABLES
LST_CTR = "List control table
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for C0_DM_LST_CTR_READ_BY_LSTNR
LSTNR_IMP - List number
Data type: RCLST-LSTNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for C0_DM_LST_CTR_READ_BY_LSTNR
ENTRIES_EXP - Number of the entries in the list
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
INDEX_AUF_EXP - Index on 1st entry of the current
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
INDEX_END_EXP - Index on last entry of the list
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
INDEX_STA_EXP - Index on 1st entry of the list
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
PHYKEY_EXP - Key to which list was set up
Data type: RCLSC-PHYKEYOptional: No
Call by Reference: No ( called with pass by value option)
RCLSC_EXP - Record from list control table
Data type: RCLSCOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for C0_DM_LST_CTR_READ_BY_LSTNR
LST_CTR - List control table
Data type: RCLSCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - For list number, no entry in dialo
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for C0_DM_LST_CTR_READ_BY_LSTNR 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_lst_ctr | TYPE STANDARD TABLE OF RCLSC, " | |||
| lv_lstnr_imp | TYPE RCLST-LSTNR, " | |||
| lv_not_found | TYPE RCLST, " | |||
| lv_entries_exp | TYPE SY-TABIX, " | |||
| lv_index_auf_exp | TYPE SY-TABIX, " | |||
| lv_index_end_exp | TYPE SY-TABIX, " | |||
| lv_index_sta_exp | TYPE SY-TABIX, " | |||
| lv_phykey_exp | TYPE RCLSC-PHYKEY, " | |||
| lv_rclsc_exp | TYPE RCLSC. " |
|   CALL FUNCTION 'C0_DM_LST_CTR_READ_BY_LSTNR' "Read loop indexes for list number |
| EXPORTING | ||
| LSTNR_IMP | = lv_lstnr_imp | |
| IMPORTING | ||
| ENTRIES_EXP | = lv_entries_exp | |
| INDEX_AUF_EXP | = lv_index_auf_exp | |
| INDEX_END_EXP | = lv_index_end_exp | |
| INDEX_STA_EXP | = lv_index_sta_exp | |
| PHYKEY_EXP | = lv_phykey_exp | |
| RCLSC_EXP | = lv_rclsc_exp | |
| TABLES | ||
| LST_CTR | = lt_lst_ctr | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " C0_DM_LST_CTR_READ_BY_LSTNR | ||
ABAP code using 7.40 inline data declarations to call FM C0_DM_LST_CTR_READ_BY_LSTNR
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 LSTNR FROM RCLST INTO @DATA(ld_lstnr_imp). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_entries_exp). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_index_auf_exp). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_index_end_exp). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_index_sta_exp). | ||||
| "SELECT single PHYKEY FROM RCLSC INTO @DATA(ld_phykey_exp). | ||||
Search for further information about these or an SAP related objects