Skip to Content

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

XSJS Service returns an empty JSON string

Hello Experts,

I am trying to retrieve data from a Calculation View using a XSJS service. The call to the service looks like:

jQuery.ajax({

  url : '../../../services/dealHeader.xsjs?cmd=getDealHeader_FCATemplate'+strFCAString,

  method : 'GET',

  dataType : 'json',

  success : function(data) {

  dealDataFCA = data;

  var dealModelFCA = new sap.ui.model.json.JSONModel(dealDataFCA);

  console.log("Deal Model FCA " + dealModelFCA);

  sap.ui.getCore().setModel(dealModelFCA,"FCADeals");

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

  sap.ui.getCore().getEventBus().publish("app", "DataLoadedFCA");

  graphTile.setBusy(false);

  },

  error : onErrorCall,

  async : true

  });

The above call is successful, but it does not return any data; it returns an empty JSON string... When I try to run a query on the Calculation view using the same selection parameters, it is able to give me results. I validated the code I had written in the .xsjs file, and it seems to look fine.

Can someone please guide on what I could be missing, could there be a problem in the Calculation View script?

Regards,

Divyata Dal

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