SAP G_SET_TREE_DELETE Function Module for









G_SET_TREE_DELETE is a standard g set tree delete 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 g set tree delete FM, simply by entering the name G_SET_TREE_DELETE into the relevant SAP transaction such as SE37 or SE38.

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



Function G_SET_TREE_DELETE 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 'G_SET_TREE_DELETE'"
EXPORTING
* CLASS = "Set class
* TAB = "Name of the table
* NO_AUTHORITY_CHECK = "'X' --> no authorization check
* NO_COMMIT_WORK = "'X' suppresses COMMIT WORK after deletion
SET = "Name of the set
* SUBCLASSMASK = '*' "Mask for set class of subsets to be deleted
* SUBSETMASK = '*' "Mask for set IDs of subsets to be deleted
* BLOCKING_CHECK = "
* DONT_DELETE_CLASS_0 = "
* DONT_DELETE_STD_HIER = "

TABLES
* USED_SUBSETS = "

EXCEPTIONS
NOT_FOUND = 1 NO_AUTHORITY = 2 SET_IS_USED = 3 SET_IS_BLOCKED = 4
.



IMPORTING Parameters details for G_SET_TREE_DELETE

CLASS - Set class

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

TAB - Name of the table

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

NO_AUTHORITY_CHECK - 'X' --> no authorization check

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

NO_COMMIT_WORK - 'X' suppresses COMMIT WORK after deletion

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

SET - Name of the set

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

SUBCLASSMASK - Mask for set class of subsets to be deleted

Data type: RGSBS-CLASS
Default: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SUBSETMASK - Mask for set IDs of subsets to be deleted

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

BLOCKING_CHECK -

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

DONT_DELETE_CLASS_0 -

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

DONT_DELETE_STD_HIER -

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

TABLES Parameters details for G_SET_TREE_DELETE

USED_SUBSETS -

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

EXCEPTIONS details

NOT_FOUND - The root set does not exist.

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

NO_AUTHORITY - No authorization for deleting the

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

SET_IS_USED - Root set is used (cannot be delete

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

SET_IS_BLOCKED -

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

Copy and paste ABAP code example for G_SET_TREE_DELETE 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_class  TYPE RGSBS-CLASS, "   
lv_not_found  TYPE RGSBS, "   
lt_used_subsets  TYPE STANDARD TABLE OF SETLIST, "   
lv_tab  TYPE RGSBS-TABLE, "   
lv_no_authority  TYPE RGSBS, "   
lv_no_authority_check  TYPE C, "   
lv_set_is_used  TYPE C, "   
lv_no_commit_work  TYPE C, "   
lv_set  TYPE C, "   
lv_set_is_blocked  TYPE C, "   
lv_subclassmask  TYPE RGSBS-CLASS, "   '*'
lv_subsetmask  TYPE C, "   '*'
lv_blocking_check  TYPE C, "   
lv_dont_delete_class_0  TYPE C, "   
lv_dont_delete_std_hier  TYPE C. "   

  CALL FUNCTION 'G_SET_TREE_DELETE'  "
    EXPORTING
         CLASS = lv_class
         TAB = lv_tab
         NO_AUTHORITY_CHECK = lv_no_authority_check
         NO_COMMIT_WORK = lv_no_commit_work
         SET = lv_set
         SUBCLASSMASK = lv_subclassmask
         SUBSETMASK = lv_subsetmask
         BLOCKING_CHECK = lv_blocking_check
         DONT_DELETE_CLASS_0 = lv_dont_delete_class_0
         DONT_DELETE_STD_HIER = lv_dont_delete_std_hier
    TABLES
         USED_SUBSETS = lt_used_subsets
    EXCEPTIONS
        NOT_FOUND = 1
        NO_AUTHORITY = 2
        SET_IS_USED = 3
        SET_IS_BLOCKED = 4
. " G_SET_TREE_DELETE




ABAP code using 7.40 inline data declarations to call FM G_SET_TREE_DELETE

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 CLASS FROM RGSBS INTO @DATA(ld_class).
 
 
 
"SELECT single TABLE FROM RGSBS INTO @DATA(ld_tab).
 
 
 
 
 
 
 
"SELECT single CLASS FROM RGSBS INTO @DATA(ld_subclassmask).
DATA(ld_subclassmask) = '*'.
 
DATA(ld_subsetmask) = '*'.
 
 
 
 


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!