ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

SAP Code Inspector

Print This Post Email This Post Written by A Swarna S on Mar 28th, 2008 | Filed under: ABAP

SAP Code InspectorCode Inspector

The Code Inspector is a tool for checking Repository objects regarding performance, security, syntax, and adherence to name conventions. The Code Inspector is a generic tool that you use to check static objects. The transaction code is SCI.
The code inspector can be called form the following transactions :

  • SE38
  • SE80
  • SE37
  • SE11
  • SE24


In code inspector we go for

  • Inspection
  • Creating Set of objects
  • Check variant

Inspection

Here Individual objects or sets of objects are checked 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
1. Persistent inspections where results are stored
2. Ad hoc inspections where results are not stored

Object Set

Using sets of objects, you can group several single objects together for an inspection. Sets of objects include, for example, programs, function groups, classes, or DDIC 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.

Check variant

When you execute an inspection using the Code Inspector, the system checks the individual objects of a defined set of objects for certain attributes using the check variant. There are global and local check variants. Global check variants are available for all users. In contrast to the global check variants, local check variants are visible only for one user.

Elements of the code inspector:
Code Inspector elements

The code inspector initial screen looks this way.
Code Inspector Initial Screen

The standard checks that come with a code inspector are :

  • Syntax checks and program generation
  • Security checks
  • Performance checks
  • Search operations

Syntax checks and program generation

The checks in this category are :

  • Normal syntax check
  • Extended program check
  • Program generation

Normal Syntax check : This is the check we all perform normally in the ABAP workbench. This is our CTRL + F2 check in the ABAP editor.

Extended program check :
This is the SLIN transaction check . It processes the static checks that are too complex or too time consuming for the normal syntax check.
These checks include :
1. Reference to program external units (eg ,SUBMIT )
2. Multi language enabling
3. Package check
4. EBCDIC/ASCII Portability
5. Generation limits
6. Statements in wrong context
7. Unnecessary items

Program generation :
This check is very similar to the other two checks but also generates the byte code of the program. This is useful for removing inconsistencies which occur during an upgrade.

Security checks

It checks :

1. Statement that is deemed critical.
2. Statement which infers ominous database access.
3. Select statements without a system return code (SY_SUBRC).

Performance checks

The performance checks are carried out to check the following conditions :
1. Database accesses that will lead to high runtimes because of the WHERE clause does not use an existing database index.
2. Select statements which use bypass buffer increasing database access.
3. CHECK statements inside SELECT and ENDSELECT loops.
4. Nested loops in internal tables.
5. Nested Selects.

Search operations

The code inspector offers search operations for use in ABAP programs
1. Search for tokens(words)
2. Search for complete statements

Code inspector run for abap program in SE38.
Code Inspector in SE38

Once the code inspector is run a screen like this appears.

Code Inspector Results - Before

The code inspector gives a detailed description of the errors in the program and double clicking the error it takes to the error in the code for correction.
Code Inspector Results - After

Download this complete article SAP Code Inspector.

Copyright : ERPDB : This article can be reproduced as long as this line stays.

Share

If you like this post, you may as well like these too:

  1. Transaction Code to Access Other Transaction Code with Values Many times in SAP, you may come across situations where in the users wants to have a separate transaction codes for some of the tables which can be easily maintained...
  2. SAP FI T/Code List Download here...
  3. Fun Tidbits in SAP Code There is a lot of fun activity going on in SAPFans. Go to Include – LV61BMES and read line from 4 to 7. Go to Include – LCORFF1K and read...



Leave a Reply