SAP RHPK_EARMARKS_READ Function Module for Read Designations
RHPK_EARMARKS_READ is a standard rhpk earmarks read 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 Designations 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 rhpk earmarks read FM, simply by entering the name RHPK_EARMARKS_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHPK
Program Name: SAPLRHPK
Main Program: SAPLRHPK
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RHPK_EARMARKS_READ 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 'RHPK_EARMARKS_READ'"Read Designations.
EXPORTING
PLVAR = "
OTYPE = "Object type
SOBID = "Object ID
* BEGDA = SY-DATUM "Start Date
* ENDDA = SY-DATUM "End Date
* WITH_STEXT = 'X' "
TABLES
PROFILE = "
EXCEPTIONS
NO_AUTHORITY = 1 INVALID_OTYPE = 2 OBJECT_NOT_FOUND = 3 UNDEFINED = 4
IMPORTING Parameters details for RHPK_EARMARKS_READ
PLVAR -
Data type: HRP1000-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
OTYPE - Object type
Data type: HRP1000-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
SOBID - Object ID
Data type: HRP1001-SOBIDOptional: No
Call by Reference: No ( called with pass by value option)
BEGDA - Start Date
Data type: HRP1000-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA - End Date
Data type: HRP1000-ENDDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_STEXT -
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RHPK_EARMARKS_READ
PROFILE -
Data type: HRPE_PROFLOptional: 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)
INVALID_OTYPE - Unauth. object type
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_FOUND - Object does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNDEFINED - Other Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RHPK_EARMARKS_READ 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_plvar | TYPE HRP1000-PLVAR, " | |||
| lt_profile | TYPE STANDARD TABLE OF HRPE_PROFL, " | |||
| lv_no_authority | TYPE HRPE_PROFL, " | |||
| lv_otype | TYPE HRP1000-OTYPE, " | |||
| lv_invalid_otype | TYPE HRP1000, " | |||
| lv_sobid | TYPE HRP1001-SOBID, " | |||
| lv_object_not_found | TYPE HRP1001, " | |||
| lv_begda | TYPE HRP1000-BEGDA, " SY-DATUM | |||
| lv_undefined | TYPE HRP1000, " | |||
| lv_endda | TYPE HRP1000-ENDDA, " SY-DATUM | |||
| lv_with_stext | TYPE SY-INPUT. " 'X' |
|   CALL FUNCTION 'RHPK_EARMARKS_READ' "Read Designations |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| OTYPE | = lv_otype | |
| SOBID | = lv_sobid | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| WITH_STEXT | = lv_with_stext | |
| TABLES | ||
| PROFILE | = lt_profile | |
| EXCEPTIONS | ||
| NO_AUTHORITY = 1 | ||
| INVALID_OTYPE = 2 | ||
| OBJECT_NOT_FOUND = 3 | ||
| UNDEFINED = 4 | ||
| . " RHPK_EARMARKS_READ | ||
ABAP code using 7.40 inline data declarations to call FM RHPK_EARMARKS_READ
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 PLVAR FROM HRP1000 INTO @DATA(ld_plvar). | ||||
| "SELECT single OTYPE FROM HRP1000 INTO @DATA(ld_otype). | ||||
| "SELECT single SOBID FROM HRP1001 INTO @DATA(ld_sobid). | ||||
| "SELECT single BEGDA FROM HRP1000 INTO @DATA(ld_begda). | ||||
| DATA(ld_begda) | = SY-DATUM. | |||
| "SELECT single ENDDA FROM HRP1000 INTO @DATA(ld_endda). | ||||
| DATA(ld_endda) | = SY-DATUM. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_with_stext). | ||||
| DATA(ld_with_stext) | = 'X'. | |||
Search for further information about these or an SAP related objects