SAP MSR1_CM_GETLIST Function Module for Get List of Customer Master Records
MSR1_CM_GETLIST is a standard msr1 cm getlist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get List of Customer Master Records 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 msr1 cm getlist FM, simply by entering the name MSR1_CM_GETLIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: MSR1_CM
Program Name: SAPLMSR1_CM
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function MSR1_CM_GETLIST 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 'MSR1_CM_GETLIST'"Get List of Customer Master Records.
EXPORTING
* APPLICATION = "Application Name
* PI_VKORG = "Sales organization (MSR_SELECT)
* PI_VTWEG = "Distribution channel (MSR_SELECT)
* PI_SPART = "Division (MSR_SELECT)
* PI_KUNNR = "Customer number (MSR_SELECT)
PI_PARVW = "Partner Function: Sales Employee
* PI_SALES_EMPLOYEE = "Personnel Number (MSR_SELECT)
IMPORTING
RETURN = "Return parameter
TABLES
POT_CUSTOMER = "MSR: Customer Master
IMPORTING Parameters details for MSR1_CM_GETLIST
APPLICATION - Application Name
Data type: MSR_SELECT-APPLICATIONOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_VKORG - Sales organization (MSR_SELECT)
Data type: KNA1VV-VKORGOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_VTWEG - Distribution channel (MSR_SELECT)
Data type: KNA1VV-VTWEGOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_SPART - Division (MSR_SELECT)
Data type: KNA1VV-SPARTOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_KUNNR - Customer number (MSR_SELECT)
Data type: KNA1VV-KUNNROptional: Yes
Call by Reference: No ( called with pass by value option)
PI_PARVW - Partner Function: Sales Employee
Data type: KNVP-PARVWOptional: No
Call by Reference: No ( called with pass by value option)
PI_SALES_EMPLOYEE - Personnel Number (MSR_SELECT)
Data type: KNVP-PERNROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MSR1_CM_GETLIST
RETURN - Return parameter
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MSR1_CM_GETLIST
POT_CUSTOMER - MSR: Customer Master
Data type: MSR1_CUSTOMEROptional: No
Call by Reference: Yes
Copy and paste ABAP code example for MSR1_CM_GETLIST 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_return | TYPE BAPIRET2, " | |||
| lv_application | TYPE MSR_SELECT-APPLICATION, " | |||
| lt_pot_customer | TYPE STANDARD TABLE OF MSR1_CUSTOMER, " | |||
| lv_pi_vkorg | TYPE KNA1VV-VKORG, " | |||
| lv_pi_vtweg | TYPE KNA1VV-VTWEG, " | |||
| lv_pi_spart | TYPE KNA1VV-SPART, " | |||
| lv_pi_kunnr | TYPE KNA1VV-KUNNR, " | |||
| lv_pi_parvw | TYPE KNVP-PARVW, " | |||
| lv_pi_sales_employee | TYPE KNVP-PERNR. " |
|   CALL FUNCTION 'MSR1_CM_GETLIST' "Get List of Customer Master Records |
| EXPORTING | ||
| APPLICATION | = lv_application | |
| PI_VKORG | = lv_pi_vkorg | |
| PI_VTWEG | = lv_pi_vtweg | |
| PI_SPART | = lv_pi_spart | |
| PI_KUNNR | = lv_pi_kunnr | |
| PI_PARVW | = lv_pi_parvw | |
| PI_SALES_EMPLOYEE | = lv_pi_sales_employee | |
| IMPORTING | ||
| RETURN | = lv_return | |
| TABLES | ||
| POT_CUSTOMER | = lt_pot_customer | |
| . " MSR1_CM_GETLIST | ||
ABAP code using 7.40 inline data declarations to call FM MSR1_CM_GETLIST
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 APPLICATION FROM MSR_SELECT INTO @DATA(ld_application). | ||||
| "SELECT single VKORG FROM KNA1VV INTO @DATA(ld_pi_vkorg). | ||||
| "SELECT single VTWEG FROM KNA1VV INTO @DATA(ld_pi_vtweg). | ||||
| "SELECT single SPART FROM KNA1VV INTO @DATA(ld_pi_spart). | ||||
| "SELECT single KUNNR FROM KNA1VV INTO @DATA(ld_pi_kunnr). | ||||
| "SELECT single PARVW FROM KNVP INTO @DATA(ld_pi_parvw). | ||||
| "SELECT single PERNR FROM KNVP INTO @DATA(ld_pi_sales_employee). | ||||
Search for further information about these or an SAP related objects