Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

SAPUI5 read from oData

$
0
0

Hi,

 

I am creating a webservice with SAPUI5. The service uses a RoadMap object with several steps. I request the needed data from a server. Then I create a model, in which I save the data from the server. Now I want to show all data which belong to the selected step.

 

The problem is that I do not find a way to access or read the details of one object in the rmapModel.data.

 

Source code:

 

var rmap = sap.ui.getCore().byId('DetailPage2--RMap');

var rmapModel = rmap.getModel();

 

This works fine. When I look up in the debbuger it looks: sadsad

 

 

rmapModel.oData:Object

  • ZFB_TOUR(Tourende='%20DE%2006268%20Kalzendorf%20%2F%20Steigra',HeaderGuid=guid'0050569E-0020-1ED3-9BDC-7DC7B54ADBFD'):Object
  • ZFB_TOUR(Tourende='%20DE%2006844%20Dessau',HeaderGuid=guid'0050569E-0020-1ED3-9BDC-7DC7B54ADBFD'):Object
  • ZFB_TOUR(Tourende='%20DE%2007580%20Ronneburg',HeaderGuid=guid'0050569E-0020-1ED3-9BDC-7DC7B54ADBFD'):Object
  • ZFB_TOUR(Tourende='',HeaderGuid=guid'0050569E-0020-1ED3-9BDC-7DC7B54ADBFD'):Object

 

 

How can I bind now just one of these objects, so that I can show the included attributs just of the clicked step?

I already tried this:

 

 

rmapModel.read("/ZFB_TOUR(1)", null, null, true, function(oData, oResponse) {

     alert("Read successful: " + JSON.stringify(oData)); },

     function() { alert("Read failed");

});

 

Unfortunately this is not working at all..


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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