‎2009 Oct 20 2:02 PM
Hi,
Loop at item_itab into wa
IF zyflag IS NOT INITIAL AND flag NE zyflag.
Delete item_itab INDEX sy-tabix.
ENDIF.
ENDLOOP.
This coding is not working. Here zyflag is a selection screen field which has multiple selection. Even though the flag value and zyflag value is equal, it is taking notequal. Is it because of zyflag is a multiple selecition field? If so, how can i give the condition?
Ezhil
‎2009 Oct 20 2:04 PM
Hello Ezhil,
Loop at item_itab into wa
" IF zyflag IS NOT INITIAL AND flag NE zyflag.
IF zyflag IS NOT INITIAL AND flag NOT IN zyflag.
Delete item_itab INDEX sy-tabix.
ENDIF.
ENDLOOP.BR,
Suhas
‎2009 Oct 20 2:03 PM
1. what do you mean by multiple selection field?
if it is a select option.. then the values comes as IEQXYZ ( where I is one field value for sign, EQ for option, and then the low high values)
so use flag in zyflag or not in
2.
inside the loop no need of indexing.
just "delete item_itab" will do.
Edited by: Soumyaprakash Mishra on Oct 20, 2009 6:34 PM
‎2009 Oct 20 2:07 PM
Delete statement is working fine. But the condition flag NE zyflag is not working. Though flag and zyflag are equal, it is showing not equal and delete statement is executed.
i think that is bec zyflag is in select-options.
So for that, how can i give the condition?
‎2009 Oct 20 2:11 PM
Hi,
Try this code.
Loop at item_itab into wa
IF zyflag IS NOT INITIAL AND flag NE zyflag-low.
Delete item_itab INDEX sy-tabix.
ENDIF.
ENDLOOP.
Thanks,
Harini
‎2009 Oct 20 2:04 PM
HI,
Since ZYFLAG is a select option try using the field ZYFLAG-low for the comaprison.
Thanks,
Harini
‎2009 Oct 20 2:04 PM
Hello Ezhil,
Loop at item_itab into wa
" IF zyflag IS NOT INITIAL AND flag NE zyflag.
IF zyflag IS NOT INITIAL AND flag NOT IN zyflag.
Delete item_itab INDEX sy-tabix.
ENDIF.
ENDLOOP.BR,
Suhas