‎2010 Apr 15 9:08 AM
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
‎2010 Apr 15 9:20 AM
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