SAP Function Modules

CVDS_DOCUMENT_CHECKOUT SAP Function module







CVDS_DOCUMENT_CHECKOUT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CVDS_DOCUMENT_CHECKOUT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CVALE
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CVDS_DOCUMENT_CHECKOUT - CVDS DOCUMENT CHECKOUT





CALL FUNCTION 'CVDS_DOCUMENT_CHECKOUT' "
  EXPORTING
    ps_draw =                   " draw          Document Data
*   pf_action = 'V'             " mcdok-action  Action
*   pf_savetype = 'F'           " mcdok-action
*   pf_fileno = '1'             " mcdok-action
*   pf_targetpath = SPACE       " draw-filep    Target Path
*   pf_targetfile = SPACE       " draw-filep    Target File
*   pf_ftp_dest = SPACE         " rfcdes-rfcdest  FTP Destination
  IMPORTING
    ps_messages =               " messages
* TABLES
*   pt_draz =                   " draz
*   pt_drao =                   " drao
*   pt_draoz =                  " draoz
  EXCEPTIONS
    ERROR = 1                   "
    NO_DATA_FOUND = 2           "
    .  "  CVDS_DOCUMENT_CHECKOUT

ABAP code example for Function Module CVDS_DOCUMENT_CHECKOUT





The ABAP code below is a full code listing to execute function module CVDS_DOCUMENT_CHECKOUT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_ps_messages  TYPE MESSAGES ,
it_pt_draz  TYPE STANDARD TABLE OF DRAZ,"TABLES PARAM
wa_pt_draz  LIKE LINE OF it_pt_draz ,
it_pt_drao  TYPE STANDARD TABLE OF DRAO,"TABLES PARAM
wa_pt_drao  LIKE LINE OF it_pt_drao ,
it_pt_draoz  TYPE STANDARD TABLE OF DRAOZ,"TABLES PARAM
wa_pt_draoz  LIKE LINE OF it_pt_draoz .

DATA(ld_ps_draw) = 'Check type of data required'.

DATA(ld_pf_action) = some text here

DATA(ld_pf_savetype) = some text here

DATA(ld_pf_fileno) = some text here

SELECT single FILEP
FROM DRAW
INTO @DATA(ld_pf_targetpath).


SELECT single FILEP
FROM DRAW
INTO @DATA(ld_pf_targetfile).


SELECT single RFCDEST
FROM RFCDES
INTO @DATA(ld_pf_ftp_dest).


"populate fields of struture and append to itab
append wa_pt_draz to it_pt_draz.

"populate fields of struture and append to itab
append wa_pt_drao to it_pt_drao.

"populate fields of struture and append to itab
append wa_pt_draoz to it_pt_draoz. . CALL FUNCTION 'CVDS_DOCUMENT_CHECKOUT' EXPORTING ps_draw = ld_ps_draw * pf_action = ld_pf_action * pf_savetype = ld_pf_savetype * pf_fileno = ld_pf_fileno * pf_targetpath = ld_pf_targetpath * pf_targetfile = ld_pf_targetfile * pf_ftp_dest = ld_pf_ftp_dest IMPORTING ps_messages = ld_ps_messages * TABLES * pt_draz = it_pt_draz * pt_drao = it_pt_drao * pt_draoz = it_pt_draoz EXCEPTIONS ERROR = 1 NO_DATA_FOUND = 2 . " CVDS_DOCUMENT_CHECKOUT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_ps_messages  TYPE MESSAGES ,
ld_ps_draw  TYPE DRAW ,
it_pt_draz  TYPE STANDARD TABLE OF DRAZ ,
wa_pt_draz  LIKE LINE OF it_pt_draz,
ld_pf_action  TYPE MCDOK-ACTION ,
it_pt_drao  TYPE STANDARD TABLE OF DRAO ,
wa_pt_drao  LIKE LINE OF it_pt_drao,
ld_pf_savetype  TYPE MCDOK-ACTION ,
it_pt_draoz  TYPE STANDARD TABLE OF DRAOZ ,
wa_pt_draoz  LIKE LINE OF it_pt_draoz,
ld_pf_fileno  TYPE MCDOK-ACTION ,
ld_pf_targetpath  TYPE DRAW-FILEP ,
ld_pf_targetfile  TYPE DRAW-FILEP ,
ld_pf_ftp_dest  TYPE RFCDES-RFCDEST .

ld_ps_draw = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pt_draz to it_pt_draz.

ld_pf_action = some text here

"populate fields of struture and append to itab
append wa_pt_drao to it_pt_drao.

ld_pf_savetype = some text here

"populate fields of struture and append to itab
append wa_pt_draoz to it_pt_draoz.

ld_pf_fileno = some text here

SELECT single FILEP
FROM DRAW
INTO ld_pf_targetpath.


SELECT single FILEP
FROM DRAW
INTO ld_pf_targetfile.


SELECT single RFCDEST
FROM RFCDES
INTO ld_pf_ftp_dest.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CVDS_DOCUMENT_CHECKOUT or its description.