Skip to Content
0
Former Member
Nov 24, 2008 at 04:42 AM

If...elseif statement...

10612 Views

Hi,

I am selecting the data to an itab gi_output.I have 3 checkboxes in my selection screen(p_wgt and p_wgt and p_dimen).so according to the checkboxes selected the data should be deleted from gi_output.

if p_wgt = 'X'.

delete gi_output where tarag NE '0.000' and magew NE '0.000'

and ntgew NE '0.000' and brgew NE '0.000'.

elseif p_ippc = 'X'.

delete gi_output where vegr1 NE ' '.

elseif p_dimen = 'X'.

delete gi_output where laeng NE '0.000'

and breit NE '0.000'

and hoehe NE '0.000'.

elseif p_wgt = 'X' and P_ippc = 'X'.

delete gi_output where tarag NE '0.000' and magew NE '0.000'

and ntgew NE '0.000' and brgew NE '0.000'

or vegr1 NE ' '.

when 1 checkbox is selected..my coding is working fine..but when 2 checkboxes are selected (suppose p_wgt and P_ippc),the control is checking 1st if statement(P_wgt = 'X')than after that it is coming out of if statement block....any idea..