‎2009 Mar 27 6:49 PM
Good afternoon everyone,
I have a abap report program that uses screen painter to design the screens. I have one screen
that has a button. I want to simulate an event of clicking tha button. Is there a command I can
do that?
Thanks for any input and let me know any questions you have.
Stephen
‎2009 Mar 27 6:55 PM
Hi,
Try this..
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING new_code = 'Pass your function code'.Thanks
Naren
‎2009 Mar 27 6:52 PM
check the function code of the button and use that...
and say if sy-ucomm = <f. code>
search in forums, you will get may sample codes...
‎2009 Mar 27 6:55 PM
Hi,
Try this..
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING new_code = 'Pass your function code'.Thanks
Naren
‎2009 Mar 27 7:02 PM
Hi, Stephen.
Please Follow the code bellow.
Flow Logic
PROCESS AFTER INPUT.
MODULE USER_COMMAND.FctCode is SAVE
MODULE user_command INPUT.
DATA: ok_code LIKE sy-ucomm.
CASE ok_code.
WHEN 'SAVE'.
CLEAR: ok_code.
" Your Code on Click Here.
WHEN OTHERS.
ENDCASE.
ENDMODULE.Please Reply if any Issue,
Best Regards,
Faisal
‎2009 Mar 27 7:04 PM
Hi stephen ,
Just assign the function code to the button which u want it to trigger event. For exaple xyz.
In PAI event, Write the code
if sy-ucomm eq 'xyz'.
" Write the event u want to do , for example
call screen 5000.
endif...
I hope , It explains little...
Thanks