For almost every tiny detail on your SAP ABAP environment, it is well known that there is most definitely a blog post, wiki, SCN Q&A, Notes/KBA that gives you technical guidance. We have now unearthed a treasure map. But to navigate the perils and reach the X mark pointing to the treasure, we are expected to possess incredible agility. We have to jump, skip and hang on for dear life to prevent us from falling down the many pitfalls. If these traps and pitfalls are the errors and incomplete output, our skill and agility can be equated to logic.

The very first thing in order to build strong logic muscles in ABAP is to make every error your pal. Your closest buddies are to become the syntax errors, error messages and short dumps. Short Dump is that talkative friend who just dumps every single detail about everything they know at the drop of a hat. In the architecture of a software product, error messages play a very vital role. Its a reminder to the developer about an area of code that hasn’t been improved yet and an indication to the user to acknowledge this characteristic about the software. There are also research done on error messages which suggests that messages do not simply alert users to problems, they guide problem-solving behavior. So, the more you explore and encounter different errors, you develop an insight about how to code and format data so as to work around the error. for e.g. use a conditional statement to guide the program flow as the simplest instance.

Next comes the knowledge of best practices. You only need to pay attention to the guidelines and stylesheets to understand how your code should appear. It is important to understand the reasons why certain things are termed as bad. When writing clean code becomes a habit, you simplify the hardest of problems, naturally. If you can self-review your own code as you write it and make conscious effort into exploring the best version of a statement to be used in your particular program, soon you end up remembering these from instinct and will impact your logic very positively. I have already covered code quality in a previous blog post here.

Develop in-depth awareness about your project system landscape. Keep in mind the numbers, the versions, the system details. This is very crucial as it directly impacts the code that you are meant to develop. Take time in understanding the tools available to you in your development environment. Understand the statements you have to work with. Explore the standard ABAP analysis tools. Everything you need to have in order to analyze and understand about a system is covered here. I have already spoken about the debugger in detail in my second edition here.

One of my colleagues had asked me how can one become better at logic. Although I have only listed down only three points here in this article, these are clearly the lowest rungs of a very tall ladder that one has to climb. What other points do you have to mention to become better at implementing ABAP logic?