cancel
Showing results for 
Search instead for 
Did you mean: 

Tooltip in alv cell

Naama
Participant
0 Kudos

Hi All,

I have an abap web dynpro application yje use alv control,

I need to create a tooltip for a cell (not a column) in the alv.

Is it possible?

Thanks,

Naama

Accepted Solutions (1)

Accepted Solutions (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Naama,

You need to create an attribute in the context node for passing tooltip for each cell. And then call SET_TOOLTIP_FIELDNAME of the particular column element. this will dynamically display tooltips for each cell.

BR, Saravanan

Naama
Participant
0 Kudos

HI Saravanan,

thanks for your answer,

can you please write how to imliment this.

Thanks,

Naama

saravanan_narayanan
Active Contributor
0 Kudos

Hello Sadiq,

1. Create an attribute by name 'Tooltip' in the context node that is passed to the ALV component

2. Populate the data for this attribute based on your requirement

3. write the following code in the INIT method of the view controller./component controller


  data lo_cmp_usage type ref to if_wd_component_usage.
  data lo_interfacecontroller type ref to iwci_salv_wd_table .
  data lr_value type ref to cl_salv_wd_config_table.

"Initialise the used Component .. in the code sample used component name is ALV. replace this accordingly
  lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
  if lo_cmp_usage->has_active_component( ) is initial.
    lo_cmp_usage->create_component( ).
  endif.

" get the ALV model from the Used Component's interface controller
  lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
  lr_value = lo_interfacecontroller->get_model( ).

  data: lr_column_settings type ref to if_salv_wd_column_settings,
        lr_column type ref to cl_salv_wd_column,
        lr_column_cell_editor type ref to cl_salv_wd_uie,
        lr_input_field type ref to cl_salv_wd_uie_input_field.

"Delete the column that is corresponding to the TOOLTIP attribute
  lr_column_settings ?= lr_value.
  lr_column_settings->delete_column( 'TOOLTIP' ).

"Retrieve the column for which you want the tooltip
  lr_column = lr_column_settings->get_column( <Context attribute name for which you want the tooltip> ).
  lr_column_cell_editor = lr_column->get_cell_editor( ).
  lr_column_cell_editor->set_tooltip_fieldname( 'TOOLTIP' ).

BR, Saravanan

Former Member
0 Kudos

how can we assign another attribute like tooltip to alv

example i have a node "VBAK" already it is mapped to node data of alv .

apart from DATA node we have

FUCIONALELEMENTS,

TOPOFLIST,

FILETER VALUES ,

ENDOF LIST.

when i assigning tool tip to local variable i 'm getting the same on every cell of that column.

Answers (0)