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

going back after error message

Former Member
0 Likes
1,444

hi friends,

while developing a module pool program, i am facing a problem.

normally, after an error message, we cant go back to the previous screen but as per the requirement i want to go back to some screen.

how can i do that????

thanks in advance..

-ankit

7 REPLIES 7
Read only

former_member186741
Active Contributor
0 Likes
914

you can issue a success message (type S instead of E). This will show the message on the next screen displayed.

Of course, you will probably need to set a flag so that your program knows that an error has occurred.

Read only

0 Likes
914

hi neil,

thanks for the answer but i want to go back to a perticular screen

for example: i am on screen no. 400 & if i get an error in pai, i want to go back to screen 200.

how can we do that???

-ankit

Read only

0 Likes
914

after issuing the message:

leave to screen 200.

PLEASE NOTE:

leave to screen 200.

is a quicker way of coding,

set screen 200. leave screen.

Message was edited by: Neil Woodruff

Read only

0 Likes
914

Hi

In this case you can't use a message type E, because if you use it the user'll be stopped here.

So use a message type I and then go to screen you need:

PROCESS PAI

FIELD FIELD MODULE CHECK_FIELD.

MODULE CHECK_FIELD.

IF FIELD = .......

MESSAGE I208(00) WITH 'ERROR!'.

SET SCREEN 200. LEAVE SCREEN.

ENDIF.

ENDMODULE.

max

Read only

Former Member
0 Likes
914

U can also show a status message.

IF ERROR.
 MESSAGE s000 WITH text-000.
 CALL SCREEN 200.
ENDIF.

Kindly reward points and close the thread if ur problem got solved.

Read only

mandar_shete
Active Participant
0 Likes
914

Hi,

Try to clear the SY-UCOMM and OKCODE before giving the error message.

Read only

Former Member
0 Likes
914

Hi,

U can put .

MODULE exit_command1 AT EXIT-COMMAND. in PAI.

in dat u have to provide sy-ucomm as back.

And in menu selection u have to put Function code- functional type E.

Then it will work.

Try it.

Regards,

Jyoti..