Employee Master Data Replication in S/4 HANA from Workday
The client is using Workday as the HR solution, there was a need to set up HR mini-master in S/4 HANA and consume data from Workday and other 3rd party systems to replicate the Organization, Position, and Worker data into the respective infotypes in the S/4 HANA system. HRMM was set up to support/fulfill requirements of SAP modules: Asset Management, Finance, and Material management
Asset Management: To perform planning, scheduling, and execution of maintenance work, workforce data is required.
Finance: Creation of Employee Business Partner & various workflows.
Material Management: Workflows for the purchase order.
To fulfill the above requirement following information objects of Employee and Contingent Workers is required:
|HR Organization||T527X (Table)|
|HR Position||T528B, T528T (Table)|
|IT 0000 – Actions|
|IT 0001- Org Assignment|
|IT 0002 – Personal Data|
|IT 0105 – Communication|
|IT 0006 – Address|
|IT 0009 – Bank|
|IT 0024 – Qualification|
|IT 0007 – Shift|
|IT 2001 – Absence|
Data objects need to be in sequence for initial load/ initial hiring.
Suppose if the organization (T527X) data did not flow from Workday due to any reason, then any attempt to create infotype 0001 with the org unit field will cause an error. Similarly, if the position data (T528B, T528T) did not flow from Workday due to any reason, then any attempt to create infotype 0001 with position field will cause an error.
Now a summary of the design looks like below:
- Prior to creating data in IT0001 with position and org unit; check if position id and org id is available in T528B/T528Tand T527X respectively
1.1 If not available create a record in T528B/T528T and T527X respectively.
1.2 If available create a record in IT0001 directly.
Technical Processing logic:
Organization and Position creation in S/4 HANA from Workday
The Workday data model for maintaining organization entities does not have valid end dates for the relationships and they are used to create only employee assignments to the organization structure. However, in S/4 HANA, the organization data model is based on relationship (O-S-P). So, it will be quite complex to replicate Org.Units/ Positions/ Jobs in HRP1000, HRP1001 tables from Workday.
OM-PA integration switch PLOGI-ORGA is “OFF” in T77SO to switch of OM-PA integration and to enable supervisor field in IT0001.
There are no standard programs/BAPIs apart from RHINTE20 to update the position and organization unit to table T528B and T527X.
There is standard program RP_HRSFEC_JOB_POS_REPL and class CL_HRSFEC_KEY_MAP_JOB_POS Method-> FLUSH which creates the entries in T528B and T527X. Which can be used as guidance to build a custom program.
By referring to the class such as CL_HRSFEC_KEY_MAP_JOB_POS method-> FLUSH, update the tables T528B and T527X first and then update the infotype 0001 with necessary entries. By doing so, F4 checks in IT0001 of position and org unit fields on tables T528B and T527X will also go through and infotypes can be updated
Employee master-data replication in S/4 HANA from Workday
We will be using a new infotype framework and the following decoupled classes in the design:
- Infotype 0000 – CL_HRPA_INFTY_0000
- Infotype 0001 – CL_HRPA_INFTY_0001
- Infotype 0002 – CL_HRPA_INFOTYPE_0002
- Infotype 0006 – CL_HRPA_INFOTYPE_0006
- Infotype 0009 – CL_HRPA_INFTY_0009
- Infotype 0105 – CL_HRPA_INFOTYPE_0105
- Infotype 1000 – CL_HRBAS_INFTY_1000
- infotype 1001 – CL_HRBAS_INFTY_1001
Framework classed provided methods like INSERT, MODIFY and DELETE for creating, changing and deleting infotype records.
Create a wrapper RFC that has the data from Workday as the importing parameter, and within this RFC infotypes like 0000, 0001, 0002, 0006 and 0007 should be created in sequence. If there is an error in creating any of the infotypes, the whole transaction should be rolled back. For delta changes, the error log can be maintained so that process can be rerun for errored ones.
Note: Creating records using decoupled classed will create a record in IT0003, IT1001 (P-CP Relationship) & (CP-BP relationship) and also create employee BP records. Necessary authorization should be in place for all infotypes and employee BP.
Replicating time infotypes from Workday
Following BAPIs can be used:
- BAPI_PTMGRATTABS_MNGCREATION to create an IT2001 or IT2002 infotype record
- BAPI_PTMGRATTABS_MNGCHANGE to change an existing IT2001/2002 infotype record
- BAPI_PTMGRATTABS_MNGDELETE To delete an existing IT2001/2002 infotype record
- For creating infotype 0007 class Infotype 0007 – CL_HRPT_INFOTYPE_0007 can be used
Replicating Qualification from Workday
Following BAPIs can be used, considering the qualification catalogue (OOQA transaction) is already available and setup
- Infotype classes CL_HRBAS_INFTY_1000 and CL_HRBAS_INFTY_1001 can also be used to create HRP1000 and HRP1001 records for qualifications
Conclusion and Outlook:
This is one of the many ways to achieve HR Mini-Master integration with Workday or 3rd Party system. All error logs can be captured in .csv or .xls which contains PERNR Infotype and Standard error text/ message and sent to email ids. The on-demand load can be implemented to reprocess these errors PERNRs.
Lesson Learned or Import point to keep in mind:
- A dedicated SAP system user should be set up in SAP S4HANA which will be used in CPI to call HRMINI OData. This user should have all necessary HR authorization and Business Partner authorization.
- S_USER_GRP (ACTVT=02 and CLASS = .)this authorization is needed for BP sync
- While updating IT0001 update PA0001-OTYPE = “S” else IT0001 in PA30 will give an error as Position not available in T528B.
- To have better performance when processing a huge load of employees, larger batches can be split into smaller batches and processed using asynchronous processing RFCs.
- 2846423 – ‘Qualification catalogue is for display only’ shows when running OOQA
- 2166374 – Considerations with BAPI_HRMASTER_SAVE_REPL_MULT BAPI
As I started to go through the blog, I realise that there are so many details that one can cover. I have tried to balance but any input is appreciated. We can find so many contain with regard to Successfactors and SAP integration but knowledge on integration with workday is limited, I hope this contributes a little to make it more known.
What do you think about it? Please feel free to ask questions, I will try to answer them all.