Code Quality: Small Solution – Big Impact
[shutterstock_473211280]
Blog SOH and S/4

Code Quality: Small Solution – Big Impact

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.

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.

Source:
Virtual Forge

About the author

Markus Schumacher, Virtual Forge

Dr. Markus Schumacher is co-founder and CEO of Virtual Forge.

Add Comment

Click here to post a comment

Sign up for e3zine´s biweekly newsbites

Please do not use administrative mail adresses like "noreply@..", "admin@.." or similar as these may get blocked for security reasons.

We use rapidmail for dispatching our newsletter. By signing up, you agree that the data you have entered will be transmitted to rapidmail. Please take note of their terms and conditions and privacy policy.termsandconditions.

Our Authors