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-PLANCHNGNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATUM - Creation date of the change document

Data type: CDHDR-UDATE
Optional: No
Call by Reference: No ( called with pass by value option)

FUTURE - Flag Material for Deletion at Client Level

Data type: MARA-LVORM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

MATNR - Material Number

Data type: CDHDR-OBJECTID
Optional: 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: MARA
Optional: No
Call by Reference: No ( called with pass by value option)

E_MVKE - Sales Data for Material

Data type: MVKE
Optional: No
Call by Reference: No ( called with pass by value option)

E_MYMS - LIFO-relevant materials

Data type: MYMS
Optional: No
Call by Reference: No ( called with pass by value option)

E_MARC - Plant Data for Material

Data type: MARC
Optional: No
Call by Reference: No ( called with pass by value option)

E_MARD - Storage Location Data for Material

Data type: MARD
Optional: No
Call by Reference: No ( called with pass by value option)

E_MARM - Units of Measure for Material

Data type: MARM
Optional: No
Call by Reference: No ( called with pass by value option)

E_MBEW - Material Valuation

Data type: MBEW
Optional: No
Call by Reference: No ( called with pass by value option)

E_MFHM - Production Resource Tool (PRT) Fields in the Material Master

Data type: MFHM
Optional: No
Call by Reference: No ( called with pass by value option)

E_MLGN - Material Data for Each Warehouse Number

Data type: MLGN
Optional: No
Call by Reference: No ( called with pass by value option)

E_MLGT - Material Data for Each Storage Type

Data type: MLGT
Optional: No
Call by Reference: No ( called with pass by value option)

E_MPOP - Forecast Parameters

Data type: MPOP
Optional: 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: DMARM
Optional: No
Call by Reference: No ( called with pass by value option)

POS_SAVE - Header and Item Information in Change Documents

Data type: MALH
Optional: No
Call by Reference: No ( called with pass by value option)

STEUERTAB - Control Table

Data type: MG03STEUER
Optional: 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



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!