‎2010 Oct 10 7:58 PM
Hi All,
In report i am using alv grid control with push buttons on the toolbar using oops concept .when i execute the report and click on button for first time ievent is triggered but when i click second time or another button on tool bar control is coming out of program .can u please tell me how to resolve it.
thanks in advance.
‎2010 Oct 10 8:05 PM
Hello Aruna
I assume you are doing the entire event handling within you event handler method (e.g. HANDLE_USER_COMMAND).
However, I recommend to use a different approach. Within your event handler method trigger PAI using the following coding:
METHOD handle_user_command.
CASE e_ucomm.
WHEN 'EXECUTE_FUNCTION'.
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
ok_code = 'EXECUTE_F1'.
..
" Result: This method call triggers PAI of the screen with a defined ok-code
ENDMETHOD.
MODULE user_command_0100. " PAI
CASE gd_okcode.
WHEN 'EXECUTE_F1'.
perform CALL_FUNCTION_F1.
...
ENDMODULE.
The advantage of this approach is that after executing the function you are always at a defined in the flow logic, i.e. after PBO when the screen is displayed.
Note the normal event handling does NOT trigger PAI which may be required depending on your program logic.
Regards
Uwe
‎2010 Oct 12 9:39 AM