SAP CDESK_COPY_AND_REPLACE_RFC Function Module for NOTRANSL: RFC 'Kopieren und Ersetzen'









CDESK_COPY_AND_REPLACE_RFC is a standard cdesk copy and replace 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 'Kopieren und Ersetzen' 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 copy and replace rfc FM, simply by entering the name CDESK_COPY_AND_REPLACE_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_COPY_AND_REPLACE_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_COPY_AND_REPLACE_RFC'"NOTRANSL: RFC 'Kopieren und Ersetzen'
EXPORTING
* HOSTNAME = ' ' "Network Address
* CDESK_ACTIVE = 'X' "
* CADSYSTEM = ' ' "CAD System
* WORKDIRECTORY = ' ' "Work Directory
* CHANGENO = ' ' "Change Number
* VALIDFROM = SY-DATUM "Date
* CALLBACK = 'X' "
* CAD_VERSION = ' ' "Version Number of Interface
* PF_HTTP_DEST = ' ' "HTTP Destination
* PF_FTP_DEST = ' ' "FTP destination

IMPORTING
CDESK_VERSION = "Version Number of Interface
COPY_GEN_STD_PARTS = "CAD Indicator
RETURN = "Return Parameter(s)

TABLES
* CAD_REL_APPLS = "
* ADD_CHECKIN_APPLS = "
* ADD_CHECKOUT_APPLS = "
* ADD_COPY_APPLS = "
PLM_DOCUMENTS = "
PLM_DOCUMENTS_NEW = "
.



IMPORTING Parameters details for CDESK_COPY_AND_REPLACE_RFC

HOSTNAME - Network Address

Data type: TDWD-NTADR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CDESK_ACTIVE -

Data type: XFLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CADSYSTEM - CAD System

Data type: CAD_SYSTEM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

WORKDIRECTORY - Work Directory

Data type: BAPI_DOC_FILES2-DOCPATH
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHANGENO - Change Number

Data type: BAPI_DOC_DRAW-ECNUMBER
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALIDFROM - Date

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

CALLBACK -

Data type: XFLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CAD_VERSION - Version Number of Interface

Data type: CDESK_INTERFACE_VERSION
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_HTTP_DEST - HTTP Destination

Data type: SY-UCOMM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_FTP_DEST - FTP destination

Data type: SY-UCOMM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CDESK_COPY_AND_REPLACE_RFC

CDESK_VERSION - Version Number of Interface

Data type: CDESK_VERSION-VERSION
Optional: No
Call by Reference: No ( called with pass by value option)

COPY_GEN_STD_PARTS - CAD Indicator

Data type: BAPI_DOC_DRAW2-CADINDICATOR
Optional: No
Call by Reference: No ( called with pass by value option)

RETURN - Return Parameter(s)

Data type: BAPIRET2
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CDESK_COPY_AND_REPLACE_RFC

CAD_REL_APPLS -

Data type: BAPI_DOC_APPLICATIONS
Optional: Yes
Call by Reference: Yes

ADD_CHECKIN_APPLS -

Data type: BAPI_DOC_APPLICATIONS
Optional: Yes
Call by Reference: Yes

ADD_CHECKOUT_APPLS -

Data type: BAPI_DOC_APPLICATIONS
Optional: Yes
Call by Reference: Yes

ADD_COPY_APPLS -

Data type: BAPI_DOC_APPLICATIONS
Optional: Yes
Call by Reference: Yes

PLM_DOCUMENTS -

Data type: PLM_DOCUMENT
Optional: No
Call by Reference: Yes

PLM_DOCUMENTS_NEW -

Data type: PLM_DOCUMENT
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CDESK_COPY_AND_REPLACE_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_hostname  TYPE TDWD-NTADR, "   SPACE
lt_cad_rel_appls  TYPE STANDARD TABLE OF BAPI_DOC_APPLICATIONS, "   
lv_cdesk_version  TYPE CDESK_VERSION-VERSION, "   
lv_cdesk_active  TYPE XFLAG, "   'X'
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
lt_plm_documents  TYPE STANDARD TABLE OF PLM_DOCUMENT, "   
lv_callback  TYPE XFLAG, "   'X'
lt_plm_documents_new  TYPE STANDARD TABLE OF PLM_DOCUMENT, "   
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_COPY_AND_REPLACE_RFC'  "NOTRANSL: RFC 'Kopieren und Ersetzen'
    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
         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
         PLM_DOCUMENTS = lt_plm_documents
         PLM_DOCUMENTS_NEW = lt_plm_documents_new
. " CDESK_COPY_AND_REPLACE_RFC




ABAP code using 7.40 inline data declarations to call FM CDESK_COPY_AND_REPLACE_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_hostname) = ' '.
 
 
"SELECT single VERSION FROM CDESK_VERSION INTO @DATA(ld_cdesk_version).
 
DATA(ld_cdesk_active) = 'X'.
 
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.
 
 
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



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!