‎2008 Nov 11 5:25 PM
I am coding a dialog program, where one of screens has mandatory fields.... However If i press BACK with out filling these field, the previous screen should be displayed,how can i do that....
‎2008 Nov 11 5:39 PM
Hi,
You need to use the AT-Exit Command here.
The Function Code Attached with your BACK Button in your GUI Status should be of type "E".
When a Type E function Code is fired, Control goes straight to the Module with AT-Exit Command in the PAI event.
For Eg:
Your BACK Button is of function type "E".
PROCESS AFTER INPUT.
MODULE BACK AT EXIT-COMMAND.
MODULE EXECUTE2.
MODULE BACK INPUT.
MESSAGE I888(BCTRAIN) WITH TEXT-002 OK_CODE INPUT1 INPUT2.
IF OK_CODE = 'BACK'.
CLEAR: OK_CODE, INPUT1, INPUT2.
LEAVE TO SCREEN 100.
ENDIF.
ENDMODULE.
Refer to:
http://help.sap.com/saphelp_NW04/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm
‎2008 Nov 11 5:39 PM
Hi,
You need to use the AT-Exit Command here.
The Function Code Attached with your BACK Button in your GUI Status should be of type "E".
When a Type E function Code is fired, Control goes straight to the Module with AT-Exit Command in the PAI event.
For Eg:
Your BACK Button is of function type "E".
PROCESS AFTER INPUT.
MODULE BACK AT EXIT-COMMAND.
MODULE EXECUTE2.
MODULE BACK INPUT.
MESSAGE I888(BCTRAIN) WITH TEXT-002 OK_CODE INPUT1 INPUT2.
IF OK_CODE = 'BACK'.
CLEAR: OK_CODE, INPUT1, INPUT2.
LEAVE TO SCREEN 100.
ENDIF.
ENDMODULE.
Refer to:
http://help.sap.com/saphelp_NW04/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm