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

initial screen

Former Member
0 Likes
478

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.

4 REPLIES 4
Read only

Former Member
0 Likes
446

Try this

if x_char <> 0.

message.

leave to screen 0.

endif

or else

if x_char <> 0.

message.

leave to screen 1000.

endif

Read only

Former Member
0 Likes
446

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

Read only

Former Member
0 Likes
446

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

Read only

Former Member
0 Likes
446

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^