Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

(S)ALV total editable

Clemenss
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

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

2 REPLIES 2

naimesh_patel
Active Contributor
0 Kudos

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

0 Kudos

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