SAP REDUCE CONSTRUCTOR INFERENCE



Get Example source ABAP code based on a different SAP table
  



REDUCE, Type Inference for Actual Parameter
If a constructor expression
REDUCE #( ... INIT ... FOR ... )
is passed to generically typed formal parameters as an actual parameter using the character # as a symbol for the operand type, the following type inference is performed for the character #:
If the data type of the first declaration after INIT matches the generic type of the formal parameter, this data type is used.
If the data type of the first declaration after INIT does not match the generic type of the formal parameter, the type is derived from the generic type as follows: