When trying to create sections to add to a JobProfile created via API, Sections shortDescriptions, longDescriptions (under JobProfileLocalizedData) requires sectionId and sectionType to be created.
But this value is unknown and is autoassigned/generated by system
- Question is how to create JobProfile and Update its sections e.g. shortDescription, longDescriptions if you dont know the sectionId ?
- Where do you get the sectionId, sectiontype data for a newly created Jobprofile, so you can use these field values to upsert to them and data?
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
SAP Successfactors HXM Suite
- SAP Successfactors Odata API
Reproducing the Issue
When you go to manage template from SF Frontend SF UI you can see the sectionId, for each sectionType. But after creating JobProfile, if you query and navigate to JobDescTemplate (via templateNav), it only shows externalCode, doesn't show any sectionIds for the sections.
1. Create New JobProfile :
"uri": "https://<api hostname>/odata/v2/TemplateEntity('*')/templateNav"
2. Query JobProfile with expands on shortDescriptions and longDescriptions
This is a product limitation, sectionId(internalId) gets the value of internalID of JobDescSection which is not exposed by the OData API.
Since this is a product limitation,
OR below workaround can be considered.
- Go to Manage Data and search for Job Template by specyfying the external code
- Scroll down to the short/longDescription section and click on details
- Scroll down to see the internalId -> this would be the section ID
In case the SectionId (internalId) is not displayed, please enable as follows:
i. Go to Configure Object Definition and search for Job Template Section
ii. Take Action and enable field internalId as "Read Only"
Now once you go back to Manage Data perform steps 1 to 3, you should be able to see the SectionId (internalId).
See Link for SAP Successfactors Reference Odata Guide (LINK) for more details
sectionId, JPB, JobProfile, JobProfileLocalizedData, internalId, JobDescTemplate, shortDescriptions, longDescriptions , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT , Integrations , Product Enhancement