Skip to Content
0

Agentry and SAP UI5

Jun 08, 2017 at 05:01 AM

173

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Bill Froelich
Jun 09, 2017 at 01:04 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
A K Jun 09, 2017 at 02:29 PM
0

Can you please share your code in codepen.io ?

Share
10 |10000 characters needed characters left characters exceeded
Bill Froelich
Jun 09, 2017 at 04:57 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded