SAP COND CONSTRUCTOR INFERENCE



Get Example source ABAP code based on a different SAP table
  



COND, SWITCH, Type Inference for Actual Parameters
If the following constructor expression 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 #:
COND$| SWITCH #( ... THEN ... )
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 operand after the first THEN is known statically and matches the generic type of the formal parameter, this data type is used.
If the data type of the operand after the first THEN is known statically and does not match the generic type of the formal parameter or if it is not known statically, the type is derived from the generic type as follows: