Ansicht
Dokumentation

ABENCMAX_CMIN_FUNCTIONS - CMAX CMIN FUNCTIONS

ABENCMAX_CMIN_FUNCTIONS - CMAX CMIN FUNCTIONS

General Data in Customer Master   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

- cmax, cmin

... cmax$|cmin( val1 = text1  val2 = text2
              $[ val3 = text3$] ... $[val9 = text9$] ) ...


Effect

These built-in 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 determines which operand is bigger or smaller based on the order in the code page used.

At least two arguments, text1 and text2, and a maximum of nine arguments must be passed. Here, the optional input parameters val3 through val9 must be filled in ascending order without gaps.

The return value has the type string.

Notes

  • The extremum functions nmax and nmin can be used to determine numeric extreme values.
  • Character-like extremum functions, like numeric extremum functions, can be traced back to the equivalent control structures using comparison operators. Remember that, unlike with the usual ABAP comparison rules, shorter arguments of fixed lengths are not padded to the length of longer arguments by padding them with blanks.
  • As in comparisons with comparison operators, the current locale is not significant when determining the extreme values.

Example

The example demonstrates how to find the smallest and largest letters of a random set, which is represented here by the lines of an internal table. Of course, in this case the result can also be achieved by sorting the internal table, which is used here for verification.

String functions cmax, cmin, and segment.






TXBHW - Original Tax Base Amount in Local Currency   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 3260 Date: 20240328 Time: 202353     sap01-206 ( 50 ms )