SAP STATUS_MAINTAIN Function Module for Maintain/Display Object Statuses









STATUS_MAINTAIN is a standard status maintain SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Maintain/Display Object Statuses 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 status maintain FM, simply by entering the name STATUS_MAINTAIN into the relevant SAP transaction such as SE37 or SE38.

Function Group: BSVA
Program Name: SAPLBSVA
Main Program: SAPLBSVA
Appliation area:
Release date: 05-Jan-2000
Mode(Normal, Remote etc): Normal Function Module
Update:



Function STATUS_MAINTAIN 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 'STATUS_MAINTAIN'"Maintain/Display Object Statuses
EXPORTING
* CLIENT = SY-MANDT "Client (Only for Exceptional Cases!)
* FLG_NO_USERSTATUS = ' ' "Suppress Display of User Status
* STSMA_ALWAYS_CHANGABLE = ' ' "Schema Can Be Changed if User Status Already Active
* DISPLAY_ONLY = ' ' "Display of Object Status Only
* FLG_NO_STSMA_CHANGE = ' ' "'No Status Profile Change' Flag
* FLG_OBJECT_LIST = ' ' "Status is Displayed From a List of Objects
OBJNR = "Object Number
* SUBSCREEN_EXT = 0000 "Subscreen: Screen Number
* SUBSCREEN_PROG_EXT = ' ' "Subscreen: Module Pool
* SET_CHGKZ = "'Activate Change Documents' Flag
* FLG_NO_SYSTEMSTATUS = ' ' "Suppress Display of System Status

IMPORTING
FLG_FIRST_OBJ = "'Status of First Object on List' Flag
FLG_LAST_OBJ = "'Status of Last Object on List' Flag
FLG_NEXT_OBJ = "'Status of Next Object on List' Flag
FLG_PREVIOUS_OBJ = "'Status of Previous Object on List' Flag
STONR = "Status Number
EXIT_CODE = "OK Code that Led to the Exit of the Function Module

EXCEPTIONS
OBJECT_NOT_FOUND = 1
.




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_SAPLBSVA_001 User Exit PP Order Processing (Non-Order-Type-Specific)

IMPORTING Parameters details for STATUS_MAINTAIN

CLIENT - Client (Only for Exceptional Cases!)

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

FLG_NO_USERSTATUS - Suppress Display of User Status

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

STSMA_ALWAYS_CHANGABLE - Schema Can Be Changed if User Status Already Active

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

DISPLAY_ONLY - Display of Object Status Only

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

FLG_NO_STSMA_CHANGE - 'No Status Profile Change' Flag

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

FLG_OBJECT_LIST - Status is Displayed From a List of Objects

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

OBJNR - Object Number

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

SUBSCREEN_EXT - Subscreen: Screen Number

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

SUBSCREEN_PROG_EXT - Subscreen: Module Pool

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

SET_CHGKZ - 'Activate Change Documents' Flag

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

FLG_NO_SYSTEMSTATUS - Suppress Display of System Status

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

EXPORTING Parameters details for STATUS_MAINTAIN

FLG_FIRST_OBJ - 'Status of First Object on List' Flag

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

FLG_LAST_OBJ - 'Status of Last Object on List' Flag

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

FLG_NEXT_OBJ - 'Status of Next Object on List' Flag

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

FLG_PREVIOUS_OBJ - 'Status of Previous Object on List' Flag

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

STONR - Status Number

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

EXIT_CODE - OK Code that Led to the Exit of the Function Module

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

EXCEPTIONS details

OBJECT_NOT_FOUND - Object Status Not Found

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

Copy and paste ABAP code example for STATUS_MAINTAIN 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_client  TYPE SY-MANDT, "   SY-MANDT
lv_flg_first_obj  TYPE XFELD, "   
lv_object_not_found  TYPE XFELD, "   
lv_flg_no_userstatus  TYPE XFELD, "   SPACE
lv_stsma_always_changable  TYPE XFELD, "   SPACE
lv_display_only  TYPE XFELD, "   SPACE
lv_flg_last_obj  TYPE XFELD, "   
lv_flg_next_obj  TYPE XFELD, "   
lv_flg_no_stsma_change  TYPE XFELD, "   SPACE
lv_flg_object_list  TYPE XFELD, "   SPACE
lv_flg_previous_obj  TYPE XFELD, "   
lv_objnr  TYPE JSTO-OBJNR, "   
lv_stonr  TYPE TJ30-STONR, "   
lv_exit_code  TYPE RSEUL_KEYS-CODE, "   
lv_subscreen_ext  TYPE SY-DYNNR, "   0000
lv_subscreen_prog_ext  TYPE SY-REPID, "   ' '
lv_set_chgkz  TYPE JSTO-CHGKZ, "   
lv_flg_no_systemstatus  TYPE XFELD. "   SPACE

  CALL FUNCTION 'STATUS_MAINTAIN'  "Maintain/Display Object Statuses
    EXPORTING
         CLIENT = lv_client
         FLG_NO_USERSTATUS = lv_flg_no_userstatus
         STSMA_ALWAYS_CHANGABLE = lv_stsma_always_changable
         DISPLAY_ONLY = lv_display_only
         FLG_NO_STSMA_CHANGE = lv_flg_no_stsma_change
         FLG_OBJECT_LIST = lv_flg_object_list
         OBJNR = lv_objnr
         SUBSCREEN_EXT = lv_subscreen_ext
         SUBSCREEN_PROG_EXT = lv_subscreen_prog_ext
         SET_CHGKZ = lv_set_chgkz
         FLG_NO_SYSTEMSTATUS = lv_flg_no_systemstatus
    IMPORTING
         FLG_FIRST_OBJ = lv_flg_first_obj
         FLG_LAST_OBJ = lv_flg_last_obj
         FLG_NEXT_OBJ = lv_flg_next_obj
         FLG_PREVIOUS_OBJ = lv_flg_previous_obj
         STONR = lv_stonr
         EXIT_CODE = lv_exit_code
    EXCEPTIONS
        OBJECT_NOT_FOUND = 1
. " STATUS_MAINTAIN




ABAP code using 7.40 inline data declarations to call FM STATUS_MAINTAIN

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 MANDT FROM SY INTO @DATA(ld_client).
DATA(ld_client) = SY-MANDT.
 
 
 
DATA(ld_flg_no_userstatus) = ' '.
 
DATA(ld_stsma_always_changable) = ' '.
 
DATA(ld_display_only) = ' '.
 
 
 
DATA(ld_flg_no_stsma_change) = ' '.
 
DATA(ld_flg_object_list) = ' '.
 
 
"SELECT single OBJNR FROM JSTO INTO @DATA(ld_objnr).
 
"SELECT single STONR FROM TJ30 INTO @DATA(ld_stonr).
 
"SELECT single CODE FROM RSEUL_KEYS INTO @DATA(ld_exit_code).
 
"SELECT single DYNNR FROM SY INTO @DATA(ld_subscreen_ext).
DATA(ld_subscreen_ext) = 0000.
 
"SELECT single REPID FROM SY INTO @DATA(ld_subscreen_prog_ext).
DATA(ld_subscreen_prog_ext) = ' '.
 
"SELECT single CHGKZ FROM JSTO INTO @DATA(ld_set_chgkz).
 
DATA(ld_flg_no_systemstatus) = ' '.
 


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!