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

Back to selection screen after an error message

Former Member
14,928

Hi all.

I have developed a report. I have to do a check in program ( in start-of-selection, no in at selection-screen), and if this check is wrong, I want to show an error message and back to selection screen. How can I get it?

Thanks a lot.

Hi all.

I have developed a report. I have to do a check in program ( in start-of-selection, no in at selection-screen), and if this check is wrong, I want to show an error message and back to selection screen. How can I get it?

Thanks a lot.

4 REPLIES 4
Read only

Former Member
0 Likes
2,329

you can use a message Type I , which shows a dialogbox and then return.

like.

if ....

Message 'Error' type 'I'.

return.

endif.

Read only

former_member438956
Active Participant
0 Likes
2,329

Hi,

you can either use an error message or can use display like option and exit the selection screen routine.

message s000 with 'Error at selection screen' display like 'E'.

Exit.

Regards,

Anil N.

Read only

Former Member
2,329

Please use the syntaxes DISPLAY LIKE and LEAVE LIST-PROCESSING to go back to selection screen after error in START-OF-SELECTION event. Something like


start-of-selection.

message s000 display like 'E'.
leave list-processing.

Regards

Ranganath

Read only

Former Member
0 Likes
2,329

I prefer to use :

MESSAGE 'PLEASE INSERT THE RIGHT NUMBER' TYPE 'E' DISPLAY LIKE 'I'.

d_error = 0.

and then give every code

check d_error ne 0. (so it will pass all of the code and back to selection screen.

well it depends on the situation actually.

you also could try by putting :

MESSAGE 'PLEASE INSERT THE RIGHT NUMBER' TYPE 'E' DISPLAY LIKE 'I'.

exit.

or

MESSAGE 'PLEASE INSERT THE RIGHT NUMBER' TYPE 'E' DISPLAY LIKE 'I'.

leave to screen 0.

hope it works.