Code Inspector User Manual

Similar documents
Function Modules Objective The following section is intended to explain: What function modules are Components of function modules

Configuring Job Monitoring in SAP Solution Manager 7.2

BC ABAP Workbench Tools

Customizing System Setting (BC-CUS)

Executing Remote Static Checks in Context of HANA Migration

SAP Landscape Transformation for SAP HANA (HA1)

ABAP Add-On: Usage & Packaging

Creating and Maintaining User Master Records

SAP. Modeling Guide for PPF

COURSE LISTING. Courses Listed. Training for Database & Technology with Development in ABAP Dialog Programming. Beginner. Intermediate.

COURSE LISTING. Courses Listed. with ABAP Dialog Programming. 25 December 2017 (08:57 GMT) NW001 - SAP NetWeaver - Overview

Engineering Workbench (PP-BD)

D75AW. Delta ABAP Workbench SAP NetWeaver 7.0 to SAP NetWeaver 7.51 COURSE OUTLINE. Course Version: 18 Course Duration:

for Q-CHECKER Text version 15-Feb-16 4:49 PM

ABAP DSL Workbench SAP TechED 2016

FUNCTION MODULE. BAPI are RFC enabled function modules. Might Be Remote Enabled or May not be Remote Enabled

BC405 Programming ABAP Reports

SAP NETWEAVER - TRANSPORT MANAGEMENT

SAP Debug Tips Switching between the Classic Debugger and New Debugger

The Official ABAP" Reference

Text version 15-Aug-12. for Q-CHECKER V4, V5 and V6

C_TAW12_740

Order type is not visible in the initial screen. Menu path Order -> Create from Planned Order is deactivated

SAS/ACCESS Interface to R/3

SAP S/4HANA on-premise PI Adaptor for Field Service Edge. Developer Guide

Editor for Personnel Calculation Schemas (PY-XX-TL)

BPMon Data Collector Generic Table Entry Counter

SAP- ABAP/4 ADVANCED COURSE CONTENT

Data Express 4.0. Data Subset Extraction

SAP' ABAP. Handbook. Kogent Learning Solutions, Inc. Sudbury, Massachusetts JONES AND BARTLETT PUBLISHERS BOSTON TORONTO LONDON SINUAPORI:

Client Copy and Transport

Change and Transport Management

C_TAW12_740

SAP NetWeaver How-To Guide How To... Configure SAP HANA for CTS

Object Determination Softproviding Core User Documentation

SAP ABAP Training Course Content :

How To Transfer ERP HCM Data Using SAP Test Data Migration Server

The Test Workbench in the SAP System (BC-CAT-PLN)

Functional Trace HELP.BCCCM. Release 620

Dell One Identity Manager Administration Guide for Connecting to SharePoint

RCT Express. Administrator Training Manual. Version 4.3

Useful SAP Transaction Codes

SAP Engineering Control

Price ƒ(x) Release 'Mojito' Release Notes Go-live Date:

Determination Applications Softproviding Core User Documentation

BC401. ABAP Objects COURSE OUTLINE. Course Version: 18 Course Duration:

qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer

SAP Engineering Control Center 5.1

D'Rainbow ALV. User Guide. Paint.Enhance.Annotate.

SAS Infrastructure for Risk Management 3.4: User s Guide

Editor for Personnel Calculation Rules (PY-XX-TL)

This is the forth SAP MaxDB Expert Session and this session covers the topic database performance analysis.

HOW TO USE THE WEB DYNPRO CONTENT ADMINISTRATOR. SAP NetWeaver 04 SP Stack 9 JOCHEN GUERTLER

EMC Documentum Composer

Product Documentation SAP Business ByDesign August Analytics

INTERVIEW QUESTIONS SAP ABAP (SAMPLE) May 23,

Security Audit Log HELP.BCCSTADM. Release 4.6C

EMCO Ping Monitor Free 6. Copyright EMCO. All rights reserved.

Basics User Guide. Release

EMC Documentum Content Services for SAP Document Controllers

Trigger-Based Data Replication Using SAP Landscape Transformation Replication Server

EMC Documentum Composer

SAP-ABAP Training Program. Topics Covered. ABAP Dictionary Concepts

OneStop Reporting OSR Budgeting 4.5 User Guide

What's New in SAP Landscape Transformation Replication Server 2.0 SP13

An Overview of ABAP Debugger Settings and System Areas

SAP R/3 Document : Background Processing

SPRO >> Customer Relationship Management >> UI Framework >> Business Roles >>

Inspection Planning with the Engineering Workbench

Preface Introduction... 23

Introduction to OOP. Procedural Programming sequence of statements to solve a problem.

Using Flow Control with the HEAD Recorder

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB

Documentation. Note Assistant. for. SAP NetWeaver 2004s. SAP NetWeaver 2004 (SAP Web AS 6.40) SPS 13 and higher. SAP Web AS 6.20 SP 55 and higher

SAP Patch Manager (SPAM) (BC-UPG-OCS)

Chapter 12 Introduction to Dialog Programming

Debugging for Fuco s. Explanation, tips & trics for debugging in SAP CRM

Changing the SAP Standard (BC)

RunningBall Trader Client

Translation Tools for Coordinators (BC-DOC-TTL)

One Identity Manager Administration Guide for Connecting to SharePoint

SAP Certified Development Associate ABAP with SAP NetWeaver 7.02

ServiceBus-Comm. Communication software for Stepper Motor Power Stages with ServiceBus. Manual 1239-A007 GB

SAP ABAP. Introduction to SAP ABAP

Adding Dynamics. Introduction

ISTA User instructions for the BMW Online Service System for BMW Service and MINI Service (OSS)

SAP ABAP WORKBENCH CONCEPTS PART 1 AND 2. INd_rasN. 1 P a g e. KIDS Information Center

Output Determination (SD-BF- OC)

HA400 ABAP Programming for SAP HANA

Excel4apps Reports Wand User Guide (SAP) 2013 Excel4apps

This tutorial explains the key concepts of Web Dynpro with relevant screenshots for better understanding.

CA Spectrum. Policy Manager User Guide. Release 9.4

Lockheed Martin s SAP Business Suite powered by SAP HANA Migration

Editing Course Tools and Properties to 8.4.1

News in RSA-RTE 10.1 updated for sprint Mattias Mohlin, January 2018

Symbio Manual. Administrator Role

TransportManager Version 5.0

Version: 4.1 Date: 02/09/2017

Gateways can be thought of as Institutional Space the place where assets can be published from a user s Personal Space for viewing by other users.

Function names can be specified with winidea syntax for qualified names, if multiple download files and file static functions are tested.

Transcription:

Code Inspector User Manual Version 2 January 2002 Table of Contents INTRODUCING THE CODE INSPECTOR... 2 CALLING THE CODE INSPECTOR... 2 RESULTS OF THE INSPECTION... 3 CHECKING SEVERAL OF YOUR OBJECTS... 5 CREATING AN OBJECT SET... 5 SELECTING AN OBJECT SET... 6 CREATING A CHECK VARIANT... 8 CREATING AN INSPECTION... 9 ANONYMOUS INSPECTION... 9 CREATING A NAMED INSPECTION... 10 STATUS OF EXECUTION AND STATISTICS OF A NAMED INSPECTION... 11 APPENDIX... 13 FURTHER POSSIBILITIES TO SELECT AN OBJECT SET... 13 DECLARING EXCEPTIONS... 13 ADMINISTRATION OF CHECKS... 13 RESTRICTIONS IN CUSTOMER SYSTEMS... 13 LIMITATIONS OF THE CODE INSPECTOR... 14 SWITCH TO MODAL F4 HELP... 14 COMMENTS AND FEEDBACK... 14 1

Introducing the Code Inspector Tool for checking static ABAP coding and DDIC objects (generally: TADIR objects) Aspects of checks are: Performance, Security, Reliability, and Statistical Information Checks are performed on single objects or Object Sets (programs, function modules, classes, interfaces, DDIC-objects). One or several single checks make up a Check Variant A Check Variant and one object/object Set can be combined to an Inspection With the Code Inspector you can perform checks of different categories on single objects as well as on a set of objects. A simple check of one object can be done with almost no preparation (see Calling the Code Inspector or Anonymous Inspection). For more elaborate checks on several objects you might first need to create an Object Set with your objects, then a Check Variant with your special check, and at last a Named Inspection combing the two. Calling the Code Inspector The easiest way to call the Code Inspector for a single object is from ABAP workbench (SE80), ABAP editor (SE38), function builder (SE37), or the class builder (SE24) with Object Check Code Inspector where Object stands for Program, Function module or Class (see figure 1). The respective single objects (program, function module, or class) are then checked with a Default Check Variant of the Code Inspector. Fig.1: Calling the Code Inspector for a class from SE24 (class builder) 2

Results of the Inspection When the Inspection run is finished, you get the results of the Inspection, which are ordered hierarchically. The system only displays the checks that were applied in the Inspection. Fig.2: Results of an Inspection Hierarchy: List of checks Check category: Performance, security, syntax, search, general Single check Type of result message: Error (red), Warning (yellow), Information (green) Message code of sub-check (with Web AS 6.20) Message Each message contains: the source code position (or name of the TADIR object) ashort explanatory text 3

To attain the inspected object double-click the message text. For further explanation click the information icon in front of the message. Fig.3: Information for a sub-check of SELECT Statements that Bypass the Table Buffer An information text is available for many of the checks, providing an explanation of the problem and further links within the Code Inspector online documentation. There is also given a pseudo-comment. When this pseudo-comment is inserted into the coding, future Inspections will not show this message. When started from the Workbench, with Web AS 6.20 you get two additional buttons on the result screen (figure 2): With the left button Create Default Check Variant you can create your local Default Check Variant. Your objects will be checked from then on with this local Default Check Variant. You can change or delete your Default variant any time from the result screen or within transaction SCI. With the button Code Inspector you get to transaction SCI. 4

Checking several of your objects If you want to check not only a single object, but rather a number of objects, for example all objects of a package or a SAP component, use transaction SCI to Create an Object Set which contains your objects, Create a new Check Variant which contains the checks you want to execute on your objects (or use a Default Check Variant), Create an Inspection and run it. Creating an Object Set To create an Object Set call transaction SCI, enter a suitable name for your new Object Set and click Create. Fig.4: Create a new Object Set Each Object Set has a version number that the system assigns automatically. This version number can help you to administrate Object Sets with slightly varying properties. 5

Using F4 Help, you get a list of Object Sets. There are local and global Object Sets. While local Object Sets are only visible for one user ( Person Responsible ), global Object Sets can be viewed by everyone. Depending on your SAPGui settings, you will have to click on the local/global icon to switch between the two settings, even if you choose an element (Inspection, Object Set, or Check Variant) with F4 Help. See how to let F4 Help switch automatically to the local/global icon. With transaction SCI you can of course also display, change, delete and copy Object Sets. Selecting an Object Set To select an Object Set with your objects, choose TabStrip Select Object Set (figure 5). In the upper part (Object Assignment) you can select objects according to their assignment. This can be one of the following: Application Component (Web AS 6.20) Software Component Package Original system Person responsible In the lower part (Object Selection) you can select the objects. TabStrip Classes, Func. Groups... allows you to select specific classes, interfaces, function groups, programs or reports, DDIC types (data element, structure/table, view, physical pool/cluster, table type), and type-pools. Using Free Obj. Choice you can select any TADIR object type (for example TABL for tables). The TabStrip Programs allows for a very general program selection and should only be used by expert users. Be sure that for your selected object type already exists a check! To save your selection and to create an object list, choose Save. You can immediately control your object list with Display Objects. If you are not satisfied with your selection, you can always change the input and save the Object Set again. If you set the flag Selections Only, your selection criteria will be saved, but no object list will be generated. This can be done later by clicking on the Create Object List button. If you use an Object Set without object list in an Inspection run, an up-to-date object list will be generated in this moment. Proceeding this way, no outdated state of your object selection will be checked. 6

In figure 5, user HOLMES selected an Object Set which contains the classes and interfaces of package S_CODE_INSPECTOR. You can assign a description to every Object Set. With Web AS 6.20 a default description is generated containing the name and version number of the Object Set. You can also determine a deletion date. Note that the default value lies 50 days ahead. This means as standard your Object Set will be deleted after 50 days if it is not included into an Inspection not yet executed. Fig. 5: Selecting an Object Set with all classes / interfaces belonging to package S_CODE_INSPECTOR See also: Further possibilities to select an Object Set 7

Creating a Check Variant Check Variants are also created, displayed, changed, deleted and copied with transaction SCI. To create a Check Variant, enter a suitable name and click Create. You obtain a tree containing all check categories with their respective single checks. Add single checks to your Check Variant just by clicking the tree. Note Some checks have attributes. These attributes can be set by clicking on the arrow in front of the check name. Attributes on the Pop-Up screen are selected by choosing Execute. Some checks (for example the search functions) will not be executed, if none of their attributes are set. With Web AS 6.20 it is not possible to save Check Variants with missing attributes. For more information on a check, choose the Information button. Fig. 6: Create a new Check Variant. Select single checks and maintain their attributes There is always a global Check Variant with name DEFAULT which is applied to the objects that are inspected from SE24, SE37, SE38, or SE80. If you create a local DEFAULT, it will override the global DEFAULT Check Variant. 8

Creating an Inspection An Inspection consists of an single object or an Object Set, and a Check Variant. In the Inspection run, the checks of the Check Variant inspect the objects. Finally you get the Results of the Inspection. Inspections can be Anonymous or Named: An Anonymous Inspection is not stored persistently, it can only handle Object Sets with less than 50 objects and is executed on the local server. A Named Inspection is stored persistently together with it s results. It can handle Object Sets containing any number of objects and is executed on the local server or alternatively by a server group. You can create suitable server groups with transaction SM59 RFC Groups. A Named Inspection can be scheduled in an background job. Anonymous Inspection In transaction SCI in the Inspection area click on Create without giving a name. You can then combine an Object Set or a single object with an existing Check Variant (Predefined) or one picked spontaneously from the tree of checks (Temporary Definition). When you click the Execute button, the Inspection will be executed immediately on the local server. Fig.7: Anonymous Inspection with single object and temporarily defined Check Variant 9

When the Inspection run is finished, you can access the results by choosing Results. Note: All results of an Anonymous Inspection will be lost when you leave the screen Inspection. Clicking the Repeat button enables you to change the input parameters for an Anonymous Inspection. The results of the old Inspection are lost, but you do not need to call the transaction SCI again and repeat all of your inputs to start a new Anonymous Inspection. Creating a Named Inspection In transaction SCI type in a name for your Inspection and click Create. You can then combine an Object Set, a single object, or objects from a request with an existing Check Variant. There are two possibilities to execute the Named Inspection: on the local server or by a Server Group. When choosing Execute, the Inspection run will be started immediately on the local server in one task. Fig.8: A Named Inspection can be executed by a server group (Execute...). You can start the Inspection immediately or you can schedule it in a background job. 10

If you choose Execute... you get to the Execution Options Pop-Up screen where you can select a server group. Make sure that the group contains only active servers that have sufficient free resources. With the button Maintain Server Group (or, alternatively, with SM59 RFC Groups) you get directly into the server group maintenance. We recommend you to run the Inspection on a Server Group when the Object Set is large (more than 50 objects). The Inspection will then be performed parallel in up to 12 tasks on all servers of the server group (if they have free resources). The load will be split up into packages of 10 to 50 objects. You can start a Named Inspection immediately or you can schedule it in a background job. Status of execution and statistics of a Named Inspection A Named Inspection can be in different states which are signalled by the status icon in front of it s name: An Inspection can be interrupted due to server shutdown, lack of resources, faulty checks, or other reasons. An broken Inspection can be (re-)started just as an Inspection not yet executed, and the Code Inspector then tries to check the remaining objects. In some cases it may not be possible for the Code Inspector to check all objects, so the Inspection will remain in the broken state. Therefore it is possible to get the results also for broken Inspections. Especially in the case of a broken Inspection, you will be interested in the execution statistics of the Inspection to get an hint about what went wrong. From the Inspection screen you get to the statistics with the Statistics button. 11

The statistics inform you about start and end time/date of execution, cumulated runtime, number of servers, tasks, and objects, execution state of the objects and errors. Fig.8: Statistics of execution of a Named Inspection Under Object Statistics you find a summary of the execution states for the checked objects. Objects can have one of the following states: Not to be checked: object belongs to Object Set, but the Inspection executed has no appropriate check for the object Not yet checked: object has not been checked because the Inspection was interrupted Checked w/o message: object was checked, but there was no message Checked with message: object was checked and there is at least one message Lead to an error: an error occurred while checking the object 12

Appendix Further possibilities to select an Object Set Additionally to selecting Object Sets from the scratch you have more options, such as: Edit Object Set: Objects Sets can be united or intersected with others and filtered according their attributes Object Type, Object Name, Package and Responsible Object Set from Result: objects that triggered messages can be input for building a new Object Set. Again filtering according to the attributes Object Type, Object Name, Package and Responsible is possible. Additionally, with Web AS 6.20, filtering according to one single check and it s message codes, and message type ( Error, Warning, or Information ) is possible. Some checks may have objects as message parameters (for example database tables used in programs) that can be extracted into a new Object Set when activating the Flag Object Set from Parameters. Object Set from Request: Object Sets can also be extracted from requests/tasks and filtered according the attributes Object Type, Object Name, Package and Responsible. Only main objects (with TADIR program-id R3TR ) will be put into the new Object Set. Declaring Exceptions You can declare exceptions by the use of pseudo-comments in your coding. You will find the appropriate comments in the online documentation of many of the checks. Exceptions for DDIC objects can be declared in table SCIEXCEPT, but in the moment this is not supported by the Code Inspector transaction SCI. Administration of checks In transaction SCI choose from the menu GoTo Test Administration. On this screen you can activate or deactivate single checks and check categories. Changes executed herein will modify the displayed Check Variant tree. When you create a global Check Variant, you have the possibility to declare it as Transportable, which means that it can be transported and reused through the entire transport landscape. Some global Check Variants ( DEFAULT and CHECKMAN ) can only be changed with special authorisation. If you want the Code Inspector to check your objects from workbench with your own Check Variant, create your local DEFAULT. This will override the global one. Restrictions in customer systems In customer systems only objects developed at the customer site can be put into an Object Set and checked in an Inspection. However, it is possible to check a single SAP object within the first 7 days after it has been modified. 13

Limitations of the Code Inspector The Code Inspector currently has the following limitations which you have to bear in mind when you use the tool: Code analysis only for static source code WHERE clause of aselect statement can only be parsed correctly when formulated in disjunctive normal form (which is the recommended form anyway) DB-Views and ABAPJOINs can not be handled hidden LOOPs in called modules can not be detected Switch to modal F4 Help How to let F4 Help switch automatically to the local/global icon (Switch to Dialog/modal Display of F4 Help) From the menu choose Help Settings... On TabStrip F4 Help under User-specific settings choose System defaults for Settings and under System defaults choose Dialog. Answer Pop-Up screen Deactivate ActiveX search help support? with Yes. Code Inspector for release 4.6C Code Inspector has been ported down to release 4.6C/4.6D and can be downloaded from sapservx by interested parties. Important limitations of the 4.6C/4.6D version of Code Inspector are: Only English and German language versions available Since we started downport of the Code Inspector before end of Web AS 6.20 development, only English and German language versions are available No integration into workbench It is not possible to check single objects from workbench (SE24, SE37, SE38, or SE80) with the DEFAULT check variant Pseudo-comments are not working Pseudo-comments to hide messages from Code Inspector will not work on release 4.6C/4.6D Comments and Feedback Both are highly appreciated, please send them to Randolf Eilenberger (Randolf.Eilenberger@sap.com). 14