Transfer employee data from ERP system to CRM (EIC) via HRMD_ABA#

There are lots of SAP notes about this topic, search with keyword "HRALX"!

These are the main function pools:

fp.SAPLRHA0HR-ALE: Verteilung Nachrichtentyp HRMD
fp.SAPLHRALX00_INTEGRATION_PERSONIntegration zwischen Person und GP
fp.SAPLHRALX00_BUPA_INTERFACEKapselung der BUPA-Funktionen

These are special points in the code:

CL_HR_ALEOX_BADI Method PROCESS_IDOC_PERS
r.LRHA0F01 Form IDOC_PROCESS_HRMD
r.LHRALX00_INTEGRATION_PERSONF18the ERP infotypes are mapped to HRP558x tables and BUT000 (see EIC): form.PUT_ALE_DATA_INTO_CONT > perform map_p558x_to_container
f.RH_ALEOX_INTG_CP_FILL_CONTfills the BP into field BP_NUMBER of the general container, if already connected with CP (in HRP1001)
f.RH_ALEOX_BUPA_WRITE_CPcreates the business partner, if BP_NUMBER is empty and opera_bp_hdr = 'I', Enhanced ZSSC_ENH_RH_ALE_BUPA_WRITE_CP (SE20)
f.RH_ALEOX_BUPA_WRITE_RELAT_CPadds an entry for HRP1001 to the IDoc data to connect CP with BP with relation B207 (BP_NUMBER mus be filled at this stage and OPERA_RELAT NOT INITIAL)
r.LHRALX00_BUPA_INTERFACEF13Form CP_BP_CREATE_BUSINESS_PARTNERS

A business partner (BP) is only created, if a valid address (IT0006) is provided. A valid address is given, when <container>-BP_HDR_DATA_CP-NAMCOUNTRY + NAMCOUNTRYISO are filled.
Generally no BP is created for terminated employees (IT0000-STAT2=0). If you want to do so, you need to change the following:

r.LHRALX00_BUPA_INTERFACEF19 > form.GET_EMPLOYEE_STATUSenable terminated employees (enhance coding STAT2 = 0)
r.LHRALX00_BUPA_INTERFACEF33
r.LHRALX00_BUPA_INTERFACEF43lines 51+107