Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 31, 2016 at 10:54 AM

    Hi Divyata,

    What happens when you run this xsjs in browser ? Also could you share your xsjs code


    Add comment
    10|10000 characters needed characters exceeded