Get Example source ABAP code based on a different SAP table
• SWITCH ABAP_CONSTRUCTOR • # SWITCH • WHEN SWITCH • THEN SWITCH • ELSE SWITCH
SWITCH>, Conditional Operator
ABAP_SYNTAX ... SWITCH type( $[let_exp>$] operand WHEN const1 THEN $[let_exp>$] result1> $[ WHEN const2 THEN $[let_exp>$] result2> $] ... $[ ELSE $[let_exp>$] resultn> $] ) ...>
What does it do? A conditional expression> with the conditional operator SWITCH> has a result, result>>, that is dependent on a case distinction. Either a value with the data type specified by type> is produced or a class-based exception is raised. The following can be specified for type>: