SAP DOKU_COPY_ALL Function Module for









DOKU_COPY_ALL is a standard doku copy all SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 doku copy all FM, simply by entering the name DOKU_COPY_ALL into the relevant SAP transaction such as SE37 or SE38.

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



Function DOKU_COPY_ALL 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 'DOKU_COPY_ALL'"
EXPORTING
* GENERIC_USE = ' ' "generic copying of several modules
NEW_OBJECT = "Name/part of the name of the target
OLD_ID = "Documentation ID e.g. DE IR DZ FU
OLD_OBJECT = "Name/part of the name of the source
* OLD_TYP = ' ' "Documentation type E T M default E&T
* SUPPRESS_AUTHORITY = 'X' "No authorization check end user documentation
* SUPPRESS_ENQUEUE = 'X' "No lock management
* SUPPRESS_TRANSPORT = 'X' "No interface to the transport system
* CORR_ENTRY = "

IMPORTING
VARTEXT = "Text string of the exception

EXCEPTIONS
HEADER_WITHOUT_TEXT = 1 INDEX_WITHOUT_HEADER = 2 NO_AUTHORITY_FOR_DEVCLASS_XXXX = 3 NO_DOCU_FOUND = 4 OBJECT_IS_ALREADY_ENQUEUED = 5 OBJECT_IS_ENQUEUED_BY_CORR = 6 TECHN_ENQUEUE_PROBLEM = 7 USER_BREAK = 8
.



IMPORTING Parameters details for DOKU_COPY_ALL

GENERIC_USE - generic copying of several modules

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

NEW_OBJECT - Name/part of the name of the target

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

OLD_ID - Documentation ID e.g. DE IR DZ FU

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

OLD_OBJECT - Name/part of the name of the source

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

OLD_TYP - Documentation type E T M default E&T

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

SUPPRESS_AUTHORITY - No authorization check end user documentation

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

SUPPRESS_ENQUEUE - No lock management

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

SUPPRESS_TRANSPORT - No interface to the transport system

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

CORR_ENTRY -

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

EXPORTING Parameters details for DOKU_COPY_ALL

VARTEXT - Text string of the exception

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

EXCEPTIONS details

HEADER_WITHOUT_TEXT - No DOKTL entry

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

INDEX_WITHOUT_HEADER - No DOKHL entry

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

NO_AUTHORITY_FOR_DEVCLASS_XXXX - No authorization for the development class

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

NO_DOCU_FOUND - No documentation available

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

OBJECT_IS_ALREADY_ENQUEUED - Document is already edited

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

OBJECT_IS_ENQUEUED_BY_CORR - Documentation locked by correction

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

TECHN_ENQUEUE_PROBLEM -

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

USER_BREAK - not yet defined

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

Copy and paste ABAP code example for DOKU_COPY_ALL 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_vartext  TYPE RSDCU-VARTEXT, "   
lv_generic_use  TYPE RSDCU, "   SPACE
lv_header_without_text  TYPE RSDCU, "   
lv_new_object  TYPE DOKHL-OBJECT, "   
lv_index_without_header  TYPE DOKHL, "   
lv_old_id  TYPE DOKHL-ID, "   
lv_no_authority_for_devclass_xxxx  TYPE DOKHL, "   
lv_old_object  TYPE DOKHL-OBJECT, "   
lv_no_docu_found  TYPE DOKHL, "   
lv_old_typ  TYPE DOKHL-TYP, "   SPACE
lv_object_is_already_enqueued  TYPE DOKHL, "   
lv_suppress_authority  TYPE DOKHL, "   'X'
lv_object_is_enqueued_by_corr  TYPE DOKHL, "   
lv_suppress_enqueue  TYPE DOKHL, "   'X'
lv_techn_enqueue_problem  TYPE DOKHL, "   
lv_user_break  TYPE DOKHL, "   
lv_suppress_transport  TYPE DOKHL, "   'X'
lv_corr_entry  TYPE KO200. "   

  CALL FUNCTION 'DOKU_COPY_ALL'  "
    EXPORTING
         GENERIC_USE = lv_generic_use
         NEW_OBJECT = lv_new_object
         OLD_ID = lv_old_id
         OLD_OBJECT = lv_old_object
         OLD_TYP = lv_old_typ
         SUPPRESS_AUTHORITY = lv_suppress_authority
         SUPPRESS_ENQUEUE = lv_suppress_enqueue
         SUPPRESS_TRANSPORT = lv_suppress_transport
         CORR_ENTRY = lv_corr_entry
    IMPORTING
         VARTEXT = lv_vartext
    EXCEPTIONS
        HEADER_WITHOUT_TEXT = 1
        INDEX_WITHOUT_HEADER = 2
        NO_AUTHORITY_FOR_DEVCLASS_XXXX = 3
        NO_DOCU_FOUND = 4
        OBJECT_IS_ALREADY_ENQUEUED = 5
        OBJECT_IS_ENQUEUED_BY_CORR = 6
        TECHN_ENQUEUE_PROBLEM = 7
        USER_BREAK = 8
. " DOKU_COPY_ALL




ABAP code using 7.40 inline data declarations to call FM DOKU_COPY_ALL

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 VARTEXT FROM RSDCU INTO @DATA(ld_vartext).
 
DATA(ld_generic_use) = ' '.
 
 
"SELECT single OBJECT FROM DOKHL INTO @DATA(ld_new_object).
 
 
"SELECT single ID FROM DOKHL INTO @DATA(ld_old_id).
 
 
"SELECT single OBJECT FROM DOKHL INTO @DATA(ld_old_object).
 
 
"SELECT single TYP FROM DOKHL INTO @DATA(ld_old_typ).
DATA(ld_old_typ) = ' '.
 
 
DATA(ld_suppress_authority) = 'X'.
 
 
DATA(ld_suppress_enqueue) = 'X'.
 
 
 
DATA(ld_suppress_transport) = 'X'.
 
 


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!