Sie sind auf Seite 1von 2

These are some of the factors to be considered for ABAP code review.

1. We should follow the proper Naming standards through out the program
2. REPORT <name> LINE-SIZE <s> LINE-COUNT <C> MESSAGE-ID <id>.
(In Classical reports we should mention the additions LINE-COUNT and LINE-SIZE. They should be avoided in
ALV's.Reason is maximum size of line is 255char which is overwritten with the value specified in LINE-SIZE
which will truncate the data.)
3. MESSAGE-ID <id>
(If we use same message class through out the Report program we should use MESSAGE-ID addition.)
4. No TABLES statement should be used because it is unnecessary wastage of memory.
5. We should not use OCCURS <n> addition for declaring internal tables.
(Reason for that is memory will be allocated to the Internal table when it is declared.)
6. We should use TYPES to define structure and later define Internal tables and Work area separately.
7. Hard coding should be avoided. Text elements should be used for that because they are language dependent.
(This helps while language translation)
8. PERFORM should be used which helps in improving readability, reusability and for enhancing performance.
Parameters should be passed by USING , CHANGING and TABLES STATEMENT.
(LIKE should not be used, we should use TYPE)
(Proper Documentation and Indentation is necessary).
9. Validations should be done on all mandatory fields mainly on the selection screen.
10. We should use all key fields in the WHERE to filter the data for the maximum extent.
11.We should check the SY-SUBRC values which are returned by SELECT statement to stop unnecessary
execution of statements.
12. We should SORT while using READ statement
14. We should SORT internal table data while using DELETE ADJACENT DUPLICATES statement.
13. We should handle the errors by handling the SY-SUBRC values from Function Modules.
14. CHECK should not be used because further processing will not take place.
15. We should avoid Nested loops, Nested IF-ELSE, SELECT inside LOOPS etc.
16. At the end we should also avoid the errors and warning messages by using EXTENDED PROGRAM
CHECK and CODE INSPECTOR.

these are the things which shd be taken care of while doing code review
prepare a xls for every object u review and mark a tik against it it not then tell the developer to make necessary
changes in the code.
1 There should be no nested select statement
2 There should be SY-SUBRC check at all possible places
3 Has usage of select-endselect been avoided wherever possible
4 There should be no perform statement inside select-endselect
5 Have variables been cleared after use
6 Have itabs been refreshed after use
7 Is documentation attached to every object
8 Has Pretty printer been used
9 Use of text elements no hard coding
10 Have constants been used wherever applicable
11 Check ABAP Code has appropriate Comments
12 Define constants wherever possible instead of hard coding. (e.g. c_planning value u2018PL instead of hard
coding u2018PLu2019).
13 No hard coding of break points in the source code.
14 Code executed more than once should be placed in a form routine.
15 No hard coding of values in BDC or Call Transaction unless specified in function specifications.
16 Variables declared within programs have reference of the corresponding table/structure fields
17 For custom tables, table maintenance generator is used for generating table maintenance interface.
18 Use SELECT SINGLE when possible.
19 Use SELECT against views or FOR ALL ENTRIES IN when possible.
20 Check the internal table in the "For all entries" Clause is not Blank
21 If structures match, use MOVE instead of MOVE-CORRESPONDING.
22 Use SELECT fields FROM database tables INTO TABLE t_tab instead of APPEND statements.
23 Avoid ORDER BY unless ordering by an index.
24 SORT and READ TABLE t_tab WITH KEY u2026 BINARY SEARCH.
26 "Avoid SELECTu2026ENDSELECT within another SELECTu2026ENDSELECT. Load data in internal tables.
To process a join, use a view wherever possible instead of nested SELECT statements. Network load is
considerably less."
27 Use text elements for Longer text.(It provides possibility for multi-language support).
28 Use CASE statement usage instead of IFu2026ELSEIF.
29 Check if the warning, error messages etc. are relevant and have proper format
30 Check if in the LOOP .. ENDLOOP , if we have used AT u2026 ENDAT,we should have copied the work area
prior to AT statement in a Buffer (work area) and use that within the AT .. ENDAT to fetch the fields of the work
area
31 While making changes New Fields are added to the End of the Structure/Table unless specified differently
32 Ensure that all the Database Changes are in a separate request
33 Check if Start of Changes and End of Changes are maintained for all the new code we write in existing
programs and also ensure that we have maintained History for the changes done.
Format : ENTCR_XXXX <Description> : Start of Changes
ENTCR_XXXX <Description> : End of Changes"
34 Add a task for the User ID of the Onsite Member in your Change Request, or change the ownership of your
request to the User ID of Onsite Member
35 Check SY-SUBRC after select query before further processing.

Das könnte Ihnen auch gefallen