The 'toMultiByte' command is used to encode text returned by a call command into multibyte characters so that a non-Unicode R/3 system can process the data. The syntax is as follows.
var z_DesiredText = "original_string";
var z_ToSendToRFCCall = "IPC"+toMultiByte(z_DesiredText);
The 'toMultiByte' command does not take any options.
To demonstrate the 'toMultiByte' method, please do the following.
Open the script file for the SAP Easy Access screen and enter the following code.
for(a=firstChild; a!=null; a=a.nextSibling) a.del( ); var z_abc = "*お化け屋敷*";
To correct this problem, you will use the 'toMultiByte' command in your script. The non-unicode characters in the string would be converted to multibyte character representation for a non-unicode R/3 server to interpret the data correctly. The revised code is as follows.
for(a=firstChild; a!=null; a=a.nextSibling) a.del( ); var z_abc = "*お化け屋敷*"; var z_ToSendToRFCCall = "IPC"+toMultiByte(z_abc);