
This section shows how to do several useful quality checking tasks with the Code Inspector.
Reviewing Saved Results
The Code Inspector saves the status (successful, aborted) and results of inspections up until their Deleted on dates.
To review saved results, do the following:
Click on the toggle
to review results of private inspections, visible only to you. Or choose
to see the results visible to everyone in the system.
Click on the F4 icon at the Name field in the Inspection frame on the start screen of the Code Inspector (transaction SCI).
The Code Inspector displays a window with the available inspections. The highest version number is of course the newest instance of an inspection.
Click on an entry in the list to fetch the inspection. You can then select
to see the saved results.
Automating ABAP Unit Tests
The Code Inspector provides a convenient way to automate ABAP Unit testing. You can, for example, run ABAP Unit tests automatically every week after transports arrive, in order to do regression testing and verify new functions.
You will find a weblog in SDN with detailed instructions for setting up automated ABAP Unit testing with the Code Inspector (English only):
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16420
To set up automated ABAP Unit testing, do the following:
Define an inspection and select the programs whose ABAP Unit tests should run.
Define a check variant in which you mark only Dynamic Tests in the List of Checks.
Choose
...
(Execute) to run the inspection. Fill out the execution options as shown here:

Confirm your choices. On the next screen, you can enter the start time and repeat interval of the Code Inspector job. The job will automatically repeat the ABAP Unit tests that you have selected.
Searching for Particular Words in ABAP Entities
Do you want to look for use of obsolete ABAP statements? Or do you need to enforce a change in terminology in coding? The Code Inspector can help you with these tasks.
In a check variant, mark the section Search Functs.
With the check
Search of ABAP Tokens, you can look for text strings in literals, comments, and in active coding. Enter the search string by clicking on the
button.
SAP recommends for best results that you start and end the search string with the wild card character: *string to search for*. The search is case-insensitive.
With the check Find Unwanted Language Elements, you can search for ABAP statements that are obsolete in modern ABAP OO programming. The check is delivered with a pre-selection of statements.
Save the check variant and use it to search for texts and statements that you wish to change.
Sending Lists of Messages by E-Mail
The Code Inspector e-mail function ( ) is not active in customer systems.
But you can still send lists of messages to users. This is a good way to report results from a consolidation system to developers who work in other systems.
Generate a results list that is suitable for a user or group of users.
For example, you can inspect development packages and send the results to the developers who work on the package.
On the
Code Inspector: Results screen, choose the
function to display the messages in ABAP list format.
Choose the
to open the mail window.
For R-Mail within the SAP System, you can specify a user ID as the Recipient and B SAP Logon Name as the Recip. Type.
For external Internet mail, you can enter an Internet e-mail address (user.name@domain) and U Internet address as the Recip. Type. For external mail, SAP Connect (transaction SCOT) must be set up.
Press
dispatch the mail.
Automatically Checking Transport Requests on Release
You can have the Code Inspector automatically check the objects in a transport request when the request is released.
To activate this feature, do the following:
Start the Transport Organizer Tools by entering transaction SE03.
Choose .
In the Check Objects when Request Released frame, mark the Globally Activated option.
The Code Inspector will automatically start when a user releases a transport request. (The Code Inspector does not run if a user releases a task within a transport request.)
The user will see a status message reporting that the Code Inspector is checking the objects in the transport request. The system DEFAULT check variant is used for the check.
If no check messages are reported, then the release of the transport request is completed, as usual.
If there are check messages, then the user has the option to review and correct them before the release of the request is completed. The user can also override the checks and complete the release of the transport request despite the presence of check messages.