SAP G_SET_MAINTENANCE Function Module for Call Set Maintenance Transaction to Display or Change









G_SET_MAINTENANCE is a standard g set maintenance SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Call Set Maintenance Transaction to Display or Change 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 g set maintenance FM, simply by entering the name G_SET_MAINTENANCE into the relevant SAP transaction such as SE37 or SE38.

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



Function G_SET_MAINTENANCE 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_MAINTENANCE'"Call Set Maintenance Transaction to Display or Change
EXPORTING
* CLASS_MASK = ' ' "Set Class (Mask is possible)
FUNCTION = "'DISPLAY' to Display or 'MODIFY' to Change
SET_NAME_MASK = "Set ID (not Set Name) (Mask is possible)
* TABLE_MASK = ' ' "Set Table (Generic Spec. possible)
* MASTER_FLAG = ' ' "'X': Change to FI-SL Sets not allowed
* USE_GROUP_MAINTENANCE = ' ' "'X': Use Group Maintenance for CO Groups
* SHOW_GROUP_VALUE = ' ' "For Group Maint.: Expand Hierarchy for this Value
* CO_SET_ACCMODE = ' ' "

IMPORTING
CLASS = "Set Class (if nec. use Selection)
SET = "Set Name (not ID) (if nec. use Selection)
TABLE = "Set Table (if nec. use Selection)

EXCEPTIONS
ILLEGAL_FUNCTION = 1 NO_SETS = 2 NO_SET_PICKED = 3 SET_NOT_FOUND = 4 NO_AUTHORITY = 5 OBJECT_CREATED_BY_SAP = 6 GROUP_MAINTENANCE_ERROR = 7 DYNAMIC_SET_ERROR = 8
.



IMPORTING Parameters details for G_SET_MAINTENANCE

CLASS_MASK - Set Class (Mask is possible)

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

FUNCTION - 'DISPLAY' to Display or 'MODIFY' to Change

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

SET_NAME_MASK - Set ID (not Set Name) (Mask is possible)

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

TABLE_MASK - Set Table (Generic Spec. possible)

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

MASTER_FLAG - 'X': Change to FI-SL Sets not allowed

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

USE_GROUP_MAINTENANCE - 'X': Use Group Maintenance for CO Groups

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

SHOW_GROUP_VALUE - For Group Maint.: Expand Hierarchy for this Value

Data type: SETVAL
Default: SPACE
Optional: Yes
Call by Reference: Yes

CO_SET_ACCMODE -

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

EXPORTING Parameters details for G_SET_MAINTENANCE

CLASS - Set Class (if nec. use Selection)

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

SET - Set Name (not ID) (if nec. use Selection)

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

TABLE - Set Table (if nec. use Selection)

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

EXCEPTIONS details

ILLEGAL_FUNCTION - Value for FUNCTION is not allowed

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

NO_SETS - No Appropriate Sets Exist

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

NO_SET_PICKED - Selection canceled by user

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

SET_NOT_FOUND - Set does not exist

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

NO_AUTHORITY - No authorization for chosen action

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

OBJECT_CREATED_BY_SAP - Object was Delivered or Generated by SAP -->

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

GROUP_MAINTENANCE_ERROR - Error Occurred During Group Maintenance

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

DYNAMIC_SET_ERROR - Error During Maintenance of Dynamic Set

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

Copy and paste ABAP code example for G_SET_MAINTENANCE 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_class_mask  TYPE RGSBS-CLASS, "   SPACE
lv_illegal_function  TYPE RGSBS, "   
lv_set  TYPE RGSBS-SETNR, "   
lv_no_sets  TYPE RGSBS, "   
lv_function  TYPE C, "   
lv_table  TYPE RGSBS-TABLE, "   
lv_no_set_picked  TYPE RGSBS, "   
lv_set_name_mask  TYPE C, "   
lv_table_mask  TYPE RGSBS-TABLE, "   SPACE
lv_set_not_found  TYPE RGSBS, "   
lv_master_flag  TYPE C, "   SPACE
lv_no_authority  TYPE C, "   
lv_object_created_by_sap  TYPE C, "   
lv_use_group_maintenance  TYPE SY-DATAR, "   SPACE
lv_show_group_value  TYPE SETVAL, "   SPACE
lv_group_maintenance_error  TYPE SETVAL, "   
lv_co_set_accmode  TYPE C, "   SPACE
lv_dynamic_set_error  TYPE C. "   

  CALL FUNCTION 'G_SET_MAINTENANCE'  "Call Set Maintenance Transaction to Display or Change
    EXPORTING
         CLASS_MASK = lv_class_mask
         FUNCTION = lv_function
         SET_NAME_MASK = lv_set_name_mask
         TABLE_MASK = lv_table_mask
         MASTER_FLAG = lv_master_flag
         USE_GROUP_MAINTENANCE = lv_use_group_maintenance
         SHOW_GROUP_VALUE = lv_show_group_value
         CO_SET_ACCMODE = lv_co_set_accmode
    IMPORTING
         CLASS = lv_class
         SET = lv_set
         TABLE = lv_table
    EXCEPTIONS
        ILLEGAL_FUNCTION = 1
        NO_SETS = 2
        NO_SET_PICKED = 3
        SET_NOT_FOUND = 4
        NO_AUTHORITY = 5
        OBJECT_CREATED_BY_SAP = 6
        GROUP_MAINTENANCE_ERROR = 7
        DYNAMIC_SET_ERROR = 8
. " G_SET_MAINTENANCE




ABAP code using 7.40 inline data declarations to call FM G_SET_MAINTENANCE

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 CLASS FROM RGSBS INTO @DATA(ld_class_mask).
DATA(ld_class_mask) = ' '.
 
 
"SELECT single SETNR FROM RGSBS INTO @DATA(ld_set).
 
 
 
"SELECT single TABLE FROM RGSBS INTO @DATA(ld_table).
 
 
 
"SELECT single TABLE FROM RGSBS INTO @DATA(ld_table_mask).
DATA(ld_table_mask) = ' '.
 
 
DATA(ld_master_flag) = ' '.
 
 
 
"SELECT single DATAR FROM SY INTO @DATA(ld_use_group_maintenance).
DATA(ld_use_group_maintenance) = ' '.
 
DATA(ld_show_group_value) = ' '.
 
 
DATA(ld_co_set_accmode) = ' '.
 
 


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!