‎2012 Feb 10 7:05 AM
I have designed a screen and calling that using call screen XXXX starting at 15 5. Sreen does load up. Upon clicking close button(X mark) on the top right side, window is not getting closed.
I have two more buttons OK and CANCEL in screen, which I designed, on clicking them screen does behave properly,
I searched in SDN but couldnt get much help.
Any idea what am missing ??
Thanks & Regards
Himayat.
‎2012 Feb 10 7:42 AM
Hi,
You have to maintain the exit/cancel or back toolbar button in Standard Function key for your screen PF status. Then this will work. If you want your manually created button will work then you have to maintain those buttons in application tool bar in PF status.
So in your screen XXX, create the module_status_XXX and create an PF status.
And in User command, you have to write code to exit for the buttons u have maintianed for standard function key.
‎2012 Feb 10 7:38 AM
Hi,
type your code a bit where you are getting problem. i.e. your user command code.
thanks.
Aswath
‎2012 Feb 10 7:42 AM
Hi,
You have to maintain the exit/cancel or back toolbar button in Standard Function key for your screen PF status. Then this will work. If you want your manually created button will work then you have to maintain those buttons in application tool bar in PF status.
So in your screen XXX, create the module_status_XXX and create an PF status.
And in User command, you have to write code to exit for the buttons u have maintianed for standard function key.
‎2012 Feb 10 10:40 AM
Hi Kaushik,
This is a normal screen which am displaying as
call screen starting 15 5. In this screen I have some fields and below them ok and cancel buttons for which PAI is triggered properly and necessary coding done. The screen window's close button which exists on the top extreme right (X mark button) when clicked PAI is not getting triggered.
I dont have PF status for this screen as there is no necessity of it.
Thanks & Regards
Himayat
‎2012 Feb 10 10:48 AM
Hi,
Please check the ok-code in debugging mode and see if your code is getting triggered. Please make sure you written your code in PAI event with module MODULE cancel_0212 AT EXIT-COMMAND. for an exmaple
PROCESS AFTER INPUT.
MODULE cancel_0212 AT EXIT-COMMAND.
in module MODULE cancel_0212 you write your code.
Regards,
Mohit
‎2012 Feb 10 10:57 AM
Hi All,
Thanks for your reply. I could resolve this issue. I created PF status for which window and included cancel option for one of the buttons. After this I could raise PAI in which I could handle the same.
Thanks & regards
Himayat
‎2012 Feb 10 11:16 AM
Himayat,
Can you close this thread if you issue is resolved.
Thanks.
‎2012 Feb 10 7:45 AM
You should put your logic in User command of that screen.
For example.
module user_command_0300 input.
case ok_code.
when 'OK'.
* give your logic
when 'CANC'.
leave to screen 0.
endcase.
clear: ok_code.
endmodule.
‎2012 Feb 10 10:36 AM
Hi Gautham,
I already have this code in place,
CLEAR v_ok_code.
v_ok_code = sy-ucomm.
CASE v_ok_code.
WHEN 'CNCL'.
REFRESH it_input.
LEAVE TO SCREEN 0.
WHEN 'TSAVE'.
PERFORM update_table.
WHEN OTHERS.
ENDCASE..
The thing is that generally for closing(X mark button on top), we dont do any explicit coding. I see some strange behaviour.
‎2012 Feb 10 7:54 AM
hi,
ensure that you code in PAI event have the following code
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'ACTION'.
CODE TO TAKE ACTION STEPS
ENDCASE.
‎2012 Feb 10 12:48 PM