ZP12

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

REPORT ZP12.

data v_z type i.


SELECTION-SCREEN begin of BLOCK bk1 with frame TITLE t1.
SELECTION-SCREEN BEGIN OF line.
SELECTION-SCREEN COMMENT 10(20) lb1.
PARAMETERS P_X type i default 20.
SELECTION-SCREEN END OF line.

SELECTION-SCREEN BEGIN OF line.


SELECTION-SCREEN COMMENT 10(20) lb2.
PARAMETERS P_Y type i default 20.
SELECTION-SCREEN END OF line.
SELECTION-SCREEN end of BLOCK bk1.

SELECTION-SCREEN begin of BLOCK bk2 with frame title t2.


PARAMETERS : P_r1 RADIOBUTTON GROUP grp1,
P_r2 RADIOBUTTON GROUP grp1,
P_r3 RADIOBUTTON GROUP grp1,
P_r4 RADIOBUTTON GROUP grp1,
P_r5 RADIOBUTTON GROUP grp1 DEFAULT 'X'.
SELECTION-SCREEN end of BLOCK bk2.

START-OF-SELECTION.
if P_r1 = 'X'.
v_z = P_X + P_Y.
write : /'SUM IS ',v_z LEFT-JUSTIFIED.
ELSEIF P_r2 = 'X'.
v_z = P_X - P_Y.
if v_z >= 0.
write :/'Difference is ',v_z LEFT-JUSTIFIED.
else.
write :/'Difference is -' NO-GAP,v_z LEFT-JUSTIFIED no-SIGN.
endif.
ELSEIF P_r3 = 'X'.
v_z = P_X * P_Y.
write :/'Product is ',v_z LEFT-JUSTIFIED.
ELSEIF P_r4 = 'X'.
v_z = P_X / P_Y.
write :/'Division is ',v_z LEFT-JUSTIFIED.
else.
write :/'None selected....'.

ENDIF.

initialization.
lb1 = 'Enter First Number'.
lb2 = 'Enter Second Number'.
t1 = 'Enter Input Values'.
t2 = 'Airthmetic Operation'.

You might also like