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

Error Message in Tcode

Former Member
0 Likes
761

hello experts ,

i have two tcode for two programs . when the user runs the first tcode , i have to display an message to ask user to use that other tcode instead of this one and take user to that other program...

thanks

5 REPLIES 5
Read only

Former Member
0 Likes
678

Hi,

Say ZT1 and ZT2 are the 2 tcodes and ZT1 should gve the message and take the user to the ZT2 program, then inside the ZT1 program write


message 'Please use transaction ZT2'' type 'I'.
call transaction ZT2.

.

Regards,

Sachin

Read only

0 Likes
678

hello sachin ,

the program for first transaction is a report program , So can u suggest where should i place the information message ? . if i place it before the selection screen its triggering the message after the execute button is pressed.

Read only

0 Likes
678

Hi Vivek,

If your requirement is to call ZT2 if the transaction code ZT1 is called, why do you need a selection screen , is the transaction ZT1 being triggered independently also, if so then this condtion of ZT2 being called from ZT1 is trigered when ?

You can not proceed without processing a selection screen if it does exist. if the program ZT1 is not called independently then there is no need of the selection screen.

Regards,

Sachin

Read only

Former Member
0 Likes
678

Hi,

Lets say the two tcodes are of custom tcodes, then in the first tcode, you have to code manually issuing the message and using the CALL TRANSACTION statement call the second transaction code.

There is no other possibility as I guess.

Regards,

Nangunoori.

Read only

former_member404244
Active Contributor
0 Likes
678

Hi,

In the first program try with at-selection screen output.

at selection-screen output.

if sy-tcode eq 'ZT1'.

message 'Please use transaction ZT2'' type 'I'.

call transaction 'ZT2'.

endif.

Regards,

Nagaraj