setting up and using the sap code inspector

4
Setting up and using the SAP Code In spector If we are looking to review development from a quality or standards point of view, either our own code or a peer review, SA P provides the Code Inspector tool. The Code Inspector is a configurale tool that can e used to check the quality and consistency of development from a single program up to an entire Package. There are two main transactions used to access the Code Inspector, SCI and SCII. Transa ction SCI can e used to configure the Code Inspector and perform inspections. Trans action SCII has less functionality than SCI and is limited to performing inspections. This log focuses entirely on transaction SCI, ut the conce pts are relevant for SCII. The Code Inspector can also e called from the A!AP edit or. This runs the inspection on the current program with the "ariant #$%A&'T . The first thing to understand is the concept of 'ocal and (loal in the Code Inspector. 'ocal elements are associated directly with a specific user id and whilst availale to all users can only e found if the responsile user id is known. (loal elements are availale to all users.  The icon on the push utton to the left of the entry field indicates the type, and can e used to switch etween the two. )hile creating elements as local is eneficial for prototyping, all elements for general use or for use across multiple systems shou ld e created as gloal. *ememer whenever the transaction is called the default setting is 'ocal. The three elements of the code inspector are the Check "ariant, the +ect Set and the Inspection, defined as follows- Check Variant   This defines the rules to e applied, which checks are to e made and the settings of those checks. Object Set   This defines the development oects that will e included. Inspection  This defines a comination of Check "ariant and +ect Set, in other words what checks are to e applied to which development oects. Creating a Check Vari ant Create a new variant or copy an e/isting one.

Upload: stoica-emil

Post on 05-Jan-2016

220 views

Category:

Documents


0 download

DESCRIPTION

Setting Up and Using the SAP Code Inspector

TRANSCRIPT

Page 1: Setting Up and Using the SAP Code Inspector

7/16/2019 Setting Up and Using the SAP Code Inspector

http://slidepdf.com/reader/full/setting-up-and-using-the-sap-code-inspector 1/4

Setting up and using the SAP Code Inspector

If we are looking to review development from a quality or standards point of view, either our own code or a peer

review, SAP provides the Code Inspector tool. The Code Inspector is a configurale tool that can e used to check

the quality and consistency of development from a single program up to an entire Package.

There are two main transactions used to access the Code Inspector, SCI and SCII. Transaction SCI can e used to

configure the Code Inspector and perform inspections. Transaction SCII has less functionality than SCI and is limited

to performing inspections. This log focuses entirely on transaction SCI, ut the concepts are relevant for SCII.

The Code Inspector can also e called from the A!AP editor. This runs the inspection on the current program with

the "ariant #$%A&'T.

The first thing to understand is the concept of 'ocal and (loal in the Code Inspector. 'ocal elements are associated

directly with a specific user id and whilst availale to all users can only e found if the responsile user id is known.

(loal elements are availale to all users.

 

The icon on the push utton to the left of the entry field indicates the type, and can e used to switch etween the

two. )hile creating elements as local is eneficial for prototyping, all elements for general use or for use across

multiple systems should e created as gloal. *ememer whenever the transaction is called the default setting is

'ocal.

The three elements of the code inspector are the Check "ariant, the +ect Set and the Inspection, defined as

follows-

Check Variant   This defines the rules to e applied, which checks are to e made and the settings of those checks.

Object Set   This defines the development oects that will e included.

Inspection  This defines a comination of Check "ariant and +ect Set, in other words what checks are to e

applied to which development oects.Creating a Check Variant

Create a new variant or copy an e/isting one.

Page 2: Setting Up and Using the SAP Code Inspector

7/16/2019 Setting Up and Using the SAP Code Inspector

http://slidepdf.com/reader/full/setting-up-and-using-the-sap-code-inspector 2/4

 

The checks can e activated or deactivated as required

The checks are well documented, so it0s usually clear what each one is for. 1y preferred approach is to start with a

large set of checks and review the results of the inspection. Then reduce the numer of checks or change the

parameters depending on how useful the results were. The "ariant can e transported if it is (loal and the

2Transportale0 checko/ is selected.

Page 3: Setting Up and Using the SAP Code Inspector

7/16/2019 Setting Up and Using the SAP Code Inspector

http://slidepdf.com/reader/full/setting-up-and-using-the-sap-code-inspector 3/4

Create an Object set

 

The +ect set defines the scope of development oects included in the Inspection. The options availale on the

main ta strip are-

Select Object Set  3 This is the most fle/ile definition of the +ect Set, essentially enaling selection from high

level attriutes such as Package or Software component down to the lowest level of individual development oects.

Edit Object Set  3 +ect Set definition ased on other e/isting +ect Sets, coming ased on either the entire

+ects Sets or ust the oects common to oth.

Object Set fr. Result  3 +ect Set definition ased on the results of an e/isting Inspection result.

Obj. Set from Request  3 +ect Set definition ased on the contents of a transport request.

Obj. Collectors 3 +ect set definition ased on comple/ criteria, such as the where3used list for a tale or program.

 An additional filter can then e applied to the criteria ased on +ect Type, 4ame, Package and Person

*esponsile.

Consider the potential volume of results from the inspection when defining the +ect Set. If the +ect Set includes

many oects and the "ariant many checks the results from the inspection could ecome unmanageale. #epending

on the stage of the development different +ect Sets will e required. #uring uild a high3level set covering a largernumer of oects is suitale whereas during testing and defect fi/ or productive operation a transport level set could

e more appropriate.

Page 4: Setting Up and Using the SAP Code Inspector

7/16/2019 Setting Up and Using the SAP Code Inspector

http://slidepdf.com/reader/full/setting-up-and-using-the-sap-code-inspector 4/4

Create an Inspection

The Inspection comines the Check "ariant and the +ect set- the checks specified in the "ariant are applied to the

development oects defined in the +ect set. The Inspection can also e defined against an individual transport or

development oect, rather than an +ect set.

4ote that a new Inspection will e created with a default 2#eleted on0 date of two months into the future. If the

Inspection results are to e retained eyond this date it can e changed.

+nce the inspection has een defined you need to run it. If the +ect Set is fairly small you could ust run theInspection in the foreground 5the regular $/ecute icon6, or otherwise in the ackground 5the $/ecute icon with some

dots after it6.

Reviewing the Inspection

The results of the inspection are displayed in the same hierarchy structure as the "ariant.

$ach message is grouped y Type 5$rror7)arning7Information6 and message. $ach message is repeated once for

each instance where it occurs. The meaning of each message 5as well as the tag needed to switch off the check6 is

availale y clicking the lue i icon. #oule3clicking on the message navigates to the development oect requiring

attention.