SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Program Flow Logic → Conditional Expressions →COND, SWITCH - result
Syntax
... operand
| { THROW [RESUMABLE] cx_class( [p1 = a1 p2 = a2 ...] ) } ...
Alternatives:
1. ... operand
2. ... THROW [RESUMABLE] cx_class( [p1 = a1 p2 = a2 ...] )
Effect
These strings specified after THEN and ELSE in the
conditional expressions
COND and
SWITCH determine the result of the expression if the appropriate branch is selected.
... operand
Effect
If an operand operand is specified, its value is converted to the data type type, if necessary, and returned as the result of the conditional expression. operand is a general expression position with the following restrictions:
Note
When an operand is selected, the condition operators COND and SWITCH
create a temporary data object (from a technical perspective) whose data type is determined by the specified
type and whose content is determined by the selected operand. This data object is used as the operand
of a statement and then deleted. It is deleted when the current statements is closed or after the analysis of a relational expression once the logical value has been determined.
... THROW [RESUMABLE] cx_class( [p1 = a1 p2 = a2 ...] )
Effect
If THROW is specified, an exception of the following exception class cx_class is raised in accordance with the rules of the statement RAISE EXCEPTION. Here, the input parameters p1, p2, ... of the instance constructor can be filled with the actual parameters a1, a2.
Notes