Exclusion of Employees in Core hybrid Replication
In SAP Standard Employee master data replication from SF EC to SAP HCM using report ECPAO_EE_ORG_REPL_QUERY we have an option to filter employees based on company code or country or Employee Class while sending query to SF EC as shown below,
But if there is a requirement to filter replication based on PERNR and USER_ID. Find below the approach.
Create a Custom Table ZHR_EMP_REP_FLTR like below.
Create a maintenance view ZHR_EMP_REP_FLTV as shown below.
Generate a Table maintenance Dialog with no recording routine as below.
Create a Transaction code for maintaining the Entries in the Filter table as below.
Now assign above Transaction code ZHR_EE_FLTR to Master data team as per need.
Master data team will enter employees info needs to filter as part of Employee master data replication in above view using transaction ZHR_EE_FLTR.
We need to create an implicit enhancement ZENH_FILTER_PERNRS in method GET_BASIC_PERNR_DATA_TAB of SAP standard Class CL_ECPAO_IN_PERNR_OF_EMPLOYEE to do actual employee filter.
Filter employee and Populate a message in the code as below to pass info back to SF EC Data replication monitor as below.
SLG1 Sample log looks like below.
So in this way we can exclude employees from replication to SAP HCM as per business need in Core hybrid scenario..