on 09-12-2006 7:35 AM
Hi experts,
within an ALV I want the user to personalize the columns of the ALV. Subsequently I needed to programmatically find out, which columns were selected in order for me to adjust the linked graphic to the selected columns.
Where would I find the info regarding the selected columns? All hints are higly appreciated.
Cheers, Rene
Hi Rene,
IF_SALV_WD_COLUMN_SETTINGS=>GET_COLUMNS should do the trick.
regards Ulli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rene
You can use the following code to find out which columns have been selected:
DATA:
lt_SALV_WD_T_COLUMN_REF TYPE SALV_WD_T_COLUMN_REF,
wa_SALV_WD_COLUMN_REF TYPE SALV_WD_S_COLUMN_REF,
l_fieldname TYPE string,
l_tabix TYPE sytabix.
field-symbols <column> type any.
CALL METHOD wd_this->SALV_CONFIG->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMNS
RECEIVING
VALUE = lt_SALV_WD_T_COLUMN_REF.
* itSelectedData contains the data in the ALV
loop at itSelectedData into isSelectedData.
l_tabix = sy-tabix.
loop at lt_salv_wd_t_column_ref into wa_salv_wd_column_ref.
concatenate 'ISSELECTEDDATA-' wa_salv_wd_column_ref-id into l_fieldname.
assign (l_fieldname) to <column>.
* Is the column invisible
if wa_salv_wd_column_ref-r_column->visible = '01'.
clear <column>.
modify itSelecteddata from isSelecteddata index l_tabix.
endif.
endloop.
endloop.
Regards
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.