11-22-2016 2:13 PM
Hi,
I will explain what I am trying to do. We have created a bespoke program that uses the transaction YP42 to run it. However from this program there is a link to run CS02 so the user needs to have access to CS02 also. So currently the user has both CS02 and YP42 transactions contained within a role that has been granted to them. I have been asked if I can stop them running CS02 directly from the main menu and force them to access CS02 by going into YP42 first. Is there a way of doing this? Hopefully this makes sense 🙂
Regards
Jim
11-22-2016 3:52 PM
Remove their authorization for CS02 (S_TCODE and menu of role)
For old versions if you didn't check authorization in YP42 associated program the CALL TRANSACTION didn't check it, but some authorization(s) associated to CS02 may be required, look at CS02 thru SU24 and copy authorization (except S_TCODE) to YP42 and regenerate role (PFCG).
For recent versions also use the WITHOUT AUTHORITY-CHECK option of the CALL TRANSACTION statement.
Regards,
Raymond
11-22-2016 3:52 PM
Remove their authorization for CS02 (S_TCODE and menu of role)
For old versions if you didn't check authorization in YP42 associated program the CALL TRANSACTION didn't check it, but some authorization(s) associated to CS02 may be required, look at CS02 thru SU24 and copy authorization (except S_TCODE) to YP42 and regenerate role (PFCG).
For recent versions also use the WITHOUT AUTHORITY-CHECK option of the CALL TRANSACTION statement.
Regards,
Raymond
11-22-2016 5:22 PM
Hi Raymond,
Many thanks for the answer. Hopefully this will resolve the situation.
Regards
Jim
11-22-2016 4:07 PM
Technically, by default, the statement CALL TRANSACTION 'CS02' does not check the authorization S_TCODE for CS02. So, if you remove CS02 from user's authorizations, it should work. Be careful, sometimes the SAP transactions do LEAVE TO TRANSACTION sy-tcode to restart themselves (to go from detail screen to initial screen), and this statement checks the authorization contrary to CALL TRANSACTION, so you should check whether CS02 is concerned. There's also the case where there are 2 transactions for change/display mode, so do this check too.
Documentation:
11-22-2016 5:25 PM