Skip to Content
Personal Insights
Author's profile photo Paul Hardy

The Rappy Horror abapGitture Show – Part Seven

NARRATOR: As you will probably be aware by now, the two biggest things happening in the SAP world are the introduction of the Cloud RAP (Restful ABAP Programming Model) and abapGit for version management, hence the title of this blog series, which narrates a horror story concerning both new concepts.

The night before the publication of the “ABAP to the Future 3” book two horrible things were happening simultaneously. First of all the author was writing the book in the first place, and if that was not bad enough in and off itself……

NARRATOR: How did we leave things on that – fateful – night, which is in fact now the – fateful – early hours of the morning of the day of the SAP Press Gala Party? Well, the author was two thirds of the way through preparing the downloadable code, and was in his private jet flying to Castle Frankenstein. SAP and ABAP were being terrorised by Baron Frankenstein as he prepared for the “Floorplan Manager Show” whatever that may be, and Professor Hasso Plattner was breaking into the castle intent on discovering the dreadful secrets within. What are these dreadful secrets? Find out in this week’s penultimate episode of the waking nightmare which is the Rappy Horror abapGiture show….

PDH: Here I am in my autonomous self-flying private Jet, on the way to Castle Frankenstein to pick up SAP and ABAP and Professor Hasso Plattner, so I can take them to the SAP Press Gala Party. I’ll invite the Baron and his staff as well, the jet is certainly big enough to carry them all. It’s about 1AM now, and I am making good progress, in fact I would not be surprised if I landed before the end of this very blog.

In any event, I am two thirds of the way through the 36 step process of preparing the downloadable code for the book, so I had better get cracking with the next step.

Mr. Tickle and his big WDA of Cash

In earlier blogs in this series I mention how in virtually every chapter of the book the subject of automated unit tests have come along, and one of the top ABAP developers at SAP for the last 20 years has been Mr. Tickle and he has recently created specialised automatic unit testing frameworks for various SAP technologies, one of which is We Dynpro ABAP. In fact Mr. Tickle is such a good programmer, and so obviously in the top 5% of programmers at SAP, if not in the world, that SAP management decided to lay him off last month, along with anyone else who was halfway good or better. This was in order to transform SAP into a lean, mean, bankrupt machine.

Anyway since an automated unit testing framework exists step twenty five is “Test your WDA Application using WDA Test Framework”. That framework does not have a catchy name, WUNIT would have been good, but alas that was not to be. You can now doubt see the pattern forming here – after a step which says “Create the XYZ component” there is (hopefully) a step which says “Create automated tests for the XYZ component”. In fact where it is possible the two should be done at the same time i.e. if you can create the test first then fantastic, if that is impossible for whatever reason then try to create the skeleton of the real component first, then the test, then the actual code.

Bob the Service Builder – can he become obsolete? Yes he can!

At this point we have a whole bunch of ways to maintain the various business objects in the Monster process – DYNPROS, BOPF and WDA/FPM applications. Now we want to be able to maintain these business objects (entities) using UI5 or indeed any web based technology that communicates via ODATA and for that we need business services to “expose” the entities to the world outside of the SAP system.

In order to achieve this step twenty six is to “Create SEGW Services for Business Objects”

SEGW is the transaction to automatically generate such services, it is called the “service builder”. With the advent of the RAP it becomes just as obsolete as the BOPF but as I said earlier with 99.99999% of SAP customers not using the Cloud RAP just yet, SEGW still has an important role to play for the time being.

In the book I explore three possible ways of creating a service for a business object.

Create SEGW Service for Monster Business Object – this is done 100% manually using transaction SEGW which is not the end of the world.

Create SEGW Service for Delivery Business Object – this is done using transaction SEGW but this time the service is auto-generated by “pulling” the information from the CDS View which relates to the entity.

Create SEGW Service for Sales Order Business Object – this is auto-generated when the CDS View for the sales order entity is activated, based upon an annotation. I call that “pushing” the SEGW service from the CDS View. This is easy but limited e.g. it does not work for complicated business objects which have more than one level e.g. Sales Orders have items, that is one level so all is OK, but if they had schedule lines that would be two levels so you would have to “pull” rather than “push”.

Naturally no ABAP (or any sort) of programmer would take the auto-generation option if they could not go in afterwards and start modifying some code based on funny user requirements. The “push” does not actually create a SEGW object and you cannot manually change something that does not exist. So a lot of programmers would rather take an option which is slightly more effort but gives you much more flexibility.

In my examples the SEGW framework outsources all its complicated logic to the model class, but I have no gigantic objections to the auto-generation of the CRUD methods. This is, after all, what is going to be happening with the RAP.

Oh, and just as an aside, SEGW is obsolete under the RAP in the same way the BOPF is.

Oh! ODATA! Oh! The Places Mr. Tickle will go – starting with the unemployment line

As mentioned earlier poor Mr. Tickle has been laid off from SAP after many years faithful service creating automated test frameworks. The very last thing he was working on was various test frameworks for ODATA and hence step twenty seven is “Test your service using ODATA test framework”

The thing is, I am not 100% sure how complete this is. There is a test framework based on ECATT available, and in the future there might be a test of the Gateway API based on the following slide from SAP which has been presented at many events now:-

Test Framework Overview

As can be seen SAP has really pushed the boat out here in recent years, in regard to being able to automatically run tests on each layer of your application. I wish they had not invented “Test Seams” as they are an abomination that violates every single principle of good computer programming, but other than that everything is wonderful, and this is all brand new. To recap, all the good bits were created by Mr. Tickle, which is why he is gone, the Test Seams were created by the Mr. Man below, and he is still employed.

Creator of Test Seams

You can use all these tools to develop your application using Test Driven Development, which is a big thing in SAP world now, ever since the Open SAP Couse on the subject last year.

(Alarm sounds, red lights start flashing)

RICEF: Master! Master! We have an intruder alert, as reported by our Internet of Things based security system!

BARON FRANKENSTEIN: An Intruder! They must be dealt with! Prepare the Sonic Oscillator!

AUDIENCE: Oh No! Not the Sonic Oscillator!

RICEF: (Looking at SAP screen). The intruder has been identified as Professor Hasso Plattner. He is currently in the Zen Room.

AUDIENCE: Oh No! Not the Zen Room!

SAP: Professor Hasso Plattner – our old teacher!

BARON FRANKENSTEIN: Oh, so your appearance here tonight was not a co-incidence after all! He is my arch-enemy! He keeps coming up with Paradigm Shifts! Do you hear me? He gives me the Paradigm Shifts!

AUDIENCE: Oh No! Not Paradigm Shifts!

BARON FRANKENSTIEN: He thinks his whacky inventions are a game changer in the area of big data, the internet of things, blockchain and machine learning!

AUDIENCE: Oh No! Not a Game Changer! Not Big Data! Not the Internet of Things! Not Blockchain! Not Machine Learning!

BARON FRANKENSTIEN: OK, I see from my screen that he is in a wheelchair. Prepare the Big Magnet!

AUDIENCE: Oh No! Not the Big Magnet!

RICEF: The Big Magnet has been activated!

(Professor Plattner is dragged all around the castle in a fairly random fashion. At one point he goes through the bedroom of C/4 HANA who is chatting to MDG. He circles round them ten times and then leaves and they totally ignore him. Eventually he arrives in the SAP Innovation Lab where the Baron and the others are).

HASSO: Guten Tag!

BARON FRANKENSTEIN: Well, now at last all the actors are assembled and we are ready for the Floorplan Manager Show – hang on, where are Rappy and ABAP?

NARRATOR: Meanwhile, back in the private jet…

PDH: As might be imagined, my private jet is just as autonomous as the self-driving cars we all use to get from A to B these days. So I do not need a pilot or anything old-fashioned like that. I do need to communicate it with it via the co-pilot digital assistant on my smartphone however. (Speaks into phone) Kit?

JET: Yes Michael? (It calls everybody Michael for some reason)

PDH: How close are we to Castle Frankenstein?

JET: We are on final approach. I am engaging Turbo Boost. Arrival time is less than thirty minutes. (Starts singing “When you are a Jet” from West Side Story)

PDH: I wonder if this artificial intelligence thing has not gone too far. In any event, we still have nine steps to go in regard to the downloadable code, so I had better get on with it.

The scene was rockin’, all were digging the sounds

Igor on chains, backed by his baying hounds

The coffin-bangers were about to arrive

With their vocal group, “The Crypt-Kicker UI5”

At long last we have finished all the various components on the SAP back end, at least in regard to the assorted Monster related Business Objects and it is now time to turn to the internet for step twenty eight which is to “Create UI5 Applications for Business Objects”.

As in previous steps if there are two ways to do this I demonstrate them both. In this case there are two possible methods:-

Create UI5 Application for Monster Business Object – this is done in a 100% manual fashion, manually coding the controller (JavaScript) and the view (XML). I love the model, view and controller all being in different languages. That demonstrates the separation of concerns like nothing else I could possibly think of.

Create UI5 Application for the Monster Sales Order Business Object – this is auto-generated using the SAP Web IDE. It reads the back end system (i.e. the annotations in the CDS view, or better still from the metadata extension to the CDS view) and uses a predefined UI template and then creates everything for you. Naturally as alluded to earlier the majority of developers will then want to mess with the generated code.

Mr. Tickle is now lying in the gutter hoping someone will give him UI5 cents

Mr. Tickle worked with JavaScript prior to working for (and getting laid off from) SAP and developed various automated testing frameworks for that language such as QUIT (which handles so called “smoking” tests) and OPA5 WINFREY which handles integration tests. He also invented ELINT which is all to do with static code checks for companies that make chocolate bunnies covered in gold wrapping.

Thus, step twenty nine is “Test your UI5 application using QUnit and what have you” which matches the earlier pattern of creating something in one step, and then testing it in the next. In addition the idea is to do test driven development whenever possible i.e. write the test before writing the actual production code, and the various automated testing tools in the JavaScript world make this the recommended way to go about things.

Up till now all the automated tests have been inside the SAP system where naturally all the code is in ABAP. We have now moved on to running automated tests on the user interface, in cases where the user interacts with the application via the web, be it on a laptop or a tablet or their smartphone. The language is JavaScript and this will naturally make many ABAPers deeply uncomfortable.

I really don’t understand why people are terrified of new programming languages. Uncle Bob says you should learn a new one every year, just to keep you on your toes. Someone else said that learning LISP was a useful exercise if you never wrote a single program using it, because learning that language changes the way you think about problem solving using code.

I found the learning curve for JavaScript coding was not very steep at all, it was a lot easier to get my head around than Web Dynpro. Nonetheless the unit testing is different enough from ABAP Unit that you struggle with it at first, and how QUnit relates to OPA5 and how they both relate to “Gherkin”. The answer is that each one builds on the one before.

Luckily there is a TON of documentation on the internet about this. Here is a good blog on the subject for example:-

You really need to actually code a few examples yourself, otherwise you will have great difficulty understanding the concepts. The online UI5 documentation has a great tutorial as per the screen shot below.

UI5 Documentation

I went through that exercise at a “Code Jam” in Belgium. That was really good, but far better was a hand on workshop on OPA testing at TechEd Barcelona, which is where the lightbulb really went on for me.

ALV and Let Die

Step thirty is “Create ALV Interactive Reports for Applications”. I imagine the official position at SAP is that no-one uses the ALV anymore and all new development is done using UI5. However I strongly suspect that the vast majority of programmers still use the ALV on a regular basis. Certainly it is the chapter about which I get the most feedback and comments, in fact it is the ONLY chapter on which I get feedback and comments (very complimentary comments I must say) and some readers have told me the ALV chapter was the only reason they bought the book in the first place.

Anyway, as per the original list of developments needed for the Monster Making Business Process we have three interactive ALV reports needed:-

The Monster Atrocity Due List Application – this reads the CDS view for sales orders and shows the date and time when a monster needs to be dispatched to do the evil deed, and what (if any) monster is currently reserved for this task. It is interactive in that at dispatch time the Hunchback at the central order taking facility can create a delivery using either the reserved monster or a similar monster that can fulfil the customer requirements.

The Missing Monster List Application – this is rather like an ATP check and shows orders where there is no monster yet reserved, either because no existing monster can fulfil the customer requirements, or there are not enough suitable monsters available at the required time. In this case the Baron has to build some new monsters. This report is interactive as a Monster Simulation can be run to generate a dynamic bill of materials (BOM) for the new monster using variant configuration. After the new monster has been built a reservation can be created and attached to the appropriate sales order.

The Monster Atrocity Monitor Application – this reads the CDS view for the deliveries and is run by the Hunchback at the Castle where the monsters are. He uses this report to see when the monsters need to be released from their cages to go and do the evil deed. It is interactive in that at dispatch time the report uses a PI proxy to remotely open the cages without the Hunchback having to physically go down there himself. It also does the goods issue for the delivery, though the “goods” are in fact services so there is no material movement, but you need the deliver to be goods issued so you can send the customer an invoice.

We are using the ALV in this step but that does not mean we are going to abandon the MVC principle – far from it. Each application has an application model class with all the business logic, and a controller, and the view in this case is an instance of a concrete class which implements my lovely user interface interface (I heard you the first time). The actual subclass is dynamically determined by configuration so it could use CL_GUI_ALV_GRID or CL_SALV_TABLE or CL_SALV_TABLE_IDA or indeed function REUSE_ALV_LIST or if in the unlikely event SAP come out with a new ALV technology than we can have a new subclass for that.

You will see in the next steps that the applications have new “incarnations” created using WDA and UI5, but those have new views and controllers which re-use the same application model.

NARRATOR: Meanwhile in the SAP innovation Lab, Baron Frankenstein had assembled everyone he needed for the so called “Floorplan Manager Show” including the newly arrived Professor Hasso Plattner. However two key people were missing namely ABAP and RAPPY HORROR. Where could they be?

(Enter RAPPY and ABAP, dressed just in towels)

BARON FRANKENSTEIN & SAP: (accusingly) what have you two been doing?

RAPPY: (frantically trying to think of a plausible excuse) we … we … we’ve been making love!

BARON FRANKENSTEIN & SAP: No you haven’t! Don’t lie to me! You’ve been writing programs together! Writing ABAP programs using the RAP!


ABAP: Maybe.


ABAP: (Shocked to see the Professor) PROFESSOR HASSO PLATTNER!

SAP: (Shocked at what ABAP had done) ABAP!

ABAP: (Shocked that SAP has found her out) SAP!

BARON FRANKENSTEIN: (Shocked by what RAPPY has done) RAPPY!














PROFESSOR HASSO PLATTNER: Anyway, that’s not important right now. What is important is why I came to Castle Frankenstein in the first place. The reason I am here is that I am searching for the relational database management system that came to this Castle some weeks ago. Let me tell you all about it….


SONG: RDBMS was a no good database



From the day it was designed

It was trouble

It was the thorn

In Larry Ellison’s side

He tried in vain

But it never caused him nothing but shame

It left home the day he turned into a werewolf

From the day it was gone

All it wanted

Was to somehow extract data from persistent tables

Und a motorbike

Shooting up SQL

NARRATOR: It was a lowdown, database from hell


Taking everyone for a ride

When RDMBS said it didn’t like response times

You knew it was a no-good database

But when it threatened your ERP system stability with a TIME OUT dump every ten seconds

What a useless waste of space, makes you design a new “in memory” database, und I did

C/4 HANA:-

Everybody used it

I very nearly wrote SQL queries using it

I said, hey, listen to me

Stay sane inside our ERP

But “lock table overflow” oh deary deary me


But it must have been drawn

Into a sub-optimal development environment

Making it warn

Me in the application log which reads (ALL: what’s it say, what’s it say?)


I’m out of my head

Oh, hurry, or I may be dead

They mustn’t carry out their evil deeds (dying scream)


When RDMBS said it didn’t like response times

You knew it was a no-good database

But when it threatened your ERP system stability with a TIME OUT dump every ten seconds

What a useless waste of space, makes you design a new “in memory” database, und I did


When RDMBS said it didn’t like response times

You knew it was a no-good database

But when it threatened your ERP system stability

With a TIME OUT dump every ten seconds

BARON FRANKENSTEIN: What a useless waste of space!

ABAP: Makes you design a new “in memory” database

HASSO: Und I did.

(Enter PDH)

PDH: Hello everybody, my private jet is parked outside. I have room inside to take everyone here to the SAP Press Gala Party this evening.

(BARON FRANKENSTEIN produces futuristic looking Ray Gun)

PDH: In fact it is so big we can probably bring along a fair few of the Monsters as well.

BARON FRANKENSTEIN: Take that! (He fires the gun and PDH is turned into a statue. Baron Frankenstein then turns the gun on RAPPY and turns him into a statue as well.)

BARON FRANKENSTEIN: Don’t worry! I’ll bring you back to life in due course … so you can take part in the Floorplan Manager show! (Brandishes gun threateningly at SAP and ABAP) You two are next … you are going to suffer the most ABAP for what you did with RAPPY!

SAP: You are as hot as Gluhwein, Frankenstein, but don’t you dare try and stomp her, with your Monster (ZAP – Turns into a statue)

HASSO: You are as hot as Gluhwein, Frankenstein, but don’t you dare try and stomp her, with your Monster (ZAP – Turns into a statue)

ABAP: You are as hot as (ZAP – Turns into a statue)

AUDIENCE: It wouldn’t have rhymed anyway!

BARON FRANKENSTEIN: OK! Here we go! Prepare the stage for the FLOORPLAN MANAGER SHOW!

MONSTERS: Yes Master!

NARRATOR: Here we leave things on that – fateful – night (which is now the morning of the day on which the SAP Press Gala party will be held in the evening). The author is five sixths of the way through preparing the downloadable code of the book, and has actually entered Castle Frankenstein, as has Professor Hasso Plattner. The Baron has turned everyone into statues in preparation for the “Floorplan Manager Show” whatever that might be. Tune in next week for the final episode of the waking nightmare which is the “Rappy Horror abapGiture Show”…..

Assigned tags

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

      You are amazing to me.  Do you sleep?   I loved this blog.  It made me smile.  Always a good thing.

      Also - I'd like to add, I had bought ABAP to the future.   The thought was that it would be a reference book.  (That's what I usually use my books for.  Let me tell you, I'm knee deep in them right now.)  I have to tell you - I've read almost all of it.  It is amazing.

      Now in case you don't know and you are reading this and not Paul.  He gives away his wisdom out her on the community as well.  Yup, he pulls some examples from his book.   Add additions, and new stuff...   Cool stuff...

      So I thought I would add that comment about his book today as I am using his book almost the entire work day!  I took a break and found this cool blog.

      Thank you for all that you do!

      In fact just:

      Thank you! Thank you! Thank you!


      Author's profile photo Arthur Sehn
      Arthur Sehn

      Let's do the time warp (i.e. ABAP GUI dynrpo) again!