SAP CDESK_INIT Function Module for NOTRANSL: Initialisierung des Desktops: Allgemeine Daten
CDESK_INIT is a standard cdesk init 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: Initialisierung des Desktops: Allgemeine Daten 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 init FM, simply by entering the name CDESK_INIT 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_INIT 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_INIT'"NOTRANSL: Initialisierung des Desktops: Allgemeine Daten.
EXPORTING
* HOSTNAME = ' ' "Network Address
* CADGROUP = ' ' "
* CADSYSTEM = ' ' "CAD System
* WORKDIRECTORY = ' ' "Work Directory
* CHANGENO = ' ' "Change Number
* VALIDFROM = SY-DATUM "Date and Time, Current (Application Server) Date
* CALLBACK = 'X' "
* CAD_VERSION = ' ' "Version Number of Interface
* PF_HTTP_DEST = ' ' "Function Code That Triggered PAI
* PF_FTP_DEST = ' ' "Function Code That Triggered PAI
IMPORTING
CDESK_VERSION = "
COPY_GEN_STD_PARTS = "
RETURN = "Return Parameter(s)
TABLES
* CAD_REL_APPLS = "
* ADD_CHECKIN_APPLS = "
* ADD_CHECKOUT_APPLS = "
* ADD_COPY_APPLS = "
IMPORTING Parameters details for CDESK_INIT
HOSTNAME - Network Address
Data type: TDWD-NTADRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CADGROUP -
Data type: CDESK_C_GROUPS-CADGROUPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CADSYSTEM - CAD System
Data type: CAD_SYSTEMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WORKDIRECTORY - Work Directory
Data type: BAPI_DOC_FILES2-DOCPATHDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGENO - Change Number
Data type: BAPI_DOC_DRAW-ECNUMBERDefault: SPACE
Optional: 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 -
Data type: BAPI_DOC_AUX-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CAD_VERSION - Version Number of Interface
Data type: CDESK_INTERFACE_VERSIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_HTTP_DEST - Function Code That Triggered PAI
Data type: SY-UCOMMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PF_FTP_DEST - Function Code That Triggered PAI
Data type: SY-UCOMMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CDESK_INIT
CDESK_VERSION -
Data type: CDESK_VERSION-VERSIONOptional: No
Call by Reference: No ( called with pass by value option)
COPY_GEN_STD_PARTS -
Data type: BAPI_DOC_DRAW2-CADINDICATOROptional: 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)
TABLES Parameters details for CDESK_INIT
CAD_REL_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: No ( called with pass by value option)
ADD_CHECKIN_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: No ( called with pass by value option)
ADD_CHECKOUT_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: No ( called with pass by value option)
ADD_COPY_APPLS -
Data type: BAPI_DOC_APPLICATIONSOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CDESK_INIT 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_hostname | TYPE TDWD-NTADR, " SPACE | |||
| lt_cad_rel_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_cdesk_version | TYPE CDESK_VERSION-VERSION, " | |||
| lv_cadgroup | TYPE CDESK_C_GROUPS-CADGROUP, " SPACE | |||
| lv_cadsystem | TYPE CAD_SYSTEM, " SPACE | |||
| lt_add_checkin_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_copy_gen_std_parts | TYPE BAPI_DOC_DRAW2-CADINDICATOR, " | |||
| lv_return | TYPE BAPIRET2, " | |||
| lv_workdirectory | TYPE BAPI_DOC_FILES2-DOCPATH, " SPACE | |||
| lt_add_checkout_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_changeno | TYPE BAPI_DOC_DRAW-ECNUMBER, " SPACE | |||
| lt_add_copy_appls | TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, " | |||
| lv_validfrom | TYPE SY-DATUM, " SY-DATUM | |||
| lv_callback | TYPE BAPI_DOC_AUX-FLAG, " 'X' | |||
| lv_cad_version | TYPE CDESK_INTERFACE_VERSION, " SPACE | |||
| lv_pf_http_dest | TYPE SY-UCOMM, " SPACE | |||
| lv_pf_ftp_dest | TYPE SY-UCOMM. " SPACE |
|   CALL FUNCTION 'CDESK_INIT' "NOTRANSL: Initialisierung des Desktops: Allgemeine Daten |
| EXPORTING | ||
| HOSTNAME | = lv_hostname | |
| CADGROUP | = lv_cadgroup | |
| 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 | ||
| CDESK_VERSION | = lv_cdesk_version | |
| COPY_GEN_STD_PARTS | = lv_copy_gen_std_parts | |
| RETURN | = lv_return | |
| TABLES | ||
| 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_INIT | ||
ABAP code using 7.40 inline data declarations to call FM CDESK_INIT
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_hostname) | = ' '. | |||
| "SELECT single VERSION FROM CDESK_VERSION INTO @DATA(ld_cdesk_version). | ||||
| "SELECT single CADGROUP FROM CDESK_C_GROUPS INTO @DATA(ld_cadgroup). | ||||
| DATA(ld_cadgroup) | = ' '. | |||
| DATA(ld_cadsystem) | = ' '. | |||
| "SELECT single CADINDICATOR FROM BAPI_DOC_DRAW2 INTO @DATA(ld_copy_gen_std_parts). | ||||
| "SELECT single DOCPATH FROM BAPI_DOC_FILES2 INTO @DATA(ld_workdirectory). | ||||
| DATA(ld_workdirectory) | = ' '. | |||
| "SELECT single ECNUMBER FROM BAPI_DOC_DRAW INTO @DATA(ld_changeno). | ||||
| DATA(ld_changeno) | = ' '. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_validfrom). | ||||
| DATA(ld_validfrom) | = SY-DATUM. | |||
| "SELECT single FLAG FROM BAPI_DOC_AUX INTO @DATA(ld_callback). | ||||
| DATA(ld_callback) | = 'X'. | |||
| 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