09-23-2010 12:06 AM
Hi,
my customer has some very special requirements They want an ALV with total lines calculated by a special weighted average algorithm. OK, I know we have access to the total line by reference. But know they even want the total line editable.
I know it is possible to extract the grid object from a class inherited from SALV_TABLE object and to make it editable. But I do not have any idea about how to even make the total and/or subtotal lines editable.
Also, they want to suppress the vertical grid lines for only the first row.
This question is about what can we possibly do using some oo inheriting techniques.
Hints are welcome!
Regards,
Clemens
09-23-2010 3:46 PM
I am not sure it would be possible to make the TOTAL Line(s) editable. But, you can make a fake total line in your internal table. Calculate the total based on the algorithm and display it. You can also register the Event "After" for Total, Subtotal, Filter etc buttons to update this total line before display.
Regards,
Naimesh Patel
09-23-2010 3:46 PM
I am not sure it would be possible to make the TOTAL Line(s) editable. But, you can make a fake total line in your internal table. Calculate the total based on the algorithm and display it. You can also register the Event "After" for Total, Subtotal, Filter etc buttons to update this total line before display.
Regards,
Naimesh Patel
09-23-2010 10:43 PM
Thank you Naimesh,
that's what I think will be the only possible solution. Another challenge is the collapse/expand icon on the sorting columns for subtotals: This is interesting - the icon comes right of the cell content. I did not try yet but I think you can only display icons followed by text.
Thanks for the AFTER_REFRESH and AFTER_USER_COMMAND hints, will need DATA_CHANGED (and more) as well.
I expect some fun...
Regards,
Clemens