Application Development 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: 

Transaction Variant Tcode capturing in User_Exit

former_member143179
Participant
0 Kudos

Dear Sir,

We created a Transaction Variant ZMB1c  for the standard SAP tcode MB1c .  The Tcode assigned to this Transaction variant is ZMB1c .

In the user_exit , sy-tcode is showing the tcode as MB1c instead of ZMB1c .  However , our requirement is to verify in User_Exit  that whether the transaction used is ZMB1c .  Kindly guide us , as how can we capture the actual tcode (in this case ZMB1c) in a user_exit .

With Regards

B Mittal

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

Instead, use method CL_ABAP_SYST=>get_transaction_code( )

2 REPLIES 2

former_member194965
Active Participant
0 Kudos

Hi Mittal,

Create data type in exit SHDTV-TCODE.

Data : LV_TCODE type SHDTV-TCODE.

IF LV_TCODE = 'ZMB1c'.

ENDIF.

now check this LV_TCODE it will read the Transaction variant ZXXX T-Code.

Regards,

E.Ananthachari.

Sandra_Rossi
Active Contributor
0 Kudos

Instead, use method CL_ABAP_SYST=>get_transaction_code( )