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:


  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().getEventBus().publish("app", "DataLoadedFCA");



  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?


Divyata Dal

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