Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor
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……

The Story So Far..

NARRATOR: When we left things laws week the current state of affairs on that – fateful – night, the night before the SAP Press Gala launch party for “ABAP to the Future Part 3” we had the author six steps finished in regard to creating the various ABAP artefacts needed for the downloadable code, and SAP and ABAP in Castle Frankenstein where they – foolishly – think that Baron Frankenstein is going to help them regarding their broken down self-driving electric car. What unspeakable horrors await all three “actors” in this waking nightmare? Find out in this week’s episode of the Rappy Horror abapGiture show….

Mind your ABAP Language

Time for step number seven, which is to create an example class to show all the various new features of the ABAP language (ZCL_CH03_ABAP_EXAMPLES)

This is not a class that does anything at all, the code in each method is unrelated to any other method. The names of the methods correspond to the listings in the book that demonstrate each new feature.

As mentioned a few blogs back it could be argued that this is not as realistic as it might be. It is all too easy for the author to spin up a contrived example that the new feature solves in a wonderful way, but that example bears absolutely no relation to any business problem anyone anywhere in the universe has ever come across.

So my ongoing aim – and I have not got there yet, this is a work in progress that will take me many years no doubt – is that the code for each such example of a new feature appears twice in the downloadable code. Once in the ABAP example class, and once in one of the business object model classes or the various applications like the Monster Atrocity Due List.

Then the reader sees the same thing twice – initially as an abstract example in the “enabler” section of the book just to get the general concept, and then later on actually being used for “real” in a Monster Application.  Again, as mentioned earlier the Monster business process is a disguised version of a real business process I have dealt with, and so all the business problems I am solving are real ones, albeit “monsterised” so much they become unrecognisable.

Bug Bunny

I read a great joke on the internet the other day. Well, I thought it was great, which may just be an indication of how much of a nerd I am. Anyway, here we go:-

Three errors walk into a bar. The barman says “Normally I would throw you out, but tonight I’ll make an Exception”.

Maybe you had to be there. Anyway step eight is to create an example program very similar to the ABAP example class, but this time demonstrating the various mechanisms available for exception handling. The program in question is ZCH04_EXCEPTION_HANDLING.

This can be even more obscure, despite the fact that over half of all code deals with error handling. It is even more difficult to convince the ABAP community that exception classes are better than “classical” exceptions that work by setting a value to SY-SUBRC.

I am not even sure that SAP itself has ever been convinced, which is why you can have old fashioned exceptions in methods, a very strange decision I may say. When a find a standard method with “classical” exceptions I wrap it in a Z method which uses exception classes.

I understand that SAP is mad keen on downward compatibility, but how hard would it be to let the old methods keep on working, but disable people from creating new ones with anything except exception classes. Just default the “use exception classes” check box to “on” (why is that not the default setting?) and then grey it out.

In any event the same idea holds here – the transactional applications in the second half of the book have load of error handling, and the examples in the first half should use those actual examples. As I said, I have not quite got there yet, but that is the aim.

Mappy Horror

Just as an aside, when I was going through the book trying to make sure every listing was actually somewhere in the downloadable code, I often really struggled to find things, even though they were actually there.

So if I cannot find the examples, what chance has anyone else got? To square that circle in the downloadable code you also get a “mapping” program which is just a simple ALV list of the listing numbers and what ABAP object (class, report etc...) you find that listing in, with the exact method name when possible.

Everything we do is Test Driven by You

Step nine is to give examples of assorted concepts to do with Test Driven Development and ABAP Unit. This time I was able to move a chunk of the examples directly into the classes they test (like the Monster Simulator) though there are still some standalone examples sadly.

Anyway that is where that mapping program comes in, to help locate each example. The program is Z_MONSTER_LISTINGS_MAPPING and it lives in the ALV package.

Pear Programming

In the book, and in the SAP Open Course on TDD mention is made of the concept of “Combinatorial Test Design” where you have a large number of input variables, and it is impractical to manually code a unit test for every possible combination as there would be ten billion.

A “Combinatorial Test Design” program reduces the number of needed tests to the minimum to give effective coverage. There are loads of free tools available on the internet, but none of them are in ABAP, so for step ten I had the unbearable urge to write such a program myself – using Test Driven Development. That program comes along with the downloadable code – it is called ZALL_PAIRS because the idea is you test every “pair” of possible variable values rather than every single possible combination.

Scripty Come Dancing

Step eleven is creating a program for the sole purpose of demonstrating debugger scripting. As you will have gathered by now my aim was to have had some sort of horrible problem during the development of the Monster transactional applications that needed to be solved by debugging and thus could be solved faster by the use of debugger scripting.

That never happened so I created a standalone example program. The irony is that only today – the very day I am writing this blog – did I have a horrible problem at work where ten million hours of debugging seemed to be needed to solve it. So I am hopeful here. It is funny when I get to the situation I actually want horrible problems at work, the worse the better. The idea here is that if using all the new technologies I write about does not actually make it easier to solve such problems then I will stop endorsing them on the spot. That has not happened yet, I will let you know if it ever does.

I don’t know his name, but his face rings SQL

Step twelve is in regard to having a load of examples of all the new features available in regard to database access. I had to put these in their own class ZCL_MONSTER_TRANSACTIONS_PERL which does not actually get used by the transactional applications, but again my grand aim in life is to have those “real” queries duplicated in the example class.

Why is it SO LONG?

As a philosophical aside ever since I started writing blogs on SCN – in 2012 – I have been asked why those blogs are so long. Your average blog gets classified as a 1-3 minute read, but mine tend to start at 11 minutes and are often much longer. Why is this, people ask.

I have no real answer except possibly it is due to my age – I am 50 years old.

In the film “Robocop” that came out around 1986 the action sometimes would cut to a one or two minute false advert or TV show from the 25th century or whenever it was the film was set. One of these was a news show with the motto “you give us 30 seconds, we will give you the world”. This was a pun on an actual USA news show at the time which had the motto “you give us an hour, we will give you the world”. The implication being that as the decades roll by, people’s attention spans get shorter and shorter.

I think that was supposed to be a joke, but as it turns out they were bang on the money. These days news stories are online and have to be really short, with Twitter being the ultimate example of not being able to go over a certain length. On the BBC news site for example the stories are generally short but there are a few “long reads” which are presumably aimed at dinosaurs like me.

I don’t know if the change over time is good or bad, I am just noting it. It could be good in that it forces people to communicate in a succinct way and not beat about the bush and go off on a tangent all the time like I do, and am doing right now.

Anyway, now I have all the DDIC structures and example programs in place it is time to turn to start coding the business logic for the various entities which the assorted Monster applications will use.

NARRATOR: Meanwhile, Baron Frankenstein had taken ABAP and SAP up to his Innovation Laboratory, on the slab was his new monster, whilst on the balcony all the SAPPHIRE NOW delegates looked on with interest.

BARON FRANKENSTIEN: Welcome my unconventional SAP conventionalists! It is time to bring my new monster to life! I am often asking why I use lightning to do this and the answer is very simple – it comes from the cloud!

Now the only problem is if I can log into my SAP cloud system – one of my fifty user identities should do the job – ah yes, here we go. Now I simply activate the “digital twin” of my new monster in the SAP system, and the actual monster in real life comes to life as well. I gave him the brain of an SAP sales representative, I hope that won’t affect him too much.


OK this is it. Welcome my new monster to the world – its name is RAPPY HORROR and ITS ALIVE! IT’S ALIVE! IT’S ALIVE!


Song: S/4 of Damocles



The End of Maintenance for ECC 6.0 is hanging over my head

All my customers won’t upgrade, they’d rather be dead

Oh! Woe is me! My life trying to market SAP products is a misery

And can't you see

That I'm at the start of a pretty big ERP Implementation

I woke up this mornin' with a start when I logged onto the system (DELEGATES: that ain't no crime)

And left from my dream it was a feelin' of shouting and twisting (DELEGATES: that ain't no crime)

My SAP High-Performance Analytic Appliance is low, I'm booted up with no place to go!

And all I know

Is I'm at the start of a pretty big ERP Implementation


Sha la la la that ain't no crime

Sha la la la that ain't no crime

Sha la la la that ain't no crime that ain't no...CRIME!


The End of Maintenance for ECC 6.0 is hanging over my head (DELEGATES: that ain't no crime)

All my customers won’t upgrade, they’d rather be dead (DELEGATES: that ain't no crime)

Oh! Woe is me! My life as an SAP sales representative is a mystery

And can't you see

That I'm at the start of a pretty big ERP Implementation


Sha la la la that ain't no crime

Sha la la la that ain't no crime

Sha la la la that ain't no crime that ain't no...CRIME!

Sha la la la that ain't no crime

Sha la la la that ain't no crime

Sha la la la that ain't no crime that ain't no...CRIME!


BARON FRANKENSTEIN: So, what do you think of my new monster? I had to make him using an Oracle database.

ABAP: I don’t like databases with lots of rows.

AUDIENCE: She like databases based on a COLUMN store!

BARON FRANKENSTEIN: Now my new Monster is ready we can all get ready for the Floorplan Manager Show!

ALL: The WHAT???

NARRATOR: There we leave things on that – fateful – night, with the Baron having brought his new monster to life with SAP and ABAP looking on in horror. Meanwhile the author has finished his DDIC elements and example programs, and was ready to move on to the transactional side of things. What unspeakable horrors await all three “actors” in this waking nightmare? And what is this “Floorplan Manager Show” of which the Baron speaks? Find out in next week’s episode of the Rappy Horror abapGiture show….

1 Comment
Labels in this area