Liquid UI - Documentation - 6.26 toMultiByte()

6.26 toMultiByte()


Purpose

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.


Syntax

var z_DesiredText = "original_string";
var z_ToSendToRFCCall = "IPC"+toMultiByte(z_DesiredText);
Note: The 'z_DesiredText' value contains the characters that will be changed to multibyte. The 'z_ToSendToRFCCall' variable contains the value after it has been changed into multibyte characters.


Options

The toMultiByte() command does not take any options.


Example

The following example demonstrates the command usage:

  1. 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 = "*お化け屋敷*";
  2. 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:

    for(a=firstChild; a!=null; a=a.nextSibling)
    a.del( );
    var z_abc = "*お化け屋敷*";
    var z_ToSendToRFCCall = "IPC"+toMultiByte(z_abc);

Can't find the answers you're looking for?