04-16-2012 10:16 PM
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:
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
04-16-2012 10: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
04-16-2012 10: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
04-23-2012 4: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.
04-24-2012 6: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
04-25-2012 9: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.