This blog will help you step by step creation of deletion patch and deployment procedure.
Some extents we need to delete unused list of objects from solution in SDK when that solution is already deployed to target tenant (Like Quality or Production).
Usually many of the objects in the solution will not allow you to delete directly, instead it expect to create a new deletion patch to delete them.
This document will describe in detail on how to delete unused objects from the solution.
Step 1: List out deleted objects
The first step in this activity is to list out the objects which are to be deleted from the solution. And make a note the reason behind of delete. So that it will comes under planned deletion hence there will be no mistakes will take place and smoothen your deletion.
Step 2: Prerequisites
Below are the prerequisites must follow –
- User must be having PDI (SDK) development role assigned (PDI_PARTNER_DEVELOPMENT)
- The PDI role must be checked deletion authorization work center. “PDI_DODO_AUTH – Deletion of Delivered Objects Authorization”
- For Business Objects (BO), cross check by using Where Used list whether it is being used anywhere. If it is used you are not allowed either delete or edit it. So make sure to re-assign such BOs before creating deletion patch and before assemble and download the solution.
- Assemble and download the current existing solution.
- Inform to the SDK team only, as it is nothing impact with the current delivery of the solution.
Note: You will not see “Delete Patch” icon in implementation manager or in any of the Menu list. It will be visible once you successfully completed assemble and download the current existing solution. Means Delete patch will appear only when the solution status is “Assembled”, as shown in below snap.
Step 3: Assemble & Download current solution (not mandatory).
- Usually Assemble and Download the current existing solution to prevent any object loses if something go wrong. It is not mandatory.
- Do Consistency check Right click on your solution in solution explorer -> Check -> select “Items and Run Time Objects”. It will list out the error if any. Else you can see the success message similarly like “check is successfully”.
- Then Assemble and Download the current existing solution.
Step 4: Create Deletion Patch and Delete Objects
After successfully assembled and downloaded the current existing solution. Do not create a new general patch. Instead you can create a deletion patch display like an pencil icon with delete bin image immediate beside to create patch, as shown below.1. Press on “Deletion Patch” as said above
2. Below popup will appear, just press OK.
Deletion patch will be created successfully with the new version i.e., adding one to the existing version like as normal way.
Now you can delete your unused objects. Right click on object and select “Delete”,
Press “OK” to confirm delete permanently (popup).
For Business Object (BO), you will see the below snap by looking into the Where Used List. If in case that object is used anywhere, you aren’t allowed to delete or edit.
My case, where used list is empty.
Confirm the deletion for ‘Delete Business Object’? popup.
Delete all unused objects.
Open BAC element and activate again.
Step 5: Assemble & Download Deletion Patch
Assemble and Download the deleted patch solution, as usually how we do for normal patch solution.
Step 6: Upload Patches in Target Tenant
- First upload normal solution to target tenant and activate it. We Assembled and downloaded current existing solution before creating a deletion patch, we need to upload it first. (Step 2 -> point 4).
- Upload and activate the deletion patch to target tenant, after successfully completed the above step.
- Create new normal patch in development tenant.
- Check your version history where you will find the deletion patch details.
Note: For any later deployments, you first deploy the deletion patch and then upload the later file. Otherwise SDK will not allow you to deploy your later version without deploying deleted patch.