on 07-01-2008 9:22 PM
Hi folks
I have an ALV with mulitple line selection,
means first there's the the lead selection and all others are additionally.
Is there any event I can use if I mark a line in the ALV?
my requirement is to calculate a sum depending on the values of the marked ALV lines
(add and subtract values immediately depending on line selection or deselection)
ON_LEAD_SELECT is only for the lead but not for all other lines
ON_CLICK -> I don't know when this is event is executed, it won't work. maybe if field is a link
ON_DATA_CHECK work only if entries were changed, but not if I only change my selection of ALV lines.
do I really have to add button saying, "calculate" and then get the marked lines and do the calculation?
Any hint is appreciated
Thomas
Hi Thomas
ON_CLICK event will trigger when there is a button or toggle button in th ALV cell and user click on that.
yes you are right ON_LEAD_SELECT will not work too.
but check for WDDOMODIFYVIEW. i think on every line select this will trigger. check if you can keep your logic in this method.
Regards
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid there is no easy answer. If the suggestions given don't work you might consider switching back to the normal table UI element. It has two separate event handlers - one for leadSelect and one for Select. Unfortunetely both of these event handlers are not mapped through the ALV component. The other suggestion would be to add a button to the ALV task bar that did the calculation. It is an extra step, but once the button is pressed you can read the selected elements from the node and do the calculation. That should produce less roundtrips to the server.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.