cancel
Showing results for 
Search instead for 
Did you mean: 

How to Switch from GET to POST Call in SAPUI5 Analytical Table with Node.js Backend?

Sridevi_G
Discoverer
0 Kudos
61

 

Hello SCN community,

I am working with an SAPUI5 Analytical Table bound to a Node.js backend service using analytical binding, and everything is working as expected with the default GET request. However, I now need to change the default behavior to use a POST request instead of GET in order to send additional data along with the request.

Current Setup:

var oModel = this.getView().getModel("analyticalModel");
oModel._request = odataModelRequest(oModel._request, this._waitODataLongReq.bind(this));

var oBindingParams = {
entitySet: "dynamicEntity",
useAnalyticalBinding: true,
initiallyVisibleFields: '',
useBatchRequests: false,
provideGrandTotals: true,
hasTotaledMeasures: true,
provideTotalResultSize: true,
reloadSingleUnitMeasures: true,
sOperationMode: sap.ui.model.odata.OperationMode.Server,
autoExpandMode: 'Sequential',
custom: { // Adding custom query parameters here
params: sParams
}
};

let fecBindcontext = {
model: oModel,
path: "/dynamicEntity"
};

var spath = `/storage/sys/${this._UUID}/se11/${this.tables}/dynamicEntity`;
var oTableBinding = new sap.ui.model.analytics.AnalyticalBinding(oModel, spath, fecBindcontext, [], [], oBindingParams);
oTable.setModel(oModel);

Sridevi_G_0-1738762191522.png

 

My Questions:

  1. Does the SAPUI5 Analytical Table support POST requests?
  2. If yes, could someone guide me on how to implement this?
    • Specifically, as it is a direct binding, I need to know how to modify the request type and how to pass the data (which is in another tab) in the body of the POST request to fetch the data in the View Output tab

      Any help or examples would be greatly appreciated!

      Thank you in advance for your support.

 

Accepted Solutions (0)

Answers (0)