2008 Jun 04 3:36 AM
Hi guys,
I have this data below for my itab:
type numc type c type c type p
90001 cca cca 1000
90002 cca cca 2000
cca cca 1000
90002 cca cca 3000
cca cca 2000
then i collect here: collect itab.
my new data for itab is this:
type numc type c type c type p
90001 cca cca 1000
90002 cca cca 5000
cca cca 1000
cca cca 2000
My expected output should be :
type numc type c type c type p
90001 cca cca 1000
90002 cca cca 5000
cca cca 3000
why is it that when the first entry is blank, the collect seem not to work...?
thanks!
rgds,
mark
2008 Jun 04 9:22 AM
i think u hv to close this thread or u hv any probelm just post.
Hey,
U can use like wise............
LOOP AT ITAB.
AT END OF...........
SUM <FLD3>
WRITE.............
ENDAT
ENDLOOP.
Try yhis out. it will help u
Reward all helpful answers,
Thanks
2008 Jun 04 3:48 AM
go throuth code , i did same wht u want , at the end see output. its coming correct only.
run this code.
data: begin of it_out occurs 0,
a type n,
b(3) type c,
c(3) type c,
d type p,
end of it_out.
it_out-a = 90001.
it_out-b = 'cca'.
it_out-c = 'cca'.
it_out-d = 1000.
collect it_out.
it_out-a = 90002.
it_out-b = 'cca'.
it_out-c = 'cca'.
it_out-d = 2000.
collect it_out.
clear it_out.
it_out-b = 'cca'.
it_out-c = 'cca'.
it_out-d = 1000.
collect it_out.
it_out-a = 9002.
it_out-b = 'cca'.
it_out-c = 'cca'.
it_out-d = 3000.
collect it_out.
clear it_out.
it_out-b = 'cca'.
it_out-c = 'cca'.
it_out-d = 2000.
collect it_out.
loop at it_out.
write:/ it_out-a, it_out-b, it_out-c , it_out-d.
endloop.
2008 Jun 04 4:59 AM
Hey,
U can use like wise............
LOOP AT ITAB.
AT END OF...........
SUM <FLD3>
WRITE.............
ENDAT
ENDLOOP.
Try yhis out. it will help u
Reward all helpful answers,
Thanks
2008 Jun 04 9:22 AM
i think u hv to close this thread or u hv any probelm just post.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |