‎2009 Apr 29 6:08 AM
Hi,
In the GUI status function keys, There are 2 buttons, one for BACK and other for EXIT.I have mandatory fields on the screen , when I press back or exit button without filling the mandatory fields , it says fill in all required entry fields but I want on pressing the exit button it should come out of the program without asking for filling the mandatory fields.Please suggest how can I do it.
‎2009 Apr 29 6:16 AM
Hi,
Double clcik on the Function code in the menu painet and Give 'E' to the Funtion Key.
Check the Demo program RSDEMO_TABLE_CONTROL.
See SET PF-STATUS 'GRUND'. for the function code 'EXIT' in Function Keys
You need to write the code in module exit at exit-command.
‎2009 Apr 29 6:16 AM
Hi,
Double clcik on the Function code in the menu painet and Give 'E' to the Funtion Key.
Check the Demo program RSDEMO_TABLE_CONTROL.
See SET PF-STATUS 'GRUND'. for the function code 'EXIT' in Function Keys
You need to write the code in module exit at exit-command.
‎2009 Apr 29 6:19 AM
Hi,
You need to use AT EXIT-COMMAND in PAI.
Also, to use it assign function type u2018Eu2019 to the relevant function in the Menu Painter or Screen Painter.In your case to EXIT / BACK button.
Thanks,
Abhishek
‎2009 Apr 29 6:26 AM
Hi,
Select the function type as exit command i.e. "E" for both exit and back buttons. Now in flow logic of the screen after the PAI module write,
MODULE back AT EXIT-COMMAND.
In F01 write the following
MODULE back INPUT.
case sy-ucomm.
when 'F_BACK'.
call screen 1000.
when 'F_EXIT'.
leave program.
endcase.
Or else you can remove the mandatory option for the fields and check them with the code.
Thanks,
Sri...
‎2009 Apr 29 6:29 AM
1) Create the Back/Exit Button with Function type As 'E'(At EXIT-COMMAND) in the PF-Status.
2) Use the Button in PAI as.
MODULE TEST AT EXIT-COMMAND.
[Refer|http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm]
Regards,
Gurpreet