‎2006 Feb 02 9:57 PM
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
‎2006 Feb 02 10:08 PM
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.
‎2006 Feb 02 10:20 PM
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
‎2006 Feb 02 10:25 PM
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
‎2006 Feb 02 10:28 PM
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
‎2006 Feb 03 4:09 AM
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.
‎2006 Feb 03 4:28 AM
Hi,
Try to clear the SY-UCOMM and OKCODE before giving the error message.
‎2007 May 01 11:10 PM
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..