When writing an SAP program, programmers often need to split the regular strings and add a newline or Tab character to the string. In other languages, you can use the ASCII code $13 $10 for insertion. an error occurred in the ABAP. To solve this problem, use the sap class cl_abap_char_utilities.
Cl_abap_char_utilities contains character constants, such as cr_lf, horizontal_tab, and newline.
The following is an example of adding carriage return to a string:
Data: CRLF (2) type C.
Data: Maid (4096) type C.
CRLF = cl_abap_char_utilities => cr_lf.
Concatenate l_html CRLF '_ function'
'30'
'Www _ get_report '> 'into l_html.
String Standard Functions
Search:Find [{First Occurrence} | {all occurrences} of] Pattern in dobj
Replace:Replace [{First Occurrence} | {all occurrences} of] Pattern in dobj with new
Replace section [offset off] [length Len] of dobj with new
Mobile:Shift C [by N places] [mode]
Splicing:Concatenate C1... CN into C [separated by S]
Split:Split C at Del into C1... CN.
Case sensitivity conversion:Translate text to upper case.
Translate text to lower case.
String overwrite:Overlay C1 with C2 [Only STR].
Compressed string:Condense C [no-gaps].
String function of system expansion (function group CSTR)
String_length
String_concatenate
String_move_right
String_reverse
String_split
String_center
Text_split
String_split_at_position
Overlay_byte
Sjis_sbc_to_dbc
Sjis_dbc_to_sbc