Ansicht
Dokumentation

ABENSPLIT_TEXT_GUIDL - SPLIT TEXT GUIDL

ABENSPLIT_TEXT_GUIDL - SPLIT TEXT GUIDL

CPI1466 during Backup   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

Splitting Texts

Usually the characters in a character string are encoded based on a code page using a fixed number of bytes. This means that it is always known in the memory where a character begins and ends. However, in some code pages, a character can be formed from a combination of multiple separately saved characters. This applies in particular to the characters of the surrogate area of the Unicode character set, that are collectively represented in the Unicode character representation UTF-16 by two consecutive 16-bit replacement codes (surrogate). The surrogate area, for example, includes several Chinese characters that are predominantly used in Hong Kong. The ABAP programming area does not support this area. ABAP supports the subset of UTF-16 covered by UCS-2, in which each character occupies two bytes. One character in the surrogate area occupies four bytes and is handled as two characters by ABAP.

Only split texts between characters

Make sure that statements do not split character strings in any places with composite characters or surrogates.

Operations that split character strings include:

  • Substring accesses with offsets/lengths or substring functions
  • The SPLIT statement
  • Every assignment to a character-like field that is too short, where one side of the original value is cut off

If texts containing combined characters or surrogates are split, this can produce undefined characters that cannot be displayed. If there is a risk of this occurring, you can define a suitable separation position by using the method STRING_SPLIT_AT_POSITION of class CL_SCP_LINEBREAK_UTIL.CL_SCP_LINEBREAK_UTIL.






Addresses (Business Address Services)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 2268 Date: 20240419 Time: 085658     sap01-206 ( 44 ms )