*&---------------------------------------------------------------------*
*& Report  ZZ_##_INTERACTIVE4                                          *
*&                                                                     *
*&---------------------------------------------------------------------*
*& SY-UCOMM:                                                           *
*& PICK -> "AT LINE-SELECTION"                                         *
*& BACK -> Eine Stufe zurückgehen ("grüner Pfeil nach links")          *
*& %EX  -> Bearbeitung beenden ("gelber Pfeil nach oben")              *
*& RW   -> Bearbeitung abbrechen ("rotes Kreuz")                       *
*&---------------------------------------------------------------------*

REPORT  ZZ_##_INTERACTIVE4.

PARAMETER number1 TYPE I.
PARAMETER number2 TYPE I.

DATA result TYPE I.

START-OF-SELECTION.
  WRITE: / number1, '?', number2.
  SET PF-STATUS '100'.

AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'ADD'.
      result = number1 + number2.
    WHEN 'SUB'.
      result = number1 - number2.
    WHEN 'MUL'.
      result = number1 * number2.
    WHEN 'DIV'.
      result = number1 / number2.
    WHEN OTHERS.
      WRITE 'Unknown function code'.
      EXIT.
  ENDCASE.
  WRITE: / 'Result:', result.