Skip to Content
Personal Insights
Author's profile photo Michael Keller

Hamurabi in ABAP

Dear Community, since I am constantly helping trainees and students with their entry into ABAP, I’m always looking for interesting topics – because exciting topics always motivate. So I recently discovered a small game called Hamurabi in a very old book on the BASIC programming language from the 1970s. The author is David H. Ahl. Wikipedia summarized the game perfectly: “Hamurabi is a text-based strategy video game of land and resource management.“. You can read more about the gameplay on Wikipedia.

Since it’s a game and not very big but at the same time interesting because of its topic, it’s well suited for working with trainees and students. So I wrote a small proof-of-concept implementation in ABAP. For simplicity, I used a very simple implementation with WRITE to design the user interface. It’s still under development, not all game logic is included and it consists of just one report. You can check the source code on GitHub (no abapGit this time, sorry). Here are a few impressions.

start screen

rule wisely

By the way, I experienced some surprises while reading the BASIC source code. I last worked with BASIC about 25 years ago. Back then with QBasic, if I remember correctly. While reading the spaghetti code, I realized how complicated a source code from another time can be. In comparison It’s impressive to see what options, tools and design principles we have today. Nevertheless, all the effort remains.

If you want to try out the game quickly, there is an online version on, written in Adventuron.

By the way, I’ve read a nice quote on David H. Ahl’s homepage: “The circles around you can include or exclude ideas, people, and events. Draw large circles.” The search for new ideas is always worth it. Sometimes you find a nice quote 😉


Best regards and please stay healthy



P.S.: Interested in a hand-picked round-up of the best ABAP development links every week? Check ABAP Weekly.

P.S.S.: Tired of reading blogs? Check SAP Online Track on YouTube.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Florian Henninger
      Florian Henninger

      This is awesome. Had to do it with java when starting programming as a student. Like the old times. Really nice Idea to retake it to an actual language. Would be a challenge to do it with abap and a modern frontend 😉

      Author's profile photo Michael Keller
      Michael Keller
      Blog Post Author

      Hi Florian, I'm always looking for nice examples to study ABAP (design, statements, IDEs and more). It's important that it's not too much at once. Students and trainees have to be introduced to topics slowly. There are many beautiful examples from the past like Hamurabi that are suitable for this. I just have to discover them 😉

      Author's profile photo Enno Wulff
      Enno Wulff

      cool idea! most important thing is sound design! ;D

      Author's profile photo Michael Keller
      Michael Keller
      Blog Post Author

      I knew you would like the idea 🙂 Game engine needs more work, sound could be integrated via that way 😉