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

Go back to screen after error message

Former Member
0 Likes
18,845

Hi,

How will the screen go back to selection screen after display an ERROR message?

Regards,

Darpana

Hi,

How will the screen go back to selection screen after display an ERROR message?

Regards,

Darpana

12 REPLIES 12
Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
7,083

hi ,

Use the following statement.

Leave to screen 1000.
message.....

Thanks & Regards

Read only

Former Member
7,083

Hello,

If it is a report program and you are giving a error E statement then it will take you to a blank screen. If you want to return back to selection screen then give a Information type I message and use LEAVE TO LIST-PROCESSING to return to selection screen.

Thanks,

Jayant

Read only

0 Likes
7,083

Thanks it Works.

Read only

Former Member
0 Likes
7,083

Hi Darpana,

When you want to give your error message, do it as follows.

MESSAGE (msgnumber) TYPE S.

LEAVE TO LIST-PROCESSING.

The message type needs to be status message.

This would give a message, plus this would take you back to the selection screen.

Regards,

Nitin.

Read only

Former Member
0 Likes
7,083

set ur back button as at exit-command

Read only

Former Member
0 Likes
7,083

Hi,

Use the statement LEAVE LIST-PROCESSING. after the error message.

For example:

-


-


If sy-subrc NE 0.

MESSAGE "Errro Message" .

LEAVE LIST-PROCESSING.

Endif.

Regards,

Ravi...

Read only

Former Member
0 Likes
7,083

Is that a standard tcode or just your zprogram?

Read only

0 Likes
7,083

It is a Zprogram. It is a simple report

Read only

0 Likes
7,083

Then there is a lot of help for you in the responce given to your question in this thread.

Hope it helps.

Thanks,

Jayant

Read only

0 Likes
7,083

Then try;

LEAVE TO SCREEN <your selection-screen number>

Regards

Karthik D

Read only

Former Member
0 Likes
7,083

That is the probelm after displaying an error message we cannot continue and go back to selection screen. It stays at the current screen. And it has to be an ERROR message.

Read only

Former Member
7,083

Hi,

Thanx for all the help.

I found the answer myself.

What i have done is that

MESSAGE text-007 TYPE 'I' DISPLAY LIKE 'E'.

CALL SELECTION-SCREEN scr_no.

LEAVE PROGRAM.

where scr_no is 1000.

In your responses:

Using leave to screen 1000 gives an error saying that the selection-screen is called without using Call Selection-Screen command.

Regards,

Darpana.