Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

mandatory fields

SG141
Active Participant
0 Likes
311

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....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
293

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

1 REPLY 1
Read only

Former Member
0 Likes
294

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