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 Variant Tcode capturing in User_Exit

former_member143179
Participant
0 Likes
656

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
Read only

Sandra_Rossi
Active Contributor
0 Likes
575

Instead, use method CL_ABAP_SYST=>get_transaction_code( )

2 REPLIES 2
Read only

Former Member
0 Likes
575

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.

Read only

Sandra_Rossi
Active Contributor
0 Likes
576

Instead, use method CL_ABAP_SYST=>get_transaction_code( )