SAP SRM_RECORD_GETLIST Function Module for
SRM_RECORD_GETLIST is a standard srm record getlist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 srm record getlist FM, simply by entering the name SRM_RECORD_GETLIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: SRM_BAPI_RECORD
Program Name: SAPLSRM_BAPI_RECORD
Main Program: SAPLSRM_BAPI_RECORD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SRM_RECORD_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 'SRM_RECORD_GETLIST'".
EXPORTING
RMS_ID = "Records Management System ID
SPS_ID = "Element Type
* MAX_HITS = "Maximum No. of Hits to be Delivered
IMPORTING
RETURN = "Return Code
TABLES
* PROPERTY_SELECTION = "Properties of Records to Find
RESULTING_LIST = "List of Records Found (Internal ID, Storage Location, Record No., Description)
EXCEPTIONS
NOT_AUTHORIZED = 1 INTERNAL_ERROR = 2 PARAMETER_ERROR = 3
IMPORTING Parameters details for SRM_RECORD_GETLIST
RMS_ID - Records Management System ID
Data type: BAPISRMREC-RMSIDOptional: No
Call by Reference: No ( called with pass by value option)
SPS_ID - Element Type
Data type: BAPISRMREC-SPSIDOptional: No
Call by Reference: No ( called with pass by value option)
MAX_HITS - Maximum No. of Hits to be Delivered
Data type: BAPISRMREC-MAX_HITSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SRM_RECORD_GETLIST
RETURN - Return Code
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SRM_RECORD_GETLIST
PROPERTY_SELECTION - Properties of Records to Find
Data type: BAPIPROPQYOptional: Yes
Call by Reference: No ( called with pass by value option)
RESULTING_LIST - List of Records Found (Internal ID, Storage Location, Record No., Description)
Data type: BAPIDOCTABOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_AUTHORIZED - User Has No Authorization
Data type:Optional: No
Call by Reference: Yes
INTERNAL_ERROR - Internal Error
Data type:Optional: No
Call by Reference: Yes
PARAMETER_ERROR - Wrong parameter
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SRM_RECORD_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_rms_id | TYPE BAPISRMREC-RMSID, " | |||
| lv_not_authorized | TYPE BAPISRMREC, " | |||
| lt_property_selection | TYPE STANDARD TABLE OF BAPIPROPQY, " | |||
| lv_sps_id | TYPE BAPISRMREC-SPSID, " | |||
| lv_internal_error | TYPE BAPISRMREC, " | |||
| lt_resulting_list | TYPE STANDARD TABLE OF BAPIDOCTAB, " | |||
| lv_max_hits | TYPE BAPISRMREC-MAX_HITS, " | |||
| lv_parameter_error | TYPE BAPISRMREC. " |
|   CALL FUNCTION 'SRM_RECORD_GETLIST' " |
| EXPORTING | ||
| RMS_ID | = lv_rms_id | |
| SPS_ID | = lv_sps_id | |
| MAX_HITS | = lv_max_hits | |
| IMPORTING | ||
| RETURN | = lv_return | |
| TABLES | ||
| PROPERTY_SELECTION | = lt_property_selection | |
| RESULTING_LIST | = lt_resulting_list | |
| EXCEPTIONS | ||
| NOT_AUTHORIZED = 1 | ||
| INTERNAL_ERROR = 2 | ||
| PARAMETER_ERROR = 3 | ||
| . " SRM_RECORD_GETLIST | ||
ABAP code using 7.40 inline data declarations to call FM SRM_RECORD_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 RMSID FROM BAPISRMREC INTO @DATA(ld_rms_id). | ||||
| "SELECT single SPSID FROM BAPISRMREC INTO @DATA(ld_sps_id). | ||||
| "SELECT single MAX_HITS FROM BAPISRMREC INTO @DATA(ld_max_hits). | ||||
Search for further information about these or an SAP related objects