SAP CV120_DOC_GET_FILE Function Module for NOTRANSL: DVS: Dateinamen über Fileselektionsbox
CV120_DOC_GET_FILE is a standard cv120 doc get file 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: DVS: Dateinamen über Fileselektionsbox 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 cv120 doc get file FM, simply by entering the name CV120_DOC_GET_FILE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CV120
Program Name: SAPLCV120
Main Program: SAPLCV120
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CV120_DOC_GET_FILE 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 'CV120_DOC_GET_FILE'"NOTRANSL: DVS: Dateinamen über Fileselektionsbox.
EXPORTING
* PF_DTTRG = "
* PF_PATH = "
* PF_FILE = "Original of Document
* PF_DAPPL = "Application
* PF_MASK1 = "
* PF_MASK2 = '*.*' "
* PF_MODE = 'O' "
* PF_TITLE = '' "Title
* PF_HOSTNAME = ' ' "Network Address
IMPORTING
PFX_FILE = "
PFX_MASK_CHANGE = "
EXCEPTIONS
WRONG_APPL = 1 ERROR = 2
IMPORTING Parameters details for CV120_DOC_GET_FILE
PF_DTTRG -
Data type: DRAW-DTTRGOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_PATH -
Data type: DRAW-FILEPOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_FILE - Original of Document
Data type: DRAW-FILEPOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_DAPPL - Application
Data type: DRAW-DAPPLOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_MASK1 -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
PF_MASK2 -
Data type: CDefault: '*.*'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_MODE -
Data type: CDefault: 'O'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_TITLE - Title
Data type: CDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_HOSTNAME - Network Address
Data type: TDWD-NTADRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CV120_DOC_GET_FILE
PFX_FILE -
Data type: DRAW-FILEPOptional: No
Call by Reference: No ( called with pass by value option)
PFX_MASK_CHANGE -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
WRONG_APPL - Application does not Exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR - Errors
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CV120_DOC_GET_FILE 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_pfx_file | TYPE DRAW-FILEP, " | |||
| lv_pf_dttrg | TYPE DRAW-DTTRG, " | |||
| lv_wrong_appl | TYPE DRAW, " | |||
| lv_error | TYPE DRAW, " | |||
| lv_pf_path | TYPE DRAW-FILEP, " | |||
| lv_pfx_mask_change | TYPE C, " | |||
| lv_pf_file | TYPE DRAW-FILEP, " | |||
| lv_pf_dappl | TYPE DRAW-DAPPL, " | |||
| lv_pf_mask1 | TYPE C, " | |||
| lv_pf_mask2 | TYPE C, " '*,*' | |||
| lv_pf_mode | TYPE C, " 'O' | |||
| lv_pf_title | TYPE C, " '' | |||
| lv_pf_hostname | TYPE TDWD-NTADR. " SPACE |
|   CALL FUNCTION 'CV120_DOC_GET_FILE' "NOTRANSL: DVS: Dateinamen über Fileselektionsbox |
| EXPORTING | ||
| PF_DTTRG | = lv_pf_dttrg | |
| PF_PATH | = lv_pf_path | |
| PF_FILE | = lv_pf_file | |
| PF_DAPPL | = lv_pf_dappl | |
| PF_MASK1 | = lv_pf_mask1 | |
| PF_MASK2 | = lv_pf_mask2 | |
| PF_MODE | = lv_pf_mode | |
| PF_TITLE | = lv_pf_title | |
| PF_HOSTNAME | = lv_pf_hostname | |
| IMPORTING | ||
| PFX_FILE | = lv_pfx_file | |
| PFX_MASK_CHANGE | = lv_pfx_mask_change | |
| EXCEPTIONS | ||
| WRONG_APPL = 1 | ||
| ERROR = 2 | ||
| . " CV120_DOC_GET_FILE | ||
ABAP code using 7.40 inline data declarations to call FM CV120_DOC_GET_FILE
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 FILEP FROM DRAW INTO @DATA(ld_pfx_file). | ||||
| "SELECT single DTTRG FROM DRAW INTO @DATA(ld_pf_dttrg). | ||||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_pf_path). | ||||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_pf_file). | ||||
| "SELECT single DAPPL FROM DRAW INTO @DATA(ld_pf_dappl). | ||||
| DATA(ld_pf_mask2) | = '*.*'. | |||
| DATA(ld_pf_mode) | = 'O'. | |||
| DATA(ld_pf_title) | = ''. | |||
| "SELECT single NTADR FROM TDWD INTO @DATA(ld_pf_hostname). | ||||
| DATA(ld_pf_hostname) | = ' '. | |||
Search for further information about these or an SAP related objects