Application Development 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: 

AT SELECTION-SCREEN validation prob

Former Member
0 Kudos

Could you please give idea of how can I go back to selection screen if wrong mail id entered ( if possible cursor should go to the email id field where wrongly entered ?) ?

AT SELECTION-SCREEN .

*Emailid validation.

IF NOT s_mail1[] IS INITIAL.

LOOP AT s_mail1.

*-----If email id entered on the selection screen doesnot contain

*'@' and '.', then give relevent message to user as popup.

IF s_mail1-low NA '@' OR s_mail1-low NA '.'.

MESSAGE i038(zs) WITH 'Please enter a valid email id'.

gc_flag_mail = 'X' .

EXIT.

ENDIF.

ENDLOOP.

IF gc_flag_mail = 'X'.

CLEAR : gc_flag_mail .

EXIT.

ENDIF. " IF gc_flag_mail = gc_x. "

Thanks in advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos

sorry,

My concern is incase of incorrect mail id entered,

how to come back to initial screen instead of continuing the program execution.

6 REPLIES 6

Former Member
0 Kudos

Hi

Refer the below threads

Regards,

Chithra

Former Member
0 Kudos

sorry,

My concern is incase of incorrect mail id entered,

how to come back to initial screen instead of continuing the program execution.

0 Kudos

Use LEAVE LIST-PROCESSING

0 Kudos

Produce an error instead of information message.

Rob

Former Member
0 Kudos

Sorry .

Not working.

former_member598013
Active Contributor
0 Kudos

Hi Sam,

Change the logic like this...


LOOP AT s_mail1.
*-----If email id entered on the selection screen doesnot contain
*'@' and '.', then give relevent message to user as popup.
IF s_mail1-low NA '@' OR s_mail1-low NA '.'.
MESSAGE i038(zs) WITH 'Please enter a valid email id'.
gc_flag_mail = 'X' . 
LEAVE LIST-PROCESSING.           "------>Add this line in your code.
EXIT.
ENDIF.
ENDLOOP.

Thanks,

Chidanand