SAP RHPE_HALFVAL_VALID_WRITE Function Module for
RHPE_HALFVAL_VALID_WRITE is a standard rhpe halfval valid write 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 rhpe halfval valid write FM, simply by entering the name RHPE_HALFVAL_VALID_WRITE into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHPE
Program Name: SAPLRHPE
Main Program: SAPLRHPE
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RHPE_HALFVAL_VALID_WRITE 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 'RHPE_HALFVAL_VALID_WRITE'".
EXPORTING
PLVAR = "Plan Version
* OTYPE = 'Q' "
OBJID = "Source object
* GDATE = SY-DATUM "Key Date
MONTHS = "
YEARS = "
TYPE = "
* VTASK = 'D' "
EXCEPTIONS
INVALID_DATE = 1 OBJECT_NOT_FOUND = 2 NO_AUTHORIZATION = 3 ERROR_DURING_INSERT = 4 UNDEFINED = 5
IMPORTING Parameters details for RHPE_HALFVAL_VALID_WRITE
PLVAR - Plan Version
Data type: HRP1000-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
OTYPE -
Data type: HRP1000-OTYPEDefault: 'Q'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJID - Source object
Data type: HRP1000-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
GDATE - Key Date
Data type: HRP1000-GDATEDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
MONTHS -
Data type: HRP1025-NMONTHSOptional: No
Call by Reference: No ( called with pass by value option)
YEARS -
Data type: HRP1025-NYEARSOptional: No
Call by Reference: No ( called with pass by value option)
TYPE -
Data type: HRP1025-N_TYPEOptional: No
Call by Reference: No ( called with pass by value option)
VTASK -
Data type: HRRHAP-VTASKDefault: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_DATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORIZATION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_DURING_INSERT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNDEFINED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RHPE_HALFVAL_VALID_WRITE 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, " | |||
| lv_invalid_date | TYPE HRP1000, " | |||
| lv_otype | TYPE HRP1000-OTYPE, " 'Q' | |||
| lv_object_not_found | TYPE HRP1000, " | |||
| lv_objid | TYPE HRP1000-OBJID, " | |||
| lv_no_authorization | TYPE HRP1000, " | |||
| lv_gdate | TYPE HRP1000-GDATE, " SY-DATUM | |||
| lv_error_during_insert | TYPE HRP1000, " | |||
| lv_months | TYPE HRP1025-NMONTHS, " | |||
| lv_undefined | TYPE HRP1025, " | |||
| lv_years | TYPE HRP1025-NYEARS, " | |||
| lv_type | TYPE HRP1025-N_TYPE, " | |||
| lv_vtask | TYPE HRRHAP-VTASK. " 'D' |
|   CALL FUNCTION 'RHPE_HALFVAL_VALID_WRITE' " |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| GDATE | = lv_gdate | |
| MONTHS | = lv_months | |
| YEARS | = lv_years | |
| TYPE | = lv_type | |
| VTASK | = lv_vtask | |
| EXCEPTIONS | ||
| INVALID_DATE = 1 | ||
| OBJECT_NOT_FOUND = 2 | ||
| NO_AUTHORIZATION = 3 | ||
| ERROR_DURING_INSERT = 4 | ||
| UNDEFINED = 5 | ||
| . " RHPE_HALFVAL_VALID_WRITE | ||
ABAP code using 7.40 inline data declarations to call FM RHPE_HALFVAL_VALID_WRITE
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). | ||||
| DATA(ld_otype) | = 'Q'. | |||
| "SELECT single OBJID FROM HRP1000 INTO @DATA(ld_objid). | ||||
| "SELECT single GDATE FROM HRP1000 INTO @DATA(ld_gdate). | ||||
| DATA(ld_gdate) | = SY-DATUM. | |||
| "SELECT single NMONTHS FROM HRP1025 INTO @DATA(ld_months). | ||||
| "SELECT single NYEARS FROM HRP1025 INTO @DATA(ld_years). | ||||
| "SELECT single N_TYPE FROM HRP1025 INTO @DATA(ld_type). | ||||
| "SELECT single VTASK FROM HRRHAP INTO @DATA(ld_vtask). | ||||
| DATA(ld_vtask) | = 'D'. | |||
Search for further information about these or an SAP related objects