Skip to Content
author's profile photo Former Member
Former Member

How to ensure code quality?

Hi there.

I am fairly new to SAP/ABAP and would like to ensure the quality of code with goes into our SAP ERP. If we could trust all the developers who work with us, then this task would be much easily achieved. Even if that were the case I still think those techniques are quite helpful (not to say, essential).

In Java, or any other mainstream platform, they use TDD, BDD, Continuous Integration (like Jenkins) and other plugins, like:

  • PMD and FindBugs (Search for bad and highly complex written pieces of code);
  • Selenium (mostly for Web applications);
  • Sonar (Check the test coverage and show many other "metrics" about the code, really cool stuff);
  • Fuzzing Test (Check if there is any basic security flaw);
  • JMeter (Check the performance of the application and its integrations and how any new commit affects it);

We could add many other plugins if we want to, but those are the basic ones which most serious projects use when the platform is Java. I know most of you guys are familiar with those concepts and techniques, which have been in use since last millenium .

Now, what are the tools, concepts or techniques which can be used in SAP/ABAP to achieve similar level of code quality and also quick feedback? I have found there is ABAPUnit (for the TDD part), but I wasn't able to find anyone who used it in real projects. What about BDD, CI...?

Even better, what are the companies using those?

Any help would be much appreciated.

Regards

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Posted on Apr 16, 2012 at 09:27 PM

    Hello,

    In my experience most of good developers mainly concentrate on -

    1. Maintainability

    2. Readability

    3. As much as possible less database hit and processing in application server

    There are few SAP provided tools like code inspector, extended syntax check, memory usage global variables are together can guide to good performed code.

    Beside that there are some settings in SAP ABAP editor like - give error if read without binary search for sorted table helps to improve performance.

    Thanks

    Krish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 16, 2012 at 09:45 PM

    In SAP you have tools like Code Inspector (SCI), Extended Program check (SLIN), Program analysis (SAT & ST12). You can use these tools to make sure, they pass from the standard checks.

    There is not much written content about the ABAP Units. I know there are people who have used it who are working on Agile and TDD. I have used it couple of clients place. Due to the face - lack of mock objects make is difficult to write Unit Tests for few of the methods. The code needs to separate out the logic vs access to DB, calls to BAPIs, etc.

    Regards,
    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 23, 2012 at 03:18 AM

    Hi Jean,

    The basic tool used for ensuring code quality is the Extended program check (SLIN).

    To access it:

    Go to the program editor -> Program (in the above menu bar) -> Check -> Extended program check.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 24, 2012 at 05:10 PM

    Hello Jean,

    SAP offers various tools and techniques to ensure high quality software. These tools underly an evolution and depending on the release of your system may offer more or less features.

    Your system should contain some documentation on quality related tools and their capabilities. So for the tool part you may get some info from the system itself, as starting point you may try transaction /NABAPHELP and search for the term ABAP Unit. The hits should somehow refer to a page like this:

    http://help.sap.com/saphelp_nw73/helpdata/en/49/1aa66f87041903e10000000a42189c/content.htm

    Best Regards

    Klaus

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 25, 2012 at 08:37 AM

    Hi Jean,

    There are 2 things to ensure this:

    1. Standard Tools inside SAP

    2. Code review checklist (which we can prepare)

    For 1.

    Tthe tools are extended program check (SLIN) and code inspector.

    They will basically highlight general abnormalities. If those abnormalities are corrected, the code will be generally ok. However as below,

    For 2.

    However, there are some points eg. Clearing a itab/variable/structure before populating, authorization check in our program. change history logging inside the code, hardcoding and constants, checking if ITAB is not empty just before using FOR all entires, etc which standard tools will not detect normally. Hence for such things, we can design a CHECKLIST kind of document (based on our experience and general guidelines). The code should be reviewed against this checklist to ensure better quality.

    Hope this helps.

    Regards,

    Amit Mittal.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.