SAP HRHAPCN_OBJ_LIB_MOVE Function Module for Drag&Drop Objective Library
HRHAPCN_OBJ_LIB_MOVE is a standard hrhapcn obj lib move SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Drag&Drop Objective Library 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 move FM, simply by entering the name HRHAPCN_OBJ_LIB_MOVE 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): Remote-Enabled
Update:

Function HRHAPCN_OBJ_LIB_MOVE 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_MOVE'"Drag&Drop Objective Library.
EXPORTING
* PLVAR = "Plan Version
* IS_TAR_OBJ = "Transfer Structure of Objective Library
OTYPE = "Object Type
OBJID = "Object ID
TOTYPE = "Target Object Type
TOBJID = "Target Object ID
* GDATE = SY-DATUM "Current Date of Application Server
* GENDD = '99991231' "End Date
* VTASK = 'D' "Type of Update
* IS_SRC_OBJ = "Transfer Structure of Objective Library
EXCEPTIONS
NO_AUTHORITY = 1 UNDEFINED = 10 OBJECT_NOT_FOUND = 2 ERROR_DURING_CUT = 3 ERROR_DURING_INSERT = 4 GDATE_BEFORE_BEGDA = 5 WRONG_OTYPE = 6 WRONG_DATE_FORMAT = 7 MOVE_NOT_ALLOWED = 8 SCALE_ERROR = 9
IMPORTING Parameters details for HRHAPCN_OBJ_LIB_MOVE
PLVAR - Plan Version
Data type: PLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
IS_TAR_OBJ - Transfer Structure of Objective Library
Data type: HAPCN_S_OBJ_LIBOptional: Yes
Call by Reference: No ( called with pass by value option)
OTYPE - Object Type
Data type: OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJID - Object ID
Data type: HROBJIDOptional: No
Call by Reference: No ( called with pass by value option)
TOTYPE - Target Object Type
Data type: OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
TOBJID - Target Object ID
Data type: HROBJIDOptional: No
Call by Reference: No ( called with pass by value option)
GDATE - Current Date of Application Server
Data type: BEGDATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
GENDD - End Date
Data type: ENDDATUMDefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VTASK - Type of Update
Data type: VTASKDefault: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IS_SRC_OBJ - Transfer Structure of Objective Library
Data type: HAPCN_S_OBJ_LIBOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_AUTHORITY - No Authorization
Data type:Optional: No
Call by Reference: Yes
UNDEFINED - Other Error
Data type:Optional: No
Call by Reference: Yes
OBJECT_NOT_FOUND - No data selected
Data type:Optional: No
Call by Reference: Yes
ERROR_DURING_CUT -
Data type:Optional: No
Call by Reference: Yes
ERROR_DURING_INSERT - Error during Insert
Data type:Optional: No
Call by Reference: Yes
GDATE_BEFORE_BEGDA - Start date is later than end date
Data type:Optional: No
Call by Reference: Yes
WRONG_OTYPE -
Data type:Optional: No
Call by Reference: Yes
WRONG_DATE_FORMAT -
Data type:Optional: No
Call by Reference: Yes
MOVE_NOT_ALLOWED -
Data type:Optional: No
Call by Reference: Yes
SCALE_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HRHAPCN_OBJ_LIB_MOVE 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 PLVAR, " | |||
| lv_no_authority | TYPE PLVAR, " | |||
| lv_undefined | TYPE PLVAR, " | |||
| lv_is_tar_obj | TYPE HAPCN_S_OBJ_LIB, " | |||
| lv_otype | TYPE OTYPE, " | |||
| lv_object_not_found | TYPE OTYPE, " | |||
| lv_objid | TYPE HROBJID, " | |||
| lv_error_during_cut | TYPE HROBJID, " | |||
| lv_totype | TYPE OTYPE, " | |||
| lv_error_during_insert | TYPE OTYPE, " | |||
| lv_tobjid | TYPE HROBJID, " | |||
| lv_gdate_before_begda | TYPE HROBJID, " | |||
| lv_gdate | TYPE BEGDATUM, " SY-DATUM | |||
| lv_wrong_otype | TYPE BEGDATUM, " | |||
| lv_gendd | TYPE ENDDATUM, " '99991231' | |||
| lv_wrong_date_format | TYPE ENDDATUM, " | |||
| lv_vtask | TYPE VTASK, " 'D' | |||
| lv_move_not_allowed | TYPE VTASK, " | |||
| lv_is_src_obj | TYPE HAPCN_S_OBJ_LIB, " | |||
| lv_scale_error | TYPE HAPCN_S_OBJ_LIB. " |
|   CALL FUNCTION 'HRHAPCN_OBJ_LIB_MOVE' "Drag&Drop Objective Library |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| IS_TAR_OBJ | = lv_is_tar_obj | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| TOTYPE | = lv_totype | |
| TOBJID | = lv_tobjid | |
| GDATE | = lv_gdate | |
| GENDD | = lv_gendd | |
| VTASK | = lv_vtask | |
| IS_SRC_OBJ | = lv_is_src_obj | |
| EXCEPTIONS | ||
| NO_AUTHORITY = 1 | ||
| UNDEFINED = 10 | ||
| OBJECT_NOT_FOUND = 2 | ||
| ERROR_DURING_CUT = 3 | ||
| ERROR_DURING_INSERT = 4 | ||
| GDATE_BEFORE_BEGDA = 5 | ||
| WRONG_OTYPE = 6 | ||
| WRONG_DATE_FORMAT = 7 | ||
| MOVE_NOT_ALLOWED = 8 | ||
| SCALE_ERROR = 9 | ||
| . " HRHAPCN_OBJ_LIB_MOVE | ||
ABAP code using 7.40 inline data declarations to call FM HRHAPCN_OBJ_LIB_MOVE
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_gdate) | = SY-DATUM. | |||
| DATA(ld_gendd) | = '99991231'. | |||
| DATA(ld_vtask) | = 'D'. | |||
Search for further information about these or an SAP related objects