Skip to Content
0
Former Member
Jul 01, 2006 at 06:10 PM

Modifying internal table.

27 Views

HI Friends,

I have an internal table with some line and each line has a material number, quantity etc.....

I need to add quantites based on a condition and add the result to the first line which does not satisfy the condition and delete all the lines which satisfy the condition from the internal table.

My code is as follows however its giving me a short dump.

DATA : wa1_input line lone of i_input.

loop at i_input.

if xvbap-pstyv = 'TAL'

wa1_input-qty = wa1_input-qty + i_input-qty.

endif.

endloop.

read table i_input where xvbap-pstyv <> 'TAL'.

i_input-qty = i_input-qty + wa1_input-qty.

modify i_input.

Any help on this will be helpful.

Shejal.