SAP HR_READ_FOREIGN_OBJECT_TEXT Function Module for
HR_READ_FOREIGN_OBJECT_TEXT is a standard hr read foreign object text 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 hr read foreign object text FM, simply by entering the name HR_READ_FOREIGN_OBJECT_TEXT into the relevant SAP transaction such as SE37 or SE38.
Function Group: RPIN
Program Name: SAPLRPIN
Main Program: SAPLRPIN
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HR_READ_FOREIGN_OBJECT_TEXT 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 'HR_READ_FOREIGN_OBJECT_TEXT'".
EXPORTING
OTYPE = "
* OBJID = "
* COSTCENTER = "
* CONTROLLINGAREA = "
* STATUS = '1' "
* BEGDA = '18000101' "
* ENDDA = '99991231' "
* REFERENCE_DATE = SY-DATUM "
* LANGU = SY-LANGU "
IMPORTING
SHORT_TEXT = "
OBJECT_TEXT = "
COSTCENTER_NAME = "
INTEGRATION_ACTIVE = "
RETURN = "
EXCEPTIONS
NOTHING_FOUND = 1 WRONG_OBJECTTYPE = 2 MISSING_COSTCENTER_DATA = 3 MISSING_OBJECT_ID = 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_SAPLRPIN_001 User Exit for HR Master Data
IMPORTING Parameters details for HR_READ_FOREIGN_OBJECT_TEXT
OTYPE -
Data type: WPLOG-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJID -
Data type: WPLOG-OBJIDOptional: Yes
Call by Reference: No ( called with pass by value option)
COSTCENTER -
Data type: HRCA_COSTC-COSTCENTEROptional: Yes
Call by Reference: No ( called with pass by value option)
CONTROLLINGAREA -
Data type: HRCA_COSTC-CONTRLAREAOptional: Yes
Call by Reference: No ( called with pass by value option)
STATUS -
Data type: WPLOG-ISTATDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BEGDA -
Data type: P1001-BEGDADefault: '18000101'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA -
Data type: P1001-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
REFERENCE_DATE -
Data type: P1001-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGU -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_READ_FOREIGN_OBJECT_TEXT
SHORT_TEXT -
Data type: P1000-SHORTOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT_TEXT -
Data type: P1000-STEXTOptional: No
Call by Reference: No ( called with pass by value option)
COSTCENTER_NAME -
Data type: HRCA_COSTC-NAMEOptional: No
Call by Reference: No ( called with pass by value option)
INTEGRATION_ACTIVE -
Data type: T77S0-GSVALOptional: No
Call by Reference: No ( called with pass by value option)
RETURN -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOTHING_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_OBJECTTYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MISSING_COSTCENTER_DATA -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MISSING_OBJECT_ID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_READ_FOREIGN_OBJECT_TEXT 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_otype | TYPE WPLOG-OTYPE, " | |||
lv_short_text | TYPE P1000-SHORT, " | |||
lv_nothing_found | TYPE P1000, " | |||
lv_objid | TYPE WPLOG-OBJID, " | |||
lv_object_text | TYPE P1000-STEXT, " | |||
lv_wrong_objecttype | TYPE P1000, " | |||
lv_costcenter | TYPE HRCA_COSTC-COSTCENTER, " | |||
lv_costcenter_name | TYPE HRCA_COSTC-NAME, " | |||
lv_missing_costcenter_data | TYPE HRCA_COSTC, " | |||
lv_controllingarea | TYPE HRCA_COSTC-CONTRLAREA, " | |||
lv_missing_object_id | TYPE HRCA_COSTC, " | |||
lv_integration_active | TYPE T77S0-GSVAL, " | |||
lv_return | TYPE SY-SUBRC, " | |||
lv_status | TYPE WPLOG-ISTAT, " '1' | |||
lv_begda | TYPE P1001-BEGDA, " '18000101' | |||
lv_endda | TYPE P1001-ENDDA, " '99991231' | |||
lv_reference_date | TYPE P1001-BEGDA, " SY-DATUM | |||
lv_langu | TYPE SY-LANGU. " SY-LANGU |
  CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT' " |
EXPORTING | ||
OTYPE | = lv_otype | |
OBJID | = lv_objid | |
COSTCENTER | = lv_costcenter | |
CONTROLLINGAREA | = lv_controllingarea | |
STATUS | = lv_status | |
BEGDA | = lv_begda | |
ENDDA | = lv_endda | |
REFERENCE_DATE | = lv_reference_date | |
LANGU | = lv_langu | |
IMPORTING | ||
SHORT_TEXT | = lv_short_text | |
OBJECT_TEXT | = lv_object_text | |
COSTCENTER_NAME | = lv_costcenter_name | |
INTEGRATION_ACTIVE | = lv_integration_active | |
RETURN | = lv_return | |
EXCEPTIONS | ||
NOTHING_FOUND = 1 | ||
WRONG_OBJECTTYPE = 2 | ||
MISSING_COSTCENTER_DATA = 3 | ||
MISSING_OBJECT_ID = 4 | ||
. " HR_READ_FOREIGN_OBJECT_TEXT |
ABAP code using 7.40 inline data declarations to call FM HR_READ_FOREIGN_OBJECT_TEXT
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 OTYPE FROM WPLOG INTO @DATA(ld_otype). | ||||
"SELECT single SHORT FROM P1000 INTO @DATA(ld_short_text). | ||||
"SELECT single OBJID FROM WPLOG INTO @DATA(ld_objid). | ||||
"SELECT single STEXT FROM P1000 INTO @DATA(ld_object_text). | ||||
"SELECT single COSTCENTER FROM HRCA_COSTC INTO @DATA(ld_costcenter). | ||||
"SELECT single NAME FROM HRCA_COSTC INTO @DATA(ld_costcenter_name). | ||||
"SELECT single CONTRLAREA FROM HRCA_COSTC INTO @DATA(ld_controllingarea). | ||||
"SELECT single GSVAL FROM T77S0 INTO @DATA(ld_integration_active). | ||||
"SELECT single SUBRC FROM SY INTO @DATA(ld_return). | ||||
"SELECT single ISTAT FROM WPLOG INTO @DATA(ld_status). | ||||
DATA(ld_status) | = '1'. | |||
"SELECT single BEGDA FROM P1001 INTO @DATA(ld_begda). | ||||
DATA(ld_begda) | = '18000101'. | |||
"SELECT single ENDDA FROM P1001 INTO @DATA(ld_endda). | ||||
DATA(ld_endda) | = '99991231'. | |||
"SELECT single BEGDA FROM P1001 INTO @DATA(ld_reference_date). | ||||
DATA(ld_reference_date) | = SY-DATUM. | |||
"SELECT single LANGU FROM SY INTO @DATA(ld_langu). | ||||
DATA(ld_langu) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects