Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Consume xsjs service in SAP UI5

Hello,

I created a xsjs service and consume it via destination. That works fine and with "url/path" I get the json result of my xsjs in the following form.

How can I import these date into my UI5 table?

{"trans":[{"ID":"52096","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:03:06 GMT+0000 (UTC)","USER":"USWALKERC","RFTRANS":"INB PTWAY_01 TASK CRE","BCK":187,"ITS":0,"GUI":0},{"ID":"52097","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:04:05 GMT+0000 (UTC)","USER":"USWALKERC","RFTRANS":"INB PTWAY_02 TASK CONF","BCK":1388,"ITS":0,"GUI":0},{"ID":"52098","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:04:33 GMT+0000 (UTC)","USER":"USWALKERC","RFTRANS":"INB PTWAY_01 TASK CRE","BCK":121,"ITS":0,"GUI":0},{"ID":"52099","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:05:40 GMT+0000 (UTC)","USER":"USWALKERC","RFTRANS":"INB PTWAY_01 TASK CRE","BCK":7,"ITS":0,"GUI":0},{"ID":"52100","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:07:05 GMT+0000 (UTC)","USER":"USWEBBRA","RFTRANS":"INB PTWAY_01 STAG GR","BCK":2925,"ITS":0,"GUI":0},{"ID":"52101","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:07:08 GMT+0000 (UTC)","USER":"USWALKERC","RFTRANS":"INB PTWAY_01 TASK CRE","BCK":439,"ITS":0,"GUI":0},{"ID":"52102","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:07:11 GMT+0000 (UTC)","USER":"USWEBBRA","RFTRANS":"INB PTWAY_01 CR+CNF RSRC","BCK":1592,"ITS":0,"GUI":0},{"ID":"52103","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:08:10 GMT+0000 (UTC)","USER":"USWALKERC","RFTRANS":"INB PTWAY_01 TASK CRE","BCK":1003,"ITS":0,"GUI":0},{"ID":"52104","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:09:33 GMT+0000 (UTC)","USER":"USWEBBRA","RFTRANS":"INB PTWAY_02 RES->BIN 1","BCK":0,"ITS":0,"GUI":0},{"ID":"52105","DATE":"Thu Apr 24 2014 00:00:00 GMT+0000 (UTC)","TIME":"Fri Dec 31 -0001 00:09:36 GMT+0000 (UTC)","USER":"USWEBBRA","RFTRANS":"INB PTWAY DROP HUS","BCK":542,"ITS":0,"GUI":0}]}

RFREST is the path for my xsjs destintion:

var ojsonModel = new sap.ui.model.json.JSONModel("/RFREST");

  oTable2.setModel(ojsonModel);

  oTable2.bindRows(!!!whatcomesinhere!!!!);

Regards,

Domenik

Former Member
Not what you were looking for? View more on this topic or Ask a question