on 06-02-2017 8:05 AM
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; }
Better to go with escape char
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.