SAP CAD_INIT_CHANGE Function Module for NOTRANSL: Einchecken selektierter Dokumente









CAD_INIT_CHANGE is a standard cad init change 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: Einchecken selektierter Dokumente 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 cad init change FM, simply by entering the name CAD_INIT_CHANGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CAD_DESKTOP
Program Name: SAPLCAD_DESKTOP
Main Program:
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CAD_INIT_CHANGE 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 'CAD_INIT_CHANGE'"NOTRANSL: Einchecken selektierter Dokumente
EXPORTING
* CHANGE_EXPERT = ' ' "Status of a Document (Language-Dependent)
* CHANGE_STATUS = ' ' "Document Management Flag

TABLES
* DOCUMENTS_IN = "Document data (identifiable)
* FILES_IN = "Documents originals (identifiable)
* STRUCTURE_IN = "Structure data for display in browser (identifiable)
* DOCUMENTS_OUT = "Document data (identifiable)
* FILES_OUT = "Documents originals (identifiable)
* STRUCTURE_OUT = "Structure data for display in browser (identifiable)

EXCEPTIONS
ERROR = 1 STATUS_NOT_FOUND = 2
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLCAD_DESKTOP_001 Customer exit function module
EXIT_SAPLCAD_DESKTOP_002 Customer exit function module
EXIT_SAPLCAD_DESKTOP_003 Customer exit function module
EXIT_SAPLCAD_DESKTOP_004 Customer exit function module
EXIT_SAPLCAD_DESKTOP_005 Customer exit function module
EXIT_SAPLCAD_DESKTOP_006 Customer exit function module

IMPORTING Parameters details for CAD_INIT_CHANGE

CHANGE_EXPERT - Status of a Document (Language-Dependent)

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

CHANGE_STATUS - Document Management Flag

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

TABLES Parameters details for CAD_INIT_CHANGE

DOCUMENTS_IN - Document data (identifiable)

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

FILES_IN - Documents originals (identifiable)

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

STRUCTURE_IN - Structure data for display in browser (identifiable)

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

DOCUMENTS_OUT - Document data (identifiable)

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

FILES_OUT - Documents originals (identifiable)

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

STRUCTURE_OUT - Structure data for display in browser (identifiable)

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

EXCEPTIONS details

ERROR - Errors have occurred

Data type:
Optional: No
Call by Reference: Yes

STATUS_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CAD_INIT_CHANGE 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_error  TYPE STRING, "   
lt_documents_in  TYPE STANDARD TABLE OF DMU_DOCUMENT, "   
lv_change_expert  TYPE BAPI_DOC_AUX-FLAG, "   SPACE
lt_files_in  TYPE STANDARD TABLE OF DMU_FILE, "   
lv_change_status  TYPE BAPI_DOC_AUX-FLAG, "   SPACE
lv_status_not_found  TYPE BAPI_DOC_AUX, "   
lt_structure_in  TYPE STANDARD TABLE OF DMU_TREE, "   
lt_documents_out  TYPE STANDARD TABLE OF DMU_DOCUMENT, "   
lt_files_out  TYPE STANDARD TABLE OF DMU_FILE, "   
lt_structure_out  TYPE STANDARD TABLE OF DMU_TREE. "   

  CALL FUNCTION 'CAD_INIT_CHANGE'  "NOTRANSL: Einchecken selektierter Dokumente
    EXPORTING
         CHANGE_EXPERT = lv_change_expert
         CHANGE_STATUS = lv_change_status
    TABLES
         DOCUMENTS_IN = lt_documents_in
         FILES_IN = lt_files_in
         STRUCTURE_IN = lt_structure_in
         DOCUMENTS_OUT = lt_documents_out
         FILES_OUT = lt_files_out
         STRUCTURE_OUT = lt_structure_out
    EXCEPTIONS
        ERROR = 1
        STATUS_NOT_FOUND = 2
. " CAD_INIT_CHANGE




ABAP code using 7.40 inline data declarations to call FM CAD_INIT_CHANGE

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 FLAG FROM BAPI_DOC_AUX INTO @DATA(ld_change_expert).
DATA(ld_change_expert) = ' '.
 
 
"SELECT single FLAG FROM BAPI_DOC_AUX INTO @DATA(ld_change_status).
DATA(ld_change_status) = ' '.
 
 
 
 
 
 


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!