SAP CVAPI_DOC_CHANGE Function Module for NOTRANSL: DVS: Dokument ändern
CVAPI_DOC_CHANGE is a standard cvapi doc change 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: Dokument ändern 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 cvapi doc change FM, simply by entering the name CVAPI_DOC_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CVAPI01
Program Name: SAPLCVAPI01
Main Program: SAPLCVAPI01
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CVAPI_DOC_CHANGE 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 'CVAPI_DOC_CHANGE'"NOTRANSL: DVS: Dokument ändern.
EXPORTING
PS_DRAW = "Dokumentdaten
* NO_EXIT_CALL = ' ' "
* PF_STATUSLOG = ' ' "Eintrag im Statusprotokoll
* PF_REVLEVEL = "Revisionsstand
* PS_API_CONTROL = "Definition API-Aufruf
* PF_FTP_DEST = ' ' "FTP-Destination
* PF_HTTP_DEST = ' ' "HTTP-Destination
* PF_HOSTNAME = ' ' "Rechnernmame des Frontends
* PF_GUI = "
* PF_ACTION = "
IMPORTING
PSX_MESSAGE = "Return
TABLES
* PT_DRAD_X = "Objektverknüpfungen
* PT_DRAT_X = "Kurztexte
* PT_FILES_X = "Originale
* PT_COMP_X = "Komponenten
IMPORTING Parameters details for CVAPI_DOC_CHANGE
PS_DRAW - Dokumentdaten
Data type: DRAWOptional: No
Call by Reference: No ( called with pass by value option)
NO_EXIT_CALL -
Data type: BAPI_DOC_AUX-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_STATUSLOG - Eintrag im Statusprotokoll
Data type: DRAP-PROTFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_REVLEVEL - Revisionsstand
Data type: MCDOK-REVLVOptional: Yes
Call by Reference: No ( called with pass by value option)
PS_API_CONTROL - Definition API-Aufruf
Data type: CVAPI_API_CONTROLOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_FTP_DEST - FTP-Destination
Data type: RFCDES-RFCDESTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_HTTP_DEST - HTTP-Destination
Data type: RFCDES-RFCDESTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_HOSTNAME - Rechnernmame des Frontends
Data type: TDWD-NTADRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_GUI -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_ACTION -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CVAPI_DOC_CHANGE
PSX_MESSAGE - Return
Data type: MESSAGESOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CVAPI_DOC_CHANGE
PT_DRAD_X - Objektverknüpfungen
Data type: DMS_DB_DRADOptional: Yes
Call by Reference: No ( called with pass by value option)
PT_DRAT_X - Kurztexte
Data type: DMS_DB_DRATOptional: Yes
Call by Reference: No ( called with pass by value option)
PT_FILES_X - Originale
Data type: CVAPI_DOC_FILEOptional: Yes
Call by Reference: No ( called with pass by value option)
PT_COMP_X - Komponenten
Data type: CVAPI_DOC_COMPOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for CVAPI_DOC_CHANGE 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_ps_draw | TYPE DRAW, " | |||
| lt_pt_drad_x | TYPE STANDARD TABLE OF DMS_DB_DRAD, " | |||
| lv_psx_message | TYPE MESSAGES, " | |||
| lv_no_exit_call | TYPE BAPI_DOC_AUX-FLAG, " SPACE | |||
| lt_pt_drat_x | TYPE STANDARD TABLE OF DMS_DB_DRAT, " | |||
| lv_pf_statuslog | TYPE DRAP-PROTF, " SPACE | |||
| lt_pt_files_x | TYPE STANDARD TABLE OF CVAPI_DOC_FILE, " | |||
| lv_pf_revlevel | TYPE MCDOK-REVLV, " | |||
| lt_pt_comp_x | TYPE STANDARD TABLE OF CVAPI_DOC_COMP, " | |||
| lv_ps_api_control | TYPE CVAPI_API_CONTROL, " | |||
| lv_pf_ftp_dest | TYPE RFCDES-RFCDEST, " SPACE | |||
| lv_pf_http_dest | TYPE RFCDES-RFCDEST, " SPACE | |||
| lv_pf_hostname | TYPE TDWD-NTADR, " SPACE | |||
| lv_pf_gui | TYPE STRING, " | |||
| lv_pf_action | TYPE STRING. " |
|   CALL FUNCTION 'CVAPI_DOC_CHANGE' "NOTRANSL: DVS: Dokument ändern |
| EXPORTING | ||
| PS_DRAW | = lv_ps_draw | |
| NO_EXIT_CALL | = lv_no_exit_call | |
| PF_STATUSLOG | = lv_pf_statuslog | |
| PF_REVLEVEL | = lv_pf_revlevel | |
| PS_API_CONTROL | = lv_ps_api_control | |
| PF_FTP_DEST | = lv_pf_ftp_dest | |
| PF_HTTP_DEST | = lv_pf_http_dest | |
| PF_HOSTNAME | = lv_pf_hostname | |
| PF_GUI | = lv_pf_gui | |
| PF_ACTION | = lv_pf_action | |
| IMPORTING | ||
| PSX_MESSAGE | = lv_psx_message | |
| TABLES | ||
| PT_DRAD_X | = lt_pt_drad_x | |
| PT_DRAT_X | = lt_pt_drat_x | |
| PT_FILES_X | = lt_pt_files_x | |
| PT_COMP_X | = lt_pt_comp_x | |
| . " CVAPI_DOC_CHANGE | ||
ABAP code using 7.40 inline data declarations to call FM CVAPI_DOC_CHANGE
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 FLAG FROM BAPI_DOC_AUX INTO @DATA(ld_no_exit_call). | ||||
| DATA(ld_no_exit_call) | = ' '. | |||
| "SELECT single PROTF FROM DRAP INTO @DATA(ld_pf_statuslog). | ||||
| DATA(ld_pf_statuslog) | = ' '. | |||
| "SELECT single REVLV FROM MCDOK INTO @DATA(ld_pf_revlevel). | ||||
| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_pf_ftp_dest). | ||||
| DATA(ld_pf_ftp_dest) | = ' '. | |||
| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_pf_http_dest). | ||||
| DATA(ld_pf_http_dest) | = ' '. | |||
| "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