calculator

 REPORT ZCALCULATOR.

PARAMETERS opt1 type i.
PARAMETERS opt2 type i.

PARAMETERS add RADIOBUTTON GROUP grp1.
PARAMETERS subtract  RADIOBUTTON GROUP grp1.
PARAMETERS multiply  RADIOBUTTON GROUP grp1.
PARAMETERS divide  RADIOBUTTON GROUP grp1.

if add 'X'.
  add opt2 to opt1.
 endif.

 if subtract 'X'.
  subtract opt2 FROM opt1.
 endif.

 if multiply 'X'.
  multiply opt1 by opt2.
 endif.

  if divide 'X'.
  divide opt1 by opt2.
 endif.

 write'resul:t' opt1.

Comments

Popular posts from this blog

sap abap import from excell to table (transparent table)

sap abap Import from excell to internal table that works 100%