Dear Community, the book “Clean ABAP: A Style Guide for Developers” was published. An important milestone in my opinion. Since I wrote a book review for heise Developer in German, I also created an English version based on my source texts for the SAP Community. Certainly not the typical book review. But definitely from me, written with belief and heart 😉
As some of you may know, ABAP has been used for around 40 years to implement business requirements in companies from various industries … some of you may have been there from the start. Others got on later. Noteworthy: the programming language has extensive downward compatibility since its release. This creates investment security that is immensely important for the companies we are working for. At the same time this creates a variety of challenges for us, the developers.
On the one hand, applications have to be maintained for many years. Their basic development can be a long time ago. Accordingly, they were developed with a different understanding of programming and also with the ABAP possibilities of that time. The traceability is not always easy here. At the same time, new applications are created every day.
Maintenance and new development have in common that they should of course be designed according to a modern understanding of programming. And also with the modern possibilities of ABAP. Because a lot has happened here in the last 10 years. ABAP has been greatly modernized. New technologies such as the RESTful Application Programming Model have been added. At the same time, there are also new options for improving the maintainability of source code. So today we also speak of “Modern ABAP“.
Ultimately, some tasks can be solved differently while working with ABAP due to the history. Sometimes there are two or three possible solutions. But only one of them corresponds to the modern understanding of ABAP. This is not just a challenge for beginners. Even experienced developers have to constantly question their specialist knowledge and, as with all programming languages, are not allowed to rest on their already collected knowledge. Things eventually change. Any orientation and help in this constant process of changes is therefore gratefully accepted.
The story begins
And that is where the story of Klaus Haeuptle and Florian Hoffmann, two SAP employees, begins. Both were confronted with the situation described above. In response, they began to apply clean code principles with regard to ABAP and to discuss and document them with colleagues from their product area. And later to expand the discussion to the entire SAP company. This resulted in an Inner Source project, an Open Source like culture within SAP. This is a big step for a company with almost 100,000 employees worldwide, including many developers.
In May 2019 the Inner Source project became an Open Source project, because the experiences were made available to everyone in a GitHub repository called “Clean ABAP“. Everyone – this actually means a lot of people. Because SAP has over 300,000 customers worldwide. In turn, there is a complex ecosystem of consulting and development houses around SAP and its customers.
They accepted the repository offer more than positively (including me). Thanks to the possibilities of GitHub, everyone had the chance to expand the repository further. Everyone was able to contribute their experiences and contribute changes. In the course of this, translations into languages such as Chinese and French were created.
This success story could end there – but it doesn’t. Klaus Haeuptle and Florian Hoffmann initially got support. By Rodrigo Jordao, Michel Martin, Anagha Ravinarayan (sorry, couldn’t identify SAP Community account) and Kai Westerholz. As an international team, they created the book “Clean ABAP”, which has recently been available as a printed and digital copy in English.
On 351 pages, in a total of 14 chapters and numerous sub-chapters, they go into detail on a variety of topics relating to clean code in ABAP. These include important topics such as the sensible use of classes and interfaces. But also on topics that seem trivial at first, such as the naming of development objects.
In contrast to the GitHub repository, this reads very fluently. Because while the GitHub repository relies on little text and often on the effect of the contrast between negative and positive examples, the book leads the reader through the many aspects of Clean ABAP in a much more elegant way. There are independent, also more complex examples that cannot be found in the GitHub repository. Of course with a more detailed explanation.
In no way should the book be understood as a simple compilation of the contents of the GitHub repository! Rather, it’s the sensible continuation and thus an absolute must for every representative of modern ABAP.
The book also has a chapter called “How to implement Clean ABAP”. The chapter name says it all. Because it’s not just about reading the many tips, but also about implementing them in day-to-day development work. In the end, that’s really all that matters. If the recommendations and suggestions were to stay in the book and find no way into daily practice, they could not have a positive effect. This challenge doesn’t only exist for the individual developer. Many developers are part of a team, the teams in turn are usually part of a (complex) organization. In such an environment in particular, the coordinated introduction of Clean ABAP is more than an exciting task. The recommendations from this chapter are therefore welcome and offer initial approaches on how to introduce Clean ABAP in your own company.
A long way
Anyone who embarks on this mission can expect a lot of conversations and discussions by this point. But these discussions have to be done: In my experience, there is no other way then clean code, also and especially in the ABAP environment.
A simple arrangement by the supervisor a la “read the book and program Clean ABAP” is not enough. The topic of “Clean ABAP” needs to be experienced. It’s worth it! Those who are convinced of the advantages based on their own experience become the best ambassador. Viewed from this perspective, the book was long overdue and, alongside the constant modernization of the programming language, is an important milestone.
By the way, you certainly don’t have to be compliant with every recommendation from the book. Reading and reflecting on it already leads to an intensive examination of one’s own programming style. Those who are open to change will also adapt. Or at least try it out. And since the book addresses a large number of typical everyday questions from the development stuff, there is also a lot of potential for change.
The question remains who should read the book. The answer is easy: Every ABAP developer! Anyone who has had their first experience with this programming language should read it afterwards. Practice early!
For all other ABAP developers it’s mandatory anyway. In contrast to the “newcomer” in the ABAP environment, they could also face the greater challenge. Because here a personal programming style that has been ingrained for years meets recommendations that lead one into the “inconvenience of change“. So definitely out of the feel-good and comfort zone of the accustomed and familiar programming style. And thanks to the book’s selection of chapters, it does so on a variety of levels. Since this takes a long time according to my own experience, it’s better to start sooner rather than later. The book is definitely a great companion on this journey!
Best regards, thanks for reading and stay healthy