SAP READ_COMPLETE_DOCUMENT Function Module for NOTRANSL: Verarbeiten komletten Änderungsbeleg Material
READ_COMPLETE_DOCUMENT is a standard read complete document SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Verarbeiten komletten Änderungsbeleg Material 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 read complete document FM, simply by entering the name READ_COMPLETE_DOCUMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: MALH
Program Name: SAPLMALH
Main Program: SAPLMALH
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function READ_COMPLETE_DOCUMENT 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 'READ_COMPLETE_DOCUMENT'"NOTRANSL: Verarbeiten komletten Änderungsbeleg Material.
EXPORTING
* CHANGENR = ' ' "Change Number
DATUM = "Creation date of the change document
* FUTURE = ' ' "Flag Material for Deletion at Client Level
MATNR = "Material Number
IMPORTING
E_MARA = "General Material Data
E_MVKE = "Sales Data for Material
E_MYMS = "LIFO-relevant materials
E_MARC = "Plant Data for Material
E_MARD = "Storage Location Data for Material
E_MARM = "Units of Measure for Material
E_MBEW = "Material Valuation
E_MFHM = "Production Resource Tool (PRT) Fields in the Material Master
E_MLGN = "Material Data for Each Warehouse Number
E_MLGT = "Material Data for Each Storage Type
E_MPOP = "Forecast Parameters
TABLES
MEINH = "Shortened MARM Structure for Change Documents
POS_SAVE = "Header and Item Information in Change Documents
STEUERTAB = "Control Table
EXCEPTIONS
MATERIAL_NOT_FOUND = 1 NO_POSITION_FOUND = 2
IMPORTING Parameters details for READ_COMPLETE_DOCUMENT
CHANGENR - Change Number
Data type: CDHDR-PLANCHNGNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATUM - Creation date of the change document
Data type: CDHDR-UDATEOptional: No
Call by Reference: No ( called with pass by value option)
FUTURE - Flag Material for Deletion at Client Level
Data type: MARA-LVORMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MATNR - Material Number
Data type: CDHDR-OBJECTIDOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for READ_COMPLETE_DOCUMENT
E_MARA - General Material Data
Data type: MARAOptional: No
Call by Reference: No ( called with pass by value option)
E_MVKE - Sales Data for Material
Data type: MVKEOptional: No
Call by Reference: No ( called with pass by value option)
E_MYMS - LIFO-relevant materials
Data type: MYMSOptional: No
Call by Reference: No ( called with pass by value option)
E_MARC - Plant Data for Material
Data type: MARCOptional: No
Call by Reference: No ( called with pass by value option)
E_MARD - Storage Location Data for Material
Data type: MARDOptional: No
Call by Reference: No ( called with pass by value option)
E_MARM - Units of Measure for Material
Data type: MARMOptional: No
Call by Reference: No ( called with pass by value option)
E_MBEW - Material Valuation
Data type: MBEWOptional: No
Call by Reference: No ( called with pass by value option)
E_MFHM - Production Resource Tool (PRT) Fields in the Material Master
Data type: MFHMOptional: No
Call by Reference: No ( called with pass by value option)
E_MLGN - Material Data for Each Warehouse Number
Data type: MLGNOptional: No
Call by Reference: No ( called with pass by value option)
E_MLGT - Material Data for Each Storage Type
Data type: MLGTOptional: No
Call by Reference: No ( called with pass by value option)
E_MPOP - Forecast Parameters
Data type: MPOPOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for READ_COMPLETE_DOCUMENT
MEINH - Shortened MARM Structure for Change Documents
Data type: DMARMOptional: No
Call by Reference: No ( called with pass by value option)
POS_SAVE - Header and Item Information in Change Documents
Data type: MALHOptional: No
Call by Reference: No ( called with pass by value option)
STEUERTAB - Control Table
Data type: MG03STEUEROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MATERIAL_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_POSITION_FOUND - No item found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for READ_COMPLETE_DOCUMENT 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_meinh | TYPE STANDARD TABLE OF DMARM, " | |||
| lv_e_mara | TYPE MARA, " | |||
| lv_changenr | TYPE CDHDR-PLANCHNGNR, " SPACE | |||
| lv_material_not_found | TYPE CDHDR, " | |||
| lv_e_mvke | TYPE MVKE, " | |||
| lv_e_myms | TYPE MYMS, " | |||
| lv_datum | TYPE CDHDR-UDATE, " | |||
| lv_e_marc | TYPE MARC, " | |||
| lt_pos_save | TYPE STANDARD TABLE OF MALH, " | |||
| lv_no_position_found | TYPE MALH, " | |||
| lv_e_mard | TYPE MARD, " | |||
| lv_future | TYPE MARA-LVORM, " SPACE | |||
| lt_steuertab | TYPE STANDARD TABLE OF MG03STEUER, " | |||
| lv_matnr | TYPE CDHDR-OBJECTID, " | |||
| lv_e_marm | TYPE MARM, " | |||
| lv_e_mbew | TYPE MBEW, " | |||
| lv_e_mfhm | TYPE MFHM, " | |||
| lv_e_mlgn | TYPE MLGN, " | |||
| lv_e_mlgt | TYPE MLGT, " | |||
| lv_e_mpop | TYPE MPOP. " |
|   CALL FUNCTION 'READ_COMPLETE_DOCUMENT' "NOTRANSL: Verarbeiten komletten Änderungsbeleg Material |
| EXPORTING | ||
| CHANGENR | = lv_changenr | |
| DATUM | = lv_datum | |
| FUTURE | = lv_future | |
| MATNR | = lv_matnr | |
| IMPORTING | ||
| E_MARA | = lv_e_mara | |
| E_MVKE | = lv_e_mvke | |
| E_MYMS | = lv_e_myms | |
| E_MARC | = lv_e_marc | |
| E_MARD | = lv_e_mard | |
| E_MARM | = lv_e_marm | |
| E_MBEW | = lv_e_mbew | |
| E_MFHM | = lv_e_mfhm | |
| E_MLGN | = lv_e_mlgn | |
| E_MLGT | = lv_e_mlgt | |
| E_MPOP | = lv_e_mpop | |
| TABLES | ||
| MEINH | = lt_meinh | |
| POS_SAVE | = lt_pos_save | |
| STEUERTAB | = lt_steuertab | |
| EXCEPTIONS | ||
| MATERIAL_NOT_FOUND = 1 | ||
| NO_POSITION_FOUND = 2 | ||
| . " READ_COMPLETE_DOCUMENT | ||
ABAP code using 7.40 inline data declarations to call FM READ_COMPLETE_DOCUMENT
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 PLANCHNGNR FROM CDHDR INTO @DATA(ld_changenr). | ||||
| DATA(ld_changenr) | = ' '. | |||
| "SELECT single UDATE FROM CDHDR INTO @DATA(ld_datum). | ||||
| "SELECT single LVORM FROM MARA INTO @DATA(ld_future). | ||||
| DATA(ld_future) | = ' '. | |||
| "SELECT single OBJECTID FROM CDHDR INTO @DATA(ld_matnr). | ||||
Search for further information about these or an SAP related objects