REPORT zsm_demo.
PARAMETERS num1 TYPE int4.
PARAMETERS num2 TYPE int4.
PARAMETERS operatn TYPE char10.
DATA: result TYPE int4.
CASE operatn .
WHEN '+'.
result = num1 + num2.
WRITE: / 'Result:', result.
WHEN '-'.
result = num1 - num2.
WRITE: / 'Result:', result.
WHEN '*'.
result = num1 * num2.
WRITE: / 'Result:', result.
WHEN '/'.
result = num1 / num2.
WRITE: / 'Result:', result.
ENDCASE.
0 Comments