2006 Jun 19 7:21 PM
Hello All,
We have a program that uses the CL_GUI_ALV_GRID and the events user_command and context_menu_request. The program functions by selecting an option for the context menu on an ALV grid which will then take you to another screen with another ALV grid.
The issue is on the second screen where the user clicks the back button to return to the first ALV Grid. For some reason, the functionality of Method user_command is triggered twice preventing the user from returning to the initial screen. Once when the menu option is selected and again when the Back button on the second screen is selected. If the user clicks the Back button again it will return to the initial ALV grid. We need to have the program go to the initial ALV grid after the Back button is clicked the first time not the second.
Does anyone have any suggestions on how to correct this? Thanks in advance for your help.
John
Hello All,
We have a program that uses the CL_GUI_ALV_GRID and the events user_command and context_menu_request. The program functions by selecting an option for the context menu on an ALV grid which will then take you to another screen with another ALV grid.
The issue is on the second screen where the user clicks the back button to return to the first ALV Grid. For some reason, the functionality of Method user_command is triggered twice preventing the user from returning to the initial screen. Once when the menu option is selected and again when the Back button on the second screen is selected. If the user clicks the Back button again it will return to the initial ALV grid. We need to have the program go to the initial ALV grid after the Back button is clicked the first time not the second.
Does anyone have any suggestions on how to correct this? Thanks in advance for your help.
John
2006 Jun 19 7:36 PM
In all probability, both the grids are using the same user_command routine.
2006 Jun 19 7:40 PM
Hello Srinivas,
Thanks for the response. From what I can tell the user_command routine is only being called on the first ALV Grid screen. The second grid does not appear to use this method at all. Any other suggestions? Thanks.
John
2006 Jul 11 10:00 AM
Hi John,
maybe this will help you. I had a similar situation.
1.) When you initialize the grid-controls try to set a
unique identifier within the display-variant.
lf_variant TYPE disvariant.
lf_variant-report = ls_report (NOT SY_REPID!)
lf_variant-handle = 'HUGO'....
2.) After leaving the 2. screen clear all handles using
the method hndle->free, free, clear ...
In PAI you can easaly check <if hndle is initial>
or <if not ( hndle is initial )> ....
Hope this will help you
BR
Michael
2006 Jul 11 10:22 AM
Both ALV are using same Event.
1.Create seperate custom control and ALV Grid for both the ALV.
Assingn all the things like handler to the second also...
so that it will noty happen
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |