Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

TRaffic light with tooltips

0 Kudos

hi all,

alv output has traffic lights icon.

I want diiferent tooltips to come depending upon the color of light( red, green and yellow)

Can anybody help me ...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can bind the selection of which variant have to be used to the column itself or

add a new column to your node which is only for this purpose.

have a look at the ON_UPLOAD_COMPLETE method of the component controller

of the WD4A component SALV_WD_DEMO_TABLE_CV.

...

if l_erg eq 0.

ls_data-cellvariant = 'TEXT_VIEW'.

else.

In some cases the field cellvariant is set to text view.

Go down in the method you will find this:

loop at lt_columns into ls_column.

*... create textview cellvariant for each column

data:

lr_cv type ref to cl_salv_wd_cv_standard.

create object lr_cv.

lr_cv->set_key( 'TEXT_VIEW' ).

data:

lr_textview type ref to cl_salv_wd_uie_text_view.

create object lr_textview.

lr_textview->set_text_fieldname( ls_column-id ).

lr_cv->set_editor( lr_textview ).

ls_column-r_column->add_cell_variant( r_cell_variant = lr_cv ).

ls_column-r_column->set_sel_cell_variant_fieldname( 'CELLVARIANT' ).

Here the cellvariant is added to the column and the filedname that contains the

variant to choose is set via set_sel_cell_variant_fieldname( 'CELLVARIANT' ).

This mean that in each row the field cellvariant is checked and if it contains the

text 'TEXT_VIEW' the cell variant is used.

You could set up the tooltip of each cell editor you use for each cell vraiant. In the

above example it wozuld be something like this:

create object lr_textview.

lr_textview->set_text_fieldname( ls_column-id ).

lr_textview->set_tooltip( 'TOOLTIP FOR TEXTVIEW CELL VARIANT' ).

Plz do reward points.

Thanks

Priyanka

1 REPLY 1

Former Member
0 Kudos

You can bind the selection of which variant have to be used to the column itself or

add a new column to your node which is only for this purpose.

have a look at the ON_UPLOAD_COMPLETE method of the component controller

of the WD4A component SALV_WD_DEMO_TABLE_CV.

...

if l_erg eq 0.

ls_data-cellvariant = 'TEXT_VIEW'.

else.

In some cases the field cellvariant is set to text view.

Go down in the method you will find this:

loop at lt_columns into ls_column.

*... create textview cellvariant for each column

data:

lr_cv type ref to cl_salv_wd_cv_standard.

create object lr_cv.

lr_cv->set_key( 'TEXT_VIEW' ).

data:

lr_textview type ref to cl_salv_wd_uie_text_view.

create object lr_textview.

lr_textview->set_text_fieldname( ls_column-id ).

lr_cv->set_editor( lr_textview ).

ls_column-r_column->add_cell_variant( r_cell_variant = lr_cv ).

ls_column-r_column->set_sel_cell_variant_fieldname( 'CELLVARIANT' ).

Here the cellvariant is added to the column and the filedname that contains the

variant to choose is set via set_sel_cell_variant_fieldname( 'CELLVARIANT' ).

This mean that in each row the field cellvariant is checked and if it contains the

text 'TEXT_VIEW' the cell variant is used.

You could set up the tooltip of each cell editor you use for each cell vraiant. In the

above example it wozuld be something like this:

create object lr_textview.

lr_textview->set_text_fieldname( ls_column-id ).

lr_textview->set_tooltip( 'TOOLTIP FOR TEXTVIEW CELL VARIANT' ).

Plz do reward points.

Thanks

Priyanka