Skip to Content
0
Former Member
May 13, 2008 at 01:50 PM

Collect Statment

23 Views

Hi all,

I have an internal table with two fields

data : begin of itab occurs 0,

field1(10) type c,

field(5) type n,

end of itab.

Itab-field1 = 'Field1'.

itab-field2 = 10.

collect itab.

Itab-field1 = 'Field1'.

itab-field2 = 20.

collect itab.

I expected the output to be

field1 30

but instead it gives me an output

field1 10

field1 20

But the collect def is

if non numeric fields are same then it add the numeric fields

I know it works if i use type i instead type n

Let me know

Thanks