cancel
Showing results for 
Search instead for 
Did you mean: 

WDA ALV: Hide button (in a colum) if the value is empty

andrea_galluccio2
Contributor
0 Kudos

Hi to all,

i have an WDA ALV.

With some tutorials i've put a button in a cell of an ALV table. The name of the icon of the button is the value of the cell (@A3@).

But not all raws of this table has this value: some rows are empty and the button appears without icon.

I'd like to hide the button for every cell that doesen' have any value. So show the button for ONLY the raws that have that colum populated with a value.

This is the code to design the button in the cell :


......
lr_column = wd_this->alv_config_table->if_salv_wd_column_settings~get_column( ls_col-id ).

DATA: lr_button TYPE REF TO cl_salv_wd_uie_button.

CREATE OBJECT lr_button.
lr_button->SET_IMAGE_SOURCE_FIELDNAME( ls_col-id ).
lr_column->set_cell_editor( lr_button ).
......

Sorry for the silly question but i'm newbie of the WDA programming. I've already searched but i wasn't able to find some posts that could help me.

Thanks a lot

Andrea

Accepted Solutions (0)

Answers (1)

Answers (1)

andrea_galluccio2
Contributor
0 Kudos

Solved with method

lr_button->SET_VISIBLE_FIELDNAME(<COLUMN>).