SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
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 →cmax, cmin - Character-Like Extreme Value Functions
Syntax Forms
... cmax|cmin( val1 = text1 val2 = text2
[val3 = text3] ... [val9 = text9] ) ...
Effect
These functions return the value of the biggest or the smallest of the character-like arguments text1, text2, ... passed. The content of the arguments is compared from left to right in the evaluation. The first different character from the left decides which operand is bigger or smaller on the basis of the sequence in the code page used.
At least two arguments, text1 and text2, and a maximum of nine arguments must be passed, whereby the optional input parameters val3 through val9 must be filled in ascending order without gaps.
The return code has the type string.
Notes
Example
For a demonstration of the extreme functions cmax and cmin, refer to the character string functions cmax, cmin, and segment.