ABAP - Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Character String and Byte String Processing →  Expressions and Functions for String Processing →  String Functions →  Processing Functions for Character-Like Arguments → 

to_upper, to_lower, to_mixed, from_mixed - Case Functions

Syntax Forms

1. ... to_upper( [val =] text ) ...

2. ... to_lower( [val =] text ) ...

3. ... to_mixed( [val =] text [sep = sep] [case = case] [min = min] ) ...

4. ... from_mixed( [val =] text [sep = sep] [case = case] [min = min] ) ...

Effect

These functions return the character string from text after it has been converted in accordance with the following case rules:

sep is a character-like expression position. If they have a fixed length, trailing blanks are ignored. min is a numeric expression position of type i. case expects a character-like data object with a fixed length. val = can be omitted only if none of the optional arguments are specified. If sep is an empty string or if min is negative, an exception of class CX_SY_STRG_PAR_VAL is raised.

The return code has the type string accordingly.

Note

The functions to_mixed and from_mixed are used to transform standard ABAP naming conventions for names with underscores to standard Java naming conventions with uppercase and lowercase letters and (namely Mixed Case Style and Camel Case Style) and the other way around.

Example

Displays the Latin alphabet in lowercase letters.

cl_demo_output=>display( to_lower( sy-abcde ) ).

Executable Example

String Functions, to_mixed and from_mixed

Exceptions

Handleable Exceptions

CX_SY_STRG_PAR_VAL