Insights of code inspector

By Mohammed Zuber, John Deere India

Most of the time we do developments and when it comes to checking or doing the review of the code we generally use Code Inspector and EPC i.e. Extended Program Check.

But have you ever wondered what these tools are doing behind the scene?

You can call the Code Inspector for the relevant single objects directly from the ABAP Editor (SE38), the Function Builder (SE37), or the Class Builder (SE24) (Object->Check->Code Inspector). The system then checks using a default check variant which is provided by SAP.



So in this post I will give an overview of how we can use the potentials of code inspector and how we can pin point the errors and deliver the best quality code with adherence to ABAP coding guidelines.

What is Code Inspector?

The Code Inspector is a tool for checking Repository objects regarding performance, security, syntax, and adherence to name conventions.

Using the Code Inspector (transaction code SCI), you can check individual objects or sets of objects for performance, security, syntax, and adherence to naming conventions. You can also determine statistical information or search for certain ABAP words (tokens). In the Code Inspector, you can define inspections that, with the help of check variants, examine certain sets of objects. As the result of an inspection, you receive information messages, warning messages, or error messages on different properties of the examined objects.


The range of functions in the Code Inspector is limited to checking static object definitions and can therefore only point out certain problems.

It cannot, for example, give a precise statement as to how the overall performance of a program is. To be able to do this, you need to analyze program execution yourself at runtime – for example, using the Runtime Analysis Tool (transaction code SE30), the Performance Trace (ST05), or the Global Performance Analysis Function (ST30).

How to start Code Inspector?

You can call the Code Inspector using transaction code SCI or through the menu path SAP Menu à Tools à ABAP Workbench à Test à Code Inspector.

You can call the Code Inspector using transaction code SCI or through the menu path SAP Menu à Tools à ABAP Workbench à Test à Code Inspector.

Below is the screen when you start Code Inspector.

We have three Blocks as below:

1.     Inspection

2.     Object Set

3.     Check Variant

What is Inspection?

Inspection is the process of checking individual objects or set of objects as to whether certain programming guidelines have been adhered to. The result of an inspection run is a list of the individual checks made with errors, warnings, or information messages. There are two types of inspections. They differ with respect to whether the results are made persistent or not.

·         Persistent inspections with results storage
For execution on the local server or parallel execution on the server group. You can plan persistent inspections as background jobs and use them for any size of object set.

·         Anonymous or ad-hoc inspections without results storage
For execution on the local server and for fewer than 50 objects. You can execute ad-hoc inspections in online mode only.

When you give a name in inspection box and click create icon following is the screen you get.

In the screen above you can see we can do inspection of an Object set (we will see shortly what that mean) which can be thought of as a collection of objects, Or we can do inspection of objects captured under any transport request by selecting the Request/Task radio button.

We can also do inspection of individual objects by selecting the Single radio button and giving the type of object and giving the name in the input box.

The next thing is Check Variant which is kind of collection of check rules that we have to follow while inspecting any object.

What are Object Sets?

They are collection of several single objects together in a group/set. Sets of objects include, for example, programs, function groups, classes, or DDIC objects. In general, any Repository objects can be included in a set of objects. 

There are global and local sets of objects. Global sets of objects are visible for all users while local objects are only visible for a single user. You can create global sets of objects only if you have the appropriate authorizations. 

Click here to continue..

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image