Even small changes in custom SAP code can have big - and sometimes negatve - impacts if not done correctly. There are however ways to solve this problem. [shutterstock: 473211280,turgaygundogdu]
Just like in life, small things can have a big impact on SAP development. For example, the quality of the customer’s code naturally depends on several factors, like the correct interception of exceptions, the use of sufficient comments, and making sure that database access does not unnecessarily waste any resources.
If one takes a closer look at customers’ development guidelines, one often finds a passage dictating naming conventions. Applying these naming conventions to all objects is not an easy task though.
For this scenario, CodeInspector can be used in standard SAP systems to check if there are naming convention violations within the coding. But one cannot forget that there are limitations: While CodeInspector might be checking the code for variables and constants which do not adhere to the naming conventions, it cannot name the errors found individually, but rather creates a feedback message saying that there are errors in the scanned code.
An even bigger disadvantage is that while it is possible to force naming conventions upon object names, CodeInspector is limited to coding only. Therefore, guidelines for, e.g. transport objects, customizing entries, and roles cannot be checked.
“An even bigger disadvantage is that (…) CodeInspector is limited to coding only.”
For exactly this purpose, we created a small add on – the Virtual Forge NamingGuard – which is now available. This tool enables the user to check transport objects on the adherence to correct naming conventions. Furthermore, NamingGuard is extremely flexible when it comes to the definition of conventions: variables, exceptions, whitelists – with NamingGuard, virtually any possibility can be covered.
This saves time and effort. Of course, one could map these conventions with regular expressions, but such a project would take weeks, if not months, to complete. NamingGuard can be set up within few days, including all naming conventions. These can even be uploaded via Excel, enabling a pre-configured version of NamingGuard to be transported onto the development system. It does not get any simpler.
NamingGuard does not reach its full potential until it is integrated with our CodeProfiler and our TransportProfiler however. Integrating NamingGuard with CodeProfiler enables you to define a wrong naming convention as a “mandatory finding”.
By doing that, it is effectively prevented that objects with wrong naming are even created. Integrating NamingGuard with TransportProfiler even takes this a step farther: by doing this, it will be checked within the productive system if an object name already exists and warns the user accordingly or even prevents the creation of an object that does not adhere to the naming conventions in the first place.