SAP CDESK_CREATE_DOCUMENT_RFC Function Module for NOTRANSL: RFC 'Dokument anlegen'
CDESK_CREATE_DOCUMENT_RFC is a standard cdesk create document rfc 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: RFC 'Dokument anlegen' 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 cdesk create document rfc FM, simply by entering the name CDESK_CREATE_DOCUMENT_RFC into the relevant SAP transaction such as SE37 or SE38.
Function Group: CDESK
Program Name: SAPLCDESK
Main Program: SAPLCDESK
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CDESK_CREATE_DOCUMENT_RFC 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 'CDESK_CREATE_DOCUMENT_RFC'"NOTRANSL: RFC 'Dokument anlegen'.
EXPORTING
* HOSTNAME = "Network Address
* CDESK_ACTIVE = 'X' "
* CADSYSTEM = "CAD System
* WORKDIRECTORY = "Path for original file
* CHANGENO = "Change Number
* VALIDFROM = SY-DATUM "Date and Time, Current (Application Server) Date
* CALLBACK = 'X' "New Input Values
* CAD_VERSION = "Version Number of Interface
* PF_HTTP_DEST = ' ' "HTTP Destination
* PF_FTP_DEST = ' ' "FTP destination
IMPORTING
RETURN = "Return Parameter(s)
COPY_GEN_STD_PARTS = "CAD Indicator
CDESK_VERSION = "Version Number of Interface
TABLES
PLM_DOCUMENTS = "
* CAD_REL_APPLS = "
* ADD_CHECKIN_APPLS = "
* ADD_CHECKOUT_APPLS = "
* ADD_COPY_APPLS = "
IMPORTING Parameters details for CDESK_CREATE_DOCUMENT_RFC
HOSTNAME - Network Address
Data type: TDWD-NTADROptional: Yes
Call by Reference: No ( called with pass by value option)
CDESK_ACTIVE -
Data type: XFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CADSYSTEM - CAD System
Data type: CAD_SYSTEMOptional: Yes
Call by Reference: No ( called with pass by value option)
WORKDIRECTORY - Path for original file
Data type: BAPI_DOC_FILES2-DOCPATHOptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGENO - Change Number
Data type: BAPI_DOC_DRAW-ECNUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
VALIDFROM - Date and Time, Current (Application Server) Date
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK - New Input Values
Data type: XFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CAD_VERSION - Version Number of Interface
Data type: CDESK_VERSION-VERSIONOptional: Yes
Call by Reference: No ( called with pass by value option)
PF_HTTP_DEST - HTTP Destination
Data type: SY-UCOMMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_FTP_DEST - FTP destination
Data type: SY-UCOMMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CDESK_CREATE_DOCUMENT_RFC
RETURN - Return Parameter(s)
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
COPY_GEN_STD_PARTS - CAD Indicator
Data type: BAPI_DOC_DRAW2-CADINDICATOROptional: No
Call by Reference: No ( called with pass by value option)
CDESK_VERSION - Version Number of Interface
Data type: CDESK_VERSION-VERSIONOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CDESK_CREATE_DOCUMENT_RFC
PLM_DOCUMENTS -
Data type: PLM_DOCUMENTOptional: No
Call by Reference: Yes
CAD_REL_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: Yes
ADD_CHECKIN_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: Yes
ADD_CHECKOUT_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: Yes
ADD_COPY_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for CDESK_CREATE_DOCUMENT_RFC 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_return | TYPE BAPIRET2, " | |||
| lv_hostname | TYPE TDWD-NTADR, " | |||
| lt_plm_documents | TYPE STANDARD TABLE OF PLM_DOCUMENT, " | |||
| lv_cdesk_active | TYPE XFLAG, " 'X' | |||
| lv_cadsystem | TYPE CAD_SYSTEM, " | |||
| lt_cad_rel_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_copy_gen_std_parts | TYPE BAPI_DOC_DRAW2-CADINDICATOR, " | |||
| lv_cdesk_version | TYPE CDESK_VERSION-VERSION, " | |||
| lv_workdirectory | TYPE BAPI_DOC_FILES2-DOCPATH, " | |||
| lt_add_checkin_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_changeno | TYPE BAPI_DOC_DRAW-ECNUMBER, " | |||
| lt_add_checkout_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_validfrom | TYPE SY-DATUM, " SY-DATUM | |||
| lt_add_copy_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_callback | TYPE XFLAG, " 'X' | |||
| lv_cad_version | TYPE CDESK_VERSION-VERSION, " | |||
| lv_pf_http_dest | TYPE SY-UCOMM, " SPACE | |||
| lv_pf_ftp_dest | TYPE SY-UCOMM. " SPACE |
|   CALL FUNCTION 'CDESK_CREATE_DOCUMENT_RFC' "NOTRANSL: RFC 'Dokument anlegen' |
| EXPORTING | ||
| HOSTNAME | = lv_hostname | |
| CDESK_ACTIVE | = lv_cdesk_active | |
| CADSYSTEM | = lv_cadsystem | |
| WORKDIRECTORY | = lv_workdirectory | |
| CHANGENO | = lv_changeno | |
| VALIDFROM | = lv_validfrom | |
| CALLBACK | = lv_callback | |
| CAD_VERSION | = lv_cad_version | |
| PF_HTTP_DEST | = lv_pf_http_dest | |
| PF_FTP_DEST | = lv_pf_ftp_dest | |
| IMPORTING | ||
| RETURN | = lv_return | |
| COPY_GEN_STD_PARTS | = lv_copy_gen_std_parts | |
| CDESK_VERSION | = lv_cdesk_version | |
| TABLES | ||
| PLM_DOCUMENTS | = lt_plm_documents | |
| CAD_REL_APPLS | = lt_cad_rel_appls | |
| ADD_CHECKIN_APPLS | = lt_add_checkin_appls | |
| ADD_CHECKOUT_APPLS | = lt_add_checkout_appls | |
| ADD_COPY_APPLS | = lt_add_copy_appls | |
| . " CDESK_CREATE_DOCUMENT_RFC | ||
ABAP code using 7.40 inline data declarations to call FM CDESK_CREATE_DOCUMENT_RFC
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 NTADR FROM TDWD INTO @DATA(ld_hostname). | ||||
| DATA(ld_cdesk_active) | = 'X'. | |||
| "SELECT single CADINDICATOR FROM BAPI_DOC_DRAW2 INTO @DATA(ld_copy_gen_std_parts). | ||||
| "SELECT single VERSION FROM CDESK_VERSION INTO @DATA(ld_cdesk_version). | ||||
| "SELECT single DOCPATH FROM BAPI_DOC_FILES2 INTO @DATA(ld_workdirectory). | ||||
| "SELECT single ECNUMBER FROM BAPI_DOC_DRAW INTO @DATA(ld_changeno). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_validfrom). | ||||
| DATA(ld_validfrom) | = SY-DATUM. | |||
| DATA(ld_callback) | = 'X'. | |||
| "SELECT single VERSION FROM CDESK_VERSION INTO @DATA(ld_cad_version). | ||||
| "SELECT single UCOMM FROM SY INTO @DATA(ld_pf_http_dest). | ||||
| DATA(ld_pf_http_dest) | = ' '. | |||
| "SELECT single UCOMM FROM SY INTO @DATA(ld_pf_ftp_dest). | ||||
| DATA(ld_pf_ftp_dest) | = ' '. | |||
Search for further information about these or an SAP related objects