Skip to Content
0
Former Member
Jan 12, 2008 at 05:10 AM

Calculate Sum Tricky one

23 Views

Hello Gurus,

A text file has data is in the following manner

I have read the file and all properly the only problem

here is summing up the data so below is how my data looks.

Please make a note this is not stored in DDIC database table it will be read in an Internal table

Also Col3 is not a integer so I cannot use COLLECT

Please suggest a way out to handle this tricky part.

I don;t thik At New On change will work please try this program using the same test data given below , please send me the abap code if you are able to crack this nut.

Col1 Col2 Col3

ABC A 1

ABC A 2

ABC B 3

BBC A 4

BBC A 5

I want to Sum up COL3 by grouping COL1 and COL2

Output will be

ABC A 3 ( 1+ 2)

ABC B 3

BBC A 9 ( 4 + 5 )

Please let me know I tired many logic but nothing seems to be working.. your help is greatly apprecaited .

Points guranteeed !!

Reagrds,

Aryan