AdHoc Inspection for ABAP Program in Quick Method
We will see how we can do a quick code inspection on a single program or an
object set. This is also termed as an Ad Hoc Inspection, since the inspection results are not
saved and are not available for future.
1. Call the SAP transaction SCII. Alternatively, you may go to transaction SCI and on
the main screen, leave the Inspection field blank and press the Create button below
the Inspection Input field. The screen appears as follows:
2. Select the Single radio-button option. From the list box, select the Program option
and then enter the name of the program in the field provided. We enter the name
of a previously created program ZST9_TEST_FOR_ALL_ENTRIES_2.
3. From the area in the lower part of the screen, we will select the option Temporary
Definition. Then we select from the available checks that we want to be carried out.
Selecting or deselecting a particular category will include or exclude all checks within
the category in the inspection. For resetting to default values at any time, select the
menu path by going to Utilities | Set Initial. Alternatively, use the toolbar button
or press F7.
4. Finally, press F8 to carry out the inspection.
The code of the program mentioned is scanned and checked based on the selected checks.
The results are then displayed. The results comprise of tree structure (hierarchy) within nodes
corresponding to the checkbox selected. There are three columns shown for messages within
the different categories and then the checkboxes pertaining to the category in question.
These are Errors, Warnings, and Information messages. You may open the various
categories to see the detail of the messages found in each category. For example,
we have two information messages found under Use of Indexes in SELECT statement.
You may double-click on a particular message to reach the actual line of the code in the
program that generated the message in question.
While selecting the checks to be run from a particular category, a check may have further
the attributes and choose the ones relevant for your requirement. If you find an icon, it means
that there is at least one value that must be set for the attributes contained within the check.
Otherwise, selecting the check will produce an error and the inspection will not run.
You have also the option of checking objects using object sets or the object contained within a
request. However, the transaction has a limitation that you may not check over 50 objects and
that the inspection may not be saved for reuse. In this case, the inspection is not stored and
does not have a name (that is, it is anonymous). The next recipe will cover the ones that will
overcome these limitations.
No comments:
Post a Comment