. Quick start on how to run SAP code inspector to do static code view,
F
igure 6 SAP code inspector result list
I double clicked the program line in Figure 6 to see the corresponding ABAP
source line related to Nested loops
SCI result would not be saved by SAP. You have to download the SCI
result manually before you quite from SAP SCI transaction if you would like
to keep the result.
You can check only single transport or single ABAP object during each
execution,
You have to enter object name each time you need to check the ABAP
object and
You have to specify the list of checks every time manually when you
execute the SCI. You can use existing check variant but you have no
control on the check variant which you are not responsible for.
If I would like to refer to the static performance check result in the SAP SCI in
the future, or I need another person to review the check result via SAP SCI,
or I need to check a lot of objects, or if I always do the same set of checks
and hate to click those options one by one every time, or is there any option
to execute the check in background to avoid timeout or make execution
faster when I have a lots of objects to check? Can SAP SCI allow me to do so?
Yes, I called it advanced way of running SAP SCI.
Figure 10 SAP SCI choose check category and associated check attribute
I saved the ERIC_PERF_DB variant by clicking the Save button. You can
see that my variant is to focus on SQL statements and targeted for programs
which mainly spends runtime on database access. For such programs, it
makes no sense for SAP SCI to check low performance operations on
internal tables etc
You can display, change, copy and delete an existing variant by clicking
correspond buttons in the check variant section of SAP SCI initial screen.
If you enter a name for SCI inspection, the SCI static checking result would
be saved in SAP database upon completion so this can be reviewed using the
name via SCI in the future. When you have a big object set and SAP SCI
returns a long list of result. You might need more than one person to review
the SCI result as well. So naming an inspection has at least following benefits
1.
Save the result for the future reference,
2.
Separate SCI execution and result reviewing,
3.
Allow several people to work on the long list of SAP inspection result.
I named my SCI static check or Inspection as
ERIC_CHECK_DB_EXPENSIVE_REP, then I click create button highlighted in
Figure 15
In Figure 17, you can click button circled in red color to review the
inspection result. You can filter the result and sort result as well via buttons
showed in Figure 17. The green button before the name of inspection
indicates that SCI is executed successfully for the inspection.
issue like you execute a operation at sale order line item level while the
operation only need to execute once for one sale order.
ABAP code review for static check can be done manually but manual check
has many disadvantages like cost, inconsistent result and painful.
SAP code inspector is integrated with SAP object creation and editor tool like
SE11 data dictionary, SE38 (ABAP program editor), SE37, SE24 (class
builder) and etc. As a developer, you can call SAP code inspector in the tool
to do static check directly. Such check is done via Default check variant
defined by the developer. For example, SAP developer can invoke the code
inspector to do static check from the same SE38 screen where code changes
are made.
SAP code inspector is doing a static check based on a predefined set of
criteria. It has no information on actual usage of ABAP code in production
environment or how big a table is Due to business changes, a code
which is executed frequently might be obsoleted over time. You do not
spend effort on an obsoleted codes due to code inspector complaining for
that purpose, SAP has introduced another tool SWLT to integrated code
inspector result with SQL usage information from SQL monitor which might
help drive priority of fixes some times. In my understanding, SAP SWLT and
SAP SQLM is targeted for Hana migration and Hana environment. I would
cover SAP tool SWLT and SQL monitor in the future.