sapdev logo background
sapdev logo sapdev logo
Comments

SAP OO OBS CASE 1 documentation, setup help and example usage



Return to SAP documentation index


INCLUDE
ARTICLE

Incorrect Statement After CASE

In ABAP Objects WHEN must be the first 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 .
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    OO_OBS_CALL_TA_1
    OO_OBS_CHARACTER_1




    comments powered by Disqus