Sunteți pe pagina 1din 18

Code Review Checklist

Note:
This category covers all information that is for internal consumption only. Employees may use such information
in the course of their daily work but may not disclose/impart such data outside of the company without prior
written consent of a Company Authority.

Document Objective
This document is used during Code review to check the adherence of all the checkpoints listed in the document and to record the defects
arising out of code review.

Guidelines:

1. Defect Severity Definitions


H - High severity defect (System crash / Incorrect data which impacts other regions / etc.)
M - Medium severity defect (Execution can continue / Incorrect data which does not impact other regions / etc.)
L - Low severity defect (Aesthetics / Message wording / Menu options / Wrong alarms / Help problems / etc.)

2. Defect Type Definitions


Syntax Assignment Interface Checking Function Data System Documentation
Syntax : Any Code Semantics / Syntax related Defects Function : Missing / Wrong Function calls
Assignment : Incorrect/ Missing assignment to a Variable Data : Incorrect data types or wrong data
Interface : Wrong Interface calls,Missing / Erroneous Interfaces System : Wrong usage of system commands
Checking : Incorrect or Missing checks / validation Documentation : Improper Identation / Inadequate comments / Poor readability of code
3. Defect Cause Definitions
COMM: Communication Failure (incorrect information / lost information /failed to communicate a change in information/ Erroneous or inadequate requirements or inputs
specified)
OVER: Oversight (overlooked or forgot something / failed to consider all cases and conditions / Missed Requirements
EDUC: Lack of Education (did not understand the new functionality added / did not understand some aspect of existing system / did not understand programming
language or tool, etc./ Mis-interpretation or Mis-understanding of functionality),Lack of Awareness
TRAN: Transcription Error ( transcribed or copied something incorrectly / knew what to do but just made a mistake)
PROC: Process Problem ( Gap in the process caused the defect) or lack of Standard

Status 3: The status of the defect shall be Open or Closed


Defect Category
(Peer/SQA) 4 Mention whether the defect is out of Peer or SQA
Code Review Checklist QMS/DEV/CL/08
HPQC ID : HPQC Title :
Author : Module ID / Sub Module ID : Program ID :
Program Size (in LOC) : Language : Effort Spent (In Person
(If applicable)
Reviewed by : Review Start Date : Hours):
Review End Date:
Mandatory checks (Yes/No) Remarks
Check modifing objects between ED1 and ECD are in sync or not? No
Check which version of code(ED1 or ECD) is in sync with production? No
Are there any changes which are happening in dev / migrated to ECQ but not to
ECP? No
Is impact analysis done before starting development? Yes
If multiple transport exists, is sequencing maintained? No
Is sonar cube analysis done for the modified objects? No
Inputs for review (Yes/No) Remarks

Are all the reference documents used for Coding available?


Are all the reference documents reviewed and approved (wherever applicable)?
Is the extended program check done for the code and verified ?
Program Attributes Checkpoints (Yes/No) Remarks
Title : Is the Title a concise description ? Yes
Type :Is the type of program specified correctly ?
Yes
Status:Has the status been set following the project standards ?
Yes
Application :Has The ABAP application been set following the project standards ?
Yes
Authorization Group :Has the appropriate authorization group been used
following the project standards ?
Package : Has the appropriate package/development class been used following
the project standards ?

Yes
Transport Request:Has an appropriate project standard for creating and
associating tasks to transport requests been used ? Yes
Technical settings (F7) : Are the appropriate technical settings used ?
-Logical
Data class (USER :Has
or USER1 is to be used when creating been
new customer tables)the
Database the appropriate logical database used following
project standards ?
Remarks
Documentation Checkpoints
Code Comments : Are there adequate comments for ease of maintenance and Yes
reliability ?
Change History: Has a chronological history of modifications maintained following Yes
the project standards
Indentation ? identation done using pretty printer ?
: Is proper Yes
Table Controls

Tab Strips

< Expand The selection to check the constructs >


Table Name : Does it follow a standard naming convention ? (ABxxxxxxxx).
Constants
Check whether Value of constants are not used as part of either its name or its
comment. Yes
Example: C_VA01 = 'VA01'.
Programming
All constants has a functional sense Convention Checkpoints Remarks
Hardcoding :Are Constants used instead of hardcoding ? If the project has a table
to maintain hardcoding then is this table used ? Is Hard Coding avoided in BDC or Yes
Call Transactions
Messages ? text used for extended help ?
:Is long
Are all unused variables , Unused data declaration and other unused program
parts are removed from the program ? Yes
Variables :Is LIKE used over TYPE based on the Version ?
Yes
Event Structure:Has the standard structure for ABAP report coding been followed
as outlined in the Programming Standards documentation? Yes
Is SY-SUBRC :Checked to ensure proper inputs when dealing with tables (for Yes
example: READ TABLE,
WHEN OTHERS SELECT,
with CASE : DoINSERT)
all CASE? statements have WHEN OTHERS to
capture unexpected errors ?
NA
Are CHECK / EXIT Commands avoided ?

Yes
Message Class and Messages : Is the message class defined and used either in NA
the
Textreport line or: inDoes
Elements the MESSAGE
each ABAPstatement depending
have associated text on the project
elements and standards
selection ?
texts from the source code placed within the Text Elements section ?Are text NA
elements used for longer text since it provides possibility for multi-language (Yes/No) Remarks
support ?
Modularization Checkpoints
Is the code broken into logical segments for modularization into
subroutines/functions/packages whenever possible ? Yes
Are formal parameters passed between modular units such as performs or Yes
functions ? executed more than once placed in a form routine ? Is modularity
Is the code
ensured while coding ?

Yes
(Yes/No) Remarks
SQL Queries Checkpoints
Is SELECT INTO preferred Over SELECT APPEND ENDSELECT ?
When an internal table needs to be created directly from one database table, the NA
SELECT INTO is used to fill the
Is INTO CORRESPONDING internal
FIELDS table. ?It is faster to use the INTO TABLE
avoided
version of a SELECT statement than to use APPEND
Instead is the movement of fields by the position in thestatements
SELECT clause ensured ? NA
For Transparent or POOL tables, is the SELECT statement fully qualified with the
WHERE option including data fields that are not part of the key ? NA
For Cluster tables, Are only the fields that are part of the key qualified in the
WHERE option ? Is The CHECK command used to eliminate other records ? NA
Does the ordering of the WHERE statements match the arrangement of the keys in NA
the table records ?
Do the Fields compared in the WHERE clause of SELECT statements have similar
types ? NA
UP TO N ROWS: Is the UPTO 1 ROWS appendage added when the full key is
unknown ?
NA
Is the Primary Key Used ?Is the full table key specified and SELECT SINGLE
specified? NA
Secondary Index Usage :
In the WHERE clause do the fields of the INDEX are in the specified order and
Are Nested
by theSelects
logical or Loops
withavoided through
for the use of
linked AND comparisons equality ? dictionary VIEW or by
using FOR ALL ENTRIES appendage to the SELECT statement ? NA
Are the DB Statement avoided within Loops ?

NA
Is a non-blank / non-empty internal table ensured prior to the command FOR ALL
ENTRIES ?
NA
Column Selection: Does the SELECT statements only query the necessary
NA
columns from a table ? Is SELECT * only used when more than one-third of the
UP TO Nare
columns ROWS: Is the?UPTO 1 ROWS appendage added when the full key is
being used
unknown ?
NA
Sorting :Is SORT ITAB used over SELECT ITAB ORDER BY ? NA
Aggregates : For aggregates ( maximum, minimum sum, average,count) is a
SELECT list with aggregate function used over programming the code ? NA
Internal Tables Checkpoints (Yes/No) Remarks
Nested Loops: Are nested loops avoided ? If unavoidable, is parallel cursor NA
technique utilized orused
Is LOOP…WHERE wherever possible
instead is a View used
of LOOP/CHECK ? ?

NA
Are the key fields specified for READ access explicitly ? NA
When a minimal number of fields within an internal table record are being modified,
Does it use the "transporting" clause, to reduce the amount of data transfer ? NA
When performing BINARY search, Is the internal table first sorted by the key ?
NA
When performing direct reads, Is the BINARY SEARCH used only when the table
contains more than 500 rows ? NA
REFRESH : Are Internal tables refreshed before using, not only at the beginning
of the program but also just before they are used within a modular unit ? NA

OCCURS:Is a number other than zero only specified for the OCCURS parameter if
the required storage is less than 8 kilobytes ? NA
SORT Checkpoints (Yes/No) Remarks
Are all SORT statements qualified with the BY option and limited to the fields that NA
must besort
Are the usedfields
to satisfy processing
specified requirement
while sorting internal?tables?
NA
General Optimization Checkpoints (Yes/No) Remarks
Are large tables such as CDHDR, CDPOS, BSEG, MSEG, MKPF, BKPF, VBFA NA
avoided ?
Are selection screen entries validated right away when applicable ? NA
Are DATA statements defined locally for local variables ? NA
Is TYPE I used for counter or loop index ? NA
Are type conversions avoided ?
NA
Is the table type considered when constructing the SELECT statement ?
NA
Are the existing AND and OR statements within the WHERE clause, replaced by
> and < statements ? NA
Do SELECT statements use as much of the primary key as possible (TRANSP and
POOL tables) ? NA
Do large selects exist that do not match any index ? Is an index usage always
being ensured ? NA
Do select statements exist which causes index fields to be skipped? For Example NA
multiple selects on the same table.
Are there any unnecessary select statements and accessing the same data more NA
than
Doesonce avoided ? Are selecting unsued
array data thatinto
arean
filtered outtable
later?avoided?
Optimized SELECT Statement, fetches internal
NA
Are Long SELECTs within the AT SELECTION-SCREEN event avoided?
NA
MOVE : Are the destination operands kept as the same data type as the source NA
operands wherever
Are all LOOPs, IFs, possible ? similar statements broken down to their simplest
CASEs, and NA
form and Is the nesting uncomplicated unless absolutely
Is the sort done before using any AT statement ? necessary ?
NA
Is AT used instead of ON CHANGE OF ?
NA
Is CASE used over IF ?
IF/CASE :Is the most likely elimination criterion specified first when using the AND NA
or OR operator
Is WHILE ? over DO ?
Preferred
NA
Is CLEAR field used to initialize rather than explicit moves ?
NA

Are Table headers,Work areas and Variables CLEAR at the end of loop process ? NA

Is MOVE CORRESPONDING used for small tables or tables where most, but not
all, fields need to be moved ? NA
Is the table MOVEd as a group when all the fields need to be moved and the NA
attributes
COLLECTfor every field and position are identical ? NA
Is the collect
Impact Statement used when possible instead of doing addition in
Anaylsis Yes
Impact Anaylsis for TR Yes
Code Comparsion Yes
Sequence Yes
QMS/DEV/CL/08

Remarks

Remarks

Remarks

Remarks
Remarks

Remarks

Remarks
Remarks

Remarks

Remarks
Code Review Checklist
HPQC ID : HPQC Title :
Author : Module ID / Sub Program ID :
Program Size (in LOC) : Module ID : :
Language Effort Spent (In
(If applicable) Person Hours):
Reviewed by : Review Start Date Review End Date:
:
Defect No. Location Defect Category Severity 1 Type 2 Cause 3 Defect Description Status 4

(Line No.) (Peer/SQA) 5

Ready for Testing (Yes or No)

Sign-off:
Prepared by: <Name > <Sign> <Date>
Reviewed by: <Name > <Sign> <Date>
Audited by: <Name > <Sign> <Date>
Approved by: <Name > <Sign> <Date>
Defect Summary
Severity High Medium Low Total
0 0 0 0
Type Syntax Assignment Interface Function Data System Documentation
0 0 0 0 0 0 0
Cause COMM OVER EDUC TRAN PROC
0 0 0 0 0
Guidelines

1. Defect Severity Definitions


H - High severity defect (System crash / Incorrect data which impacts other regions / etc.)
M - Medium severity defect (Execution can continue / Incorrect data which does not impact other regions / etc.)
L - Low severity defect (Aesthetics / Message wording / Menu options / Wrong alarms / Help problems / etc.)

2. Defect Type Definitions


Syntax Assignment Interface Checking Function Data System Documentation
Refer Cover Sheet for more details

3. Defect Cause Definitions


COMM: Communication Failure (incorrect information / lost information /f ailed to communicate a change in information)
OVER: Oversight (overlooked or forgot something / failed to consider all cases and conditions)
EDUC: Lack of Education (did not understand the new functionality added / did not understand some aspect of existing system / did not understand programming language or tool, etc.)
TRAN: Transcription Error ( transcribed or copied something incorrectly / knew what to do but just made a mistake)
PROC: Process Problem ( Gap in the process caused the defect) or lack of Standard
Status 3: The status of the defect shall be Open or Closed
Defect
Category
(Peer/SQA) 4 Mention whether the defect is out of Peer or SQA
Cause Decription
Total
0
language or tool, etc.)

S-ar putea să vă placă și