SAP MMPUR_DOC_UPLOAD Function Module for DVS: Dokument einchecken
MMPUR_DOC_UPLOAD is a standard mmpur doc upload SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for DVS: Dokument einchecken 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 mmpur doc upload FM, simply by entering the name MMPUR_DOC_UPLOAD into the relevant SAP transaction such as SE37 or SE38.
Function Group: OPS_SE_PUR_INFRASTRUCTURE
Program Name: SAPLOPS_SE_PUR_INFRASTRUCTURE
Main Program: SAPLOPS_SE_PUR_INFRASTRUCTURE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 2

Function MMPUR_DOC_UPLOAD 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 'MMPUR_DOC_UPLOAD'"DVS: Dokument einchecken.
EXPORTING
PF_DOKAR = "Dokumentart
PF_DOKNR = "Dokumentnummer
PF_DOKVR = "Dokumentversion
PF_DOKTL = "Teildokument
* PS_DOC_STATUS = "Statusdaten für API
* PF_REPLACE = ' ' "Ersetze aktuelles Original
* PF_CONTENT_PROVIDE = ' ' "Wie wird der Inhalt des Originals übertragen
TABLES
* PT_FILES_X = "Originale
* PT_COMP_X = "Zusatzdateien
* PT_CONTENT = "Originale für Dokumente
IMPORTING Parameters details for MMPUR_DOC_UPLOAD
PF_DOKAR - Dokumentart
Data type: DRAW-DOKAROptional: No
Call by Reference: No ( called with pass by value option)
PF_DOKNR - Dokumentnummer
Data type: DRAW-DOKNROptional: No
Call by Reference: No ( called with pass by value option)
PF_DOKVR - Dokumentversion
Data type: DRAW-DOKVROptional: No
Call by Reference: No ( called with pass by value option)
PF_DOKTL - Teildokument
Data type: DRAW-DOKTLOptional: No
Call by Reference: No ( called with pass by value option)
PS_DOC_STATUS - Statusdaten für API
Data type: CVAPI_DOC_STATUSOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_REPLACE - Ersetze aktuelles Original
Data type: MCDOK-ACTIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_CONTENT_PROVIDE - Wie wird der Inhalt des Originals übertragen
Data type: MCDOK-CONTENT_PROVIDEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MMPUR_DOC_UPLOAD
PT_FILES_X - Originale
Data type: CVAPI_DOC_FILEOptional: Yes
Call by Reference: No ( called with pass by value option)
PT_COMP_X - Zusatzdateien
Data type: CVAPI_DOC_COMPOptional: Yes
Call by Reference: No ( called with pass by value option)
PT_CONTENT - Originale für Dokumente
Data type: DRAOOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MMPUR_DOC_UPLOAD 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_pf_dokar | TYPE DRAW-DOKAR, " | |||
| lt_pt_files_x | TYPE STANDARD TABLE OF CVAPI_DOC_FILE, " | |||
| lv_pf_doknr | TYPE DRAW-DOKNR, " | |||
| lt_pt_comp_x | TYPE STANDARD TABLE OF CVAPI_DOC_COMP, " | |||
| lv_pf_dokvr | TYPE DRAW-DOKVR, " | |||
| lt_pt_content | TYPE STANDARD TABLE OF DRAO, " | |||
| lv_pf_doktl | TYPE DRAW-DOKTL, " | |||
| lv_ps_doc_status | TYPE CVAPI_DOC_STATUS, " | |||
| lv_pf_replace | TYPE MCDOK-ACTION, " SPACE | |||
| lv_pf_content_provide | TYPE MCDOK-CONTENT_PROVIDE. " SPACE |
|   CALL FUNCTION 'MMPUR_DOC_UPLOAD' "DVS: Dokument einchecken |
| EXPORTING | ||
| PF_DOKAR | = lv_pf_dokar | |
| PF_DOKNR | = lv_pf_doknr | |
| PF_DOKVR | = lv_pf_dokvr | |
| PF_DOKTL | = lv_pf_doktl | |
| PS_DOC_STATUS | = lv_ps_doc_status | |
| PF_REPLACE | = lv_pf_replace | |
| PF_CONTENT_PROVIDE | = lv_pf_content_provide | |
| TABLES | ||
| PT_FILES_X | = lt_pt_files_x | |
| PT_COMP_X | = lt_pt_comp_x | |
| PT_CONTENT | = lt_pt_content | |
| . " MMPUR_DOC_UPLOAD | ||
ABAP code using 7.40 inline data declarations to call FM MMPUR_DOC_UPLOAD
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 DOKAR FROM DRAW INTO @DATA(ld_pf_dokar). | ||||
| "SELECT single DOKNR FROM DRAW INTO @DATA(ld_pf_doknr). | ||||
| "SELECT single DOKVR FROM DRAW INTO @DATA(ld_pf_dokvr). | ||||
| "SELECT single DOKTL FROM DRAW INTO @DATA(ld_pf_doktl). | ||||
| "SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_replace). | ||||
| DATA(ld_pf_replace) | = ' '. | |||
| "SELECT single CONTENT_PROVIDE FROM MCDOK INTO @DATA(ld_pf_content_provide). | ||||
| DATA(ld_pf_content_provide) | = ' '. | |||
Search for further information about these or an SAP related objects