Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Code review tools & procedures

Former Member
0 Likes
5,619

Hi,

we've decided to go through a code review process in order to gain/maintain better code (e.g.,, standard, efficient,..). after a short search we've got a list of provided tools & transactions (e.g., code inspector, ST05). now, i need to set a procedure (for our abap developers) to ensure developed code standards quality.

what tools should i use? at what order? at what development phase?

looking forward for your comments.

Regards

Uri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,717

Hi,

You can search in SCN for related articles and blogs.

ST05 and SE30 are tools which you can use for performance improvement. Use the tips and tricks in SE30.

Code Inspector and Extended Program Check will help you in efficient programing.

There are several other things which you need to follow as follows:-

1. Proper Naming Convention of variables for better code understanding.

2. Avoid nested selects.

3. Avoid nested loops whenever possible.

4. Use of SORT and BINARY SEARCH in READ statements wherever possible.

5. SY-SUBRC checks wherever needed.

6. Avoid ZERO DIVIDE errors.

7. Use of FOR ALL ENTRIES as needed.

8. Better handling of messages and exception.

9. Avoiding endless looping.

These are some points. You can add more as per your knowlegde.

Create a code review checklist document and ask your developers to follow the same.

I can share a template if you need.

Regards,

Ankur Parab

Edited by: Ankur Parab on Sep 17, 2009 3:20 PM

Edited by: Ankur Parab on Sep 17, 2009 3:34 PM

5 REPLIES 5
Read only

Former Member
0 Likes
2,718

Hi,

You can search in SCN for related articles and blogs.

ST05 and SE30 are tools which you can use for performance improvement. Use the tips and tricks in SE30.

Code Inspector and Extended Program Check will help you in efficient programing.

There are several other things which you need to follow as follows:-

1. Proper Naming Convention of variables for better code understanding.

2. Avoid nested selects.

3. Avoid nested loops whenever possible.

4. Use of SORT and BINARY SEARCH in READ statements wherever possible.

5. SY-SUBRC checks wherever needed.

6. Avoid ZERO DIVIDE errors.

7. Use of FOR ALL ENTRIES as needed.

8. Better handling of messages and exception.

9. Avoiding endless looping.

These are some points. You can add more as per your knowlegde.

Create a code review checklist document and ask your developers to follow the same.

I can share a template if you need.

Regards,

Ankur Parab

Edited by: Ankur Parab on Sep 17, 2009 3:20 PM

Edited by: Ankur Parab on Sep 17, 2009 3:34 PM

Read only

0 Likes
2,717

Ankur,

sharing your template would be great, pleas do. it will be helpful.

10x

Uri

Read only

0 Likes
2,717

uri,

code inspector result will any ways create a result set for you which you can take as code review checklist.

Read only

Former Member
0 Likes
2,717

use code inspector: TCode: SCI and SCII.

you can also trigger code inspector from any program from SE38->program->check->code inspector.

this will check the code as per standard check variant. you can also use own variants by using SCI tcode

most checks described above can be done by code inspector

Read only

Former Member
0 Likes
2,717

Hi,

Adding to Ankur's list,

You should take care of the following of the code:

1.Remove the dead code

2.Remove the redundant codes.These 2 are for better readability.

3.Avoid Nested-loops

4.Avoid using select * and use select <fields required>

5.Avoid the use of INTO CORRESPONDING command in the select query

6.Avoid using hashed/sorted internal table types if the data volume is large.

7.Use comments as and when required.

8.Keep a track of changes in the history of the program.

Mostly it is in the stlye of the coding you follow. It is always a best practice to have a checklist given to both the programmer and reviewer.

Rgds,

Swetha