SAP HRMGE_MERGE_CP_RELATIONSHIP Function Module for Merge personnel assignments to CP









HRMGE_MERGE_CP_RELATIONSHIP is a standard hrmge merge cp relationship SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Merge personnel assignments to CP 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 hrmge merge cp relationship FM, simply by entering the name HRMGE_MERGE_CP_RELATIONSHIP into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRMGE00_CP_RELATION_CHANGE
Program Name: SAPLHRMGE00_CP_RELATION_CHANGE
Main Program: SAPLHRMGE00_CP_RELATION_CHANGE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HRMGE_MERGE_CP_RELATIONSHIP 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 'HRMGE_MERGE_CP_RELATIONSHIP'"Merge personnel assignments to CP
EXPORTING
PERSONID_EXT = "External Person ID

TABLES
PERNR_TAB = "HR: Master Data, PERNR Table (unsorted)

EXCEPTIONS
IT_FRAMEWORK_INACTIVE = 1 PERSONID_EXT_NOT_FOUND = 10 MODIFY_PERSONID_EXT = 11 DATA_SHARING = 12 DB_UPDATE = 13 MERGE_ONLY_TWO_PERNO = 14 MERGE_IMPOSSIBLE = 15 NO_ACTIVE_PLVAR = 2 PERNR_WO_CP = 3 MERGE_NOT_SUPPORTED = 4 PERNR_LOCK = 5 OBJECT_LOCK = 6 INSERT_NEW_CP_RELAT = 7 DELETE_OLD_CP_RELAT = 8 DELETE_CP_OBJECT = 9
.



IMPORTING Parameters details for HRMGE_MERGE_CP_RELATIONSHIP

PERSONID_EXT - External Person ID

Data type: PERSONID_EXT
Optional: No
Call by Reference: Yes

TABLES Parameters details for HRMGE_MERGE_CP_RELATIONSHIP

PERNR_TAB - HR: Master Data, PERNR Table (unsorted)

Data type: PERNR_TAB
Optional: No
Call by Reference: Yes

EXCEPTIONS details

IT_FRAMEWORK_INACTIVE - Infotype Framework not active

Data type:
Optional: No
Call by Reference: Yes

PERSONID_EXT_NOT_FOUND - IT0709 for ext. PersonID was not found

Data type:
Optional: No
Call by Reference: Yes

MODIFY_PERSONID_EXT - Modification of ext. Personid failed

Data type:
Optional: No
Call by Reference: Yes

DATA_SHARING - Data Sharing corrections failed

Data type:
Optional: No
Call by Reference: Yes

DB_UPDATE - Update of database failed

Data type:
Optional: No
Call by Reference: Yes

MERGE_ONLY_TWO_PERNO - Can only merge two personnel numbers

Data type:
Optional: No
Call by Reference: Yes

MERGE_IMPOSSIBLE - Merge is impossible

Data type:
Optional: No
Call by Reference: Yes

NO_ACTIVE_PLVAR - Active PLVAR was not found

Data type:
Optional: No
Call by Reference: Yes

PERNR_WO_CP - Program was called with Pernr without CP

Data type:
Optional: No
Call by Reference: Yes

MERGE_NOT_SUPPORTED - Pernrs are not in different molgas

Data type:
Optional: No
Call by Reference: Yes

PERNR_LOCK - Pernrs could not be locked

Data type:
Optional: No
Call by Reference: Yes

OBJECT_LOCK - PD objects could not be locked

Data type:
Optional: No
Call by Reference: Yes

INSERT_NEW_CP_RELAT - Insertion of new CP relationships failed

Data type:
Optional: No
Call by Reference: Yes

DELETE_OLD_CP_RELAT - Deletion of CP relationships failed

Data type:
Optional: No
Call by Reference: Yes

DELETE_CP_OBJECT - Deletion of CP object failed

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for HRMGE_MERGE_CP_RELATIONSHIP 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:
lt_pernr_tab  TYPE STANDARD TABLE OF PERNR_TAB, "   
lv_personid_ext  TYPE PERSONID_EXT, "   
lv_it_framework_inactive  TYPE PERSONID_EXT, "   
lv_personid_ext_not_found  TYPE PERSONID_EXT, "   
lv_modify_personid_ext  TYPE PERSONID_EXT, "   
lv_data_sharing  TYPE PERSONID_EXT, "   
lv_db_update  TYPE PERSONID_EXT, "   
lv_merge_only_two_perno  TYPE PERSONID_EXT, "   
lv_merge_impossible  TYPE PERSONID_EXT, "   
lv_no_active_plvar  TYPE PERSONID_EXT, "   
lv_pernr_wo_cp  TYPE PERSONID_EXT, "   
lv_merge_not_supported  TYPE PERSONID_EXT, "   
lv_pernr_lock  TYPE PERSONID_EXT, "   
lv_object_lock  TYPE PERSONID_EXT, "   
lv_insert_new_cp_relat  TYPE PERSONID_EXT, "   
lv_delete_old_cp_relat  TYPE PERSONID_EXT, "   
lv_delete_cp_object  TYPE PERSONID_EXT. "   

  CALL FUNCTION 'HRMGE_MERGE_CP_RELATIONSHIP'  "Merge personnel assignments to CP
    EXPORTING
         PERSONID_EXT = lv_personid_ext
    TABLES
         PERNR_TAB = lt_pernr_tab
    EXCEPTIONS
        IT_FRAMEWORK_INACTIVE = 1
        PERSONID_EXT_NOT_FOUND = 10
        MODIFY_PERSONID_EXT = 11
        DATA_SHARING = 12
        DB_UPDATE = 13
        MERGE_ONLY_TWO_PERNO = 14
        MERGE_IMPOSSIBLE = 15
        NO_ACTIVE_PLVAR = 2
        PERNR_WO_CP = 3
        MERGE_NOT_SUPPORTED = 4
        PERNR_LOCK = 5
        OBJECT_LOCK = 6
        INSERT_NEW_CP_RELAT = 7
        DELETE_OLD_CP_RELAT = 8
        DELETE_CP_OBJECT = 9
. " HRMGE_MERGE_CP_RELATIONSHIP




ABAP code using 7.40 inline data declarations to call FM HRMGE_MERGE_CP_RELATIONSHIP

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!