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

AT SELECTION-SCREEN validation prob

Former Member
0 Likes
812

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
Read only

Former Member
0 Likes
775

sorry,

My concern is incase of incorrect mail id entered,

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

Use LEAVE LIST-PROCESSING

6 REPLIES 6
Read only

Former Member
0 Likes
775

Hi

Refer the below threads

Regards,

Chithra

Read only

Former Member
0 Likes
776

sorry,

My concern is incase of incorrect mail id entered,

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

Read only

0 Likes
775

Use LEAVE LIST-PROCESSING

Read only

0 Likes
775

Produce an error instead of information message.

Rob

Read only

Former Member
0 Likes
775

Sorry .

Not working.

Read only

Former Member
0 Likes
775

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