SAP Knowledge Base Article - Public

2225549 - External codes are returned instead of description when Position is Queried under SFAPI EmpJob Entity

Symptom

You are expecting Position details like -"Sales Manager/Administrative Assistant/Account Manager, etc".

However, SFAPI EmpJob Entity returns external code which does not give you much detail.

Environment

Successfactors System

Reproducing the Issue

Request XML

SELECT person_id_external,position FROM EmpJob WHERE person_id_external = 'isingh'

Response XML

       <sfobject>
          <type>EmpJob</type>
          <person_id_external>isingh</person_id_external>
          <position>25890</position>
        </sfobject>

Cause

This is the system behavior.

Position field from the EmpJob SFAPI entity returns the External Code of the Position which is not visible on the UI.

 

 

Resolution

If you would like to know the position details, Please use Odata API entity Position and query the desired field names.

This provides their position details. For better understanding, You may refer to the behavior in the below example.

Request XML

https://salesdemo4.successfactors.com/odata/v2/Position?$format=json&$top=1&$select=code,jobCode,description

Note - The value of the "top" in the above url refers to the amount of records that have to be returned.

Response XML

"__metadata" : {
"uri" : "https://salesdemo4.successfactors.com:443/odata/v2/Position(code='MGR_SALES_SC4',effectiveStartDate=datetime'2000-01-01T00:00:00')", "type" : "SFOData.Position"
}, "code" : "MGR_SALES_SC4", "description" : "Sales Manager, SC", "jobCode" : "SALES-MAN"

 If you would like to see the position of one particular employee, you may refer to the below example - 

/odata/v2/EmpEmployment?$format=json&$select=personIdExternal,jobInfoNav/positionNav/code,jobInfoNav/positionNav/company,jobInfoNav/positionNav/department,jobInfoNav/positionNav/description,jobInfoNav/positionNav/division,jobInfoNav/positionNav/jobCode,jobInfoNav/positionNav/jobLevel,jobInfoNav/positionNav/jobTitle&$expand=jobInfoNav/positionNav&$filter=personIdExternal eq 'isingh'

Response

"code":"ADMIN_SALES_NE","division":"IND","jobLevel":"IC","description":"Administrative Assistant, NE Sales","department":"SALES","company":"ACE_USA","jobCode":"ADMIN-1","jobTitle":"Administrative Assistant, NE Sales".

See Also

For information related to SFAPI/Odata API , Please refer handbooks/guides at 

http://help.sap.com/hr_api/

 

Keywords

EmpJob returns numbers for  position, How to check position details How to check position information Odata Position API , KBA , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Core 1511 ; SAP SuccessFactors HCM Core 1602