2023 Feb 20 8:20 AM
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.
2023 Feb 20 8:26 AM
2023 Feb 20 8:55 AM
2023 Feb 20 9:45 AM
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.
2023 Feb 20 11:02 AM
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 😉
2023 Feb 20 11:02 AM
Subroutines have been obsolete for 14 years (since ABAP 7.02).
Use methods instead.
2023 Feb 20 1:12 PM
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.
2023 Feb 21 7:49 AM
matthew.billingham Even if I use CL_SALV_TABLE ; Wouldnt I need a METHOD to handle the hotspot. I am missing something here?