0% found this document useful (0 votes)
25 views2 pages

Program 06

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Program 06

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Sanjivani SAP Training Programme

Program 06: Design of CHECKBOXES on selection screen to perform


arithmetic operations and display the result on execute button.

REPORT Z1208PROG6.

parameters : p_x type i default 20 obligatory,


p_y type i default 30 obligatory.

data v_z type i.

parameters : p_c1 as checkbox user-command FC1,


p_c2 as checkbox user-command FC2,
p_c3 as checkbox user-command FC3,
p_c4 as checkbox user-command FC4.

at selection-screen.

case sy-ucomm.
when 'FC1'.
IF P_C1 = 'X' .
MESSAGE 'ADDITION CHECKBOX SELECTED' TYPE 'I'.
ELSE.
MESSAGE 'ADDITION CHECKBOX DESELECTED' TYPE 'I'.
ENDIF.
WHEN 'FC2'.
IF P_C2 = 'X' .
MESSAGE 'DIFFERENCE CHECKBOX SELECTED' TYPE 'I'.
ELSE.
MESSAGE 'DIFFERENCE CHECKBOX DESELECTED' TYPE 'I'.
ENDIF.
WHEN 'FC3'.
IF P_C3 = 'X' .
MESSAGE 'PRODUCT CHECKBOX SELECTED' TYPE 'I'.
ELSE.
MESSAGE 'PRODUCT CHECKBOX DESELECTED' TYPE 'I'.
ENDIF.
WHEN 'FC4'.
IF P_C4 = 'X' .
MESSAGE 'DIVISION CHECKBOX SELECTED' TYPE 'I'.
ELSE.
MESSAGE 'DIVISION CHECKBOX DESELECTED' TYPE 'I'.
ENDIF.
WHEN OTHERS.
MESSAGE 'NONE OF THE CHECKBOXEX SELECTED/DESELECTED' TYPE 'I'.
ENDCASE.

Prepared By: Salkar Sailee R (SAP Co-Incharge, SAP ABAP Trainer, Sanjivani College of Engineering
Kopargaon)
Sanjivani SAP Training Programme

start-of-selection.

if p_c1 = 'X'.
v_z = p_x + p_y.
write : / 'sum of two no.is',v_z .
endif.

if p_c2 = 'X'.
v_z = p_x - p_y.
write : / 'Difference of two no.is',v_z .
endif.

if p_c3 = 'X'.
v_z = p_x * p_y.
write : / 'product of two no.is',v_z .
endif.

if p_c4 = 'X'.
v_z = p_x / p_y.
write : / 'division of two no.is',v_z .
endif.

Prepared By: Salkar Sailee R (SAP Co-Incharge, SAP ABAP Trainer, Sanjivani College of Engineering
Kopargaon)

You might also like