Symptom
- SFAPI is not returning the main employment username of users with concurrent employment (employees who own more than one job/role).
- The SFAPI is returning only the concurrent employment username of users with concurrent employment.
For Example:
Employee: Juan Dela Cruz
Main employment username: Juan
Concurrent employment username: Cruz
Sample API request:
{panel:title=Sample API request}
<queryString>SELECT person,paycompensation_non_recurring,deduction_recurring,deduction_non_recurring,secondaryassignments,email_information,employment_information,job_information,personal_information,national_id_card,address_information,phone_information,compensation_information,paycompensation_recurring FROM CompoundEmployee WHERE person_id_external IN ('168')AND replicationContentType = 'EMPLOYEE_MASTER_DATA' AND replicationTargetSystem = 'X7KCLNT600' AND employment_information_company IN ('PUR') AND employment_information_country IN ('USA') AND effective_end_date >= to_date('2018-07-01') </queryString>
{panel}
It may appear as though, instead of sending the username of his main employment, the SFAPI is sending their concurrent username. This makes the user unable to replicate to ECP and cannot fetch through Integration.
(note: CE API does return the logon user name from user account yet it may not necessarily be the one of the concurrent employment. This depends mainly on User Account Decoupling and latest changes of the employments, cf. See Also)
Environment
Employee Central - Concurrent Employments
Reproducing the Issue
Use an API query to generate the username or logon_user_id of users with concurrent employment or multiple UserIDs (1 UserID per employment).
Cause
In the case of concurrent employment, user_name field is returned from the table USER_ACCOUNT by the API and it is an expected behavior as the username is retrieved from table user_account for person_id.
Resolution
Customer is using SFAPI integration to send employee data from Employee Central to Employee Central Payroll. This integration (standard provided by SAP) uses the SFAPI to retrieve employee data from EC.
For users with concurrent employment, logon information can only be determined partly. As a resolution, manually import the logon info for users with concurrent employment.
For example:
Employment 1: username "Juan-1"
Employment 2: username "Juan"
API request: Select username with -1
See Also
2318773 - Employee Central - Concurrent Employment
2909730 - Explanation of <logon_user_name> and <last_modified_on> fields - SFAPI CompoundEmployee
2326735 - Concurrent Employment - OData and SFAPI - secondary employments
Keywords
concurrent employment, ec, concurrent, employments, multiple employments, username, logon_user_id , KBA , LOD-SF-INT-CE , Compound Employee API , LOD-SF-INT , Integrations , LOD-SF-EC-CGA , DO NOT USE - Use EC-CON or EC-GA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem