Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 
This blog is for beginners who are new to ABAP Test Cockpit. It provides a comprehensive tutorial on the basics of ABAP Test Cockpit, including how to create and run test cases, how to manage test data, and how to analyze test results. Provides a guide on how to use ABAP Test Cockpit (ATC) to ensure successful development and gain insights into performance and security.

What is ATC?

ABAP Test Cockpit (ATC) is a tool introduced by SAP that is used to check the quality of the ABAP Program, it is compatible with ABAP code inspector for creating of variants.

ABAP Test Cockpit(ATC) is directly integrated with ABAP workbench and ABAP Development Tools for Eclipse and allow the users to check their codes from within the development Environment.

In particular, you can check the ABAP Programs for many types of problems like syntax errors, performance of a program.

ABAP Test Cockpit(ATC) is a tool that can be used both by SAP developers and quality expert. For example, if a developer want to checks all development objects of a package in the development system using the same ATC, he can go ahead and correct all messages without having to wait for feedback from the quality manager.

Before going towards in ATC we should know about the Code Inspector.

Code Inspector is a tool to analyze an ABAP Program during the it's design, it analyzes code for a variety checks, example syntax checks, programming standards, naming conventions check and security checks.

The T-CODE for Code Inspector - SCI

We can analyze single object/ set of objects and transport request in the result we receive the count of errors, warnings and information.

Open the T-Code SCI

In the above screen we can see the 3 elements

  • Inspection

  • Object Set

  • Check Variant

Here we can create the two types of variant Global and local Variables as shown in the below image.

As Global Variant is access by all users and Local Variant is access by only that particular user.

So now we should create the local variant, here we should give variant name and click on the create.

After that we can move to another screen as shown in below image.

In the above image we can see the two radio buttons

  • In reference check system.

  • Locally available checks.

We should select the locally available checks it is mainly used for local checks i.e., with in the system, where in reference check system we use the RFC i.e., for remote checking.

In above image we can see they are so many checks i.e., ABAP dictionary checks, performance checks, security checks, syntax check… based on our needs we can select the checkbox.

General checks  mainly it contains  data formatting elements, such as listing table names from SELECT statements.

Security checks  mainly contain checks for critical statements, cross-client queries, inadequate authority checks.

Syntax check / generation mainly contains ABAP syntax check.

Programming conventions mainly contain checks for name conventions.

Search functions contain searches in ABAP coding for tokens (words) and statements.

Here based on our requirements we can check is checkboxes, here i want to check the performance check, security, general checks, so based on that i have selected checkboxes and click on the save button.

After click on save button, we can see the success message at bottom of the screen.

By this way we can create the variant in Code Inspector (SCI).

After creation of the variant we should create the Job run by using the ABAP Test Cockpit.

How to create ATC?

As i said before using the ATC tool we should create a variant in Code Inspector.

T-CODE for ABAP Test Cockpit - ATC

When we open the t-code ATC we will get a screen as shown in above image.

In that we should click on the Schedule Runs. when we click on the Schedule Runs we will get a screen as shown in below image.

Now we should click on the create.

Here we should give the series name.

After enter the series name we can get the below screen as shown in below image.

Here we should give the check variant name that we have created in SCI t-code and we should give the package name that we want to analyze, we can give our custom package name.

Here i have given my package name, after that click on the save. We get the series name that we have created.

Here we can see the series name, variant name, created by, created on...etc.

Now we should select the series name that we have created and click on the Schedule.

After click on the Schedule we will redirect to another screen, in that screen no need to change anything click on F8. After completion of execution. We can get the success message the run successfully scheduled.

After completion of execution. Back to ATC and click on the monitor and control runs.

Here we can see the Run Series, Created by and time period.

Here we should give our Run Series name and after that click on F8.

As shown in above image we can see out ATC run, it contains the state, duration of time it takes, started on.. etc.

we have 3 main states.

- Complete State.

- Running State

- Failed State.

By double click on ATC run. We can see the phases of checking. We can see that check failures is 1 i.e., we have one failed case.

By double click on check failures we can get the data where the check is failed as shown in below image.

After completion of the runs we can go-to ATC tcode and in that we should click on Manage Results.

Here we get the run result list sorted by priority. As shown in the below image.

Now double click on the check title or check message, it displays the details where we got the error.

By clicking on the object name we directly redirect to the program at where error is present.

Here in above image in select query we didn't have where condition. To overcome that we can add where condition or we can add the pseudo comment that given in the above image.

Remote Code Inspection in ATC

To create the Remote code Inspection in ATC we have to follow the following steps.

Go to T-code SM59  in order to check the RFC destination used by ATC.

Here we should give the custom name for destination and connection type.

In technical settings we should give the targe host and after that go-to logon and security.

Here we should give the logon details of the target system.

After that check the connection Test and Remote Logon. After completion of that go-to Tcode - ATC.

Here we should go to system role. Select the ATC checks using Object providers radiobutton.

After that move to the object providers.

When we double click on the object providers and in that go-to System groups section and create the new system group.

After Creation of new system group, we should go-to RFC Object Providers. Here creates the new entry then set the system group and RFC destination which we created before.

After that we should schedule the runs.

Here below the description we should check all the check boxes.

If you want to check the remote system via RFC about the readiness check oh s/4 hana migration, you should select “S4HANA_READINESS_REMOTE” here.

After that we should save the Service name and schedule the run. Go-to monitor and control runs here you can see the ATC run monitoring for you schedule run.

In the Remote analyze by ATC the job is running in the destination system but the result will shown in the current system.

How to Check ATC for Single Program.

Go to ABAP program TCode SE38.

Program -> check --> ABAP Test Cockpit (ATC)

Now directly you can check the ATC.

ATC Check for eclipse

Go eclipse and open any cds view /Amdp program or any program in eclipse.

Go-to run->runas->ABAP test cockpit.

Under ATC problems we can see errors or any information are present. If we have any information for a program then we get total details of information on the right side of the screen.


How to Create ATC Check Variant in Eclipse

Open the file menu and choose New > Others > ABAP Repository > Check Variant.

Here we should give the package, name of variant and description.

In the above image we can see the check boxes, based on our requirements we can check the checkboxes and include in our check variant.

In window check details, use the tab parameters to display the parameters of the selected check and Documentation to display available documentation for selected check, these two are optional.

Save and Active your check variant.

If we want to run the program with our custom variant then choose RUN > RUNAS > ABAP Test Cockpit with.

Here we should give the variant that we have created.

Here we can see that we have run the program with the variant we have created.

Excemptions in ATC

In above image we can see the Request an exemption, as previously we know that we can over come this errors by adding the pseudo code to the particular line, or suppose we don't want to add the pseudo code than we can raise a request exemption.

Suppose some times we don't have authorization for development objects to access like edit for a program so then we can use Request as exemption.

Now click on the Request as Exemption, we can get the screen as shown in the below image.

We can see the two steps exemption scope and Approver and Reason.

Under Apply exemptions we can see Finding, program include and program.

As when we selected the Program include option we have get the apply exemptions to all findings as shown in above image.

Based on our requirement we can check the apply exemptions options.

Select the option Finding and click on the continue option.

Now we should give the approver name and reason and justification and below we have the options email for rejection, On approval or on Rejection or never. Based on our requirement we can select the option.

After click on the complete option. Now the person who is approver they will get the email notification.

Overcome the errors for Eclipse development.

As previously we have know how to check the ATC variant in Eclipse Development tool. If they are any errors present in that development objects then pseudo code will not applicable, for that we should create the Exemptions.

As in above image we can see the exemption and errors that we have in the program.

Now right click on the exemption so we can get option request exemption.

Similar to SAP GUI in Eclipse Development tool exemption creation is same, as shown in above image click on the next option.

After that give the approver name, reason and justification and click on finish. After that approver get the email notification.

By following my profile 1013242 , you will receive updates on new blog posts and other content related to ABAP development best practices.

Follow the SAP ABAP environment Topic page: SAP ABAP

This page is a great resource for staying up-to-date on the latest news and developments in the SAP HANA environment. You can follow the page to receive updates, post and answer questions, and read other posts on the topic

If you have any queries related to SAP and ABAP Developments you can post here, you can also find many topics related to your query.