on 02-27-2008 3:16 AM
Hi Guys,
I have a requirement with table having functionalities of filtering table-row and making the table-column in ascending order (sorting) having icon on table-column field. Anyone having idea about it? plz, let me know.
Thanks,
Ravin.
hi ravin,
In alv we can define functions on the toolbar and each column can be sorted( default ).
Regards,
janakiram.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ravin,
In table we can perform sorting by follwed code.
Declare attribute in attributes tab
table_control type if_wd_table_method_hndl
In modifyview method
data wd_table type ref to cl_wd_table
check first_time = abap_true.
wd_table ?= view->get_element( 'TABLE' ).
wd_this->table_control ?= wd_table->_method_handler.
This attribute is the node attribute to which table field is binded.
wd_this->table_control->set_key_attribut_name( 'ATR1' ).
*create an action handler for sort event in table
In Onsort Action handler
wd_this->table_control ->apply_sorting( ).
For creating functions
first create toolbar for the table
then add buttons to the table and at the same time define action also.
this will serve u r requirement
Regards,
janakiram
Dear Jankiraman,
Whenever, i'm applying your code for sorting it gives me following dump error.
Access via 'NULL' Object reference not possible in the following line although i have already declared TABLE_CONTROL type IF_WD_TABLE_METHOD_HNDL in the attributes tab.
wd_this->table_control ?= wd_table->_method_handler.
Kindly provide me further inputs.
Thanks,
Ravin
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.