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: 

ALV table with two dimensions and a link in each cell to a document

Former Member
0 Kudos

Hi,

I want to create an ALV output for a 2-dimension table. The table should look like:

--- | Col1 | Col2 | ...

_________________________

L1 | Cell11 | Cell12 | ...

_________________________

L2 | Cell21 | Cell22 | ...

Do you have any hints how I could implement such a two dimensional ALV with different links when clicking on Cell11, Cell12, Cell21, ....

Thanks for your help!

Caroline

1 ACCEPTED SOLUTION

former_member225448
Participant
0 Kudos

Hello Caroline,

first you should set the "HOTSPOT" in the fieldcatalog for all collumns in question. You also need to implement and register a DOUBLE_CLICKED event handler. This handler gets called for all "HOTSPOT" cells. You are free to do whatever you like for each click. And this might be something different for each cell.

If you find my answer useful, please don't forget the reward.

Regards,

Juergen

3 REPLIES 3

former_member225448
Participant
0 Kudos

Hello Caroline,

first you should set the "HOTSPOT" in the fieldcatalog for all collumns in question. You also need to implement and register a DOUBLE_CLICKED event handler. This handler gets called for all "HOTSPOT" cells. You are free to do whatever you like for each click. And this might be something different for each cell.

If you find my answer useful, please don't forget the reward.

Regards,

Juergen

Former Member
0 Kudos

Caroline,

Like Juergen mentioned you need to activate the hyper links for specific fields in the field catalog. Similarly for the Double click as well, if you want to activate both for the same column. However it does not make sense to activate both for the same column.

If you want to activate these for specific cells, not for entire column, then you need to add a table of type LVC_T_STYL to the data table and fill in the field details specific for the row you want.

Once that is done, the event returns you the column name and the row number on which the user has clicked.

Regards,

Ravi

Note : Reward the posts that help you.

hymavathi_oruganti
Active Contributor
0 Kudos

if u use OO ALV,

1.on clicking CELL1, CELL2 etc, to get different links,

u can put hotspot for the fields in fieldcat

and u can handle method

button_click event of cl_gui_alv_grid.

----


  • CLASS LCL_EVENT_RECEIVER DEFINITION

----


*

----


CLASS LCL_EVENT_RECEIVER DEFINITION.

PUBLIC SECTION.

METHODS HANDLE_CLICK_ROW_COL

FOR EVENT CLICK_ROW_COL OF CL_GUI_ALV_GRID

IMPORTING ROW_ID COL_ID.

ENDCLASS. "cl_event_receiver DEFINITION

----


  • CLASS CL_EVENT_RECEIVER IMPLEMENTATION

----


*

----


CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.

METHOD HANDLE_BUTTON_CLICK.

perform button_click using ROW_ID COL_ID.

ENDMETHOD . "handle_top_of_page

ENDCLASS . "cl_event_receiver

2.

FOR GETTING TWO DIMENSIONS, HANDLE PRINT_TOP_OF_PAGE

and using write statements, build a row at the top of grid.

or else

IN THE LAYOUT , U CAN PLACE BUTTONS JUST ABOVE THE CUSTOM CONTAINER