SAP MATERIAL_READ_DOCUMENTS Function Module for
MATERIAL_READ_DOCUMENTS is a standard material read documents 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 material read documents FM, simply by entering the name MATERIAL_READ_DOCUMENTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: MGML
Program Name: SAPLMGML
Main Program: SAPLMGML
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MATERIAL_READ_DOCUMENTS 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 'MATERIAL_READ_DOCUMENTS'".
EXPORTING
MATNR = "Material number
AKTVSTATUS = "
KZRFB = "
NEUFLAG = "
* NO_DOCS = "
IMPORTING
KZTLB = "Ind.: Technical delivery terms exist
DOKAR_DVS = "Standard document type material (dialog only)
CHANGING
* RMMZU = "Material Master Maintenance: Additional Fields
TABLES
* ITQ09 = "Document types 'tech. delivery terms' (dialog only)
* IDRAD = "Documents for material (dialog only)
IMPORTING Parameters details for MATERIAL_READ_DOCUMENTS
MATNR - Material number
Data type: MARA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
AKTVSTATUS -
Data type: T130M-PSTATOptional: No
Call by Reference: No ( called with pass by value option)
KZRFB -
Data type: MTCOM-KZRFBOptional: No
Call by Reference: No ( called with pass by value option)
NEUFLAG -
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
NO_DOCS -
Data type: T130F-KZREFOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MATERIAL_READ_DOCUMENTS
KZTLB - Ind.: Technical delivery terms exist
Data type: RMMG2-KZTLBOptional: No
Call by Reference: No ( called with pass by value option)
DOKAR_DVS - Standard document type material (dialog only)
Data type: RMMZU-DOKAR_DVSOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for MATERIAL_READ_DOCUMENTS
RMMZU - Material Master Maintenance: Additional Fields
Data type: RMMZUOptional: Yes
Call by Reference: Yes
TABLES Parameters details for MATERIAL_READ_DOCUMENTS
ITQ09 - Document types 'tech. delivery terms' (dialog only)
Data type: TQ09Optional: Yes
Call by Reference: No ( called with pass by value option)
IDRAD - Documents for material (dialog only)
Data type: DRADOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MATERIAL_READ_DOCUMENTS 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_itq09 | TYPE STANDARD TABLE OF TQ09, " | |||
| lv_kztlb | TYPE RMMG2-KZTLB, " | |||
| lv_matnr | TYPE MARA-MATNR, " | |||
| lv_rmmzu | TYPE RMMZU, " | |||
| lt_idrad | TYPE STANDARD TABLE OF DRAD, " | |||
| lv_dokar_dvs | TYPE RMMZU-DOKAR_DVS, " | |||
| lv_aktvstatus | TYPE T130M-PSTAT, " | |||
| lv_kzrfb | TYPE MTCOM-KZRFB, " | |||
| lv_neuflag | TYPE T130F-KZREF, " | |||
| lv_no_docs | TYPE T130F-KZREF. " |
|   CALL FUNCTION 'MATERIAL_READ_DOCUMENTS' " |
| EXPORTING | ||
| MATNR | = lv_matnr | |
| AKTVSTATUS | = lv_aktvstatus | |
| KZRFB | = lv_kzrfb | |
| NEUFLAG | = lv_neuflag | |
| NO_DOCS | = lv_no_docs | |
| IMPORTING | ||
| KZTLB | = lv_kztlb | |
| DOKAR_DVS | = lv_dokar_dvs | |
| CHANGING | ||
| RMMZU | = lv_rmmzu | |
| TABLES | ||
| ITQ09 | = lt_itq09 | |
| IDRAD | = lt_idrad | |
| . " MATERIAL_READ_DOCUMENTS | ||
ABAP code using 7.40 inline data declarations to call FM MATERIAL_READ_DOCUMENTS
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 KZTLB FROM RMMG2 INTO @DATA(ld_kztlb). | ||||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_matnr). | ||||
| "SELECT single DOKAR_DVS FROM RMMZU INTO @DATA(ld_dokar_dvs). | ||||
| "SELECT single PSTAT FROM T130M INTO @DATA(ld_aktvstatus). | ||||
| "SELECT single KZRFB FROM MTCOM INTO @DATA(ld_kzrfb). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_neuflag). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_no_docs). | ||||
Search for further information about these or an SAP related objects