SAP CUX1_DOCUMENT_GET Function Module for NOTRANSL: liefert die Daten (bmp-file,...) eines Dokuments
CUX1_DOCUMENT_GET is a standard cux1 document get 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: liefert die Daten (bmp-file,...) eines Dokuments 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 cux1 document get FM, simply by entering the name CUX1_DOCUMENT_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: CUX1
Program Name: SAPLCUX1
Main Program: SAPLCUX1
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CUX1_DOCUMENT_GET 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 'CUX1_DOCUMENT_GET'"NOTRANSL: liefert die Daten (bmp-file,...) eines Dokuments.
EXPORTING
DOKAR = "
DOKNR = "
DOKTEIL = "
DOKVR = "
* CAD_INSERT = ' ' "
* DATEI_NAME = ' ' "Name of temporary file instead of sy-uname
* ONLY_DATA = 'X' "
IMPORTING
DATEI_NAME_E = "Name of temporary file
EXCEPTIONS
NOT_FOUND = 1 NO_AUTH = 2 NO_ORIGINAL = 3
IMPORTING Parameters details for CUX1_DOCUMENT_GET
DOKAR -
Data type: DRAW-DOKAROptional: No
Call by Reference: No ( called with pass by value option)
DOKNR -
Data type: DRAW-DOKNROptional: No
Call by Reference: No ( called with pass by value option)
DOKTEIL -
Data type: DRAW-DOKTLOptional: No
Call by Reference: No ( called with pass by value option)
DOKVR -
Data type: DRAW-DOKVROptional: No
Call by Reference: No ( called with pass by value option)
CAD_INSERT -
Data type: RCURS-CHECKEDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATEI_NAME - Name of temporary file instead of sy-uname
Data type: DRAW-FILEPDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ONLY_DATA -
Data type: RCURS-CHECKEDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CUX1_DOCUMENT_GET
DATEI_NAME_E - Name of temporary file
Data type: DRAW-FILEPOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTH -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ORIGINAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CUX1_DOCUMENT_GET 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_dokar | TYPE DRAW-DOKAR, " | |||
| lv_not_found | TYPE DRAW, " | |||
| lv_datei_name_e | TYPE DRAW-FILEP, " | |||
| lv_doknr | TYPE DRAW-DOKNR, " | |||
| lv_no_auth | TYPE DRAW, " | |||
| lv_dokteil | TYPE DRAW-DOKTL, " | |||
| lv_no_original | TYPE DRAW, " | |||
| lv_dokvr | TYPE DRAW-DOKVR, " | |||
| lv_cad_insert | TYPE RCURS-CHECKED, " ' ' | |||
| lv_datei_name | TYPE DRAW-FILEP, " ' ' | |||
| lv_only_data | TYPE RCURS-CHECKED. " 'X' |
|   CALL FUNCTION 'CUX1_DOCUMENT_GET' "NOTRANSL: liefert die Daten (bmp-file,...) eines Dokuments |
| EXPORTING | ||
| DOKAR | = lv_dokar | |
| DOKNR | = lv_doknr | |
| DOKTEIL | = lv_dokteil | |
| DOKVR | = lv_dokvr | |
| CAD_INSERT | = lv_cad_insert | |
| DATEI_NAME | = lv_datei_name | |
| ONLY_DATA | = lv_only_data | |
| IMPORTING | ||
| DATEI_NAME_E | = lv_datei_name_e | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| NO_AUTH = 2 | ||
| NO_ORIGINAL = 3 | ||
| . " CUX1_DOCUMENT_GET | ||
ABAP code using 7.40 inline data declarations to call FM CUX1_DOCUMENT_GET
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_dokar). | ||||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_datei_name_e). | ||||
| "SELECT single DOKNR FROM DRAW INTO @DATA(ld_doknr). | ||||
| "SELECT single DOKTL FROM DRAW INTO @DATA(ld_dokteil). | ||||
| "SELECT single DOKVR FROM DRAW INTO @DATA(ld_dokvr). | ||||
| "SELECT single CHECKED FROM RCURS INTO @DATA(ld_cad_insert). | ||||
| DATA(ld_cad_insert) | = ' '. | |||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_datei_name). | ||||
| DATA(ld_datei_name) | = ' '. | |||
| "SELECT single CHECKED FROM RCURS INTO @DATA(ld_only_data). | ||||
| DATA(ld_only_data) | = 'X'. | |||
Search for further information about these or an SAP related objects