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 know father transaction code?

Former Member
0 Likes
1,073

Hi!

By example: I'm in the transaction ZA and I call to transaction ZB.

How could I know in transaction ZB that I came from ZA?

Thanks in advance!

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
899

Check the system variable SY-CPROG. It contains the name of the calling program.

If both the trxns are custom, then you can EXPORT some flag in the calling tcode & in the called tcode IMPORT & check the flag.

Edited by: Suhas Saha on Jul 5, 2010 3:28 PM

6 REPLIES 6
Read only

Former Member
0 Likes
899

Hi marco,

the program name always remain same from which u start.

Read only

Former Member
0 Likes
899

The sy-cprog has the actual report, not the first Any idea? Thanks!

Read only

Former Member
0 Likes
899

HI

You can use the table TCDCOUPLES for finding relation between all the called tcodes and calling tcodes.

Are you looking to get the Tcodes at runtime?

Cheers

Ajay

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
900

Check the system variable SY-CPROG. It contains the name of the calling program.

If both the trxns are custom, then you can EXPORT some flag in the calling tcode & in the called tcode IMPORT & check the flag.

Edited by: Suhas Saha on Jul 5, 2010 3:28 PM

Read only

Former Member
0 Likes
899

Hi,

I assume that the father transaction may not more than 3 like Z1,Z2 and Z3.. If any of these transaction call ZB means there should be some difference in the transaction ZB..(May be in field wise.) For Eg.. If Z1 call the ZB, you are getting one filed as 1, and Z2 to ZB means that fields is 2 etc....

From that field you can write some switch or if statement to find the parent transaction.....

If the screen ZB is always same for all three transaction calls, then you have to pass some flag from parent to ZB for the identification.

Thanks and Regards,

Senthil Kumar Anantham.

Read only

Former Member
0 Likes
899

I will use an import/export Thanks to all!