SAP Knowledge Base Article - Public

2343596 - Query fails with Form360Rater in OData API or Integration center

Symptom

You are querying the Form360Rater odata API or integration and encounter errors like below:

{
"error" : {
"code" : "ServerErrorException", "message" : {
"lang" : "en-US", "value" : "Remote Exception: RuntimeException; nested exception is: \n\tjava.lang.IndexOutOfBoundsException: Index: 0"
}
}
}

{
"code" : "ServerErrorException", "message" : {
"lang" : "en-US", "value" : "Index: 0"
}
}
}
Screen Shot 2021-04-28 at 08.21.06.png
ServerErrorException HTTP request failed Status Code: 500

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.



         

Environment

  • Successfactors HXM Suite
    • OData API
    • Integration center

Reproducing the Issue

Execute the query to fetch results as shown below.

Request url

/odata/v2/Form360Rater?$format=json

API Response

{
"error" : {
"code" : "ServerErrorException", "message" : {
"lang" : "en-US", "value" : "Remote Exception: RuntimeException; nested exception is: \n\tjava.lang.IndexOutOfBoundsException: Index: 0"
}
}
}


Cause

This API cannot be used as it is currently being used. Business keys are missing in the api request url.

Resolution

How to find the relevant business keys for this API?

Navigation:

Admin center > OData API data dictionary -> Expand the entity "Form360Rater "

Observe the business keys for this entity as shown below:

 form api.png

Ensure that you include all the above business keys with valid data in your Query.

Example 1 (Correct query formation but with invalid data) ie, provided formDataId or formContentId is incorrect or inaccessible

/odata/v2/Form360Rater(formContentId=1234,formDataId=1234)?$format=json

{
"error" : {
"code" : "NotFoundException", "message" : {
"lang" : "en-US", "value" : "Form360Rater with key (formContentId=1234,formDataId=1234) not found!"
}
}
}

Example 2 (Correct query formation but with valid data)

/odata/v2/Form360Rater(formContentId=15284,formDataId=7538)?$format=json

solution form.png

These solutions in OData side are described in the handbook chapter 13.1.2.10 Form360Rater SAP SuccessFactors HXM Suite OData API: Reference Guide (V2)

For integration center, even if you pass the filters in the URL, the system does not allow you to fetch data from this starting entity resulting errors and this is the expected behavior.

Keywords

Form360Rater with key not found!. nested exception is: \n\tjava.lang.IndexOutOfBoundsException: Index: 0, ServerErrorException, ServerErrorException HTTP request failed Status Code: 500
, KBA , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-PM-API , Webservices, OData APIs , Problem

Product

SAP SuccessFactors HCM Core all versions ; SAP SuccessFactors HCM suite all versions