cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to change item in an Odata entity from code to value

0 Likes
426

Hello.

I am compiling employee data for my company at work.

From SFSF I am using the REST api to download employee data from Odata entities such as PerPersonal and Emp Job.

However, I have a problem.

In the Emp_job entity there are items like "empl_status" and "employee_type", but they all have data in code.

For example, "1820" or "1300".

I wanted to replace these with values (e.g. "contracted employee", "part-time job") and looked at other entities, but none of them have those mappings.

Where in the SFSF can I find this mapping between codes and values?

Or does the SFSF have such data by default?

I am Japanese, so sorry for my poor English.

Thanks for reading.

I am very confused and need your help.

Any answer would be appreciated.

Thank you very much.

Accepted Solutions (0)

Answers (1)

Answers (1)

nlgro02343
Active Contributor
0 Likes

To get these values, you need to leverage the according navs (i.e. employeeClassNav --> picklistValueNav --> Name_en_US) as the API just based on calls does not permit transformations (those are to be done via middleware).

Completely different entities perhaps, but it gives you an idea how such a call should roughly look like (there should be quite some examples on the internet too (via using the expand property for the respective navs):

https://api55.sapsf.eu/odata/v2/WfRequest?$filter=status ne 'COMPLETED'+and+createdBy+eq+'00090744'&$expand=workflowAllowedActionListNav,wfRequestStepNav

I think for the desired result you will prefer to use transformation (you can also have a try with integration center, that is a bit easier and allows you to do transformation and leverage data from Navs a bit easier).