SAP HRHAPCN_OBJ_LIB_STATUS_CHANGE Function Module for Change Planned Status of Object
HRHAPCN_OBJ_LIB_STATUS_CHANGE is a standard hrhapcn obj lib status change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Change Planned Status of 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 hrhapcn obj lib status change FM, simply by entering the name HRHAPCN_OBJ_LIB_STATUS_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRHAPCN_PA_UI_OBJLIB
Program Name: SAPLHRHAPCN_PA_UI_OBJLIB
Main Program: SAPLHRHAPCN_PA_UI_OBJLIB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HRHAPCN_OBJ_LIB_STATUS_CHANGE 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 'HRHAPCN_OBJ_LIB_STATUS_CHANGE'"Change Planned Status of Object.
EXPORTING
* SNOTE = "Note
* WTLOG = ABAP_TRUE "Write Log or Not
* LOGTY = ' ' "Log Type
* ISTAT = '1' "Planning Status
* IS_TARGET = "Object
* NAME = "Object Name
EXCEPTIONS
NO_AUTHORITY = 1 NOTHING_FOUND = 2 ERROR_DURING_UPDATE = 3 WRITE_INFOTYPE_1001_ERROR = 4
IMPORTING Parameters details for HRHAPCN_OBJ_LIB_STATUS_CHANGE
SNOTE - Note
Data type: HAPCN_WD_UI_NOTEOptional: Yes
Call by Reference: Yes
WTLOG - Write Log or Not
Data type: CHAR1Default: ABAP_TRUE
Optional: Yes
Call by Reference: Yes
LOGTY - Log Type
Data type: HAPCN_LOG_TYPEDefault: SPACE
Optional: Yes
Call by Reference: Yes
ISTAT - Planning Status
Data type: ISTAT_DDefault: '1'
Optional: Yes
Call by Reference: Yes
IS_TARGET - Object
Data type: HAPCN_S_OBJ_LIBOptional: Yes
Call by Reference: Yes
NAME - Object Name
Data type: STEXTOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_AUTHORITY - No Authorization
Data type:Optional: No
Call by Reference: Yes
NOTHING_FOUND - Object Not Found
Data type:Optional: No
Call by Reference: Yes
ERROR_DURING_UPDATE - Error during update
Data type:Optional: No
Call by Reference: Yes
WRITE_INFOTYPE_1001_ERROR - Error create relationship
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HRHAPCN_OBJ_LIB_STATUS_CHANGE 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_snote | TYPE HAPCN_WD_UI_NOTE, " | |||
| lv_no_authority | TYPE HAPCN_WD_UI_NOTE, " | |||
| lv_wtlog | TYPE CHAR1, " ABAP_TRUE | |||
| lv_nothing_found | TYPE CHAR1, " | |||
| lv_logty | TYPE HAPCN_LOG_TYPE, " SPACE | |||
| lv_error_during_update | TYPE HAPCN_LOG_TYPE, " | |||
| lv_istat | TYPE ISTAT_D, " '1' | |||
| lv_write_infotype_1001_error | TYPE ISTAT_D, " | |||
| lv_is_target | TYPE HAPCN_S_OBJ_LIB, " | |||
| lv_name | TYPE STEXT. " |
|   CALL FUNCTION 'HRHAPCN_OBJ_LIB_STATUS_CHANGE' "Change Planned Status of Object |
| EXPORTING | ||
| SNOTE | = lv_snote | |
| WTLOG | = lv_wtlog | |
| LOGTY | = lv_logty | |
| ISTAT | = lv_istat | |
| IS_TARGET | = lv_is_target | |
| NAME | = lv_name | |
| EXCEPTIONS | ||
| NO_AUTHORITY = 1 | ||
| NOTHING_FOUND = 2 | ||
| ERROR_DURING_UPDATE = 3 | ||
| WRITE_INFOTYPE_1001_ERROR = 4 | ||
| . " HRHAPCN_OBJ_LIB_STATUS_CHANGE | ||
ABAP code using 7.40 inline data declarations to call FM HRHAPCN_OBJ_LIB_STATUS_CHANGE
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.| DATA(ld_wtlog) | = ABAP_TRUE. | |||
| DATA(ld_logty) | = ' '. | |||
| DATA(ld_istat) | = '1'. | |||
Search for further information about these or an SAP related objects