‎2006 Nov 16 10:24 AM
Hi Friends,
I wanted to know how to go to my initial tcode.
Suppose i have one condition & that condition is true. I wanted to display an error message & leave to first screen of tcode.
sample code is
if x_char <> 0.
message.
leave to transaction 'zxyz'.
endif.
but this is not working. Could u tell me other way plz.
‎2006 Nov 16 10:25 AM
Try this
if x_char <> 0.
message.
leave to screen 0.
endif
or else
if x_char <> 0.
message.
leave to screen 1000.
endif
‎2006 Nov 16 10:29 AM
Hi Salil,
If you explain the call sequence we could give a better reply.
If you want to go back to the calling screen, you can say
SET SCREEN 0.
LEAVE SCREEN.
else if you want to go to the Screen which was displayed initially, you can use,
CALL SCREEN 'xxxx'.
Regards
Meera
‎2006 Nov 16 10:35 AM
Saill,
After error message contol doesn't go to next statement.
so make it Information or some other message than go to the transaction.
-Anu
‎2006 Nov 16 10:55 AM
hi
good
Executable Program Transaction
Call without return SUBMIT LEAVE TO TRANSACTION
Call with return SUBMIT AND RETURN CALL TRANSACTION
EXAMPLE->
if not sy-subrc is initial.
concatenate text-040 l_rfc_destination msg_text
into msg_text separated by space.
message s001(vl) with msg_text.
leave to transaction 'ZTESTWEIGH'.
endif.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9df735c111d1829f0000e829fbfe/content.htm
thanks
mrutyun^