cancel
Showing results for 
Search instead for 
Did you mean: 

How to model a Get call with input for multiple entity sets?

vipinkumar_kanchan
Participant
0 Kudos

Hi Experts,

We have a requirement where we have to do a GET call on a SAP Gateway service where we need to pass in data for multiple entity sets. Based on our search on SDN, we have not been able to find a way to do this as in general the GET call does not support a body element in the call. Based on deep_entity that needs to be used, it looks like only a POST call will work for this scenario. Please let me know if there is any other way to do this.

We went ahead and created a POST scenario where we coded the data provider class to take the input of multiple entity sets and execute a BADI to get data from the system. We are able to get the data for all the entities from the BADI upto the end of the Create_DEEP_Entity module. But when we look at the response in the Gateway client, we see only the data for the entities that were passed in. So if we passed in 2 entity sets with data into the call, we get only those 2 entity sets in the response. we need the response to contain the remaining entity sets data also for a successful call.

Can someone please guide us on this?

Regards,

VK

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Vipin,

You need to maintain the Navigation Property defined for the Pricing Data in the request payload along with Header & Items details so that response of GW will have Pricing Data.

Sample JSON payload ->

{

"HeaderId":"01",

"Item":[{"IdO":"10","NameO":"TestO1"},

{"IdO":"20","NameO":"TestO2"}],

"Pricing":[{}]

}

Where Item and Pricing would be your Navigation Properties defined in your GW model.

Regards,

Ashwin

vipinkumar_kanchan
Participant
0 Kudos

Thanks Ashwin.

That worked for getting the other entity set into the response through the POST call.

any ideas on the GET call possibility.

Regards,

VK

AshwinDutt
Active Contributor
0 Kudos

Hello Vipin,


As far as i know there is no direct way to pass table of inputs to a GET Operation to accomplish your scenario in a single call.


Since your case involves passing table of inputs we cannot use batch call also here.

Regards,

Ashwin

vipinkumar_kanchan
Participant
0 Kudos

Thanks for you response Ashwin.

Answers (0)