0% found this document useful (0 votes)
23 views9 pages

Abap Code Review Check List

Uploaded by

Mayuresh Pawar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views9 pages

Abap Code Review Check List

Uploaded by

Mayuresh Pawar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Vrata

Tech
ABAP Code Review Checklist
Quality
Procedures
Project : <Project Name> Final Review Status
Developer Auditor
File name : ABAP Code Review Checklist_I/E_nnnn,I-Interface,E-enhancement Status status
ZV1U_ESO_CREATE_ORDER (Webdynpro
Progra Component) class : ZV1U_ESO_CREAT_ORDER_ASST
m method COST_CENTER_VALIDATION
Name:
Description:
Developer: Santhosh Kumar Konda
Auditor: Seshagiri Ravi Kiran Y
Audit Date
Sl.No Program Objects
Program Definition
Attributes
1
Program Name should begin with ZAXXX_A(A - Application area ; sss -
Subcategory - REP for reports, IN for inbound interface, OUT for outbound
interface etc. NA NA
XX = system name (1U, DAM).
2 Title of the program NA NA
4 Status(This should always be ‘K’ for ABAPs developed by anyone other than NA NA
SAP).
5 Application (This should always be 2nd and 3rd character of the name) NA NA
6 Ex. Y_REPORT) NA NA
7 Authorization Group (If Type is ‘I’, an authorization group is not needed). NA NA
Text Elements
8 Title and Headers
If the report definition says ‘no standard page headings’ or if no report is
produced in the ABAP, then these can be blank; otherwise they must be
filled in. Normally this comes from the title given in the attributes.
Selection Texts
If the ABAP uses Selection Options or Parameters, they must be documented
here.

Text Symbols
Texts which are used in cloumn headings, Write statements should not be NA NA
hard coded in the program.Must use Text-symbols for this.
8 b) Selection Texts NA NA
8 c) Text Symbols should be provided with string associated with text
element Ex: 'Customer Name'(001) NA NA
Program History Documentation

CTS Document / Naming Standards (Use SE09)


9
1) CR_<Application Area>-<CR Title from HPSM>
2) Before releasing the TR-One TOC should be created using ZSE10 which
will automatically generates main TR comonents like Done Done
ZCHANGE_REQUEST,ZSSOLID etc
10 Report Definition should contain:
Report xxxxxxxx NO STANDARD PAGE HEADING MESSAGE-ID xx NA NA
Program Declaration
Naming Standards:
All Data Declarations to be at the top of the program before any events starts as per
11 customer naming standards
Data Definition
a) Work areas for internal tables(with comments)
Object Naming
Internal table 'T_...',e.g.: 'T_YEAR'.
Structures 'S_...',e.g. S_DATE’
Constants ‚C_...’,e.g. ‚C_PI’
Global variables
‚G_...’e.g. G_REPID
Parameters ‚P_...’ e.g. P_VBELN
Select-Options‚ SO_...’ e.g. ‚SO_BUKRS’
Types ‚TY_...’e.g. ‚TY_TABTYP’
Reference variables‚R_...e.g.
‚R_ALV’’ Local constants‚L_...’ e.g.
‚LC_LOCAL’ Local variables‚L_...’
e.g. ‚L_LOCAL’ Local
structures‘LS_...’ e.g. ‘LS_DATE’
Local tables ‘LT_...’e.g. LT_YEAR’
Local types ‘LTY_...’e.g.
‘LTY_TYPE’ Classes ‘CL_...’e.g.
‘CL_CLASS’
Ranges ‘RA_...’e.g. ‘RA_RANGE’ Done Done
Radio Button ‘RB_...’
Check Box ‘CB_...’
b) Field Symbols begin with fs_ NA NA
Reusable Objects Definition
Sourcecode of all subroutines should be locked in the separate include and every
12 new subrountine should be created at the bottom of the include
Function Modules, Classes, DDIC Structures, Methods,Subroutines, name
should reflect the purpose Done Done
SQL Queries
13 Select Statement
Data base selections, [ 1)Check the use of * in select statements,
preferable to have a field list always( Select * to be used only when more
than 1/3 of the total fields required for processing for the DB table_ 2)Check
the usage of Start & End-of-Selection events where ever necessary] NA NA
SY-SUBRC is checked after database calls and other activities when logic
must be used for Error Handling. NA NA
When an internal table needs to be created directly from one database
table,the SELECT INTO is used to fill the internal table.It is faster to use INTO
version of a SELECT statement rather than use APPEND NA NA
Avoid SELECT …. ORDERBY .Better to use SORT after appending into an
Internal Table. NA NA
Avoid GROUP BY and DISTINCT operations On SELECT statements whenever
possible. NA NA

SELECT FOR ALL ENTRIES used outside of loops, with a read used inside the NA NA
loop.
Nested SELECTS and Loops - these are avoided through the use of a
dictionary NA NA
VIEW or by using FOR ALL ENTRIES appendage to the SELECT statement.
1) If FOR ALL ENTRIES is used, the table size is verified > 0. NA NA
2) If key fields are not used, the DELETE ADJACENT command should be
used - if appropriate. NA NA
The ordering of the WHERE Statements match the arrangement of the keys
in the table records. NA NA

Fields compared in the WHERE clause of the SELECT statements have NA NA


similar types.
SELECTION: Check if the fields of the <SELECT> instruction in the same
order of the structure declaration or the internal table. If so check to see if
<INTO CORRESPONDING FIELDS OF> is avoided NA NA
The use of negative logic in SELECT's is avoided whenever possible . NA NA
When using the AND or OR operator ,the most likely elimination criteria is
specified first,and so on down to the least likely criteria. NA NA
Aggregrate functions (SUM,AVG,MIN,MAX) shall be used whenever possible NA NA
When using ‘for all entries’, must check that the table used in the where
clause is not empty. NA NA
Primary Key Used - Whenever possible ,the full table key is specified and
SELECT SINGLE is specified NA NA

Secondary Index Usage - When possible ,in the Where clause the fields of
the INDEX are in the specified order and linked by the logical AND with NA NA
comparisons for equality .
A Secondary Index has been considered if : NA NA
1) Non-key fields or fields for which index support does not exist are
repeatedly used to make selections. NA NA
2) Only a small part of a large table is selected .(<5%) NA NA
3) The WHERE condition of the SELECT is simple . NA NA
4) Fields that make up the index significantly reduce the selection set of
records by matching the unique Qualifiers in the WHERE clause . NA NA
For relation operators Use 'EQ' 'GT' 'LT' 'GE' 'LE' instead of NA NA
symbols '=' '>' '<' etc…
Note : Prior to creating secondary indexes ,consultation with the Database
administrator is required.
Data Processing
14 Avoid Negative Logic NA NA
Use structured coding style - do not use “STOP” to halt a program. The use
of “EXIT” should be used only when there is no other structured method for
exiting a loop or form. NA NA
or Form NA NA
Currency Calculations are performed between currency fields only - Both
fields must have the Same Currency key. NA NA
All LOOPS,Ifs,CASEs and similar statements are broken down to their
simplest form and nesting is not complicated unless absolutely necessary NA NA
MOVE statements - when possible ,the destination operands are kept as
the same data type as the source operands NA NA
CASE statement preferred to multiple ELSEIFs . NA NA
WHILE preferred Over DO . NA NA
CLEAR command - CLEAR <field> is used to initialize rather than explicit NA NA
moves.
Table headers and work areas are CLEARed at the end of loop processing . NA NA
MOVE CORRESPONDING is only used for small tables or tables where most
but not all ,fields need to be moved . NA NA
when all fields need to be moved and the attributes for every field and
Position are identical ,the table is moved as a group NA NA
When COLLECT semantics are needed,the COLLECT command is used . NA NA
Done
Extracts-All fields involved in sort options ( user specified / hardcorded in the
15 abap program) of the output data shall be the part of the fieldgroup'Header'. NA NA
16 Internal Tables-Nested Loops are avoided . NA NA
Use APPEND LINES OF <I_table> to merge two internal tables . NA NA
APPEND SORTED BY used only for reportrs such as "TOP 50" or "TOP 100" . NA NA
For reading ,LOOP …. WHERE is used instead of LOOP/CHECK . NA NA
For READ operations ,the key fields are specified for the READ access NA NA
explicitly .
when performing direct reads,the BINARY SEARCH is used only when the
table contains more than 500 rows and must be sorted by the key Done Done
REFRESH <table> is used to initialize table records .Internal tables are
REFRESHed when needed. NA NA
The FREE command is used to release the memory allocated to internal
tables when the program is finished processing the data in the table NA NA
SORT <itab> ORDER BY preferred over SORT ITAB NA NA
OCCURS clause - not used since we are setting the initial size for all internal NA NA
tables.
Messages
Every Message (Error/Information/Warning) in the program has a comment
17 beforehand for explanation . NA NA
If function modules used ,every error message should be captured and
18 processed accordingly . NA NA
Extended Code Check
Check for any unused code lines(i.e) Commented code lines in case of new
development and in case of TDL / PQR , the commented lines should have
19 the 'CTS Number' within the comment string in the editor Done Done
20 Check for any division by Zero NA NA
An Extended Syntax Check has been run on tha ABAP Program . The Run
21 time Trace Analysis (SE30) NA NA
The Run time Trace Analysis (SE30) has been used to evaluate the hit lists
of the top CPU consumers,table accesses,and to get a general idea of the
22 coding run during the program execution . NA NA
Documentation
23 History Documentations on every report/include program Done Done

Comments required if
New logic - Purpose of new logic why it has been added
Inactive logic - If any of the existing logic is commented, it should be clearly
why it has been commented
Complex logic - Detailed explanation is required if logic written is complex /
24 assumtions / forcasting the future issues Done Done
25 Comments on processing blocks like methods, subroutines, function Done Done
modules etc
Programming Modularization & Optimi
Spacing : Please leave blank lines between coding structures or clearly
26 definable coding blocks. Done Done
The Standard structure for coding a ABAP Program has been followed as
27 outlined in the Development Standards Document NA NA
28 Modularize code - Forms Should be used to group Logical Segments of Code. NA NA
29 Modularize the code as much as possible using FORM Routines . NA NA
Function Group & Function Modul
30 Function Group should start with Z_* NA NA

Function Modules should start with Z_*


Parameters in Function Modules starting
with: import parameter: 'IMP_...'
export parameter: 'EXP_...'
changing parameter:'CHG_...'
31 table parameter: 'TAB_...' NA NA
Function Groups and Function Modules should be stored in the applicaton
32 specific packages NA NA
Naming Standards for ALE/EDI/IDoc Relate
Idoc Types Basic Type-Zapplication area _ desc_ sequence no (for
ex: ZV1U_MBGMCR02) Namespace-
33 Z, NA NA
Sequence number-nnn
Idoc segments :Z1NNNN
34 Namespace-Z, Meaningful text -NNNNN NA NA
Program History & modifications

Template for Program modifications:Ref program


:Z_TEMPLATE_PROGRAM_01
************************ MODIFICATION LOG
***************************
* Date User name TR Change Request Case ref. *
* dd-mm-yyyy Description *
* -*
*2005-03-05 Programmer D1UK987816 C01458464
35 * Done Done
* Description of what changes are made. *
* Changes are documented using FMDK902069. *
******************************************************************************
*****
lineitem-rectype = 310.
if lineitem-rectype = 610
* Begin of Comment by USERID on DD.MM.YYYY for CR#<CR Number>
----This applies only for the logic which is being commented
* End of Comment by USERID on DD.MM.YYYY for CR#<CR Number>
* Begin of Insert by USERID on DD.MM.YYYY for CR#<CR Number>
----This applies only for the new logic that has been written
* End of Insert by USERID on DD.MM.YYYY for CR#<CR Number>
* Begin of Changes by USERID on DD.MM.YYYY for CR#<CR Number>
----This applies only if logic is commented and new logic is replaced
* End of Changes by USERID on DD.MM.YYYY for CR#<CR
36 Done Done
Number> endif.
Vrata Tech Solutions

Completed

Remarks

You might also like