cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with

Former Member
0 Kudos

Hello, i've a problem regarding the percentage symbol when posting data from web to SAP backend. The posting is working, and I've found that if there is a % inside my data sent to SAP, it is not working. Here is the code. Do I have to change my% symbol before sending data and then change it the other way in SAP before processing data ? or should I add escape characters to my String ? In the content the symbol is surrounded by double quote.

Thank you for any answer

Laurent

ajax2: function(vDatas) {

//Online mode => send data to sap

var protocol = location.protocol;

var slashes = protocol.concat("//");

var host = slashes.concat(window.location.hostname);

var sUrl = host.concat(":8443/sap/bc/zwsmo_operation?");

var vData = $.ajax({

async: false,

type: 'POST',

url: sUrl,

data: JSON.stringify(vDatas),

success: function(data) {

return data; },

//error: function()

{ error: function(xhr, textStatus, errorThrown)

{ return false; } });

return vData; }

Accepted Solutions (0)

Answers (1)

Answers (1)

karthikarjun
Active Contributor
0 Kudos

Better to go with escape char