on 04-23-2010 9:05 AM
Hi,
I'm using Table UI control and I need to calculate sum value of specified column of displayed values. I use filter in this table what means that I need to recalculate sum after each filter event and sum only displayed values in the table control. How to achieve this?
I have read some articles about adding a row into itab and sum values into this new row and bind this itab into table, but this doesn't solve the problem with filter.
Many thanks for any reply.
Regards Jiri Neuzil
Hi Jiri,
have you thought of having a separate table for your sums/totals?
Either that - and handle the totaling in your table's onFilter event - or sounds like you'll have to build your own table filter handler! Having done that with WD Java because of limitations in the supplied filter handler, it was a reasonable bit of work - but at least CL_WDR_TABLE_METHOD_HNDL is a lot better than the Java one I had to use as a model.
You could create your own filter handler to implement IF_WD_TABLE_METHOD_HNDL and IF_WD_VIEW_ELEMENT_METHOD_HND.
Unfortunately CL_WDR_TABLE_METHOD_HNDL is final - so you can't subclass it - but you could at least hand off most of the calls to an instance of it.
Good luck!
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.