on 12-07-2009 9:43 AM
Hi All,
We are using the UI Table element in our webdynpro screen (Not using ALV). Now is it possible to use the sorting (ascending, descending) and also sorting by individual columns without changin it to ALV ?
And in our screen, we have many editable fields. When the user makes a change and tries to exit without pressing 'SAVE' option , we should display a pop-up asking whether the datas should be 'SAVED' in database table. Is there any standard fm for doing this?
Thanks in advance.
No standard way of doing these thihgs, You have to implenment the conetxt change log for that node to which the table is bound and get the log for changes and in the button handler, based on the entries in log you have to open a popup for data save..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
when I write this code in WD DOMODIFY after following the steps in the first thread , I am able to sort the table column
"MATNR" ascending as well as descending ,
data wd_table type ref to cl_wd_table.
check first_time = abap_true.
* Name of the table UI element to be provided
wd_table ?= view->get_element( 'TABLE' ).
wd_this->table_control ?= wd_table->_method_handler.
*Name of the key attribute of the context node to which the table binding is done to be provided
wd_this->table_control->set_key_attribute_name( 'MATNR' ).
// here column "MATNR is sorted
proceed like the first reply to thread , u wud get it
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Am able to apply the sorting. Thanks a lot.
But one thing am noticing is that I have applied the sorting to only one column of the table
wd_this->table_control->set_key_attribute_name( 'MATNR').
here column "MATNR is sorted
My table has 6 fields. Am able to see that after writing above piece of code am able to sort all the six columns in the table.
Can anyone explain how this is happening?
Thanks in advance.
Hi,
Now is it possible to use the sorting (ascending, descending) and also sorting by individual columns without changin it to ALV ?
The sorting functionality can be achived for normal table UI element also.
You can write the code in the events (ONSORT) of the table UI element.
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
it is possible to sort the table
u must have binded ur context node to the internal table in WD DOINIT.
thn proceed like this :
1 Go to Attributes Tab, Give TABLE_CONTROL in the Attribute Column , Check the Check Box in the RefTo Column & give IF_WD_TABLE_METHOD_HNDL in the Associated Type.
2 Then create one Event for onSort Event of the Table .Then Give the Action Name as ON_TEST_SORT and press Enter.
3 In the onaction method ie ONACTIONON_TEST_SORT
wd_this->table_control->apply_sorting( ).
4 write this piece of code in WDDOMODIFYVIEW
data wd_table type ref to cl_wd_table.
check first_time = abap_true.
* Name of the table UI element to be provided
wd_table ?= view->get_element( 'TABLE' ).
wd_this->table_control ?= wd_table->_method_handler.
*Name of the key attribute of the context node to which the table binding is done to be provided
wd_this->table_control->set_key_attribute_name( 'MATNR' ).
// here column "MATNR is sorted
regards,
amit
Edited by: amit saini on Dec 7, 2009 10:49 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.