SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
Incorrect Statement After CASE
Error message in ABAP Objects if the following syntax is used:
CASE a.
MOVE 5 TO a.
WHEN 5.
WRITE a.
ENDCASE.
Correct syntax:
MOVE 5 TO a.
CASE a.
WHEN 5.
WRITE a.
ENDCASE.
Reason:
The CASE control structure must always reflect the semantics
of an IF - ELSEIF control structure, which is not ensured if a statement could occur between CASE and WHEN.