on 12-19-2012 6:42 AM
Hello
I am displaying a table using webdynpro ( not alv webdynpro ), then user may change the column positions by drag and drop and he may also hide some columns.
Now after user modifications , say if i click on a buttion, inside the onaction method i want to capture the new positions of the coulumn(so how to get the new column positions ? ) i want to store this in a z table and i want to display the order what he has choosen next time ( so how can i set the column positions ?).
i found some methods in ALV, i also tried with CL_WD_TABLE but nothing works out. Pls help.
Hello,
This functionality is already taken care by the Webdynpro Personalization.
Whenever a user changes the column order of a table, it is saved and is reflected when he log in next time.
Warm regards,
Upendra Agrawal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But, I want to do this manually, Because my actual scenario is different.is there any way?
i am doing this as below, But i am getting lt_col as empty.
METHOD WDDOMODIFYVIEW .
*GR_TABLE I have declared as global variable type CL_WD_TABLE
WD_THIS->GR_TABLE ?= VIEW->GET_ELEMENT( `TABLE` ).
ENDMETHOD.
METHOD ONACTIONGETCOL .
DATA : LT_COL TYPE CL_WD_TABLE_COLUMN=>TT_TABLE_COLUMN.
CALL METHOD WD_THIS->GR_TABLE->GET_COLUMNS
RECEIVING
THE_COLUMNS = LT_COL.
ENDMETHOD.
Hi Ramanuja,
I wonder if you would get different results if instead of setting a global reference to the table (wd_this->gr_table) in wddomodifyview, you instead fetch the table reference in the action method...
data lo_view type ref to if_wd_view.
data lo_table type ref to cl_wd_table.
* Get a reference to the view, casting to the appropriate interface
lo_view ?= wd_this->wd_get_api( ).
* Get a reference to the table
lo_table ?= lo_view->get_element( 'TABLE' ).
* Get the columns
lt_col = lo_table->get_columns( ).
Cheers,
Amy
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.