Class for Trailing Blanks
The class CL_ABAP_STRING_UTILITIES contains methods for processing text strings.
- C2STR_PRESERVING_BLANKS assigns text fields while preserving the trailing blanks.
- DEL_TRAILING_BLANKS deletes the trailing blanks from strings.
Tasks like this can now also be performed using statements and built-in functions.
The program compares the method C2STR_PRESERVING_BLANKS with the built-in function
shift_right. The implementation of the method now consists of nothing more than this function.
DATA(str) = `abc `. DATA(rslt) = str. cl_abap_string_utilities=>del_trailing_blanks( CHANGING str = rslt ). ASSERT rslt = shift_right( str ).
This translation does not reflect the current version of the documentation.