ABAP: Ternary Operator

There is no ternary operator in ABAP, but with 740 there is something that comes close to that. When can check for example whether a variable is initial in one line.

DATA(lv_var_int) = COND #( WHEN iv_imp_int IS INITAL THEN 1 ELSE iv_imp_int ).

In this example we can assume, that iv_imp_int is an importing parameter, that is not filled. If that were the case, lv_var_int would default to 1, if it weren't the case, lv_var_int would assume the original value of iv_imp_int.