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

how can i give two tcode in same program

Former Member
0 Likes
1,871

Hi all,

How can I give two tcode to the same program in which two conditions call in that two t codes

how can I do so please help me for that.

Ketan

ABAP consultant

4 REPLIES 4
Read only

Former Member
0 Likes
1,110

hi,

In your case, if the calling of the two transactions is mutually exclusive,

then

IF
call transaction 'A'.
else.
Call transaction 'B'.
endif.

else,

if you need to call the transactions one after the other,

.
.
.
.
.
CALL TRANSACTION 'A'.
.
.
.
.
CALL TRANSACTION 'B'.

Thanks

Sharath

Read only

Former Member
0 Likes
1,110

Hi,

You can create two t codes a prgram through SE93 .

Now in your program

report ztest.

if sy-tocde eq 'ZXYZ1'.

include ztest1.

elseif sy-tcode eq 'ZXYZ2'.

include ztest2.

endif.

Now in these includes create your seelction screens and do whatever u want.

or you can use the same selection screen.

Regards,

Venkatesh

Read only

Former Member
0 Likes
1,110

HI....

YOU CAN GO WITH THE TESTED CODE LIKE.

DATA: P_NUM TYPE I.

IF P_NUM = 1.

CALL TRANSACTION 'SE11'.

ELSE.

CALL TRANSACTION 'SE37'.

ENDIF.

REGARDS

Read only

Former Member
0 Likes
1,110

IF CONDITION.

CALL TRANSACTION 'TCODE1'.

ELSE.

CALL TRANSACTION 'TCODE2'.

ENDIF.

Regards,

Joan