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

Transaction code which using method of a class as start object

Former Member
0 Likes
1,521

Hi all,

I'm creating a new tcode 'Z123' which is tied to a method of a class in SE93. However, when I run this tcode and into debug mode, SY-TCODE will always return OS_APPLICATION. How can I get the actual tcode, which is 'Z123' into my program?

Thanks in advance

1 REPLY 1
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
692

You can try using the method GET_CURRENT_TRANSACTION of class CL_DYNPRO. Check this SAP documentation for details:

... the method GET_CURRENT_TRANSACTION of the class CL_DYNPRO can be used to obtain the transaction code of the current transaction. This method returns the transaction code during a parameter transaction or variant transaction instead of the transaction code of the implicitly called dialog transaction.

But if i try checking sy-tcode in a tcode bound to a method of a class i get the correct tcode & not OS_APPLICATION.

Br,

Suhas