SAP RH_READ_OBJECT Function Module for Read Object









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

Function Group: RHDB
Program Name: SAPLRHDB
Main Program: SAPLRHDB
Appliation area: H
Release date: 07-Apr-1998
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RH_READ_OBJECT 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_READ_OBJECT'"Read Object
EXPORTING
PLVAR = "Plan Version
* STORE = 'X' "Buffer Data ' '/X
* CHECK_STRU_AUTH = 'X' "X=Display/M=Maintain Authorization Check
* READ_DB = ' ' "X = Object is Read From Database (Buffer Replaced)
OTYPE = "Object Type
* OBJID = "Object ID
* REALO = ' ' "Extended Object ID (External Object)
* ISTAT = ' ' "Status for Reading Text
* BEGDA = SY-DATUM "Start Date for Reading Text
* ENDDA = SY-DATUM "End Date for Reading Text
* LANGU = SY-LANGU "Language for Reading Text
* OINTERVAL = 'X' "Return Object Validity Period ' '/X/I

IMPORTING
OBEG = "Object Start Date
OEND = "Object End Date
OSTAT = "Object Status
HISTO = "Historical Record Flag
SHORT = "Abbreviation
STEXT = "Name
TISTAT = "Status of Texts Returned
TLANGU = "Language of Texts Returned
DISPLAY_TEXT = "Object Description

TABLES
* EXISTENCE = "Status-Dependent Existence Intervals

EXCEPTIONS
NOT_FOUND = 1
.



IMPORTING Parameters details for RH_READ_OBJECT

PLVAR - Plan Version

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

STORE - Buffer Data ' '/X

Data type: HRPP0C-TEST
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_STRU_AUTH - X=Display/M=Maintain Authorization Check

Data type: HRRHAS-AUTHY
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

READ_DB - X = Object is Read From Database (Buffer Replaced)

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

OTYPE - Object Type

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

OBJID - Object ID

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

REALO - Extended Object ID (External Object)

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

ISTAT - Status for Reading Text

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

BEGDA - Start Date for Reading Text

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

ENDDA - End Date for Reading Text

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

LANGU - Language for Reading Text

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

OINTERVAL - Return Object Validity Period ' '/X/I

Data type: HRPP0C-TEST
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RH_READ_OBJECT

OBEG - Object Start Date

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

OEND - Object End Date

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

OSTAT - Object Status

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

HISTO - Historical Record Flag

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

SHORT - Abbreviation

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

STEXT - Name

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

TISTAT - Status of Texts Returned

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

TLANGU - Language of Texts Returned

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

DISPLAY_TEXT - Object Description

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

TABLES Parameters details for RH_READ_OBJECT

EXISTENCE - Status-Dependent Existence Intervals

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

EXCEPTIONS details

NOT_FOUND - Object not found

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

Copy and paste ABAP code example for RH_READ_OBJECT 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_obeg  TYPE PLOG-BEGDA, "   
lv_plvar  TYPE PLOG-PLVAR, "   
lt_existence  TYPE STANDARD TABLE OF HROEXIST, "   
lv_not_found  TYPE HROEXIST, "   
lv_store  TYPE HRPP0C-TEST, "   'X'
lv_check_stru_auth  TYPE HRRHAS-AUTHY, "   'X'
lv_read_db  TYPE HRPP0C-TEST, "   SPACE
lv_oend  TYPE PLOG-ENDDA, "   
lv_otype  TYPE PLOG-OTYPE, "   
lv_objid  TYPE PLOG-OBJID, "   
lv_ostat  TYPE PLOG-ISTAT, "   
lv_histo  TYPE PLOG-HISTO, "   
lv_realo  TYPE OBJEC-REALO, "   SPACE
lv_istat  TYPE PLOG-ISTAT, "   SPACE
lv_short  TYPE P1000-SHORT, "   
lv_begda  TYPE PLOG-BEGDA, "   SY-DATUM
lv_stext  TYPE P1000-STEXT, "   
lv_endda  TYPE PLOG-ENDDA, "   SY-DATUM
lv_tistat  TYPE P1000-ISTAT, "   
lv_langu  TYPE SY-LANGU, "   SY-LANGU
lv_tlangu  TYPE P1000-LANGU, "   
lv_ointerval  TYPE HRPP0C-TEST, "   'X'
lv_display_text  TYPE P1000-STEXT. "   

  CALL FUNCTION 'RH_READ_OBJECT'  "Read Object
    EXPORTING
         PLVAR = lv_plvar
         STORE = lv_store
         CHECK_STRU_AUTH = lv_check_stru_auth
         READ_DB = lv_read_db
         OTYPE = lv_otype
         OBJID = lv_objid
         REALO = lv_realo
         ISTAT = lv_istat
         BEGDA = lv_begda
         ENDDA = lv_endda
         LANGU = lv_langu
         OINTERVAL = lv_ointerval
    IMPORTING
         OBEG = lv_obeg
         OEND = lv_oend
         OSTAT = lv_ostat
         HISTO = lv_histo
         SHORT = lv_short
         STEXT = lv_stext
         TISTAT = lv_tistat
         TLANGU = lv_tlangu
         DISPLAY_TEXT = lv_display_text
    TABLES
         EXISTENCE = lt_existence
    EXCEPTIONS
        NOT_FOUND = 1
. " RH_READ_OBJECT




ABAP code using 7.40 inline data declarations to call FM RH_READ_OBJECT

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 BEGDA FROM PLOG INTO @DATA(ld_obeg).
 
"SELECT single PLVAR FROM PLOG INTO @DATA(ld_plvar).
 
 
 
"SELECT single TEST FROM HRPP0C INTO @DATA(ld_store).
DATA(ld_store) = 'X'.
 
"SELECT single AUTHY FROM HRRHAS INTO @DATA(ld_check_stru_auth).
DATA(ld_check_stru_auth) = 'X'.
 
"SELECT single TEST FROM HRPP0C INTO @DATA(ld_read_db).
DATA(ld_read_db) = ' '.
 
"SELECT single ENDDA FROM PLOG INTO @DATA(ld_oend).
 
"SELECT single OTYPE FROM PLOG INTO @DATA(ld_otype).
 
"SELECT single OBJID FROM PLOG INTO @DATA(ld_objid).
 
"SELECT single ISTAT FROM PLOG INTO @DATA(ld_ostat).
 
"SELECT single HISTO FROM PLOG INTO @DATA(ld_histo).
 
"SELECT single REALO FROM OBJEC INTO @DATA(ld_realo).
DATA(ld_realo) = ' '.
 
"SELECT single ISTAT FROM PLOG INTO @DATA(ld_istat).
DATA(ld_istat) = ' '.
 
"SELECT single SHORT FROM P1000 INTO @DATA(ld_short).
 
"SELECT single BEGDA FROM PLOG INTO @DATA(ld_begda).
DATA(ld_begda) = SY-DATUM.
 
"SELECT single STEXT FROM P1000 INTO @DATA(ld_stext).
 
"SELECT single ENDDA FROM PLOG INTO @DATA(ld_endda).
DATA(ld_endda) = SY-DATUM.
 
"SELECT single ISTAT FROM P1000 INTO @DATA(ld_tistat).
 
"SELECT single LANGU FROM SY INTO @DATA(ld_langu).
DATA(ld_langu) = SY-LANGU.
 
"SELECT single LANGU FROM P1000 INTO @DATA(ld_tlangu).
 
"SELECT single TEST FROM HRPP0C INTO @DATA(ld_ointerval).
DATA(ld_ointerval) = 'X'.
 
"SELECT single STEXT FROM P1000 INTO @DATA(ld_display_text).
 


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!