on 03-26-2015 1:38 PM
Hello Webdynpro Experts,
i want display dynamically webdynpro alv, based on input values.
if the user enter the date 20th march,2015 to 24th,march 2015, then it should show the columns from 20th to 24th.
if the user enter the date 20th march,2015 to 26th,march 2015, then it should show the columns from 20th to 26th.
then after i have to add some more fields like employee_name and shift ..etc.
u can see bellow screen shot.
Thanks in Advance.
sam.
hi,
thanks for replay
but your hiding the columns , but i need to display columns at run time.
please read the my post, what is Req.
sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Sam p,
you can write this logic inside the LOOP and HIDE which are not in required to show.
in your case. "date 20th march,2015 to 24th,march 2015,"
you must above date range so HIDE which are not falling in your date range.
LOGIC something LIKE;
LOOP at columns WHERE
columns-name LT 20thMarch 2015 AND
lv_date GT 24thMarch 2015.
<HIDE COLUMN LOGIC>.
ENDLOOP.
Follow the COLumn name logic accordingly;
thanks,
Kiran
you can loop through the columns and which one to hde
* Declare ALV config table
data: ALV_CONFIG_TABLE type REF TO CL_SALV_WD_CONFIG_TABLE.
DATA: wd_table_usage TYPE REF TO if_wd_component_usage.
* Create an instance of ALV component created ALV_COMP is usage name
wd_table_usage = wd_this->wd_cpuse_alv_comp( ).
IF wd_table_usage->has_active_component( ) IS INITIAL.
wd_table_usage->create_component( ).
ENDIF.
* Get ALV component
DATA: wd_table TYPE REF TO iwci_salv_wd_table.
wd_table = wd_this->wd_cpifc_alv_comp( ).
alv_config_table = wd_table->get_model( ).
* Declare variable to store column details
DATA: column_settings TYPE REF TO if_salv_wd_column_settings,
column TYPE REF TO cl_salv_wd_column.
column_settings ?= alv_config_table.
***************
*HIDE COLUMNS *
***************
column = column_settings->get_column( 'MANDT' ).
column->set_visible( if_wdl_core=>visibility_none ).
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 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.