Skip to Content
Product Information
Author's profile photo PARAMITA MUKHERJEE

Troubleshooting in Business Integration Builder (BIB) for SuccessFactors Employee replication from Employee Central to SAP ERP HCM

Business Integration builder tool which is commonly known as BIB, is a very flexible tool used for integrating Success Factor Employee Central (EC) Employee Master Data with SAP ERP HCM. The details about replication of Employee Master data using Business Integration tool can be found in the guide here. 

This blog assumes that you have already set up your ERP HCM system with Success Factor (SF) Employee Central (EC) and have triggered Employee Master Data from EC using the Query program ‘ECPAO_EE_ORG_QUERY’. The query is sent to EC via the middleware CPI and the requested Employees have been replicated from EC to ERP. But the status of Employee replication is ‘failed’ due to Configuration issues/data issues and hence you would like to debug the code to resolve the errors.  

With this post you will learn how to troubleshoot the replication errors encountered during Employee Replication using BIB tool.  In ERP, the error logs are visible in the ‘Analyse Application Log’ which can be accessed via transaction SLG1 and in EC, the same can be checked in the Data Replication Monitor (DRM). 

There are two ways to debug/troubleshoot. 

1.Using the Employee Query Report/Program ECPAO_EE_ORG_QUERY: 

Use this troubleshooting mechanism in a Quality or Test environment when there are no scheduled jobs for Employee replication. Since this debugging technique uses the RFC/External user, it can impact Employee replication if this technique is used in a Productive environment or other environments where Employee replication job is scheduled as a batch job. Also make sure that the user is a ‘Dialog’ user in SU01 in order to debug in ERP. 

In this approach, we would Query the employee using the query program in ERP and debug the Employee in real time which will be fetched from EC.  

The steps to be followed are as outlined below: 

  • Go to transaction SE38 and execute the report ‘ECPAO_EE_ORG_REPL_QUERY’ .  
  • Give the transformation template group which you’ve created for Replicating the Employee. 
  • The External Employee id is the EC Employee ID which you want to replicate to ERP. 
  • Change Date is the date after which all the Employees will be replicated from EC. If you would like to replicate the complete data of an Employee (After FTSD) keep this field as blank. 
  • Make sure to do ‘Enable Payload Logging’ which logs the Query as well as the response in SRT_UTIL in ERP. 
  • Enable Extended Verbose Logging gives a detailed log of Employee master data w.r.t the mapping in SLG1 log. 
  • Test Mode can be used for troubleshooting where the Employee is replicated but won’t be persisted in the PA tables.  

Now to debug, before executing the query report with all these data, put an external breakpoint with the external user/RFC user in method CL_ECPAO_EE_MD_ORGAS_BNDL_REQ-> II_ECPAOX_EE_MD_ORGAS_BNDL_REQ~EE_MD_ORGAS_BNDLE_REPL_REQ. How to derive the name of this class? We will discuss that in the second method of troubleshooting. 

To get the external user/RFC user, you can check the SLG1 logs for any of the previously replicated employees. 

The main processing logic for BIB starts from the method CL_ECPAO_IN_PROCESS_MSG_BIB->CALL_EMPLOYEE_REPLICATION. If you would like to understand the BIB employee replication logic flow, please start from this point.  

 

2. Using the proxy for debugging: 

With this approach, you need to first download the payload file from SRT_UTIL. The payload file will be available only if the Employee was replicated from EC. So you can also first trigger the replication using the query report (ECPAO_EE_ORG_REPL_QUERY) and then check for the file in SRT_UTIL. To do this, please give the proper date and time (when the employee was replicated-> can be checked from SLG1 as well) and check for the Receiver Interface ‘EmployeeMasterDataAndOrgAssignmentBundleReplicationRequest_In’ . This file will contain the Employee master data fetched from EC. 

There will be many files with this Receiver Interface since the same proxy is also used for Notification purpose. As shown below, the file which we need will look something like this. The data would be in Base64 format. If you would like to check the Employee data, you can do so by decoding the data in XML format.  

Now download this file as marked below in your local computer.  

Next, you need to execute the proxy with the downloaded payload file. For this, please go to ABAP development workbench using transaction SE80 and open the package ‘PAOC_SFI_EE_PROXY’ Within the Enterprise Services, you will find the proxy II_ECPAOX_EE_MD_ORGAS_BNDL_REQ. Double click on this proxy and there you will find the Implementing class ‘CL_ECPAO_EE_MD_ORGAS_BNDL_REQ’ as shown in the below image 

As mentioned before in the previous method of debugging, this is how we derive the class name. Now put a session breakpoint (with your login user) within the method CL_ECPAO_EE_MD_ORGAS_BNDL_REQ-> II_ECPAOX_EE_MD_ORGAS_BNDL_REQ~EE_MD_ORGAS_BNDLE_REPL_REQ and execute the proxy. 

Now load the payload file from your computer into this proxy using the load file (as shown in the image) and execute. This will now hit those breakpoints and you can start debugging.  

With this option, you might need to perform an additional step during debugging. The payload response contains the timestamp from EC which we store in ERP after a successful employee replication. If the employee master data has been replicated today but the payload (which you are going to use for debugging) contains the timestamp from yesterday, then the replication will be terminated with a warning message in SLG1 log. This is to ensure that only the latest employee data is replicated to ERP.  

To avoid the termination of Employee replication, please also make sure to put a breakpoint in method CL_ECPAO_IN_PROCESS_MSG_BIB ->PROCESS_MESSAGE as shown in the below image. Then during debugging, please clear the variable last_replication_time or try to use an employee payload which was recently replicated to ERP since it will have the latest timestamp from EC.  

 

Note: For debugging in Production environment, please make sure to use a payload file which was initially queried with the ‘Test mode’ set via the Query report. This will ensure that when you debug using the proxy with a downloaded Employee master data payload file, the test mode indicator is still set. This further ensures that any changes you are performing during debugging are not committed to the database after completion of debugging. 

What’s next? Now you can troubleshoot the code and get an overview of how BIB replication works.

I hope these techniques help you in troubleshooting the issues encountered during replication easily. If you have any feedback, please put it in the comment section.  

 

Thanks, 

Paramita Mukherjee 

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Syambabu Allu
      Syambabu Allu

      Hi Paramita,

      it’s very helpful blog..Thanks for sharing.

      Thank you,

      Syam