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

Why do I get an empty table in SAPUI5 even though the OData service works?

$
0
0

Hello Guys,

 

I am currently learning SAP Gateway OData Service and SAPUI5 at the same time. My first task is to develop an OData service and consume it later with SAPUI5. My OData service presently only has the GET_ENTITYSET implemented and it works. In the method GET_ENTITYSET I actually call a function module that will deliver the data set for et_entityset. That function module requires three import parameters that have to come from the SAPUI5 consuming client application and these parameters are NOT part of the entity resources(data model). I thought I could append those import parameters to the service URL(ServiceUrl?x=y&z=t&m=n)  in the OData model instance of SAPUI5 and process them without problem in the GET_ENTITYSET method. I actually did it and I could retrieve those three import parameters using " ME->MR_REQUEST_DETAILS->TECHNICAL_REQUEST-REQUEST_HEADER" with the request_uri. I was able to pass these three import parameters to my function module and indeed it delivered the  required set of data for et_entityset. When I try to test the service from the server-side I can see my et_entityset as XML document but in the SAPUI5 application I see an empty table with "NO DATA". I am kind of confused here. How come et_entityset in my GET_ENTITYSET has data but the SAPUI5 application does not get it? I am really new to the whole thing. What can hinder the Gateway OData service to deliver the data set to my SAPUI5 consuming application? Note that the client application and the service application are in the same domain, so this has nothing to do with the cross origin policy. When I hard-code my import parameters in the GET_ENTITYSET method  the table in SAPUI5 is now filled with the data set. How can I  solve it? Like I said my import parameters are NOT part of the entity components(data model) and the user will give them in the SAPUI5 consuming application in order to fetch the ET_ENTITYSET in GET_ENTITYSET. Please I need help . Thanks a  lot in advance


Viewing all articles
Browse latest Browse all 3510

Trending Articles



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