cancel
Showing results for 
Search instead for 
Did you mean: 

Property 'results' is invalid" when using brackets in a JSON create deep call

Anabelensi
Explorer
0 Kudos

Hi community,

1. I do a GET on the gateway client to get the Request for a POST client. This works fine.

2. When retrieving more than one Object, the Objects are within Brackets.

3. When I try to use the same call in a POST action I always get the same error until I remove the brackets.

4. But then I can only make the post with one single line.

5. I have implemented the deep creation, review several blocks and I cannot find any tip related to the problem I have with the brackets.

6. The Create deep entity method is properly reach but I am not capable to find the proper structure to make the JSON call with more than one entry.

- What I am missing?

- How can I make a call with multiples lines of the same entity?

Thanks a lot in advance for your help!

Result from the Output Call;

Error when I use it as input:

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor

You shouldn't pass the same response back, you need to adjust it, in your case

Remove "d" and "results". It should be like below

{
'prop1':value1
}

And you can only pass one entry at a time.

For deep create you need data in the form of parent and child, linked with association.. many blogs are there, check one below (but only one parent and multiple childs)

https://blogs.sap.com/2018/08/30/sap-gateway-deep-insert-end-to-end-scenario/

But in your scenario, you are passing multiple parents, so the better approach for this is using changeSet process, for that you can check the below blog and many other also available

https://blogs.sap.com/2018/05/06/batch-request-in-sap-gateway/

Anabelensi
Explorer

Hi Mahesh,

You pointed me to the solution!!!! Thanks a lot!!

Answers (0)