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: 

How to add a hotspot click event for ALV which is inside a method

0 Kudos
668

I have a method 'CHANGE_AT_SAVE'.
I have an include in this method 'INCL_SAVE1'.
In this Include I am using call function 'REUSE_ALV_GRID_DISPLAY'.
Here I need a hotspot click event but due to encapsulation I am not able to add a form.
Is there a workaround this problem?
Thanks.

7 REPLIES 7

FredericGirod
Active Contributor
0 Kudos
532

How could you have an include in a method ?

0 Kudos
532

Its a BADI Interface.

raymond_giuseppi
Active Contributor
532

Use an ALV OO class and not an old REUSE FM. You can add your own private methods and attributes in your implementing class, you are not limited to the interface of the BAdI.

Just insure that the GUI interface is available to prevent dumping.

Sandra_Rossi
Active Contributor
532

frdric.girod It's technically possible. I guess the requester asked that all developments were to be done in ABAP Objects, but thinking that ABAP Objects is just having code in a class is a frequent thinking by OO unexperienced developers 😉

Sandra_Rossi
Active Contributor
532

Subroutines have been obsolete for 14 years (since ABAP 7.02).

Use methods instead.

matt
Active Contributor
0 Kudos
532

Workaround. Use CL_SALV_TABLE.

Includes should NEVER be used for encapsulation. Their only purpose is to organise code. Since the current ABAP editor came in ... about 25 years ago ... they've been largely unnecessary.

0 Kudos
532

matthew.billingham Even if I use CL_SALV_TABLE ; Wouldnt I need a METHOD to handle the hotspot. I am missing something here?