Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

internal table selection

Former Member
0 Kudos

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.

2 REPLIES 2

amit_khare
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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