SAP CDESK_TEST Function Module for Test Function
CDESK_TEST is a standard cdesk test SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Test Function 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 test FM, simply by entering the name CDESK_TEST 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): Normal Function Module
Update:

Function CDESK_TEST 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_TEST'"Test Function.
EXPORTING
* CADSYSTEM = "CAD System
* CADUSER = "User Name
* INITIAL_VIEW = 'CADSTRUCT' "View in CAD Desktop
* TEXT_NAME = "
IMPORTING
TDWST = "Document Status Texts
RETURN = "Return Parameter(s)
EXP_FILENAME = "Path for original file
COPY_GEN_STD_PARTS = "CAD Indicator
IMPORTING Parameters details for CDESK_TEST
CADSYSTEM - CAD System
Data type: CAD_SYSTEMOptional: Yes
Call by Reference: No ( called with pass by value option)
CADUSER - User Name
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
INITIAL_VIEW - View in CAD Desktop
Data type: CDESK_VIEWDefault: 'CADSTRUCT'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT_NAME -
Data type: CDESK_PDOC_LOG-TEXT_NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CDESK_TEST
TDWST - Document Status Texts
Data type: TDWSTOptional: No
Call by Reference: Yes
RETURN - Return Parameter(s)
Data type: BAPIRET2Optional: No
Call by Reference: Yes
EXP_FILENAME - Path for original file
Data type: BAPI_DOC_FILES2-DOCPATHOptional: No
Call by Reference: Yes
COPY_GEN_STD_PARTS - CAD Indicator
Data type: BAPI_DOC_DRAW2-CADINDICATOROptional: No
Call by Reference: Yes
Copy and paste ABAP code example for CDESK_TEST 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_tdwst | TYPE TDWST, " | |||
| lv_cadsystem | TYPE CAD_SYSTEM, " | |||
| lv_return | TYPE BAPIRET2, " | |||
| lv_caduser | TYPE BAPIRET2, " | |||
| lv_exp_filename | TYPE BAPI_DOC_FILES2-DOCPATH, " | |||
| lv_initial_view | TYPE CDESK_VIEW, " 'CADSTRUCT' | |||
| lv_text_name | TYPE CDESK_PDOC_LOG-TEXT_NAME, " | |||
| lv_copy_gen_std_parts | TYPE BAPI_DOC_DRAW2-CADINDICATOR. " |
|   CALL FUNCTION 'CDESK_TEST' "Test Function |
| EXPORTING | ||
| CADSYSTEM | = lv_cadsystem | |
| CADUSER | = lv_caduser | |
| INITIAL_VIEW | = lv_initial_view | |
| TEXT_NAME | = lv_text_name | |
| IMPORTING | ||
| TDWST | = lv_tdwst | |
| RETURN | = lv_return | |
| EXP_FILENAME | = lv_exp_filename | |
| COPY_GEN_STD_PARTS | = lv_copy_gen_std_parts | |
| . " CDESK_TEST | ||
ABAP code using 7.40 inline data declarations to call FM CDESK_TEST
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 DOCPATH FROM BAPI_DOC_FILES2 INTO @DATA(ld_exp_filename). | ||||
| DATA(ld_initial_view) | = 'CADSTRUCT'. | |||
| "SELECT single TEXT_NAME FROM CDESK_PDOC_LOG INTO @DATA(ld_text_name). | ||||
| "SELECT single CADINDICATOR FROM BAPI_DOC_DRAW2 INTO @DATA(ld_copy_gen_std_parts). | ||||
Search for further information about these or an SAP related objects