2014 Jun 18 12:10 PM
Every programmer have their habit to code, but this lead a problem , it is difficult to read other people's code, especially the complex logic.
So how to establish code standards to make the abap code more readability?
I came up with this:
1.Unify the naming rule.
2.Reduce the nest of 'if' statement. (better in less than 4 if statement in one block )
3.Use more Perform to replace the big code block.
Is there any other standards to make our abap code more readability ? (if we establish the standards, in sap is there any tool to help us to follow the rule we set ?)
Every programmer have their habit to code, but this lead a problem , it is difficult to read other people's code, especially the complex logic.
So how to establish code standards to make the abap code more readability?
I came up with this:
1.Unify the naming rule.
2.Reduce the nest of 'if' statement. (better in less than 4 if statement in one block )
3.Use more Perform to replace the big code block.
Is there any other standards to make our abap code more readability ? (if we establish the standards, in sap is there any tool to help us to follow the rule we set ?)
2014 Jun 18 12:43 PM
Hi Zhang,
Those things have been largely discussed here on SCN. You can even find a whole section from ABAP Documentation with code guidelines and best practices.
Also take a look into SAP Code Inspector (transaction SCI).
Regards
2014 Jun 18 1:25 PM
There are a number of things you could do. Some of which are:
I would recommend creating your own in-house document on Coding standards, some of which you can control with the code inspector.
It is also possible to set up the transport request in such a way that objects that do not pass the SCI test are not allowed to be released.
I would also assign a senior developer to act as quality control for all developments. You can have a rotation scenario where this work can be divided by the number of senior developers you have.