10-24-2007 7:05 PM
hi experts,
I have a situation regarding internal tables. I have different records with the same order no in a internal table. There is a filed for completion which has possible values X or ' '. The values will be different for this field for the records with the same oredr no. I need to move only those records which does not have 'an X' at all in the completion field for any of the record with the order no.
10-24-2007 7:11 PM
Try this -
loop at itab into wa_itab.
at new order.
if flag = 'X'.
wa_itab2-order = wa_itab-order.
append wa_itab2 to itab2.
flag = ' '.
endif.
endat.
if wa_itab1-completion = 'X'.
flag = 'X'.
endif.
endloop.
Now all order number are there in itab2.
loop at itab1 into wa_itab1.
read table itab2 into wa_itab2....
......
...
endloop.
Regards,
Amit
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
10-24-2007 7:14 PM
You have one internal table
loop at itab.
if itab-cstatus = ''.
move the values to other internal table.
move itab to itab1.
append itab1.
endif.
endloop.
here itab1 contains records with completion status is space
Thanks
Seshu