SAP DOKU_DELETE_ALL Function Module for









DOKU_DELETE_ALL is a standard doku delete 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 delete all FM, simply by entering the name DOKU_DELETE_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_DELETE_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_DELETE_ALL'"
EXPORTING
DOKU_ID = "Doc. ID e.g. B RE DE DZ FU
DOKU_OBJECT = "Name/part of the name of the document to be deleted
* DOKU_TYP = ' ' "Documentation type E T M
* GENERIC_USE = ' ' "Generic deletion of documentation
* SUPPRESS_AUTHORITY = 'X' "No authorization check
* SUPPRESS_ENQUEUE = 'X' "No lock management
* SUPPRESS_TRANSPORT = 'X' "No interface to the transport system

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_DELETE_ALL

DOKU_ID - Doc. ID e.g. B RE DE DZ FU

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

DOKU_OBJECT - Name/part of the name of the document to be deleted

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

DOKU_TYP - Documentation type E T M

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

GENERIC_USE - Generic deletion of documentation

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

SUPPRESS_AUTHORITY - No authorization check

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)

EXPORTING Parameters details for DOKU_DELETE_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 - DOKTL entry is missing

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

INDEX_WITHOUT_HEADER - DOKHL entry is missing

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

NO_AUTHORITY_FOR_DEVCLASS_XXXX - No authorization for 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 - Document 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_DELETE_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_doku_id  TYPE DOKHL-ID, "   
lv_vartext  TYPE RSDCU-VARTEXT, "   
lv_header_without_text  TYPE RSDCU, "   
lv_doku_object  TYPE DOKHL-OBJECT, "   
lv_index_without_header  TYPE DOKHL, "   
lv_doku_typ  TYPE DOKHL-TYP, "   SPACE
lv_no_authority_for_devclass_xxxx  TYPE DOKHL, "   
lv_generic_use  TYPE DOKHL, "   SPACE
lv_no_docu_found  TYPE DOKHL, "   
lv_suppress_authority  TYPE DOKHL, "   'X'
lv_object_is_already_enqueued  TYPE DOKHL, "   
lv_suppress_enqueue  TYPE DOKHL, "   'X'
lv_object_is_enqueued_by_corr  TYPE DOKHL, "   
lv_suppress_transport  TYPE DOKHL, "   'X'
lv_techn_enqueue_problem  TYPE DOKHL, "   
lv_user_break  TYPE DOKHL. "   

  CALL FUNCTION 'DOKU_DELETE_ALL'  "
    EXPORTING
         DOKU_ID = lv_doku_id
         DOKU_OBJECT = lv_doku_object
         DOKU_TYP = lv_doku_typ
         GENERIC_USE = lv_generic_use
         SUPPRESS_AUTHORITY = lv_suppress_authority
         SUPPRESS_ENQUEUE = lv_suppress_enqueue
         SUPPRESS_TRANSPORT = lv_suppress_transport
    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_DELETE_ALL




ABAP code using 7.40 inline data declarations to call FM DOKU_DELETE_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 ID FROM DOKHL INTO @DATA(ld_doku_id).
 
"SELECT single VARTEXT FROM RSDCU INTO @DATA(ld_vartext).
 
 
"SELECT single OBJECT FROM DOKHL INTO @DATA(ld_doku_object).
 
 
"SELECT single TYP FROM DOKHL INTO @DATA(ld_doku_typ).
DATA(ld_doku_typ) = ' '.
 
 
DATA(ld_generic_use) = ' '.
 
 
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!