Ansicht
Dokumentation

ABENNMAX_NMIN_FUNCTIONS - NMAX NMIN FUNCTIONS

ABENNMAX_NMIN_FUNCTIONS - NMAX NMIN FUNCTIONS

Addresses (Business Address Services)   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

- nmax, nmin

... nmax$|nmin( val1 = arg1 val2 = arg2 $[val3 = arg3$] ... $[val9 = arg9$] ) ...

Effect

These built-in functions return the value of the largest or smallest of the passed arguments. A minimum of two arguments, arg1 and arg2 must, and a maximum of nine arguments can be passed. Here, the optional input parameters val3 to val9 must be filled in ascending order without gaps. The arguments arg1 to arg9 are numeric expression positions.

The following applies to the data type of the return value:

  • Within an arithmetic expression, the arguments of the function contribute to the calculation type of the entire expression and the function is calculated using the calculation type. If an argument itself is an arithmetic expression, its operands contribute to the entire calculation type and the argument is also calculated using this type.

Notes

  • The extremum functions cmax and cmin can be used to determine character-like extreme values.
  • When using two input parameters:
result =  nmax$|nmin( val1 = arg1 val2 = arg2 )

the evaluation of the functions is equivalent to:

IF num1 >= num2 $| num1 = num2.
  result = num1.
ELSE.
  result = num2.
ENDIF.

When using more than two input parameters, an equivalent control structure would be more complex.

Determination of the smaller of two time stamps in packed numbers, whereby the initial value of the conditional operator COND is not regarded as the smallest value.

Extremum Functions nmax, nmin






TXBHW - Original Tax Base Amount in Local Currency   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 3194 Date: 20240328 Time: 105924     sap01-206 ( 47 ms )