SAP STATUS_OBJECT_SWITCH_NUMBER Function Module for Replace Temporary Object Number with Real Object Number









STATUS_OBJECT_SWITCH_NUMBER is a standard status object switch number SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Replace Temporary Object Number with Real Object Number 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 object switch number FM, simply by entering the name STATUS_OBJECT_SWITCH_NUMBER into the relevant SAP transaction such as SE37 or SE38.

Function Group: BSVA
Program Name: SAPLBSVA
Main Program: SAPLBSVA
Appliation area:
Release date: 11-Sep-1998
Mode(Normal, Remote etc): Normal Function Module
Update:



Function STATUS_OBJECT_SWITCH_NUMBER 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_OBJECT_SWITCH_NUMBER'"Replace Temporary Object Number with Real Object Number
EXPORTING
* CLIENT = SY-MANDT "Client
OBJNR_NEW = "New Object Number
OBJNR_OLD = "Old (Temporary) Object Number

EXCEPTIONS
OBJECT_NOT_FOUND = 1 OBJNR_NEW_INVALID = 2 OBJNR_OLD_INVALID = 3 STATUS_OBJECT_ALREADY_EXISTS = 4
.




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_OBJECT_SWITCH_NUMBER

CLIENT - Client

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

OBJNR_NEW - New Object Number

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

OBJNR_OLD - Old (Temporary) Object Number

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

EXCEPTIONS details

OBJECT_NOT_FOUND - Old Object Number does not Exist

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

OBJNR_NEW_INVALID - New Object Number is Temporary

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

OBJNR_OLD_INVALID - Old Object Number is not Temporary

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

STATUS_OBJECT_ALREADY_EXISTS - Status Object Already Exists

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

Copy and paste ABAP code example for STATUS_OBJECT_SWITCH_NUMBER 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_object_not_found  TYPE SY, "   
lv_objnr_new  TYPE JSTO-OBJNR, "   
lv_objnr_new_invalid  TYPE JSTO, "   
lv_objnr_old  TYPE JSTO-OBJNR, "   
lv_objnr_old_invalid  TYPE JSTO, "   
lv_status_object_already_exists  TYPE JSTO. "   

  CALL FUNCTION 'STATUS_OBJECT_SWITCH_NUMBER'  "Replace Temporary Object Number with Real Object Number
    EXPORTING
         CLIENT = lv_client
         OBJNR_NEW = lv_objnr_new
         OBJNR_OLD = lv_objnr_old
    EXCEPTIONS
        OBJECT_NOT_FOUND = 1
        OBJNR_NEW_INVALID = 2
        OBJNR_OLD_INVALID = 3
        STATUS_OBJECT_ALREADY_EXISTS = 4
. " STATUS_OBJECT_SWITCH_NUMBER




ABAP code using 7.40 inline data declarations to call FM STATUS_OBJECT_SWITCH_NUMBER

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.
 
 
"SELECT single OBJNR FROM JSTO INTO @DATA(ld_objnr_new).
 
 
"SELECT single OBJNR FROM JSTO INTO @DATA(ld_objnr_old).
 
 
 


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!