cancel
Showing results for 
Search instead for 
Did you mean: 

submitting values in querystring - sapui5

Former Member
0 Kudos

Hi,

I have need to submit some values to SAP backend from sapui5 fronend side

here is my url that I want to submit:

/sap/opu/odata/sap/ZVACTKT_apr_SRV/ApplyRequestDecision?Comment='Enjoy'&Decision='APPROVE'&RequestNum='0000000051'

how to do that please?

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

var params = {};

params["Comment"] = "'Enjoy'";

params["Decision"] = "'APPROVE'";

params["RequestNum"] = "'0000000051'";

oModel.callFunction("addhoc_approval", {

  urlParameters: params,

  async: true,

  method : "GET",

  success: function (data) {

  },

  error: function (oError) {

  }

  }

);

where oModel is your Odatamodel

Former Member
0 Kudos

Thank you Maksim,

I have a question..

what is the value of addhoc_approval? is it "ApplyRequestDecision"  ??

former_member182372
Active Contributor
0 Kudos

in your case - ApplyRequestDecision, yes

Former Member
0 Kudos

It is working fine.. thank you

just a note.. we need to remove the double quotation, we just need the single quotation when we define the parameters.

Answers (0)