Technical Articles
Configuring the replication of Cost Centers from SAP ERP to SuccessFactors Employee Central Using SAP Cloud Platform Integration
Hello SAP community,
We would like to share one working sample of the replication of Cost Centers from SAP ERP to SuccessFactors Employee Central Using SAP Cloud Platform Integration as the Middleware.
The ERP used was one S/4HANA OnPremise running ODTFINCC 600 SP11 and SAP_BASIS 753 SP 2.
Objective:
Help our customers and partners completing the configuration in your local environments/projects.
The handbook used during this set up is:
- Replicating Cost Centers from SAP ERP to Employee Central Using SAP Cloud Platform Integration as the Middleware – (1H 2020 – 2020-04-09)
- the handbook link includes the “/latest” in the URL, so in future, this handbook might have some different procedures or minor changes not documented in this blog post.
All the images and data used here was taken from SuccessFactors SalesDemo instance, local CPI tenant, local ERP OnPremise installation, so we are using dummy data.
In the handbook, we have the technical scenario and landscape in the picture below:
In the sample of this blog posting, we did not implemented the ERP to ECP COSMAS IDOC/RFC replication. In this sample we implemented just the ERP > CPI (SAP Cloud Platform Integration) > SAP SuccessFactors part of the flow, according the image below:
We are going to cover the implementation in steps 1 to 7.
1) Setting up the middleware SAP Cloud Platform Integration (CPI).
Package name = ERP to SAP SuccessFactors Employee Central Cost Center
Artifact names =
- Replicate Cost Centers from SAP ERP or SAP S4HANA to SAP SuccessFactors Employee Central
- Map Cost Center Language Keys from SAP ERP or SAP S/4HANA to Language Keys from SAP SuccessFactors Employee Central
Find below the configuration done.
The “Sender” tab was not modified. We kept the standard values.
In the “Receiver” tab the Address was selected (according the Datacenter of our SF instance, in our case it is hosted in the DC4 salesdemo).
The Timeout (in min) was changed the value to 10 to avoid any timeout. This could help when the servers are more slowly.
Under “More” tab, we changed the ENABLE_PAYLOAD_LOGGING = true during the setup, later (production) you can keep this as false.
We also configured the ERP_DEFAULT_LANGUAGE = E (to use English).
I would recommend you to read all the parameters description in the chapter 5.3.4 of the implementation handbook.
After this configuration above, the artifact was deployed.
The endpoint URL generated was https://d400001-iflmap.hcisbt.br1.hana.ondemand.com/cxf/ERP_to_EC_CostCenter_Replication_IDoc
Please notice that this endpoint above works in our test tenant. You might have one different URL in yours.
We also did the language mapping for 3 languages, according below:
Doing these configurations above we prepared the CPI artifact to receive translations of english, portuguese and spanish.
2) Starting with the ERP side.
Transaction = WE30 > ODTF_CCTR01 > display
Double click in the E101ODTF_S_COST_CENTER_NAME > Segment editor
In the below screen you can see the lengths of the fields. This is the standard configuration and the same length should be kept in the SF side (Admin center > Configure Object Definitions > Cost Center > config is reflected in the FOCostCenter OData entity).
This part is not required to change, you can keep the standard values, but in case your company need to change length or add fields, please return back here.
3) Transaction SM59 > connection type G > create:
Port is 443 to use HTTPS protocol.
Path Prefix is the address defined the “Sender” tab configuration of your CPI.
Under Logon & Security, we typed the CPI username and password and we also selected the SSL Certificate Active and SSL Client (Standard).
We did not add the CPI certificates under STRUST this time, because this was already done inside the BIB implementation (step 3 of this other blog posting).
Important. In this blog posting, we did not enable the Change pointers, because we will manually sync Cost centers. In one customer real life scenario, please enable the Change pointers according the chapter 6.2 Enabling Change Pointers of the handbook.
4) Transaction SALE > Basic Settings > Logical Systems > Define Logical Systems > created the S4ACLNT200 and CPI_BR Logical Systems. These names are the suggestions from our test system. In your side, you can create something according your landscape like PP1CLNT700 and CPI_US, etc.
Returning back in the transaction above, now let’s configure the > Modelling and Implementing Business Processes > Maintain Distribution Model and Distribute Views (last option in the bellow screen).
Switch to the edit mode > Create Model view with the Technical name EC_CC_REPL.
Add Message Type ODTF_CCTR with the Model view EC_CC_REPL created earlier and the Receiver CPI_BR created earlier.
5) Transaction WE21 > XML HTTP > Create > used the values below:
Application/x-sap.idoc
RFC destination created earlier (named S4A_CPI_COST_CENTER in the step 3)
6) Transaction WE20 > Partner Type LS > Create:
Used the Type US, Agent my user id, Lang. EN and also the Partner No. the middleware logical system created earlier in step 4 (CPI_BR) and saved.
Clicked in the plus button of the Outbound tab.
Included the message Type ODTF-CCTR
Receiver Port CC_CPI
Basic Type ODFT_CCTR01
Completed the settings like above and Saved.
7) Now let’s test.
Transaction SE38 > run the report named ODTF_REPL_CC.
For this sample purpose, we selected just one cost center (code “REM”) and we flagged some options according below.
Logical System (value previously created)
Receiver Partner No. (value previously created)
Send IDOC.
After you execute, you can see the ID of the IDOC created.
In this sample above the IDOC was ID = 000000…0000003 (lots of zeros and 3 in the end).
This internal system is not sending IDOCs automatically because like I explained, the change pointers were not configured.
To push this to CPI and SuccessFactors, please use the transaction:
Access the transaction BD87 > type the IDOC ID and run.
Select the line and click in Process:
This will trigger the ERP IDOC (RFC) > CPI (middleware) > SF OData upsert (update the Admin center > Manage Data > Position).
We can see under the CPI message processing the completed log.
In the SF side, the call arrived with OData API upsert in the entity FOCostCenter. You can see that under Admin center > OData API Audit logs.
We can see the record created in the Admin center > Manage Data > Cost Center > search for the cost center REM.
All set!
Happy implementation.
Please also check out some relevant KBAs for common issues.
2680792 – ERP to EC Cost Center Replication Failure – Inbound processing in endpoint at /ERP_to_EC_CostCenter_Replication_IDoc failed with message “Fault:Unexpected EOF in prolog
2817538 – IDoc not reaching CPI for Cost Center Replication – SuccessFactors Integrations
2743884 – Package integration: ERP to SAP SuccessFactors Employee Central Cost Center Customization options
2747830 – ERP to SuccessFactors Cost Center Object Replication using HCI/CPI Tool with Error Message: The XML is malformed at node <XXXX>
Conclusion:
Using the instructions of this blog posting, you will be able to set up the SAP Cloud Platform Integration (CPI) packages, the ERP RFCs and other configurations required and later validate the replication of Cost Centers in your SuccessFactors instance.
I hope this blog post can help your team doing the same implementation faster.
If you find this blog post helpful – please press like button ?
Best Regards from Brazil,
Soliman
Hi Guilherme
Thanks for the detailed information.
Can you tell me how did you manage the association with legal entity in EC side when the legal entities are starting at different start dates in EC.
In ODTF_REPL_CC program variant we can have only one start date to transfer delta changes of cost centres.
There is also a challenge where the FI systems sends costcentre via ALE to HCM system and change pointers are not created in HCM side as the data is directly coming in ALE method.
Can you share some inputs on the above aspects.
Regards
Gautham.
Hi Soliman,
Thanks for sharing in detailed blog to replicate Cc from SAP HCM to SF EC.
As mentioned Gautham,is there way to mange associate to legal entity when replicate CC from SAP HCM to SF EC.
Thank you,
Syam
Hello Syambabu Allu and Gautham Reddy N
Thanks for your comments and questions.
I spoke with the SF engineering colleagues and he helped sharing guidance and documentations for your questions. Find below:
About the question with the association with legal entity:
In cost center replication from ERP to EC we don’t support an association to legal entity. The parameter COMPANY_ID_TARGET_FIELD in the CPI process can be used to enter a custom field name for the cost center object in EC to which the Company Code (COMPANY_CODE_ID) value from ERP IDoc should be mapped to. But this is just a custom field, no navigation field or association to legal entity. This is also described in our documentation here:
https://help.sap.com/viewer/4bbb474f1284476faf550afd7c1250ab/latest/en-US/902565d2411c4612aae7566ccf9b963e.html
About the question with just one start date:
We are not sure if we got the question. This date is the date from which the historic data is replicated. We don’t see the need or use case why there should be multiple start dates.
More information about this can be found here under “Transfer of Historic Data as Of”:
https://help.sap.com/viewer/4bbb474f1284476faf550afd7c1250ab/latest/en-US/c097cde64801431895efdc5caf3cb653.html
About the last question with change pointers:
For this question we can only refer to our documentation where it is described how to set up the replication to run it in delta mode to replicate changes using change pointers:
https://help.sap.com/viewer/4bbb474f1284476faf550afd7c1250ab/latest/en-US/50dfdc724ae64defb060ccb799f6e877.html
And also how to enable change pointers:
https://help.sap.com/viewer/4bbb474f1284476faf550afd7c1250ab/latest/en-US/b293faaee49448d09b311f3aaddb34dc.html
I hope this can help you both.
Have a great Friday!
Hi Guilherme, how are you doing?
My question is about how to deal with modifications in this entire flow, since SAP ERP to SF. Which is the best approach if I had been required to apply some modifications along this way?
For example, let´s suppose that someone tells me to add a fixed information in Description field concatenating with regular information, where is the best place to do this? Use a BADI, into the CPI iflow, or another place?
Thanks for sharing your knowledge, by the way, um grande abraço, sou brasileiro também! haha
Sérgio.
Hello Sergio Silva
I am good thanks for asking, hope you well and safe too.
To apply modification like your sample (concatenate description + other info), the best place is with User exists, according link below:
https://help.sap.com/viewer/4bbb474f1284476faf550afd7c1250ab/latest/en-US/c33bb21eef3544ce8bf1b29330017ec5.html
Keep in mind that your source system is ERP and destination is SF, in that case, the destination system also need to be prepared to receive this modified field.
You can check the step 2 of this KBA 2527971 with one sample of the FOCostCenter entity inside the Admin center > OData API Data Dictionary. In that case, your sender system ERP needs to send the fields in the same format your OData entity can accept, like creatable/upsertable fields, string fields check the maxlength of the field, etc.
Um abraço!
Hi Guilherme Soliman
I need your help for an issue. I have configured the Standard iflow in CPI , but in the Payload from IDOC , Field Name_Short is not there. This is why , Name Field at EC is getting filled correctly. Can you please help.
Thanks and Regards,
Vivek Jain
Hello Vivek
Can you please check the step 2 of this blog where we see the NAME_SHORT under WE30 ?
Another thing that can be the issue is that the cost center have this value populated in one language, but not in the one you are checking or did the mapping.
Try to check these both configurations and if assistance is still needed, please raise one support incident. Thanks
Thanks for the Response Guilherme. I hope I got your comment , but the value is not there in the payload from S4 itself.
IDOC Payload Screenshot
Hi Guilherme
I have a requirement to increase the max length of field Name in IDOC to 50 chars. What would be the best solution? Any clue?
Thank you.
Hello Maicon, sorry my late reply, I did not saw this question earlier.
I could see inside the handbook details according below:
Thank you!
Hi,
you can also make use of the Cloud Integration Automation Service to configure this scenario.
Cloud Integration Automation Service is a customer- and system specific framework that offers partially automated configuration of SAP business scenarios. With this service you can setup the integration with a role-based workflow inside your SAP Cloud Platform account.
Here you can find out more and see which scenarios are already covered by this service:
https://help.sap.com/viewer/product/Cloud%20Integration%20Automation%20Service/Latest/en-US
Hi,
do you know if you can send cost center from one ERP client to multiple SF instances?
Before testing it I'd like to know if you gained already some experience on that.
ODTF_REPL_CC does allow only one receiver. But when I have multiple setups in the distribution modell for the message type would it be an option?
Regards,
Timmy.
Hello Timmy,
I never saw customers implementing one ERP client sending cost centers to multiple SF instances.
We have inside our handbook these details below (other topic, but gives us some tips):
So I think you can try same approach, like having multiple times the iFlow deployed in the middleware (each one connecting with different SF instance) and having multiple setups in distribution model.
If you advance in this config and works, please let us know here after 🙂 This will help SAP community.
Cheers
Hi Guilherme,
thanks for the reply.
We had the same idea. One iFlow per SF target instance is setup. We will create an additional destination as the CPI endpoint will be different on ERP side. We will add one additional receiver port to the distribution model.
Will share the outcome. Keep fingers crossed.
Regards,
Timmy
Hi,
unfortunately it is not working.
The program ODTF_REPL_CC allows only to put one destination which is used. Hence it is not possible in standard to send cost centers to multiple SF intances at once.
Regards
Hello Timmy,
Thanks for trying and posting for us here. This will help other persons for sure too. The way the program was build was to integrate one ERP with one EC. One alternative maybe would be having different client connecting with same CPI (doing copies of the artifact).
Thanks
Nice and Informative Blog. Thanks for sharing,