Skip to Content
Technical Articles
Author's profile photo Taranam Dhindsa

Cleanup of unused Custom Code during S/4HANA Upgrade

As we know SAP has 5 year mainstream maintenance window for each S/4HANA release ; customers need to keep their S/4HANA systems upgraded on regular basis to comply with S/4HANA maintenance . After the end of mainstream maintenance, the release usually enters customer-specific maintenance. Nowadays S/4HANA Upgrades are catching up considering 1511 and 1610 are already out of maintenance and clients having long implementation journey are upgrading their S/4HANA landscape during the build itself to leverage S4HANA new innovations released with every new release

Now many customers doing S/4HANA Technical Upgrade always have query on cleanup of their unused code as some of the objects created initially during implementation are not used .But they have concerns that if at later point what if they need that code again. Few of Qs asked by clients are :

  • How to remove unused code to clean up my core
  • Where to keep backup of deleted code ; in case its required at later point
  • How to restore backup code

So if you plan to reduce custom code footprint by deleting unused code in your landscape along with your S4HANA Upgrade; this blog addresses these queries and we have leveraged S4HANA new tools and apps to achieve the same

Prerequisites :

  • S/4HANA 1909 or higher (since we are using gCTS)
  • GitHub License and set up
  • CCM(Custom Code Migration) and gCTS app enabled in your system

We are covering deletion of unused code using CCM and gCTS app in this blog ; so traditional way for code deletion(manually) and backup (TRs/abapgit) is not covered in this .

High level steps are listed below under 5 umbrellas as shown below :

1

  1. Scoping: First step is to define the scope of objects that you want to retain and the ones you plan to delete during the S4HANA Upgrade. We can create Deletion Transport using CCM app.
  • Firstly, create Project in CCM app and once its Ready for Scoping; you can remove the packages from Scope using option ‘Remove Package from Scope’

1

  • Then on Projects main page; click on ‘Create Deletion TR’ and it will create the Deletion TR having packages that have Scope information as ‘Not in Scope’

2

  • You can validate the Deletion TR content in transaction SE01

3

     2.  Backup: Using gCTS Fiori app we can push the package to GitHub repository before deleting the unused objects from system. GitHub repository will act as backup for the custom code.

4

Once the gCTS is released; you will find the same under gCTS Fiori app under Commits Tab. You can also validate the same under your GitHub repository as well.

3. Remove: During Upgrade of your S/4HANA system; you can provide Deletion TR during SUM phase as shown below :

    Phase name: PREP_CONFIGURATION/SUMASK_SINGLE_TRANSPORT_REQUEST

5

4. Validate: Once the S/4HANA system is upgraded; you can validate if the objects defined in Deletion TR have been removed /not.

5. Restore: Later at any point if you need to restore the deleted objects , you can restore the same from GitHub repository .It’s very well covered in Blog here

In this Blog; I have covered usage of Fiori apps CCM and gCTS for unused custom code deletion, backup and restore .

Please do share your experiences .

 

Thanks and Regards
Taranam

 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.