2007 Jul 11 11:33 AM
Hello ABAPers,
I use an ALV in a screen, and use a copy of the standard status (from the function group SALV) STANDARD_FULLSCREEN, which contains the menu and ALV toolbars.
If the user chooses Print (fcode = $RNT) and executes the printing, I must execute some code (e. g. change some ALV data).
1) Is it possible to catch the event of clicking the Print menu button?
2) How could I implement my own user_command to handle the function codes (right now it goes to the standard user_command provided by the standard status)
Thanks in advance,
Ivson
Hello ABAPers,
I use an ALV in a screen, and use a copy of the standard status (from the function group SALV) STANDARD_FULLSCREEN, which contains the menu and ALV toolbars.
If the user chooses Print (fcode = $RNT) and executes the printing, I must execute some code (e. g. change some ALV data).
1) Is it possible to catch the event of clicking the Print menu button?
2) How could I implement my own user_command to handle the function codes (right now it goes to the standard user_command provided by the standard status)
Thanks in advance,
Ivson
2007 Jul 12 5:06 AM
Hi Ivson,
Write a class which implements the method handle_user_command for the event user_command of class cl_gui_alv_grid.
In this method you have to handle the print.
Set handler for the alv.
Then the control goes to the method when the print button is selected on the alv toolbar.
check the program : BCALV_TEST_GRID_EVENTS
you can handle the event : user_command or before_user_command.
hope this helps you.
regards,
prasanth
reward all helpful points
2007 Jul 16 10:17 AM
Thank you for your response, but for this particular case I cannot use ALV objects.
For my first question, I already solved the problem by filling the parameter I_CALLBACK_USER_COMMAND with the name of a form where commands are handled.
For the second point, I changed the name of the Print fcode in the pf status (originally "&RNT"); otherwise it would send me to the standard user_command.
Best regards,
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |