Configuring Custom Entity for custom portlet for BIB replication
As a consultant we come across this scenario multiple times where client uses SuccessFactors EC as master data source and uses on-Premise SAP for further processing.
Many a times SF EC will have custom MDF portlets created for specific client requirements and we the same needs to be sent to on-Premise SAP.
In this blog we would learn how we can use configurations to map Custom MDF entities to SAP using BIB functionality.
Every company assigns different assets when an employee joins. The details for each type of asset can be tracked easily in SF EC using a Custom MDF object. Also the same records need to go back to SAP ECC for many legacy reporting purposes.
During replication of data from SF EC to SAP ECC there are often requirements for data to flow from Custom MDF objects where there is a Parent-Child relationship at EC to infotypes at SAP.
Example for such cases would be when multiple details are to be added in EC at item level
- Assets belonging to Company which employees are using
- Laptop with laptop number,start date, model number
- Cell phones with model number, year of purchase
The details are added at the Child Entity Level which is basically accessed Via the Parent entity( Laptop/Cell). In this case replication mapping is only required for the child entity.
The problem arises when we try to directly map the Child entity.This results in replication error.
Although we get the complete child entity data in payload – configuring only the Parent Entity for field mapping will not work. The metadata of the parent object does not contain fields in the child objects.
Now this sounds difficult but the above can be achieved at BIB Configuration level itself.
Solution and Steps :-
Step 1: Defining Custom Employee Central Entities for Employee Data Entities
- In the Define Additional Employee Central Entities for Employee Data Customizing activity (view V_ECPAO_ECTMPL)
- Enter a unique entity ID and a description. The ID should be in the customer namespace, which means that it should start with a number (0* – 9*).
Step 2: Create Header Entity
- Exact API name of the corresponding entity in Employee Central needs to be used
- Header should have Start date and End date fields
- End date in Header should be mdfSystemEffectiveEndDate – This is a very important step for the configuration to work
Step 3: Create Child Entity
- Should not have the Start and End date fields and the Dependent field to be added using the Parent Entity name, and inherit field should be blank.
Step 4 : Upload the metadata for both the Parent and Child entity
Step 5: Add End Date
For custom portlets, SAP do not have the End date field in metadata, so we need to add the End date field with the name as mdfSystemEffectiveEndDate (*) and Type as Datetime
Customizing Path for Additional fields in Metadata
Personnel Management — Integration with SuccessFactors Employee Central — Business Integration Builder — Basic Settings — Import Metadata from Employee Central — Transport Imported Metadata and Check Metadata for File-Based Data Transfer
Step 6: Create a Transformation Template with Child ID
- Customizing Path for Define Field Mapping for Employee Data
Personnel Management — Integration with SuccessFactors Employee Central — Business Integration Builder — Employee Data Integration — Define Field Mapping for Employee Data
Step 7: Add the Child Entity in the Exception node with Header CPI segment
This is a very important Step for the configuration to work
Add the Parent API in Exception –
CE API segment is from Parent API and Entity name is from Child
Customizing Path for Exception:
- Personnel Management — Integration with SuccessFactors Employee Central — Business Integration Builder — Employee Data Integration — Define Exceptions for Compound Employee API query
With the above configuration steps in place, now we are ready to do the field level mapping from child entity to the infotype fields and start replication.
Here is how the end result will work with above configurations.
Example the SF EC screen to have some record on the custom portlet that needs to be moved to SAP ECC.
Once the employee is triggered for replication the payload would look like below having Parent/Child structure.
Upon Successful processing , the record gets inserted at infotype level.
Depending on the requirement from client, custom MDF data can also be used for different subtypes as well using the cloning technique from BIB.
The important point to note here is that this is done without writing BADI or a single piece of code and thus reducing the development efforts. It is easier and quicker as well.
Note:- This blog do not describe the complete BIB functionality and is intended for consultants having BIB integration knowledge.
For BIB knowledge the below link can be referred:-