2016 Mar 29 6:22 AM
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
2016 Mar 29 12:51 PM
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'.
2016 Mar 29 10:21 PM
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)