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 Usage issue

Former Member
0 Likes
767

Hi,

   A Transaction variant was created for LP10 Transaction to hide one field and given as ZLP10 for executing it. Authorisation for LP10 is removed for users as per business requirement and they should execute only ZLP10. It is working fine and creating TR and TO sucessfully. but issue is as per standard code it is executing below code.

   LEAVE TO TRANSACTION SY-TCODE

So here sy-tcode is considered as LP10 only even though executing ZPL10. As the authorisation for LP10 is removed it is giving error as "" you are not authorised"

How to over come this issue.

please suggest

Regards,

Lokesh

2 REPLIES 2
Read only

Former Member
0 Likes
644

Hi lokesh,

           Instead of creating new tcode create screen variant for the transaction in shd0 and then trasaction variant and activate in standard variant tab as shown in fig. This applies to all users and there will be no need to change the tcode also. You can also  restriction based on users  by  creating usergroup and assign to the users using tcode 'shd0'.

Read only

Sandra_Rossi
Active Contributor
0 Likes
644

For information (I don't give a solution as it's standard code and you shouldn't change it) : SAP usually recommends using LEAVE TO CURRENT TRANSACTION for this kind of situation, it will go to the actually started transaction (ZLP10, not LP10) ; More info in ABAP documentation and in Note 617930 - New statement LEAVE TO CURRENT TRANSACTION (and an old one: Note 1321 - Original transaction code in ABAP programs)