Skip to Content
0
Former Member
Jan 30, 2009 at 06:58 AM

Problem in At End Of

25 Views

Hi experts,

I hv one int table it_data with following entries.

ARTNR BUDAT VVVOL3 VVVOL_ME3

1010371 20070110 10 L

1010371 20070110 10 L

1010371 20070124 20 L

1010371 20070124 20 L

1012376 20070110 4 L

1012376 20070110 4 L

1012376 20070110 4 L

1012376 20070110 4 L

1012377 20070110 20 L

1012377 20070110 20 L

1012377 20070110 20 L

1012377 20070110 20 L

Now I want to do SUM of VVVOL3 for the same ARTNR and the BUDAT & VVVOL_ME3 ( posting date and unit )of last ARTNR to be taken

i.e. for ARTNR 1010371 the record should be

ARTNR BUDAT VVVOL3 VVVOL_ME3

1010371 20070124 60 L

So for that , I am using ..AT END OF. ....as below

Loop at it_data.

At end of artnr.

Sum.

move it_data-artnr to it_data1-artnr .

move it_data-budat to it_data1-budat .

move it_data-vvvol3 to it_data1-vvvol3.

move it_data-vvvol3_me to it_data1-vvvol3_me .

append it_data1.

clear it_data1.

clear it_data.

endloop.

But The corresponding BUDAT and VVVOL3_ME can not be taken in it_data1.

As inside ' AT END OF' fields witl data type DATS,UNIT,CUKY are filled with '**********'.

Could anybody suggest me a simpler solution?

Thanks...............