Skip to Content
0

Problem with

Jun 02, 2017 at 07:05 AM

41

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

A K Jun 02, 2017 at 07:10 AM
0

Better to go with escape char

Share
10 |10000 characters needed characters left characters exceeded