4 Replies Latest reply: Dec 11, 2012 11:33 AM by vasu yadav RSS

Tooltip in alv cell

Naama Meroz
Currently Being Moderated

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

  • Re: Tooltip in alv cell
    Saravanan Narayanan
    Currently Being Moderated

    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

    • Re: Tooltip in alv cell
      Naama Meroz
      Currently Being Moderated

      HI Saravanan,

      thanks for your answer,

      can you please write how to imliment this.

      Thanks,

      Naama

      • Re: Tooltip in alv cell
        Saravanan Narayanan
        Currently Being Moderated

        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

        • Re: Tooltip in alv cell
          vasu yadav
          Currently Being Moderated

          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.

Actions