Skip to Content
0

How to Create OData Service for Multiple Input Parameters and Tables

Feb 13 at 09:57 AM

147

avatar image

Hi Experts,

I have Consumed External Web Service using Service Consumer and created an RFC.

I need to pass Multiple inputs to retrieve data as shown in the screen shot.

Need Help regarding how to Create OData Service for this Step by Step in Gateway Service Builder !! snap.png

snap.png (10.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ankit Maskara
Feb 15 at 03:26 AM
1

What is the structure of REP_REQUEST and REP_RESPONSE ?

Show 4 Share
10 |10000 characters needed characters left characters exceeded
request.png (18.7 kB)
response.png (46.3 kB)
0

Hi,

You can model an entity as below and implement deep create method to transfer data

{
"DummyKey": "XXXXXX",
"StartIndex": "1",
"EndIndex": "10",
"Requests": [{
"DummyKey": "XXXXXX",
"StartIndex": "1",
"EndIndex": "10",
"RequestId" : "1",
"Responses" : [{
"DummyKey": "XXXXXX",
"StartIndex": "1",
"EndIndex": "10",
"RequestId" : "1",
"ResponseId": "1",
"Field1": "Value1",
"Field2": "Value2"
},
{
"DummyKey": "XXXXXX",
"StartIndex": "1",
"EndIndex": "10",
"RequestId" : "1",
"ResponseId": "2",
"Field1": "Value1",
"Field2": "Value2"
}
]
}]
}

Basically model a three level entity and pass the data. Also, you can achieve same via a JSON object by a JSON object to backend.

0

Thanks A Lot...

Can you please give more detail how can i model the above in entity and implement Deep Create Method?

0

You can model via SEGW t-code and then implement the Create deep method of the generated DPC_EXT class. Further details - https://blogs.sap.com/2014/03/06/let-s-code-crudq-and-function-import-operations-in-odata-service/

and https://blogs.sap.com/2014/04/27/step-by-step-development-guide-for-createdeepentity-operation/.

Thanks to Chandrashekhar Mahajan and Syam Babu.

1