Quantcast
Channel: SCN : Popular Discussions - SAP NetWeaver Gateway Developer Center
Viewing all articles
Browse latest Browse all 1657

Netweaver Gateway URI or Odata URI Optional parameter (The request URI contains an invalid key predicate)

$
0
0

Hello,

 

I created a Entity type and contains parameters then i put one property type as optional and rest of the parameters type as key. So i have ran the Query/URI but i get the error like 'The request URI contains an invalid key predicate'.

 

Example:

Entity Type : Request

Properties : Name Type : Optional

Properties : Age    Type : is Key

Properties : Place  Type : is Key       

 

GET Call :


If i call the below URI i get the error mentioned in the above


URI-1: sap/opu/odata/sap/z_sample_test_srv/RequestSet(Name='abc',Age='25',Place='India')?$format=json    ->  Error

 

If i call the below URI i get respose as successful.

URI-2: sap/opu/odata/sap/z_sample_test_srv/RequestSet(Age='25',Place='India')?$format=json  ->Success


I was wondering if you could confirm which URI is correct ..?


If 1st URI is wrong what is the solution to use optional parameter in URI..?


Thanks,

Suresh


Viewing all articles
Browse latest Browse all 1657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>