Show TOC

Background documentationCase Expression Locate this document in the navigation structure

 

The Case expression is similar to the ABAP CASE statement. The expression takes a case parameter and checks its value against a number of test parameters.

For each of these test parameters, a corresponding return parameter is specified in the When table. As soon as one of the test parameters matches the case parameter, the corresponding return parameter is evaluated and a result is returned. If the test parameters do not match the case parameter then a different parameter is evaluated in order to specify the result.

All parameters can be context data objects or nested expressions. Typically, the case parameter is a context data object, the test parameters are constants and the result parameters are nested expressions.