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

CI and CD Set up in S/4HANA System, journey continues…

Last year while exploring CI and CD Set up for S/4HANA 2020 system; I had written blog on Step towards CI and CD Set up in S/4HANA System. One of the limitations mentioned then was unavailability of SAP predelivered pipeline for ATC checks for On Premise version. As we know SAP CI and CD framework is also evolving; now while working for client PoC on S/4HANA 2020 FPS01 system I was glad to find that SAP has now delivered pipeline for ATC as well. ATC is must to be included in SAP S/4HANA CI and CD framework so that Code reviews can be automated as well along with Unit Testing . Now SAP has addressed the need of hour and ATC is also included in predelivered pipelines for SAP S/4HANA On Premise version

gCTS in SAP S/4HANA 2021 is very well explained in blog gCTS in SAP S/4HANA 2021. In this blog we will cover what’s changed wrt. CI and CD framework and issues faced while trying out the same. Jenkins Warnings-Next-Generation plugin is required for better readability of errors occurred during execution of ATC pipeline

Let’s have a look at the same; pipeline gctsExecuteABAPQualityChecks has now replaced gctsExecuteABAPUnitTests as shown below.

1

 

gctsExecuteABAPQualityChecks executes ABAP Unit Test and ATC checks for a specified scope of objects that exist in local Git repository on ABAP system. In this step:

  • We can specify scope of objects for which we want to execute ATC checks
  • We can choose whether to perform ABAP Unit/ATC/or both
  • By default, both checks are executed
  • You can specify the ATC variant in pipeline; else by default it will take the variant defined in ATC transaction as default one

In Scope – you can specify the objects for which ATC should be executed

  • localChangedObjects – object delta derived from last activity in the local repository. The checks are executed for the individual objects. Sample output:

3

  • remoteChangedObjects-object delta between the commit that triggered the pipeline and the current commit in the remote repository. The checks are executed for the individual objects
  • localChangedPackages-object delta derived from last activity in the local repository. All objects are resolved into packages. The checks are executed for the packages.
  • remoteChangedPackages-object delta between the commit that triggered the pipeline and the current commit in the remote repository. All objects are resolved into packages. The checks are executed for the packages.
  • repository-all objects that are part of the local repository. The checks are executed for the individual objects. Packages (DEVC) are excluded. This is the default scope
  • packages -all packages that are part of the local repository. The checks are executed for the packages.
  • Jenkinsfile need to be updated with below script to execute gctsExecuteABAPQualityChecks. Initially when we tested the pipeline, we hardcoded the commit to the last commit in the repository. Commit id was taken from the repository and host given here is dummy one which need to be replaced with your server details
    gctsExecuteABAPQualityChecks (
    script: this,
    host: ‘https://abap.server.com:port’,
    client: ‘100’,
    abapCredentialsId: ‘ABAPUserPasswordCredentialsId’,
    repository: ‘taranamjit-dhindsa-demo’,
    atcVariant: ‘S4HANA_READINESS_2020’,
    scope: ‘localChangedObjects’,
    commit: ’98a8e0c22ea7ee8b956882dd47b9d99a5ddb0c9e’,
    verbose: ‘true’
    )

Now let’s have a look at roadblocks faced while trying out this new pipeline

  • Since we were working on S/4HANA 2020 FPS01; we were getting below error while executing gctsExecuteABAPQualityChecks pipeline with scopes as localChangedPackages¬†or¬†remoteChangedPackages

error: get local changed packages failed: resolve package failed: request to <http(s)://hostname: port/sap/bc/cts_abapvcs/objectType/objectName> with response 500 Internal Server Error

We raised the OSS message and SAP response was that the object meta information endpoint which resolves objects into packages is not available in release 755 And Down port version of OSS Note was released 3159798 – gCTS Piper integration: Down port Object Meta Information endpoint to SAP S/4HANA 2020 FPS01 – SPS04.After applying the note it worked fine

  • When we tried using commit:“${GIT_COMMIT}” in the Jenkins file to make it dynamic for taking last commit id from the repository rather than hardcoding commit id- we got the error

2

SAP documentation had mentioned to use commit: “${GIT_COMMIT}”, so we raised OSS Message for this issue as well. Then as per SAP feedback we used commit: “${env.GIT_COMMIT}”, and it worked . So probably in coming days documentation will be updated to reflect the same.

  • ATC pipeline will fail in case of Priority 1 and Priority 2 errors ; in TR release we can control TR blockage based on ATC settings for P1,P2 and P3 errors . But in case of pipeline ; we cannot control failing of pipeline based on ATC priorities. We can only switch off execution of ATC pipeline and execute only ABAP Unit by making changes in pipeline script

I will keep updating issues and my learnings wrt CI and CD set up in S/4HANA system.To learn more on gCTS; you can also enroll in On-going open SAP Session gCTS 2021

 

Regards
Taranam

Assigned Tags

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