cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax problem in service URL

GowthamRaja
Participant
0 Kudos

Hi Experts,

I have created a get_entity method, now i want to execute it. If my model has only one key field then my URL would be as

/sap/opu/odata/sap/Z_SALEORDER_SRV/SO_INPUTS('0000000076') which is working fine. If i have model with two key field how the URL format

should be? i have tried with

/sap/opu/odata/sap/Z_SALEORDER_SRV/SO_ITEMS('0000000076','000010')    and

/sap/opu/odata/sap/Z_SALEORDER_SRV/SO_ITEMS('0000000076'),('000010') which is not working

Please help me.

Accepted Solutions (1)

Accepted Solutions (1)

ChandraMahajan
Active Contributor
0 Kudos

it should be as below,

/EntitySet(KeyField1='<value1>',KeyField2='value2')


Regards,

Chandra

GowthamRaja
Participant
0 Kudos

Thanks it works correctly

Answers (1)

Answers (1)

former_member184867
Active Contributor
0 Kudos

you need to specify the key fields with the value.  try this below URL

http://services.odata.org/V2/Northwind/Northwind.svc/Order_Details(OrderID=10248,ProductID=11)


Learn more about URL conventions at URI Conventions | OData - The Protocol for REST APIs