Skip to Content
Technical Articles
Author's profile photo Jose Jeyakumar Wilson

Employee Central Payroll – PTP for non-localized country

Last month Bill Cradick provided a live demo session(in ECPY learning Rooms) on the Employee Central payroll PTP topics which was very informative. During the session, there was a question raised about how to handle PTP replication for non-localized countries.  There is a thread still open in the employee Central Payroll learning room where details are being shared and discussed with Mr. Joaquin Muela.

I would be covering the details on one of the options available to handle non localized country replication in Employee Central Payroll(ECPY).

What is the issue?

As you would all know, Employee Central provides localization for 98 countries whereas ECPY localization is available for 45 countries. When a requirement comes for implementing payroll for a non-localized country in ECPY, it’s a common practice to use the international version (country version 99) in ECPY system.

Lets take an example of implementing payroll for the country Peru (PE ). As Peru localization is available in EC, an employee hired under Peruvian entity would have country code as PE.

IN ECPY, as localization isn’t available for Peru, the enterprise structure would be designed with 99(international version)  as the country code.

When you run the standard replication program, the replication process fails as the system cannot map a  ‘PE’ country employee from EC to ‘99’ country in ECPY.

PTP framework

In the PTP framework, there are country specific replication classes available which are mapped in the table ‘HRSFEC_CNTRY’. This table is delivered by SAP and shouldn’t be altered. SAP has provided a customer table ‘HRSFEC_CNTRY_CC’ wherein customer specific entries can be maintained.

Determination of the replication classes happen in the class ‘CL_HRSFEC_EE_MDR_BNDL_PROC’ where the Molga of the pernr is  identified  and the relevant classes is obtained from HRSFEC_CNTRY/HRSFEC_CNTRY_CC. If a country doesn’t exist , then ’CL_HRSFEC_EE_MDR_MAIN’ is taken as the replication class by default.

Also note that ’CL_HRSFEC_EE_MDR_MAIN’ is the superclass for all the country specific replication classes.

’CL_HRSFEC_EE_MDR_MAIN’ has a logic in the method ‘CHECK_MOLGA_OF_PERNR’ which stops  the replication if the incoming country from EC (PE in our example) is different than the country (99) assigned in ECPY.


To resolve the issue, a custom class can be created with the superclass mentioned as ‘CL_HRSFEC_EE_MDR_MAIN’ so that it inherits all the methods of the superclass.

The method ‘CHECK_MOLGA_OF_PERNR’ in the custom class can be redefined so that the existing check can be suppressed and the replication logic can be allowed to continue.

You can also redefine other methods or include your own methods in case of any country specific logics required .For example, replicating national id information/bank details specific to Peru,etc., form EC to ECPY

The custom class has to be entered in the table HRSFEC_CNTRY_CC against country PERU and replication type as ‘ECEMD’ (Employee Master Data Replication).

With the above changes, the standard replication program would  pick up the custom replication class  and proceed with the replication logic  without any issue.


There is another option available in ECPY to handle non localized countries wherein a new country version called PE can be activated along with the PE payroll cluster. But in such a case, we need to spend some effort in developing payroll programs where the new PE payroll cluster is accessed.

Kindly feel free to share your inputs  on the above options and special thanks to Joaquin Mela and  Bill Cradick .

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Charles Jose
      Charles Jose

      Thank you Jose.

      This is a valuable solution in easing the implementation for non localized countries. Importantly saves critical time and efforts needed.

      Author's profile photo Nirmala V Mahadevappa
      Nirmala V Mahadevappa

      Thank you Jose.

      Brilliant job  as always.

      Author's profile photo Srinivasa Rao Y
      Srinivasa Rao Y

      Excellent Jose.. simply detailed out solution for non localized countries in ECPY....keep it up


      Author's profile photo Mohankumar Rengaraju
      Mohankumar Rengaraju

      Hi Jose,


      Nice to see a fully customized solution. It looks like a standard country version solution.



      Author's profile photo Rajpriya Paulraj
      Rajpriya Paulraj

      Apt approach to handle PTP replication for non localized countries in ECPY. Nice write and a good work. Thank you Jose!

      Author's profile photo Shilpa Ijantkar
      Shilpa Ijantkar

      Nicely explained Jose, Thank you

      Author's profile photo Jans Steyn
      Jans Steyn

      Just for your information EPI-USE has an SAP-certified Partner Add-On for Peru ECP, maintained for legal changes.

      Author's profile photo Jose Jeyakumar Wilson
      Jose Jeyakumar Wilson
      Blog Post Author

      Hi Steyn,

      thanks for the info . EPI-USE has addons for many of the non localised countries as you correctly mentioned.

      In my blog, I just took Peru as an example 🙂

      Thank you,


      Author's profile photo Hari Bhaskar Bhoopathy
      Hari Bhaskar Bhoopathy

      Dear Jose,

      Thanks for this great blog.

      I tried following your procedure and implement it for Bahrain (BH), but still, I am receiving the below error while I run "HRSFEC_PTP_EE_REPL". Can you please support

      Replication of employee data has failed for Id XXXXXX (265) for BH

      Message No. HRSFEC_SERVICES263

      I only want the employee to be successfully replicated.

      I have redefined the method with the "Redefine" button, do I need to make further changes at the code level.?



      Step 1



      Redefining methods



      Table:table HRSFEC_CNTRY_CC


      Please let me know if I have completed the full configurations or I need to make some additional changes.



      Author's profile photo Jose Jeyakumar Wilson
      Jose Jeyakumar Wilson
      Blog Post Author

      Hi Hari,

      In the redefined method check_molga_of_pernr , can you set the exporting parameter ev_is_equal to 'X' and then try replicating.

      Only if ev_is_equal is 'X'(abap_true), the replication program will proceed further. If not, it will throw an error and exit.

      Let me if the above suggestion worked.

      Thank you,


      Author's profile photo Nashwa Abdel Aziz
      Nashwa Abdel Aziz

      Thanks for the great information it really helped me to implement LB Localization.