SAP RH_OBJECT_STATUS_CHANGE Function Module for









RH_OBJECT_STATUS_CHANGE is a standard rh object status change 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 rh object status change FM, simply by entering the name RH_OBJECT_STATUS_CHANGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHP0
Program Name: SAPLRHP0
Main Program: SAPLRHP0
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function RH_OBJECT_STATUS_CHANGE 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 'RH_OBJECT_STATUS_CHANGE'"
EXPORTING
* FCODE = 'AKTI' "
* CONSERVE_HISTO = ' ' "
* VTASK = 'D' "Update (B=Buffer,D=Online,V=Update,S=Sync)
* KEEP_LUPD = ' ' "
* NOCOMMIT = "

TABLES
ALL_OBJECTS = "

EXCEPTIONS
NO_AUTHORITY = 1 NOTHING_FOUND = 2 ERROR_DURING_UPDATE = 3
.



IMPORTING Parameters details for RH_OBJECT_STATUS_CHANGE

FCODE -

Data type: HRRHAP-FCODE
Default: 'AKTI'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONSERVE_HISTO -

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

VTASK - Update (B=Buffer,D=Online,V=Update,S=Sync)

Data type: HRRHAP-VTASK
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

KEEP_LUPD -

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

NOCOMMIT -

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

TABLES Parameters details for RH_OBJECT_STATUS_CHANGE

ALL_OBJECTS -

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

EXCEPTIONS details

NO_AUTHORITY - No Authorization

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

NOTHING_FOUND - Object Not Found

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

ERROR_DURING_UPDATE -

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

Copy and paste ABAP code example for RH_OBJECT_STATUS_CHANGE 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_fcode  TYPE HRRHAP-FCODE, "   'AKTI'
lt_all_objects  TYPE STANDARD TABLE OF HROBJECT, "   
lv_no_authority  TYPE HROBJECT, "   
lv_nothing_found  TYPE HROBJECT, "   
lv_conserve_histo  TYPE CHAR1, "   ' '
lv_vtask  TYPE HRRHAP-VTASK, "   'D'
lv_error_during_update  TYPE HRRHAP, "   
lv_keep_lupd  TYPE KEEP_LUPD, "   ' '
lv_nocommit  TYPE BAPI_STAND-NO_COMMIT. "   

  CALL FUNCTION 'RH_OBJECT_STATUS_CHANGE'  "
    EXPORTING
         FCODE = lv_fcode
         CONSERVE_HISTO = lv_conserve_histo
         VTASK = lv_vtask
         KEEP_LUPD = lv_keep_lupd
         NOCOMMIT = lv_nocommit
    TABLES
         ALL_OBJECTS = lt_all_objects
    EXCEPTIONS
        NO_AUTHORITY = 1
        NOTHING_FOUND = 2
        ERROR_DURING_UPDATE = 3
. " RH_OBJECT_STATUS_CHANGE




ABAP code using 7.40 inline data declarations to call FM RH_OBJECT_STATUS_CHANGE

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 FCODE FROM HRRHAP INTO @DATA(ld_fcode).
DATA(ld_fcode) = 'AKTI'.
 
 
 
 
DATA(ld_conserve_histo) = ' '.
 
"SELECT single VTASK FROM HRRHAP INTO @DATA(ld_vtask).
DATA(ld_vtask) = 'D'.
 
 
DATA(ld_keep_lupd) = ' '.
 
"SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit).
 


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!