SAP Function Modules

RH_READ_HRS1002 SAP Function module







RH_READ_HRS1002 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RH_READ_HRS1002 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RHWR
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM RH_READ_HRS1002 - RH READ HRS1002





CALL FUNCTION 'RH_READ_HRS1002' "
  EXPORTING
    act_otype =                 " hrsobject-otype
    act_objid =                 " hrsobject-objid
*   act_subty =                 " hrs1002-subty
*   act_langu =                 " hrs1002-langu
*   use_customer_ext = 'X'      " hrpp0c-test
*   bypassing_buffer =          " hrpp0c-test
*   autoformat = SPACE          " hrpp0c-test
  TABLES
    act_hrs1002 =               " hrs1002
  EXCEPTIONS
    NO_DATA_FOUND = 1           "
    .  "  RH_READ_HRS1002

ABAP code example for Function Module RH_READ_HRS1002





The ABAP code below is a full code listing to execute function module RH_READ_HRS1002 including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_act_hrs1002  TYPE STANDARD TABLE OF HRS1002,"TABLES PARAM
wa_act_hrs1002  LIKE LINE OF it_act_hrs1002 .


SELECT single OTYPE
FROM HRSOBJECT
INTO @DATA(ld_act_otype).


SELECT single OBJID
FROM HRSOBJECT
INTO @DATA(ld_act_objid).


SELECT single SUBTY
FROM HRS1002
INTO @DATA(ld_act_subty).


SELECT single LANGU
FROM HRS1002
INTO @DATA(ld_act_langu).


DATA(ld_use_customer_ext) = some text here

DATA(ld_bypassing_buffer) = some text here

DATA(ld_autoformat) = some text here

"populate fields of struture and append to itab
append wa_act_hrs1002 to it_act_hrs1002. . CALL FUNCTION 'RH_READ_HRS1002' EXPORTING act_otype = ld_act_otype act_objid = ld_act_objid * act_subty = ld_act_subty * act_langu = ld_act_langu * use_customer_ext = ld_use_customer_ext * bypassing_buffer = ld_bypassing_buffer * autoformat = ld_autoformat TABLES act_hrs1002 = it_act_hrs1002 EXCEPTIONS NO_DATA_FOUND = 1 . " RH_READ_HRS1002
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_act_otype  TYPE HRSOBJECT-OTYPE ,
it_act_hrs1002  TYPE STANDARD TABLE OF HRS1002 ,
wa_act_hrs1002  LIKE LINE OF it_act_hrs1002,
ld_act_objid  TYPE HRSOBJECT-OBJID ,
ld_act_subty  TYPE HRS1002-SUBTY ,
ld_act_langu  TYPE HRS1002-LANGU ,
ld_use_customer_ext  TYPE HRPP0C-TEST ,
ld_bypassing_buffer  TYPE HRPP0C-TEST ,
ld_autoformat  TYPE HRPP0C-TEST .


SELECT single OTYPE
FROM HRSOBJECT
INTO ld_act_otype.


"populate fields of struture and append to itab
append wa_act_hrs1002 to it_act_hrs1002.

SELECT single OBJID
FROM HRSOBJECT
INTO ld_act_objid.


SELECT single SUBTY
FROM HRS1002
INTO ld_act_subty.


SELECT single LANGU
FROM HRS1002
INTO ld_act_langu.


ld_use_customer_ext = some text here

ld_bypassing_buffer = some text here

ld_autoformat = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RH_READ_HRS1002 or its description.