Skip to Content
avatar image
Former Member

Problem with

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


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; }

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 02, 2017 at 07:10 AM

    Better to go with escape char

    Add comment
    10|10000 characters needed characters exceeded