Technical Articles
ABAP Test Cockpit in the Cloud – What is already possible
Last edit: September 11, 2023
If you use (or intend to use) the SAP BTP ABAP Environment – formerly known as SAP Cloud Platform ABAP Environment – to develop ABAP applications in the cloud and want to establish quality assurance for your cloud-based ABAP developments then you are surely interested in the execution of ABAP test cockpit checks over our ABAP custom code in the cloud.
PLEASE NOTE: after custom code analysis you can stop your SAP BTP, ABAP environment system to save the costs, if the system is temporarily not used. Learn how to do it in this blog SAP BTP ABAP Environment – Manage system hibernation. |
How to execute custom code analysis in the Cloud
Custom Code Migration app, which is the SAP recommended tool for analysis of your custom code for SAP S/4HANA and cloud, supports also classic custom code analysis projects.
If you press Create button in the Custom Code Migration App you can now select a custom code analysis project:
Under the Advanced Configuration you can restrict custom code analysis and choose which packages you want to analyze:
After you saved your custom code analysis project, ABAP Test Cockpit will execute custom code analysis and you can examine your ATC results under the Analysis tab by clicking the Analyze Findings button or by clicking directly on the reported “Number of Findings” in the project:
How to execute CVA checks in the Cloud
You can also execute SAP Code Vulnerability Analyzer (CVA) checks for your custom code using the custom code analysis project of the SAP Fiori Custom Code Migration app. Using SAP CVA in the SAP BTP ABAP Environment is included at no additional licensing fee.
It works as following. Use Create button in the Custom Code Migration App and select a custom code analysis project:
Then enter the project data and select the ATC check variant SLIN_SEC. You can check your custom code in the same system as well as the code in remote on-premise system (in this case you need to enter the connection to your remote system):
After you saved your project data, the custom code analysis will be executed and afterwards you can see the results as usual by clicking e.g. on the Number of Findings:
In the Findings list you will get the results of all CVA checks executed for your custom code:
How to configure an ATC check variant in the Cloud
The SAP BTP ABAP Environment offers you by default some predefined ATC check variants. For example, the check variant ABAP_CLOUD_DEVELOPMENT_DEFAULT contains the preconfigured ATC checks, which will be used if you just run ATC in ABAP Development Tools in Eclipse over your custom code in your cloud-based ABAP system.
But surely you may want to configure the ATC check variant according to your needs e.g. adjust the check priorities or exclude some checks.
You can configure your ATC check variant for cloud using the SAP Fiori app ABAP Test Cockpit Configurator. Let’s examine in detail how it works.
The new SAP Fiori App ABAP Test Cockpit Configurator allows you to maintain ATC configurations for the Cloud based on ATC check variants. For more information how to provide access to users and how to implement this App, see the SAP Help Documentation ABAP Test Cockpit Configurator.
View and maintain ATC configurations
Open the ABAP Test Cockpit Configurator App by clicking on it. All available ATC configurations in your ABAP system in the SAP BTP ABAP Environment are listed, and the active configuration is checked. You can any time click on the respective “>“ button and adjust an ATC configuration.
As you see from this example already 3 ATC configurations were created in the App and one of them is checked as Active:
Create a new ATC configuration based on an ATC check variant
Let’s create a new ATC configuration based on the default ATC check variant for cloud ABAP_CLOUD_DEVELOPMENT_DEFAULT. To do so click the Create button, enter the Name and select the ATC check variant ABAP_CLOUD_DEVELOPMENT_DEFAULT:
Press Create button:
Change ATC check priorities
Now you can (if needed) change the ATC check priorities for this configuration. Use the Search field to search for the check class or message code you want to edit.
Press Edit button and use the drop-down menu to change a priority of a message:
Don’t forget to save your changes:
Configure transport settings
You can also configure the behavior at transport release using the new provided Transport Settings e.g. in order to prevent release of transport requests at ATC errors of certain priorities:
Consequently, while trying to release a transport request containing the source code with ATC findings in the ADT in Eclipse, developer will get the corresponding error message, e.g.:
Set your ATC configuration as active
If you now want to use your adjusted ATC configuration as active just select it in the ATC configurations list and click the Set as Active button:
How to display an ATC check variant in ABAP development tools for Eclipse
For the ATC execution in the cloud we currently offer some standard ATC check variants. You can choose an ATC check variant from the existing check variants by clicking the Browse button (or using Content Assist: Ctrl + Space shortcut):
Until now it was not possible to see, which ATC checks are contained in the corresponding ATC check variant. Now you can display an ATC check variant as an ABAP development object using the Open ABAP Development Object (Ctrl + Shift + A) to see which checks are contained in it:
Just select the ATC check variant and it gets displayed in the editor in a tree-like view as you know it from the SAP GUI Code Inspector. You can open a check category (e.g. “Syntax Check”) to see which checks are chosen there. On the bottom of the view you can switch between parameters of the selected check (“Parameters”) and its details (“Documentation”):
How to create an ATC check variant in ABAP development tools for Eclipse
For the ATC execution in the SAP BTP ABAP Environment, we currently offer some standard ATC check variants.
But surely, you may want to create your own ATC check variants as you can do it in your on-premise SAP systems to bundle ATC checks as it is suitable for your own development use case.
If you want to create your own ATC check variant in SAP BTP ABAP Environment, you can either create it from scratch or copy and change an existing ATC check variant delivered by SAP.
More details in the blog How to create and use your own ATC check variant in ABAP Development Tools for Eclipse.
How to create an ATC check in ADT
Some of you may not only want to configure the ATC checks delivered by SAP and bundle them to custom ATC check variants but are eager to write own ATC checks.
More details how to do it in the blog How to create your own ATC check in ABAP Development Tools for Eclipse.
How to create and approve ATC exemptions
You can create and approve ATC exemptions using ABAP development tools for Eclipse and transport them between different SAP BTP, ABAP environment systems.
More details in the blog How to create and approve ATC exemptions in ABAP Development Tools for Eclipse.
How to integrate ATC checks into your CI/CD processes
If you use Jenkins as a CI/CD server to control your lifecycle and quality processes you can also set up the ABAP environment pipeline and configure the execution of ATC checks within this pipeline. Find more details in the Daniel’s Mieg blog: https://blogs.sap.com/2020/10/22/ci-cd-tools-for-sap-cloud-platform-abap-environment/.
Please consider that the ATC exemptions that you have defined in your development system will be also considered within the pipeline.
How to export and import ATC objects across on-premise and cloud ABAP systems
We also enabled the export and import scenario via abapGit for ATC related objects. You can use abapGit to import and export ATC check variants, ATC check objects and ATC check categories across your on-premise and cloud ABAP systems.
More details in the blog Export and import ATC objects across on-premise and cloud ABAP systems.
Hi Olga Dolinskaja
This feature is not available in the SAP CP ABAP Trial, is it? I was not able to find the required Fiori Apps there.
Christian
Hi Christian,
no, ATC Configurator is not available in the SAP CP ABAP Trial.
Bye,
Olga.
Hi Christian,
this is because you change system wide settings with the App. And I think this will drive you crazy when several people change the prios at the same time 😉
Regards,
Thomas.
Hi Olga,
Great and very Informative blog as like always. Thanks for giving your precious time for these blog!!
Regards
Ajay Sigh
Olga,
we have on-prem system configured as Central ATC Check system(754 - Hana) which is productive and don't have Dev/QA systems which is a concern.
Thinking of below two options and would like to know which one is cost effective.
Appreciate your time.
Regards
Kasi
Hi Kasi,
why do you need a DEV system for the central ATC system?
Currently it is not possible to call the central ATC system in the Cloud from your on-prem systems. Therefore the 2 options you mention are currently not possible. We currently run a POC to evaluate the developer scenario for the ATC in SAP BTP to check when we can provide this scenario as well.
We will keep you in the loop via this blog.
Regards,
Thomas.
Hi Thomas,
could you further explain what a "developer scenario" is?
We are also very interested in using a SAP BTP system as a central ATC system.
Regards,
Chris
Hi Chris,
I mean that you can can trigger the central ATC from within your development system on-prem.
See the blog for details: https://blogs.sap.com/2017/02/27/remote-code-analysis-in-atc-for-developers/
Unfortunatly this scenario is currently not possible via th eCloud version of ATC.
Regards,
Thomas.
Hi Olga,
In your blog you state the following regarding 'CVA'
Using SAP CVA in the SAP BTP ABAP Environment is included at no additonal licensing fee.
We have a couple of questions (to ease the mind of our management):
Thanks,
Steven
Hi Steven,
yes, you need only to entitle the SAP BTP ABAP Environment, CVA checks are provided in the Custom Code Migration app for free. There is no connection between the standard on-premise CVA license (user-based) and CVA usage in the SAP BTP (free of license fee). These usage scenarios are completely separated. You can surely use cloud CVA (free of license fee) for on-premise security analysis, but some ATC features are still missing there (baseline concept, integration with SolMan tools, developer scenario, end-to-end exemption handling...).
Kind Regards,
Olga.
Thanks for your quick responses to my various questions ... much appreciated.
Dear Olga,
currently we use a OnPremise system S4HANA1909 as a central ATC System (SAP_BASIS 754/SP1).
We are also very interested in using a SAP BTP system as a central ATC system.
How can I migrate my existing data (Baseline data, exemption requests, etc.) to SAP BTP?
Which features are still missing on a SAP BTP system?
(baseline concept, integration with SolMan tools, developer scenario, end-to-end exemption handling...).
What's the roadmap of missing features?
Kind Regards
Frank
Hi Frank,
the missing features (as you listed them) are currently planned for the 2023 and onwards. I cannot provide more details on that now. We haven't thought yet about the migration of the existing on-premise baseline and exemptions data, since the baseline and exemption concepts are not yet implemented, but we will consider your feedback (thank you!), it depends of course on the technical feasibility of such migration.
Kind Regards,
Olga.
Hi Olga,
we have a requirement of getting ATC checks triggered from our WEB application. is there any API that we can use for that purpose?
is it possible to approve exemptions from web platform?
Thanks,
Asanka.
Hi Asanka,
we have APIs to trigger an ATC run and get the results from the run. Approval of exemptions is currently not possible. I will add this topic to our ATC-API backlog.
https://help.sap.com/docs/btp/sap-business-technology-platform/executing-abap-test-cockpit-atc-check-runs
Regards,
Thomas.
Thanks Thomas. How can I link the display_id to anexemption_id programatically. I need to list out all exemptions created for a specific display_id and display them. could you please help me with relevant object classes?
Thank you!.
Asanka.
Hi Asanka,
you mean the Diaplay_ID of an ATC run? There is no relation between an ATC run and an exemption. An exemption depends on several parameters, like object, source code, message-id etc. But not to an specific ATC run.
Regards,
Thomas.
Thanks Thomas.
Hi Olga,
Thanks for the informative blog!
Very much interested in using ATC in our SAP landscape to make sure any developer extensions on our S/4HANA are meeting quality and security requirements and standards. In addition would like to explore the usage of ATC to make sure ABAP for Cloud is enforced, like described in another one of your blogs: How the ABAP Test Cockpit supports you to adopt ABAP Cloud | SAP Blogs
I do wonder however, initially this blog goes back to 2021. Have there been any new developments on SAP BTP ATC? Are same functionalties provided as "on-premise" central ATC setup, including the check for ABAP Cloud developer extensibility?
Many thanks,
Regards, Bart Groot
Hi Bart,
this blog has been updated over time (as new features became available), and now it contains the up-to-date information regarding the usage of ATC in SAP BTP ABAP Environment. For the on-premise ATC see please these blog series https://blogs.sap.com/2016/12/12/remote-code-analysis-in-atc-one-central-check-system-for-multiple-systems-on-various-releases/. You can also check your code for ABAP Cloud readiness on-premise, see the blog https://blogs.sap.com/2022/10/26/how-to-make-your-custom-code-cloud-ready-and-upgrade-stable/.
Kind Regards,
Olga.