Skip to Content
1
Nov 16, 2017 at 06:10 AM

Getting error message while calling Odata service with filter expression from SCP XSJS

1445 Views

Hello

I have one Odata service with request URI as below:-

/sap/opu/odata/sap/ZGW_IOT_DELIVERY_DETAILS_SRV/ZES_DELIVERY_DETAILS?$filter=Lfart eq 'LF' and Plant eq 'ZFG1'

Now when i call this URI from gateway client its giving me expected result. Now my purpose is to call this odata service from my XSJS through SCP cloud. I have called gateway service from xsjs successfully for other Odata service without filter expression. But when i am using filter to call this service from xsjs getting this error message :-

jsn Invalid request received by HTTP proxy: java.lang.IllegalArgumentException: invalid version format: = LFART EQ 'LF' AND PLANT EQ 'ZFG1'?$FORMAT=JSON HTTP/1.1

Here is the request message i have built in xsjs :-

request = new $.web.WebRequest($.net.http.GET,"/ZES_DELIVERY_DETAILS?$filter = Lfart eq '" + lfart + "' and Plant eq '" + plant + "'?$format=json");

Any idea why using filter I am getting this error message?

Thanks,

Sunit