on 02-07-2011 6:44 PM
I am using ALV to display data from a dynamic node that I have created. I have added code for sorting a few columns, and then added totals for the numeric columns. In changing the configuration settings for the ALV I am using lo_value->if_salv_wd_table_settings~set_first_visible_row( 1 ) to try and display the initial grid starting with the 1st row. My problem is that the ALV grid always displays showing the last rows with the final total row. I tried moving set_first_row_visible around (after the totaling) but got the same result. The code will work if I just add sorting with no totals, but as soon as I add code to total the numeric columns I end up at the last row on initial display. Does anyone have a suggestion on what I can do to initially show my ALV grid starting at row #1 with totals?
Thanks,
Jeff M
hello ,
lo_value->if_salv_wd_field_settings~SET_AGGR_BEFORE_ITEMS( abap_true ).
this you can use to show the totals before the data. i.e. above the first row itself.
and if you dont want this and want to display total at the end only then it is not feasible with the
IF_SALV_WD_TABLE_SETTINGS~SET_FIRST_VISIBLE_ROW() function
you need to do some work around like putting the code to get the total for th field in wddomodifyview method and
then getting the first visible row by using IF_SALV_WD_TABLE_SETTINGS~gET_FIRST_VISIBLE_ROW() and then
display the total (or we can say get the total ) only when you have reachen at the end.
but then you need to remove the total once the user is scrolling up.
so it is kind of complicated.
so better will be to use the first case of diplaying the totals above the data.
thanks
sarbjeet singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.