Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

Parameters while reading oData service

$
0
0

Hello,

 

I am using below code to get data from an oData service in my ui5 application as an array:

 

var oModel = new sap.ui.model.odata.ODataModel(serviceUrl, {json: true,loadMetadataAsync: true});

var salesOrders = [];

oModel.read("/SalesOrderSet", {

               

               async: false,

 

 

               success: function (oEvent) {

                  

               $.each(oEvent.results, function (i, item) {

                   

               salesOrders.push({

                     "OrderNo" : item.OrderNo

               });

              });

              }}); 

 

I am getting the values fine into this array, however I want to pass some customer parameters back to the abap code where the data is prepared to be sent to the service. Any thoughts how I can do this?

 

Note that there is an importing parameter IT_KEY_TAB in the get_entityset method in the odata service class, but I am not sure how to populate the parameters from the UI application.

 

Thanks,

Charles


Viewing all articles
Browse latest Browse all 3523

Trending Articles



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