cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

OOP code review

Former Member

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi,

Found this in net: http://web.mit.edu/ist/org/admincomputing/dev/abap_review_check_list.htm

Hope it helps you.

Regards,

Anjali

Former Member
0 Likes

Thanks for ur response.

I was looking specifically at Object oriented ABAP check list - for eg. need for a 'try catch' block when u have type casting etc.

Would be gr8 if someone can help me on that!

Thanks!

Former Member
0 Likes

Hi,

Here are some. I dont have a link and site which can give u all that.

Shall give a few points here:

1. The nesting of IF statements should be limited. When multiple conditions are being tested, the appropriateness of the CASE statement should be considered

2. The CASE statement uses WHEN OTHERS

3. When possible, do not use the TRANSLATE statement, because it is not efficient.

4. Always specify your conditions in the Where clause instead of checking

5. SELECT INTO preferred to SELECT

6. Avoid select * to the max.

7. Use primary key while selecting.

8. Avoid nested selects and nested loops

9. Avoid the use of the ORDER BY clause on a SELECT statement that sorts by non-indexed fields.

10. SORT ITAB ORDER BY preferred over SORT ITAB

11. Use multiple MOVE statements instead of a single MOVE-CORRESPONDING statement.

12. LOOP…WHERE is prefered to LOOP/CHECK

13. use binary search while readin

14. Itab2[] = Itab1[] is preferred to

Loop at Itab1.

Itab2 = Itab1.

Append Itab2.

Endloop.

15. use DESCRIBE instead of COUNT

Hope these will help you your review process.

Also check out this link:

http://www.sap-basis-abap.com/abap/abap-4-development-code-efficiency-guidelines.htm

http://www.ams.utoronto.ca/userfiles/page_attachments/Library/1/Developmentstandards_guidelines_3356...

Best Regards,

Anjali

Answers (3)

Answers (3)

Former Member
0 Likes

This message was moderated.

Former Member
0 Likes

Hello Aarthi,

I beleive your are about talking ABAP Code Inspector.If that is so,please follow the following points to view the lists of checks SAP does :

1. Execute transaction SCI

2. Create an Inspection(just click the create button even without giving a name)

3. It'll show the program/function module/class.. to be inspected

4. It also shows check variants ,ie.the checks you would want perfrom on the selected object.

5.Click on the 'information' button for each check,which will show the lists of all checks it performs.

Please note each category has many no of checks which can be seen by the collapsing the node.

I hope this is pretty clear.

Please revert for further clarifications.

Regards,

Partha.

Message was edited by: parthasarathy G

Former Member
0 Likes

Thanks Anjali & Partha!

Let me clarify my Q once again. What i need to know is, what are the things you shd keep in mind when u code using Object Oriented ABAP!

For eg: Use of TRY.....CATCH when you use type casting.

Similarly wat else shd u keep in mind!

Thanks.

abdul_hakim
Active Contributor
0 Likes

Hi Aarthi,

U can use ABAP Unit.

Please check http://help.sap.com

Regards,

Abdul