SAP Knowledge Base Article - Public

2203919 - Query Failure! Error: Please set all mandatory prompt fields in "constrain by"

Symptom

You are trying to do a submitQueryJob for a standard adhoc entity.

Ideally you expect a task-id to be created. However, you the task-id is not generated but the error appears as mentioned below:

Query Failure! Error: Please set all mandatory prompt fields in "constrain by". [asOfDate]

 

 

Environment

Successfactors Adhoc API (SOAP)

Reproducing the Issue

Execute the submitQueryJob for an Adhoc entity as shown below.

Here we use the entity "ADHOC_ectint"

Adhoc error.jpg

 

The Query fails with the above error message.

Cause

Mandatory filters for the entity are missing in the SOAP request.

Resolution

"Constrain by" is used for adding the filter for mandatory fields in an Adhoc report.

From the describe operation for th entity "adhoc_ectint", We can see that "asofDate" is the only mandatory parameter.Therefore, This needs to be present in the request xml under "constrain by".

You can understand this from the below - (From API describe operation)

describe.jpg

 

We can see that asOfDate is mandatory as explained above. You can also check the same from SFAPI data dictionary.

dd true.jpg

The highlighted place shows the required attribute to be "true".


Now, Include the constrain by and asOfDate as shown below and observe the output

adhoc good response.jpg

We can see that the taskId is generated.

 

See Also

You cannot edit the mandatory attributes from a standard Adhoc Entity.

 

Keywords

taskId not created Adhoc entity error   , KBA , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors Workforce Analytics all versions