Skip to Content

Have fun with ABAP Koans

ABAP Koans

Why practicing is better than theory?


By designing you learn to design. By making programs you learn to make programs. wiki.c2

Are you trying to master a new language or level up with the one you already familiar with?
Koans are a great way to hone your skills through small exercises.

The first Koans exercises are created by Jim Weirich for learning the Programming Language Ruby. Ruby Koans

The Koans walk you along the path to enlightenment in order to learn Ruby. The goal is to learn the Ruby language, syntax, structure, and some common functions and libraries. We also teach you culture. Testing is not just something we pay lip service to, but something we live. It is essential in your quest to learn and do great things in the language.

Koans aren´t limited to learning a Language. I´d like the concept of Carlos Ble´s to use the Koans for learning Unit-Testing in JavaScript jskoans.

I adapted this idea and wrote the first ABAP Koans to explore the ABAP Unit Testing Framework. It should be a small step to motivate YOU to start exploring Unit Tests in ABAP.
(System Requirement minimum 7.40)

Essentially ABAP Koans is an interactive tutorial.
You clone the GitHub repository navigate to the existing global class and execute the Unit Tests over Menu >Execute>Unit Test or via the Keyboard Shortcut CTRL+SHIFT+F10 (works also in ABAP in Eclipse ;-).

You start with a failing Unit Test.

Solve them and continue to the next failing Test, until you solve every failing Unit Test.

No previous knowledge is required. The first Tests are very basic, but feel free to extend the current standing!

You must be Logged on to comment or reply to a post.
  • /
  • Love the graphic! Reminds me of the famous "Ten Bulls" woodcut from 12th-century Chinese Zen (or Chan) Buddhism, which I'm pretty sure could be adapted to the process of mastering the art of design!

    Image result for ten bulls

    Image result for ten bulls
  • This is all about UNIT TESTING as well, so gets my vote.

    The Australian development system where I work is on 7.50 (up from 7.02) as about fifteen minutes ago, so we are good to go. Germany (where I am) will be about three months behind, and I will push this here as well, purely from the UT perspective.

    SAP as a company should note how few people (customer systems) actually are on a 7.40 system or above. It is far less than anyone imagines....


    • Hi,

      agree - glad we are on 7.4.

      11500 according to the TechEd slides


  • Hi ,

    Can you please explain the benefit to the developer as I didn’t get exactly where i can get the benefit of during abap development.


    thanks ,



  • Hi, it's REALLY nice idea!

    Some time ago we published a book of exercises in ABAP, 101 Exercises in ABAP (, because we (me and Fabio Pagoti ) also believe that "practicing is better than theory".

    Nice job bringing that to ABAP!


  • After having found recently (via a comment on ), I remembered at least the title of this blog and went searching for it.

    Cloning didn't work (HTTP-Error 407), but I worked around it with import *.zip. (Another thing  I can give praise to OpenSap WTC1: it made me install and use ABAPgit for the first time, lowering the bar of "unknown, thus uncomfortable" for all future cases where I come across it!).


    So I did about 12 of those Koans.

    What threw me off at first, is that it's not about the production code at all; thw whole reason of those unit tests existing is them failing (or later: passing), nothing else....


    I can see that such a setup is a possible way of learning/exploring a new topic (here: what methods does cl_abap_unit_assert have, and how are they used).



    • I today did the rest of them, and now understand, that it's actually not about unit testing. Instead the ABAPunit-framework is used to learn whatever the Koan is designed to teach (e.g. regular expressions)

      Would be interesting to see more of those Koans!
      And yes, it is fun! 🙂