In this doc we will discuss various methods to restrict the user to release the Transport request in SAP.
THis scanerio is used when you are having third party support and you want to check all TRs at your end and dont want to give them authorization to release the TRs.
We don’t have any enhancement points in program so we will go with BADI.
First Method: Authorization Check Method
This is a little bit complex method but you will learn authorization object creation & using it in SAPUser Roles.
Go to SU21:
Fill the Object name, class, authorization field:
Click on permitted activities & fill Release Code activity i.e. 43:
Now save it all.
Now Punch Tcode SE19 &
Create Implementation of CTS_REQUEST_CHECK Badi as in following Screenshot:
Select 2nd option which is area to check coding before releasing a request:
Use your coding in this method to restrict as per requirement.
What we have used here is an authorization check, so following is the code:
Save it. Don’t forget to activate it as well as BADI in previous screen.
Now give the user the Authorization object we created, with the help of BASIS Consultant:
Users having upper listed object (Z_TR_REL) can only release the TR.
Otherwise will have following error while releasing the TR.
2nd Method: Table Entries check method
This one is easier as we don’t have to go to every user role. We just have to enter the User name in table & that will be checked while releasing the TR.
Create a Z table with following fields & maintenance view:
Save & Activate the Table.
Now open SE19 & do the same procedure as mentioned (to add coding in 2nd option):
Code will be different for this one as it will check the table & the username entered there will not able to release the TR.
NOTE: If you want opposite of this, do following coding in the block:
Now save it. Activate it.
Make entries in table we created earlier:
Now create TR from the SAP ID & Check.
Voila !! JOB DONE!!..
Thanks all for reading this as it is my first time blog & hope you all get benefits from this.