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

Function CVAPI_DOC_CHECKIN 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_CHECKIN'"NOTRANSL: DVS: Dokument einchecken.
EXPORTING
PF_DOKAR = "Dokumentart
* PF_REPLACE = ' ' "Ersetze aktuelles Original
* PF_CONTENT_PROVIDE = ' ' "Wie wird der Inhalt des Originals übertragen
PF_DOKNR = "Dokumentnummer
PF_DOKVR = "Dokumentversion
PF_DOKTL = "Teildokument
* PS_DOC_STATUS = "Statusdaten für API
* PF_FTP_DEST = ' ' "FTP-Destination
* PF_HTTP_DEST = ' ' "HTTP-Destination
* PF_HOSTNAME = ' ' "Rechnername
* PS_API_CONTROL = "API-Kontrollstruktur
IMPORTING
PSX_MESSAGE = "Fehlermeldungen
TABLES
* PT_FILES_X = "Originale
* PT_COMP_X = "Zusatzdateien
* PT_CONTENT = "Originale für Dokumente
IMPORTING Parameters details for CVAPI_DOC_CHECKIN
PF_DOKAR - Dokumentart
Data type: DRAW-DOKAROptional: No
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)
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_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 - Rechnername
Data type: TDWD-NTADRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PS_API_CONTROL - API-Kontrollstruktur
Data type: CVAPI_API_CONTROLOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CVAPI_DOC_CHECKIN
PSX_MESSAGE - Fehlermeldungen
Data type: MESSAGESOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CVAPI_DOC_CHECKIN
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: Yes
Copy and paste ABAP code example for CVAPI_DOC_CHECKIN 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_psx_message | TYPE MESSAGES, " | |||
| lv_pf_replace | TYPE MCDOK-ACTION, " SPACE | |||
| lv_pf_content_provide | TYPE MCDOK-CONTENT_PROVIDE, " SPACE | |||
| 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_ftp_dest | TYPE RFCDES-RFCDEST, " SPACE | |||
| lv_pf_http_dest | TYPE RFCDES-RFCDEST, " SPACE | |||
| lv_pf_hostname | TYPE TDWD-NTADR, " SPACE | |||
| lv_ps_api_control | TYPE CVAPI_API_CONTROL. " |
|   CALL FUNCTION 'CVAPI_DOC_CHECKIN' "NOTRANSL: DVS: Dokument einchecken |
| EXPORTING | ||
| PF_DOKAR | = lv_pf_dokar | |
| PF_REPLACE | = lv_pf_replace | |
| PF_CONTENT_PROVIDE | = lv_pf_content_provide | |
| PF_DOKNR | = lv_pf_doknr | |
| PF_DOKVR | = lv_pf_dokvr | |
| PF_DOKTL | = lv_pf_doktl | |
| PS_DOC_STATUS | = lv_ps_doc_status | |
| PF_FTP_DEST | = lv_pf_ftp_dest | |
| PF_HTTP_DEST | = lv_pf_http_dest | |
| PF_HOSTNAME | = lv_pf_hostname | |
| PS_API_CONTROL | = lv_ps_api_control | |
| IMPORTING | ||
| PSX_MESSAGE | = lv_psx_message | |
| TABLES | ||
| PT_FILES_X | = lt_pt_files_x | |
| PT_COMP_X | = lt_pt_comp_x | |
| PT_CONTENT | = lt_pt_content | |
| . " CVAPI_DOC_CHECKIN | ||
ABAP code using 7.40 inline data declarations to call FM CVAPI_DOC_CHECKIN
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 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) | = ' '. | |||
| "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 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