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

I can see ABAP Moon Rising – Part Eight of Eight

NARRATOR: There have been two horrible crime’s committed on the 23rd of November2021. One was murder most foul, the other the release of a new ABAP related book and associated musical. It is difficult to say which is worse but this series of blogs will help you decide whilst singing and dancing and solving a crime and thus winning prizes.

The%20Three%20Amigos

The Three Amigos

Previously on this channel:-

https://blogs.sap.com/2021/11/16/i-can-see-abap-moon-rising-part-one-of-eight/

https://blogs.sap.com/2021/11/23/i-can-see-abap-moon-rising-part-two-of-eight/

https://blogs.sap.com/2021/11/30/i-can-see-abap-moon-rising-part-three-of-eight/

https://www.youtube.com/watch?v=9Y0KGYB1mR4

https://blogs.sap.com/2021/12/07/i-can-see-abap-moon-rising-part-four-of-eight/

https://blogs.sap.com/2021/12/14/i-can-see-abap-moon-rising-part-five-of-eight/

https://blogs.sap.com/2021/12/21/i-can-see-abap-moon-rising-part-six-of-eight/

https://blog.sap-press.com/abap-room-101-the-worst-thing-in-the-world

https://blogs.sap.com/2021/12/28/i-can-see-abap-moon-rising-part-seven-of-eight/

STUPID VOICE: And now – the conclusion!

NARRATOR:  The SAP Gala Press party to celebrate the release of „ABAP to the Future 4“ was slated for 23/11/1792 with the guests travelling backwards in time from 2021 but events on that – fateful – night have reached crisis point with all the guests having been eaten by a werewolf and Slin Shady attacking Frank BOPF with a chainsaw! Meanwhile there was some sort of stupid book being written.

*———————————————————————————————-*

Book Writing

*———————————————————————————————-*

PDH: All the chapters have now been updated and the editing and copy-editing process is complete.

This means all the building blocks are in place to help your organization achieve a DIGITAL TRANSFORMATION!

AUDIENCE: (Sings) Transformers! Transformers! Optimus Prime! DARE TO BE STUIPID!

https://www.youtube.com/watch?v=h4WMHcSVSNE

The last task is to make sure the downloadable code is OK.

The first task is to create a README word document which lives on the SAP Press Web Site for the book under the „Product Supplement“ section. This explains to the reader how to download the code.

https://www.sap-press.com/abap-to-the-future_5360/

Supplements

Supplements

There are various options to download the code but realistically only GitHub makes any sense.

The README file also explains the nature of various utility programs in the downloadable code, the most important being as follows.

Monster Mapping Program

It occurred to me that whilst you are having a look at any given code sample in the book you might want to easily drill into the code samples in the sample code, especially if you then want to cut and paste that code somewhere else.

To do this, run program Z4_MONSTER_LISTINGS_MAPPING and enter the chapter you are interested, or leave that field blank to see everything.

Mapping%20Program

Mapping Program

Then you can drill straight into the code by double clicking on the appropriate line. Some of the code has Murder Mystery clues as comments.

The supplements link also lets you download a spreadsheet containing a quiz about the book. Once you answer the questions about each chapter correctly you get some more clues to the Murder Mystery.

Bridge of SCIs

It is a funny fact that most SLIN/SCI static code checks happen after the event. What I mean by this is that all the code listings in the book are finished and set in stone in the final manuscript. This time SAP Press even had a special magic thingy which colours and formats the code shown in the book based upon what language it is in i.e. usually ABAP but sometimes JavaScript or whatever.

Now I have to upload the code to GitHub. Now some of the examples are examples of how NOT to do something so I want to leave them exactly as they are. For everything else I would be the worlds biggest hypocrite if I did not do extensive SLIN & SCI checks till the cows came home to roost. I also switched on a lot more Code Inspector checks than I use in my day to day work and of course I also have the ABAP Open Checks by Lars and the SAP „Code Pal“ checks and for both of those I also switched on more of the checks than I would normally.

I fix all the errors and warnings reported and pretty all of the information messages as well. In effect this means changing pretty much every method in every class – despite the fact I did the exact same exercise on the code before starting the book. I have not quite worked out how this can happen but it does.

This has two consequences:-

  • The code listings in the book are not a 100% match for the code in the downloadable code. The latter will be subtly better.
  • Since I do this exercise at the end of every book the code listings in edition four will contain all the corrections I made after edition three was finalized, and if and when edition five comes out the code listings there will contain all the corrections I just made.

In any event I do not export any code to GitHub until it has passed all these static checks inside SAP.

APACK up your Troubles in your Old Kit Bag

All throughout the book I make much of the assorted open source ABAP projects which can be found at https://dotabap.org/

Have a look through the list. It is like being a child in a toy shop where all the toys are free. You will most likely find something that was created eight years ago and really helps you with a common day to day problem you have at work and then you wonder why you have been doing things the hard way for the last eight years.

To demonstrate how good some of these are I use such open source projects all over the place in the applications described in the book, the applications I am exporting to GitHub.

On one hand it would be bonkers crackers free energy crazy for me to duplicate the code in those open source projects in my repository as well. On the other hand my code will not compile unless those open source projects are installed in your system.

On the Gripping Hand this problem was long ago solved in other languages. When you load a package in Java (or whatever) at the start of the defintion of the package is a list of what other packages it needs to compile, and those are loaded first. As each such dependency is loaded the same trick is done to see if the dependency has a dependency. You will have seen this sort of thing when you load a complex OSS note via transaction SNOTE i.e. if there are fifteen notes and you try to load just the last one you are forced to either load the first fourteen as well or abort.

(In case you were wondering this three hand thing comes from the novel „The Mote in God’s Eye“

https://en.wikipedia.org/wiki/The_Mote_in_God%27s_Eye

)

In ABAP we now have the same concept known as APACK. If I use ABAP2XLSX inside one of my monster packages I declare the fact inside a class in that package which implements the APACK interface. Then if someone tries to download my package from GitHub and ABAP2XLSX is not in their system they get prompted to install the ABAP2XLSX package first.

TEN THOUSAND DIFFERENT BLOGGERS: ABAP2XLSX? What in the world is that? Never heard of it! Oh, and by the way I have just invented a new way to upload/download to and from Excel using ABAP!

Hubble Space Telescope

In any event I created a repository on GitHub and uploaded all the code into it. That repository is:-

https://github.com/hardyp/ABAPToTheFuture04

You can download the code to your system using abapGit.

https://docs.abapgit.org/guide-install.html

Obviously you can download all the code for free without buying the book, but a lot of it will not make much sense without any context. Though it does of course contain clues to the Murder Mystery, in the form of comments randomly distributed through the code. Have I mentioned that enough yet?

Lindt Gold Easter Bunny

As mentioned earlier I do a lot of checks on the code within my SAP system before exporting it – I run my „Dependency Analyser“ to make sure no data elements or what not are missing, plus loads of SLIN and SCI checks.

Now here is an interesting thing – a load of other static code checks are done on the uploaded code once it arrives inside GitHub. Static code checks on ABAP done even though there is no SAP system at all.

This is abapLint which was invented by Lars who also invented abapGit. I install abapLint on my GitHub account and every time I upload some code from my SAP system to the GitHub repository a load of checks are done and I can see the results. This tells me if any objects are missing my dependency analyser in SAP had not picked up on, and „unclean“ code formatting and all sorts.

https://abaplint.org/

Obviously if I get any errors then I correct them and post a correction on GitHub as fast as fast can be.

Chequered Flag

Then once the code is merrily sitting on GitHub and people can look at it and/or download it then if they find something wrong e.g. it dumps in their system, then they can (and do) raise an issue on GitHub and I fix that as fast as I can as well and upload the correction.

As mentioned earlier many people are scared of open source projects because they worry you do not get the support you get for real SAP products. I have found that generally the turnaround time for issues on open source projects is really good even (and I will be burned as a witch for saying this) better than what you might get raising a ticket for a standard SAP problem via OSS. I still call it OSS after all these years. The reason the problem solving mechanism in SAP used to be called OSS is because it was invented by Black Sabbath lead singer OSS E. OSBOURNE when he used to be in charge of SAP service and support before moving into the pop industry.

In addition when people start to read the book sometimes they look at the code listings and find mistakes. I got an email from someone who (correctly) pointed out to me that I had two code samples purporting to demonstrate two ways to do the same thing. But in fact in the first listing I was turning GREEN monsters into BLUE monsters and in the second listing I was turning BLUE monsters into GREEN monsters. Obviously I was horrified. That mistake was in earlier editions of the book as well.

In any event as soon as I was made aware of the problem I fixed up the code and uploaded the correction to GitHub ten minutes later. And then emailed him back with an extra Murder Mystery clue as a thank you.

So if you find an error in any of the listings, or in the spelling or grammar in the chapters please email SAP Press at the address at the start of the book and they will let me know and you will get a bonus clue as well. You are probably thinking „That’s not much of a reward!“ but I tell you – the prizes are fantastic. My wife was up to 4AM last night making one.

*———————————————————————————————-*

Code Base

*———————————————————————————————-*

A Mixed Bag of Monsters

Up till now we have been talking about creating the various business objects – monsters, sales orders, deliveries and so on.

In the various new SAP programming models those business objects can be used to automatically generate UI5 applications to get a list of monsters and then perform CRUD operations upon them as well as determinations / validations and actions.

However most business applications use a mixture of business objects e.g. you have a list of sales orders and you want to assign monsters to the order items and then create deliveries based on those order items.

So there are two applications – the Monster Atrocity Due List and the Monster Atrocity Monitor – which are ALV reports working off assorted business objects.

Then there are various helper constructs like a Monster Message Class and some Monster Exception Classes and A Monster Factory (which helps with unit testing) and so on and so forth.

As I was going up the stair I met a man who wasn‘t there – things which do not yet exist

However the introduction to the book describes a fully complete set of business applications with which to run Baron Frankenstein’s Monster Making business – but in actual fact only the objects needed to demonstrate assorted new technologies were actually created.

However that is not really a problem. You don’t need everything to exist to get your head around the various examples. Also, if the downloadable code was stored on the SAP Press site in the form of co-files for transport requests it would of course be the same forever. With GitHub I can keep creating new things each week and adding them as I go. So my initial grandiose plans for bucket loads of downloadable code might eventually be realised.

*———————————————————————————————-*

Clues

*———————————————————————————————-*

ENTER „APPY“ „MAC“ GYVER

AMG: It seems such a long time ago now but please try to recall – we have a murder victim – namely Count Dracula. I think it is fairly clear he was killed by a Monster – but which one – and where? If you want to win a mystery prize you need to answer that – and more – and supply your reasoning.

  • One Haunted Castle is in Japan
  • One Haunted Castle is in Ireland
  • One Haunted Castle is in the Czech Republic
  • A good way to find someone’s email address is to look them up on GitHub
  • The winner has to say => Which Monster has the Super-Power of being able to cause the sun to shine in the middle of the night?

That’s it – you have all the clues you are going to get and that should be enough to identify the murderer of Count Dracula. I would re-iterate that the blogs are not the sole source of clues, and the other sources have been identified in earlier blogs and indeed in this one several times. There is some overlap but really you will need to look at all three sources.

As has been said many times you have to write your reasoning down – and there should be about 30 logical inferences which you need to write down. This is not like programming were you can achieve the desired result without writing one line of code!

AUDIENCE: (Sings) Code Code Go Away! Come Again Another Day!

Instead you have to write out all the steps. Just sending in the name of the correct Monster on its own will be about as much use as Enterprise SOA!

AUDIENCE: Enterprise SOA! (Entire audience falls about helpless with laughter for a full fifteen minutes. Appy waits for them to finish)

You send your answers and the reasoning list to Paul and HEY PRESTO! If you are one of the first few to do so you will get a mystery prize.

*———————————————————————————————-*

Plot – loosely based on „House of Frankenstein“ (1944) – Part 8 – Conclusion / Finale

*———————————————————————————————-*

NARRATOR:  Evil Criminal Mastermind Frank BOPF and his hunchbacked assistant Slin Shady have escaped from prison in the year 2156 and fled back in time across the BW bridge to the year 1792. After reviving Count Dracula, only for him to be murdered, they move onto Castle Frankenstein where they encounter the Baron, singing dancing Monsters, Werewolf Larry „Talbot“ Ellison and Gypsy Girl Beatty Pea.

At the SAP Press Gala Party Ellison turns into a Werewolf and eats every single one of the guests and then kills Beatty Pea, who however shoots him dead with a silver bullet before she dies. Slin Shady blames BOPF for her death and attacks him with a chainsaw.

BOPF: (Hiding on top of a big rotating brown ball) Look, Slin, I can see you’re really upset about this. I honestly think you ought to sit down calmly, take a stress pill and think things over.

SLIN: Don‘t try to worm out of this. What with all the murders you have committed, false promises you made, wooly jumpers you have worn and song and dance acts you have done, up until now yours has been only the game in town. Well this here chainsaw is a GAME CHANGER!

AUDIENCE: (Stand up, wave their hands in the air) Changer! Changer! Game Changer Will Robinson!

SLIN: Here we go! (Attacks the brown ball with the chainsaw. It shatters into a thousand pieces, and BOPF lands on his head, knocked unconscious) Up till now everything has gone your way – from now on it is all going to go my way! You could therefore say that we are at an INFLECTION POINT!

AUDIENCE: (Sings) Two Inflection Points of Lager and a Packet of Crisps Please!

NARRATOR: At this point the Monsters (who are madly in love with BOPF) intervene, and throw Slin Shady out of the window, and carry the half-conscious BOPF outside the Castle. Once outside the range of the shields that protect the castle the village people are waiting with pitchforks and flaming brands.

VILLAGE PEOPLE: (Sing and Dance) In the Navy – you can sail the seven seas! Y.M.C.A – it’s fun to stay at the Y.M.C.A.!

NARRATOR: Not those village people! I mean the people from the nearby village who have been terrorised by the werewolf recently and Baron Frankenstein for years, and so they hate everyone from the castle and want to kil them.

VILLAGE PEOPLE: Prepare to die! (They brandish their pitchforks and flaming brands)

BOPF: Hang on – I recognize those fiery things you are holding (To audience) How’s that for BRAND RECOGNITION!

BASIL BRUSH: Boom! Boom! Mr. Roy!

BOPF: Villagers! You have got us all wrong!  Don‘t yell „Help help here comes the monsters!“ / Don‘t yell „Help help here comes the monsters!“

(Villages advance menacingly)

BOPF: (To Monsters) Let’s Split!

(Benny Hill theme plays. BOPF runs off followed by a single file line of monsters followed by a single file line of villagers with pitchforks and burning brands followed by a single file line of top models. After running round in circles several times they head towards the marshes)

NARRATOR  The villagers chase their quarry into the marshes. There both the Monsters and BOPF drown in quicksand. They are all dead! HA HA HA HA! THE END!

BARON: Ooooooooo! That is so depressing!

NARRATOR: That is what is says in the script.

BARON: Why don‘t we change the script – just a tiny little bit. How about you replace „drown in quicksand“ with „do a quick grand finale song and dance in the style of a Big Band!“. That sort of rhymes. You make that small change and that would be a major shift in the plot. You could even call it a PARADIGM SHIFT!

AUDIENCE: Whooooooooooooooooooo! (Does Mexican Wave) (Sings) Bananas, bananas, one million tons of bananas! Ba-na-na-na-na-na, na-na, na-na! Ba-na-na-na-na-na, MAKE YOUR BODY SING!

https://www.youtube.com/watch?v=zOvM2uYVkVs

NARRATOR: That version of the banana song was actually quite sweet. But anyway, all right, all right, I will re-jig the plot as you so desire. Take 2

The monsters (who are madly in love with BOPF) intervene, and throw Slin Shady out of the window, and carry the half-conscious BOPF outside the Castle. Once outside the range of the castle shields the village people are waiting and chase them into the marshes.

There both the Monsters and BOPF do a quick grand finale song and dance in the style of a Big Band!

ENTER RAP-STAS

RAP-STAS: I am sorry I am late. Have I missed anything?

ALL: Nothing important!

*———————————————————————————————-*

Song – Grand Finale – The Business Application Studio

https://www.youtube.com/watch?v=r0qBaBb1Y-U

*———————————————————————————————-*

(The Monsters dig up various musical instruments from the swamp and start playing.

The BLUE monsters start playing trumpets.

The GREEN monsters start playing trombones.

The PURPLE monsters start playing saxophones whilst hovering in the sky

The RED monsters start playing guitar, piano, and double bass.

The SKY-BLUE PINK monsters form a Chorus Line

RAP-STAS plays the drums)

BOPF:

There’s this IDE that’s been on my mind
All the time, Business Application Studio
Oh oh
Now it don’t even come for free
It connects to the BTP
Business Application Studio
Woah oh

Ah if it called me a Big Fat Elephant
I’d use it for Fiori Elements

It’s all I need, for UI5 (but not ABAP)
I feel so good if I just say Dev Space
Business Application Studio
Just say Dev Space, oh
Business Application Studio

Now I know that I’m a fool
So I just use Fiori Tools
Business Application Studio
Oh oh
Ooh, appGyver me a chance, appGyver me a sign
I’ll code in it anytime
Business Application Studio
Oh oh

Ah! I’ve just got to have it, have it now
I’ve got to connect it to my SAP back end, but I don’t know how
Trying takes forever and makes me scared
But I feel so good if I just say Dev Space
Business Application Studio
Just say Dev Space, oh
Business Application Studio
Oh

Ah! It’s all I need for UI5
I feel so good if I just say Dev Space
Business Application Studio
I just say Dev Space oh
BA-Business Application Studio
I just say Dev Space oh
Business Application Studio
I just say Dev Space oh
Business Application Studio oh-oh
Oh, oh

Just say Dev Space
Just, just, just say Dev Space
Ooh hoo just say Dev Space
BA-Business Application Studio
Business Application Studio
Ah Business Application Studio
Business Application Studio
BAS-Ooo
Business Application Studio

(Monsters go bananas with the Big Band musical instruments)

Just say Dev Space
Business Application Studio
Say Dev Space oh
Just say Dev Space
Just, just, just say Dev Space

 

Final Curtain – bows with RAP-STAS taking centre stage

 

Ending Credits

 

The Narrator – an SAP Expert – Sir David Attenborough (real name Boaty McBoatFace)

Paul Hardy – an SAP Mentor and SAP Press Author – Himself

Dr. Frank BOPF – a Scientist & Master Criminal – Frank Bough

Slin Shady – a Hunchback (he is a Czech) – Slim Shady

The BAS Street Kids – a bunch of Travelling Showmen – Justice Crew

Baron Frankenstein – a Scientist – John Inman

The Monsters – a Chorus Line of Monsters – Themselves

Appy „Mac“ Gyver – an Investigator, assistant to Code inspector Clouseau of the Surete – Peter Falk

Count Dracula – a Vampire – Bela Lugosi

Mayor McCheese – a Prison Governor – Ronald McDonald

Freda Tier – a Grand-Daughter – Susan Boyle

Larry „Talbot“ Ellison – a Werewolf – Himself

Beatty Pea – a Gypsy Girl – Bella Emberg

The Villagers – a bunch of Downtrodden Peasants – The Cast of „Love Island Season 3“

RAP-STAS – a Relative – Bob Marley

Murder Mystery Prizes created by Vikki Hardy

https://www.sap-press.com/abap-to-the-future_5360/

Baron Frankenstein will return in three years in the musical „Merrily we ROLLBACK WORK“

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Paul Hardy
      Paul Hardy
      Blog Post Author

      I know it has only been a week, but no-one has solved the crime yet and I have a room full of prizes looking at me accusingly saying "I should have been won by now! I should be in a parcel on the way to USA / India / Venezuela or wherever!"

      I think I may have made the contest a trifle too hard, what with splitting the clues into three sources - SCN Blogs / GitHub Code / Quiz on SAP Press Site.

      That coupled with the fact the the murder mystery is a so called "Zebra Puzzle" which in theory at least only 1% of the population are clever enough to solve. However the sort of people who are interested in the latest ABAP technology tend to fall into that bucket so I was worried if I made it any easier I would get bombarded with a flood of correct answers.

      Anyway this week I have (vey slightly) increased the level of duplication (overlap) between the three sources i.e. if before 2 clues were both in the blog and the code, now 3 are. If I have no crime solvers by this time next week I will repeat the process.

      Cheersy Cheers

      Paul