Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 1010

Re: how to pass multiple single entry for a variable in odata

$
0
0

Hello Preeti,

 

A bit complicated to pass multiple values to single property in entity type and URL will not accept 'and' operator for single property if you use filter operation.

 

technically better option is use get_entityset  and add some logic in dpc_ext class to filter strings.

 

Example:

 

/sap/opu/odata/sap/TESTQUERY_SRV/TESTQUERY/Results?$filter=ZTCOUNTRY_SSV eq 'ZZ' orZTCOUNTRY_SSV='AA'


if you want use other than get_entityset


Define property type as edm.string and split the string into table and pass those values to you query or RFC.


If you want to use bit complex logic follow the below threads for multiple values for single property.

 

http://scn.sap.com/thread/3170195

 

http://scn.sap.com/blogs/lindsay.stanger/2012/12/29/gateway-odata-calls-convert-ivfilterstring-to-itfilterselectoptions

 

http://scn.sap.com/thread/3173146


Viewing all articles
Browse latest Browse all 1010

Trending Articles