
This section explains how to create reusable inspections. The definition (name, object set, check variant) of a reusable code inspection is saved. You can run it repeatedly or schedule it for automatic execution as a background job.
Likewise, the results of a reusable inspection are saved. You can compare or track the results over time.
To inspect a large number of objects (more than 50), you must use a reusable code inspection.
To define and run a reusable code inspection, do the following:
Start the Code Inspector with transaction SCI.
Enter a name for your inspection in the
Name field in the
Inspection frame and choose
or
.
Click on the toggle
for a private inspection, visible only to you. Or choose
to create or choose from an inspection visible to everyone in the system. You have the same choice for object sets and check variants.
You can also create a new version -
- of an existing inspection and run it right away, without changing the object set or variant. .
For more details, click here.
Define the object set - the programs and objects to inspect.
You can choose an existing object set. Or you can define a new object set by entering a new name in the Object Set field and double-clicking for forward navigation.
You can also inspect the objects in a transport request, or specify programs or other components by name.
Define the check variant - the checks to be done in the inspection.
You can choose an existing an existing variant or define a new variant by entering a new name in the field in Check Variant frame.
Run the inspection.
Choose
to run the inspection while you wait in your current session.
Choose
...
(Execute) to run the inspection asynchronously. The most interesting option is to run the inspection as a background job. For this, enter a server group (click on
and mark the
In Background (Periodically also) field. With this option, you can run the inspection periodically. This is a good way to
run ABAP Unit tests automatically.
Wait for the results. The screen shows when the inspection has finished (you may need to refresh the screen with Display <-> Change). You will see one of these icons next to the Inspection field.
The inspection has not yet run or has not yet been completed.
The inspection finished successfully.
The inspection aborted (the background job or asynchronous execution failed). There are no results.
You can also pick up the results later. Just use the F4 Possible Entries function of the inspection Name field to access inspections that have already run.
As soon as the
Executed icon shows, click
to see the results screen.
Here, the display is opened to show an error and two warnings. These are in the categories Analysis of WHERE Condition for SELECT and Low Performance Operations on Internal Tables.

If you would like to re-check the objects after making corrections, just click on the
button.
The Code Inspector creates a new version of your inspection, and you can run it again.