Ansicht
Dokumentation

ABENUNICODE_BYTEFOLGEN - UNICODE BYTEFOLGEN

ABENUNICODE_BYTEFOLGEN - UNICODE BYTEFOLGEN

ABAP Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

String Processing for Byte Sequences

Overview

1. IN BYTE MODE addition
2. Determining the string length
3. String comparison operations

1. The IN BYTE MODE addition

You differentiate between the hexadecimal (X) and character variants of the string statements using the IN BYTE MODE addition. The IN CHARACTER MODE addition can be used optionally for the character string variants.

If you define the IN BYTE MODE addition, only hexadecimal fields and hexadecimal strings are allowed as arguments. There is a syntax or runtime error if arguments of a different type are passed.

CLEAR ... WITH IN BYTE MODE
CONCATENATE ... IN BYTE MODE
FIND ... IN BYTE MODE
REPLACE ... IN BYTE MODE
SEARCH x FOR x1     IN BYTE MODE
SHIFT x ... IN BYTE MODE
SPLIT ... IN BYTE MODE

The full length of the hexadecimal fields are always used in all string commands for byte strings, so that bytes with contents X'00' are never truncated at the end of the field. There are no variants that search for sub-sequences for the FIND, SEARCH, and REPLACE statements with the IN BYTE MODE addition.

2. Determining the length of the string

You can ascertain the string length for byte strings using the XSTRLEN XSTRLEN function. XSTRLEN returns the current length for X strings and the defined length in bytes for X fields, where null bytes at the end of fields are also counted.

3. String comparison operations

The X variants of the string comparison operations differ from the string variants by the BYTE prefix. Only X fields and fields of type XSTRING are allowed as arguments for these operations.

BYTE-CO
BYTE-CN
BYTE-CA
BYTE-NA
BYTE-CS
BYTE-NS






BAL Application Log Documentation   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 3041 Date: 20240425 Time: 155523     sap01-206 ( 42 ms )