Skip to Content
avatar image
Former Member

Agentry and SAP UI5

Hi ,

I am working on integrating Agentry and SAP UI5. I am using WM 6.4 and SMP 3.0 for this.

I am able to pass single value to UI5 and get the value from UI5 to Agentry.

I want to pass whole WorkOrders collection to UI5. How can I do this?

I tried like below

sap.m.MessageToast.show(AgentryUI5Bridge.getAgentryObjects(function(){}), { duration: 3000}); and result is like below:

Regards,

Shyam

messagetoast.png (3.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jun 09, 2017 at 01:04 PM

    Have you looked at the samples that come with the EAM and service mobile app SDK? I believe the charting example references a collection.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Bill,

      I have checked those examples. I have used below code from analytics analytics.

      AgentryUI5Bridge.getJsonData(

      function(value){

      var oModel = new sap.ui.model.json.JSONModel(eval('(' + value + ')'));

      sap.ui.getCore().setModel(oModel);

      var jsonData = eval('(' + value + ')');

      var modelData = jsonData["data"];

      var busData = [];

      for(var i in modelData){

      var item = modelData[i]; busData.push(item["attributes"]); }

      //console.log("busData = " + JSON.stringify(busData));

      sap.m.MessageToast.show(JSON.stringify(busData), { duration: 3000}); oModel.setData({busData : busData}); }

      )

      Output is as below

      And one more query is how can I publish OpenUI-SAPUI5-app.agxz on my local SMP server. How I can configure the backend for it?

      Regards,

      Shyam

  • Jun 09, 2017 at 02:29 PM

    Can you please share your code in codepen.io ?

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 09, 2017 at 04:57 PM

    You already have the samples as they are included with the SDK. No need to share them via an external site.

    The samples are inlcuded in the Android and iOS folders (but not WPF for some reason) but as it is UI5 they will work with WPF.

    Add comment
    10|10000 characters needed characters exceeded