2007 Jun 28 6:33 AM
Hi experts...
I am using alv function module.. I want to count the number of rows and display..the output is
PLAN BUKRS PERSA PERNR
__________________________________
adnd 1010 US01 100102
bsch 1010 US02 100103
The output I want is
PLAN BUKRS PERSA PERNR
__________________________________
adnd 1010 US01 100102
bsch 1010 US02 100103
total PERNR in US01 1
total PERNR in US02 1
total PERNR in 1010 2
total PERNR in PLAN 2
PLease help...if u can provide with sample code....the code may be also in class method....
points will be awarded....nut its urgent
2007 Jun 28 6:43 AM
Hi Abhay,
One thing you can do it is while creating an internal table after each group insert a line of count and then simply display it in ALV.
Like,
loop at itab.
at end of group (US01, US02....)
count lines.
insert lines to itab.
endat.
---
endloop.
Pass this to ALV.
Reward if useful!
2007 Jun 28 7:12 AM
HI prasad,
I have done that...but the problem is when sorting..if the user sorts the alv...then the problem is that the counted rows come in start
2007 Jun 28 8:15 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |