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: 

hot spot for particular column of ALV grid using class

Former Member
0 Kudos

Hi...

I want to enable hot spot for particular column of ALV grid which is created using class(CL_GUI_ALV_GRID)

As i structure instead am not creating field catalog so how i can create hot spot ...

Thanks & Regards ..

...Ashish

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Create an entry for this fields only at fieltcatalog table and pass the hotspot parameter.

9 REPLIES 9

Former Member
0 Kudos

Create an entry for this fields only at fieltcatalog table and pass the hotspot parameter.

Former Member
0 Kudos

Hi,

Check this thread,

The pointers could be useful

[;

Former Member
0 Kudos

Hi,

you can send the column name and the hotspot option available in the field catalog.

f_cat-FIELDNAME = 'XXX'.
f_cat-hotspot = 'X'.
append f_cat to t_fcat.

use the event HOTSPOT_CLICK.

As you wanted it for a particular column check the field when clicks the field with an if condition and then trigger the event.


 set handler lcl_event_handler=>hotspot for grid.

[check this wiki|https://wiki.sdn.sap.com/wiki/x/mIDvB]

Thanks&Regards

Sarves

0 Kudos

Hi,


*   Handle hotspot_click event for grid
    METHODS : handle_hotspot_click FOR EVENT hotspot_click OF
               cl_gui_alv_grid
               IMPORTING
                  e_row_id e_column_id es_row_no.

* In the field catalog specigy this...

 ls_fldcat-fieldname = 'KUNNR'.
  ls_fldcat-col_pos = '4'.
  ls_fldcat-coltext = text-t05.
  ls_fldcat-hotspot = 'X'.
  ls_fldcat-intlen = 10.

You can then handle your hot spot as you want..

Former Member
0 Kudos

Hi,

Try this

field-symbols: <ls_fcat> type lvc_s_fcat.

    read table it_fcat assigning <ls_fcat>
               with key fieldname = 'FIELD1'. 

    if sy-subrc eq 0.
      <ls_fcat>-style = cl_gui_alv_grid=>mc_style_hotspot.
    endif.

Regards

I355602
Advisor
Advisor
0 Kudos

Hi,

Refer the link:

Hope this helps you.

Thanks & Regards,

Tarun

Former Member
0 Kudos

In case I m not creating field catalog as i am assigning name of standard structure to attribute I_STRUCTURE_NAME ... how to create hot spot?

Former Member
0 Kudos

Hi,

Create a field catalog internal table using the function module

LVC_FIELDCATALOG_MERGE

and modify the internal table content to have hotspot and use that internal table in ALV funtion.

Thanks and regards,

Venkat.

Former Member
0 Kudos

Thanks