Report ZZ_##_INTERACTIVE5

*&---------------------------------------------------------------------*
*& Report ZZ_##_INTERACTIVE5 *
*& *
*&---------------------------------------------------------------------*
*& 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_##_INTERACTIVE5.
 
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.
* WRITE / sy-lsind.
* sy-lsind = sy-lsind - 1.
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.