SAP DOCUMENT_CHECK_IN_CHECK_OUT Function Module for NOTRANSL: CHECK-IN- CHECK-OUT-Funktion für Dokumentoriginale
DOCUMENT_CHECK_IN_CHECK_OUT is a standard document check in check out 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: CHECK-IN- CHECK-OUT-Funktion für Dokumentoriginale 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 document check in check out FM, simply by entering the name DOCUMENT_CHECK_IN_CHECK_OUT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CV00
Program Name: SAPLCV00
Main Program: SAPLCV00
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function DOCUMENT_CHECK_IN_CHECK_OUT 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 'DOCUMENT_CHECK_IN_CHECK_OUT'"NOTRANSL: CHECK-IN- CHECK-OUT-Funktion für Dokumentoriginale.
EXPORTING
ACTION = "
* DOC_VERSION = ' ' "Document version
* FTP_DESTINATION = ' ' "
* LOGFIELD = ' ' "Log field
* TMODE = 'N' "Processing mode for transaction
* BATCH_MODE = 'X' "
* TARGETPATH = ' ' "
* TARGETFILE = ' ' "
* COMMIT_FLAG = 'X' "
* CHECK_IN_PATH = ' ' "
* DATA_PATH = ' ' "Relative path for working copy
* DATA_SERVER = ' ' "Data server for working copy
* DISPLAY = "Display address of external system
DOC_NUMBER = "Document number
* DOC_PART = ' ' "Document part
* DOC_STATUS = ' ' "Document status after CHECK IN
DOC_TYPE = "Document type
IMPORTING
COMMANDLINE = "Command line for application display
E_MSGV3 = "Message Variable 3
E_MSGV4 = "Message Variable 4
ERROR = "An error occurred
E_URL = "
RETURN = "Return Parameter(s)
DATA_PATH = "Relative path for working copy
DATA_SERVER = "Data server for working copy
PROGRAM = "Program name for application display
E_MSGTY = "Message Type
E_MSGID = "Message ID
E_MSGNO = "Message Number
E_MSGV1 = "Message Variable 1
E_MSGV2 = "Message Variable 2
TABLES
* GRAPHICS_DATA = "Table of binary data
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCV00_001 Exit for check_in before files transport
EXIT_SAPLCV00_002 Exit for check in after file transport
IMPORTING Parameters details for DOCUMENT_CHECK_IN_CHECK_OUT
ACTION -
Data type: MCDOK-ACTIONOptional: No
Call by Reference: No ( called with pass by value option)
DOC_VERSION - Document version
Data type: DRAW-DOKVRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FTP_DESTINATION -
Data type: RFCDES-RFCDESTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOGFIELD - Log field
Data type: DRAP-PROTFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TMODE - Processing mode for transaction
Data type: MCDOK-ACTIONDefault: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BATCH_MODE -
Data type: MCDOK-MARAFDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TARGETPATH -
Data type: DRAW-FILEPDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TARGETFILE -
Data type: DRAW-FILEPDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMIT_FLAG -
Data type: MCDOK-MARAFDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECK_IN_PATH -
Data type: DRAW-FILEPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATA_PATH - Relative path for working copy
Data type: MCDOK-FILEPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATA_SERVER - Data server for working copy
Data type: MCDOK-DTTRGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY - Display address of external system
Data type: TDWD-NTADROptional: Yes
Call by Reference: No ( called with pass by value option)
DOC_NUMBER - Document number
Data type: DRAW-DOKNROptional: No
Call by Reference: No ( called with pass by value option)
DOC_PART - Document part
Data type: DRAW-DOKTLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOC_STATUS - Document status after CHECK IN
Data type: TDWST-STABKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOC_TYPE - Document type
Data type: DRAW-DOKAROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DOCUMENT_CHECK_IN_CHECK_OUT
COMMANDLINE - Command line for application display
Data type: DRAW-FILEPOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGV3 - Message Variable 3
Data type: SY-MSGV3Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV4 - Message Variable 4
Data type: SY-MSGV4Optional: No
Call by Reference: No ( called with pass by value option)
ERROR - An error occurred
Data type: MCDOK-ACTIONOptional: No
Call by Reference: No ( called with pass by value option)
E_URL -
Data type: SDOKFILACS-URIOptional: No
Call by Reference: No ( called with pass by value option)
RETURN - Return Parameter(s)
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
DATA_PATH - Relative path for working copy
Data type: MCDOK-FILEPOptional: No
Call by Reference: No ( called with pass by value option)
DATA_SERVER - Data server for working copy
Data type: MCDOK-DTTRGOptional: No
Call by Reference: No ( called with pass by value option)
PROGRAM - Program name for application display
Data type: DRAW-FILEPOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGTY - Message Type
Data type: SY-MSGTYOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGID - Message ID
Data type: SY-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGNO - Message Number
Data type: SY-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGV1 - Message Variable 1
Data type: SY-MSGV1Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV2 - Message Variable 2
Data type: SY-MSGV2Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for DOCUMENT_CHECK_IN_CHECK_OUT
GRAPHICS_DATA - Table of binary data
Data type: DRAOOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DOCUMENT_CHECK_IN_CHECK_OUT 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_action | TYPE MCDOK-ACTION, " | |||
| lv_commandline | TYPE DRAW-FILEP, " | |||
| lt_graphics_data | TYPE STANDARD TABLE OF DRAO, " | |||
| lv_e_msgv3 | TYPE SY-MSGV3, " | |||
| lv_doc_version | TYPE DRAW-DOKVR, " SPACE | |||
| lv_e_msgv4 | TYPE SY-MSGV4, " | |||
| lv_ftp_destination | TYPE RFCDES-RFCDEST, " SPACE | |||
| lv_error | TYPE MCDOK-ACTION, " | |||
| lv_logfield | TYPE DRAP-PROTF, " SPACE | |||
| lv_e_url | TYPE SDOKFILACS-URI, " | |||
| lv_tmode | TYPE MCDOK-ACTION, " 'N' | |||
| lv_return | TYPE BAPIRET2, " | |||
| lv_batch_mode | TYPE MCDOK-MARAF, " 'X' | |||
| lv_targetpath | TYPE DRAW-FILEP, " ' ' | |||
| lv_targetfile | TYPE DRAW-FILEP, " ' ' | |||
| lv_commit_flag | TYPE MCDOK-MARAF, " 'X' | |||
| lv_data_path | TYPE MCDOK-FILEP, " | |||
| lv_check_in_path | TYPE DRAW-FILEP, " SPACE | |||
| lv_data_path | TYPE MCDOK-FILEP, " SPACE | |||
| lv_data_server | TYPE MCDOK-DTTRG, " | |||
| lv_program | TYPE DRAW-FILEP, " | |||
| lv_data_server | TYPE MCDOK-DTTRG, " SPACE | |||
| lv_display | TYPE TDWD-NTADR, " | |||
| lv_e_msgty | TYPE SY-MSGTY, " | |||
| lv_e_msgid | TYPE SY-MSGID, " | |||
| lv_doc_number | TYPE DRAW-DOKNR, " | |||
| lv_e_msgno | TYPE SY-MSGNO, " | |||
| lv_doc_part | TYPE DRAW-DOKTL, " SPACE | |||
| lv_e_msgv1 | TYPE SY-MSGV1, " | |||
| lv_doc_status | TYPE TDWST-STABK, " SPACE | |||
| lv_e_msgv2 | TYPE SY-MSGV2, " | |||
| lv_doc_type | TYPE DRAW-DOKAR. " |
|   CALL FUNCTION 'DOCUMENT_CHECK_IN_CHECK_OUT' "NOTRANSL: CHECK-IN- CHECK-OUT-Funktion für Dokumentoriginale |
| EXPORTING | ||
| ACTION | = lv_action | |
| DOC_VERSION | = lv_doc_version | |
| FTP_DESTINATION | = lv_ftp_destination | |
| LOGFIELD | = lv_logfield | |
| TMODE | = lv_tmode | |
| BATCH_MODE | = lv_batch_mode | |
| TARGETPATH | = lv_targetpath | |
| TARGETFILE | = lv_targetfile | |
| COMMIT_FLAG | = lv_commit_flag | |
| CHECK_IN_PATH | = lv_check_in_path | |
| DATA_PATH | = lv_data_path | |
| DATA_SERVER | = lv_data_server | |
| DISPLAY | = lv_display | |
| DOC_NUMBER | = lv_doc_number | |
| DOC_PART | = lv_doc_part | |
| DOC_STATUS | = lv_doc_status | |
| DOC_TYPE | = lv_doc_type | |
| IMPORTING | ||
| COMMANDLINE | = lv_commandline | |
| E_MSGV3 | = lv_e_msgv3 | |
| E_MSGV4 | = lv_e_msgv4 | |
| ERROR | = lv_error | |
| E_URL | = lv_e_url | |
| RETURN | = lv_return | |
| DATA_PATH | = lv_data_path | |
| DATA_SERVER | = lv_data_server | |
| PROGRAM | = lv_program | |
| E_MSGTY | = lv_e_msgty | |
| E_MSGID | = lv_e_msgid | |
| E_MSGNO | = lv_e_msgno | |
| E_MSGV1 | = lv_e_msgv1 | |
| E_MSGV2 | = lv_e_msgv2 | |
| TABLES | ||
| GRAPHICS_DATA | = lt_graphics_data | |
| . " DOCUMENT_CHECK_IN_CHECK_OUT | ||
ABAP code using 7.40 inline data declarations to call FM DOCUMENT_CHECK_IN_CHECK_OUT
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 ACTION FROM MCDOK INTO @DATA(ld_action). | ||||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_commandline). | ||||
| "SELECT single MSGV3 FROM SY INTO @DATA(ld_e_msgv3). | ||||
| "SELECT single DOKVR FROM DRAW INTO @DATA(ld_doc_version). | ||||
| DATA(ld_doc_version) | = ' '. | |||
| "SELECT single MSGV4 FROM SY INTO @DATA(ld_e_msgv4). | ||||
| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_ftp_destination). | ||||
| DATA(ld_ftp_destination) | = ' '. | |||
| "SELECT single ACTION FROM MCDOK INTO @DATA(ld_error). | ||||
| "SELECT single PROTF FROM DRAP INTO @DATA(ld_logfield). | ||||
| DATA(ld_logfield) | = ' '. | |||
| "SELECT single URI FROM SDOKFILACS INTO @DATA(ld_e_url). | ||||
| "SELECT single ACTION FROM MCDOK INTO @DATA(ld_tmode). | ||||
| DATA(ld_tmode) | = 'N'. | |||
| "SELECT single MARAF FROM MCDOK INTO @DATA(ld_batch_mode). | ||||
| DATA(ld_batch_mode) | = 'X'. | |||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_targetpath). | ||||
| DATA(ld_targetpath) | = ' '. | |||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_targetfile). | ||||
| DATA(ld_targetfile) | = ' '. | |||
| "SELECT single MARAF FROM MCDOK INTO @DATA(ld_commit_flag). | ||||
| DATA(ld_commit_flag) | = 'X'. | |||
| "SELECT single FILEP FROM MCDOK INTO @DATA(ld_data_path). | ||||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_check_in_path). | ||||
| DATA(ld_check_in_path) | = ' '. | |||
| "SELECT single FILEP FROM MCDOK INTO @DATA(ld_data_path). | ||||
| DATA(ld_data_path) | = ' '. | |||
| "SELECT single DTTRG FROM MCDOK INTO @DATA(ld_data_server). | ||||
| "SELECT single FILEP FROM DRAW INTO @DATA(ld_program). | ||||
| "SELECT single DTTRG FROM MCDOK INTO @DATA(ld_data_server). | ||||
| DATA(ld_data_server) | = ' '. | |||
| "SELECT single NTADR FROM TDWD INTO @DATA(ld_display). | ||||
| "SELECT single MSGTY FROM SY INTO @DATA(ld_e_msgty). | ||||
| "SELECT single MSGID FROM SY INTO @DATA(ld_e_msgid). | ||||
| "SELECT single DOKNR FROM DRAW INTO @DATA(ld_doc_number). | ||||
| "SELECT single MSGNO FROM SY INTO @DATA(ld_e_msgno). | ||||
| "SELECT single DOKTL FROM DRAW INTO @DATA(ld_doc_part). | ||||
| DATA(ld_doc_part) | = ' '. | |||
| "SELECT single MSGV1 FROM SY INTO @DATA(ld_e_msgv1). | ||||
| "SELECT single STABK FROM TDWST INTO @DATA(ld_doc_status). | ||||
| DATA(ld_doc_status) | = ' '. | |||
| "SELECT single MSGV2 FROM SY INTO @DATA(ld_e_msgv2). | ||||
| "SELECT single DOKAR FROM DRAW INTO @DATA(ld_doc_type). | ||||
Search for further information about these or an SAP related objects