Skip to Content

Frankenstein Must be Destroyed

Writing another book for SAP Press – Part 3 of 3

Winter of Dis-Contents

Introduction

Why a Second Edition?

ABAP

HANA

BOPF

ALV

UI5 / BUILD

PUSH CHANNELS

Introduction

As you can see from the above pictures Dr.(Baron) Frankenstein has his work cut out for him. In both the 1930-1940 run of movies and then later in the 1950 to 1970 Hammer pictures on the same important subject, at the end of each film (movie) the monster was destroyed but Baron Frankenstein managed to get away.

 

He is still at it to this day:-

 

https://en.wikipedia.org/wiki/Dean_Koontz%27s_Frankenstein

 

Having to recreate all those destroyed monsters, right from the late 19th century to the present day, again and again, must get quite frustrating. Luckily now we have all the new technology that SAP has brought to the operating table, to aid the Baron in his insane experiments.

 

How did we get to this stage? Well, this (Monster Making) is the primary, if not the only, reason that a lot of new technology has been developed recently e.g. in-memory database, UI5, BOPF, BRFPlus and so forth.

 

In a stroke of genius, the founders of SAP came to the conclusion that all these new tools could also be used by all the various large private corporations and government departments that were running SAP, not just barking mad monster makers like the Baron. The founders of SAP were working for IBM at the time, and went and told the powers that be at IBM of their new idea. They were laughed out of the room, IBM said only monster makers would be interested in such things, and so SAP was founded as a new company in order to develop such technology for not only monster makers but for all comers.

 

Thus was my first SAP book born, describing how the new technology used by the Baron could perhaps also be used by other organisations. I used monsters for all the examples, but dreamed of the day when SAP could be used for other purposes, maybe even the airline industry. The idea of using airline flights for examples instead of monster seems silly I know, but who knows what the future may bring.

 

After reading my book, lots of companies, some of whom had nothing to do with digging up dead bodies at midnight, cutting them up and then building monsters out of the resulting components, started using SAP, using the very same technology (BRFPlus etc.) the Baron had been using to such great effect. Thus was a worldwide renaissance in such industries as mining and telecommunications, and indeed government, born.

 

Well, I was very happy, I can tell you. Who could have thought that such a simple book, on an obvious subject like making monsters using SAP, could have transformed every aspect of the world we lived in? I literally cannot believe no-one had thought of that approach before me, though I suppose someone always has to be first.

 

It reminds me of the Hollywood film “The Man with Two Brains” and if I was the one being interviewed the conversation would go like this:-

 

Paul Hardy: Would you read that back to me? I’m afraid that might make me sound pompous to your readers.

Interviewer: My brilliant SAP Press Book is unsurpassed in the history of the universe, and will probably make my name live beyond eternity.

Paul Hardy: Well, that’s all right. Take out the ‘probably’. It makes me sound wishy-washy.

 

In fact, so many non-Monster related organisation started using SAP that, in retrospect IBM probably regrets this situation. To put this into perspective, as everyone knows, in 1981 English musician Jeff Lynne was transported into the future by an alien who came down to him from the open skies. In that version of the future IBM was still dominant, hence he sang the following lyrics from the song “Yours Truly, 2095”.

 

I drive the very latest hovercar

I don’t know where you are

But I miss you so much till then

I met someone who looks a lot like you

She does the things you do

But she is an IBM.

 

Taking all the lyrics from that song as a whole:-

 

http://www.azlyrics.com/lyrics/electriclightorchestraelo/yourstruly2095.html

 

-:the song was clearly about a Cortana/Siri/Alexa type of thing, a digital female assistant, who is a telephone, who after every request asks for a type of “are you sure” confirmation by saying “Is that what you want?” before doing a COMMIT WORK.

 

Maybe I am viewing this through the eyes of today, but it seems quite on the ball as predictions go. What no-one could have predicted in 1981 was that in fact it was not IBM who would come up with that sort of technology. That is because the powers that be at IBM did not back the founders of SAP with their proposed dissemination of monster making technology to the masses.

 

Once SAP got going down that path (technology for non-monster organisations) then Apple and all the other companies jumped on the bandwagon. The irony is that SAP was in fact last digital assistant wise; their version of this sort of artificial telephone with a jumpsuit on is called “co-pilot”.

 


 

Second Edition

Frankenstein Conquers the World

As can be imagined it would be difficult to surpass that first achievement – amazingly though after the book had been out only one year technology had changed so much (since I started writing the book in early 2014) that SAP Press wanted me to write an updated edition.

 

There were two pieces of evidence that the world was changing rapidly enough for a new edition to be needed – firstly at TECHED 2015 I noticed that the CDS view was mentioned again and again as the be all and end all. That paired with the SAP Web IDE marked a radical change in SAP direction. In and off itself that would have been enough to prompt a second edition, especially considering most other SAP technologies had also advanced in that short period in quite a dramatic fashion.

 

The second, and far more telling, factor happened a year later at TECHED 2016. In 2015 all the events were spread throughout the upper floors of the hotel, this year they were all in the basement, which is the ideal place to make monsters; safe from the prying eyes of the mob of villagers with burning torches and pickaxes. As an added bonus, the idea of having the presentations underground made things a lot easier for all the presenters and delegates who had, for one reason or another, turned into vampires during the intervening period between TECHED 2015 and 2016.

 

As it transpired, this year’s TECHED 2016 in Las Vegas was the same week as Oracle Open World which also was held underground in a cave, most likely for the same sort of reasons. It was also a full moon.

 

That timing was clearly not intentional and senior management at both SAP and Oracle were both unhappy at the result. This is somewhat like the movie “Underworld” in which two ERP companies fight to the death.

 

Trouble came to a head at midnight on the first day when SAP founder Hasson Plattner and Oracle founder Larry Ellison encountered each other on the main Vegas strip. Ellison spread his black cape wide, jumped into the air, spreading his wings and baring his fangs, preparing to suck all the blood out of Plattner, who responded by turning into a wolf and eating a memory stick in Ellison’s belt containing the top secret details of forthcoming Oracle version 13a, thus delaying the launch indefinitely.

 

Both companies deny the incident.

 

You will have worked out by now that the combination of incredibly rapid technological innovation by SAP, coupled by a vastly increased amount of monster activity in the ERP world in general, generated a situation that was crying out for a second edition of a Monster/SAP themed book.

 

As in the last two blogs on this subject, I would just like to comment on a few of the chapters, talking about the general rationale for some changes I felt the need to make, coupled with content I had to remove due to space concerns.

 

ABAP

I always despair when SAP come up with examples of new ABAP syntax and use variables like “A” and “B” which have no relationship to the real world at all. We developers spend our day solving real world problems so abstract examples are very hard to relate to. Since I want to do something different, how did I go about picking meaningful examples?

 

One recent innovation in ABAP is the UNION clause in Open SQL. How I picked my use case was to look at all the SCN postings over the years that moaned and groaned about how there was no UNION option in ABAP. I saw what sort of problems they were trying to solve in those postings, and picked a likely looking one, and found that indeed it could be solved using UNION.

 

I then changed the problem to a very similar one involving monsters, so everyone could relate to it, and Bob is your uncle.

 

A lot of examples I use originate from my day job. I thank my lucky stars I have such a difficult job in real life – because when you have to do something difficult and/or tedious which makes you scream in despair and try to saw your own head off, it sticks in your mind for some reason. Then when SAP provides a solution I can say to myself “that would have been GREAT – five years ago, and now there is a solution for when my company upgrades in ten years’ time!”

 

HANA

As the song says “What’s that coming over the hill? Is it a monster? Is it a monster?” Well it’s worse than that, it’s S/4 HANA Jim, S/4 HANA Jim, S/4 HANA Jim, etc etc.

 

You cannot talk about HANA programming without talking about code pushdown and CDS views, and you cannot talk about CDW views without talking about monsters. Obviously. And Monsters have an alarming tendency to kill people.

 

The problem I faced is that SAP Press do not want to put off their readers by having their textbooks full of graphic descriptions of death and destruction. They would prefer to focus on “how to” guides for using aspects of SAP technology.

 

However when the very technology is used for monster making, playing with forces mankind was never supposed to understand or control, violence in some form or other is almost always the result, as the Baron had discovered so many times over his career.

 

To try and toe the line, some of my more violent images had to be edited out of the book. For example I described the customers of the Baron as being Evil Landowners in Top Hats who tie women to the railroad tracks and then stand back laughing and twirling their moustaches.

 

I had to remove the murderous element, even though that is just the thing evil landowners used to do in 1930 black and white films. The important point of course is  that moustache twirliness is an important attribute for the customer business object as represented by a CDS view.

 

CDS views are not the only sort of code pushdown – the other one is the use of ADMP which involves coding in SQLScript, a new, scary, language.

 

Proponents of SQlScript often put on sunglasses and shout “Jungle is massive!” by which they mean multiple queries can run in parallel, speeding up what is already a very fast database access.

 

I don’t know about you, but I find coding in SQLScript to be somewhat painful, the syntax is demanding to say the least; I thought ABAP was bad enough – sometimes demanding spaces between the bracket and the variable, sometimes forbidding spaces – but I did not know when I was well off. It also keeps changing, so if you copy something off the internet or a blog, then it most likely will not compile.

 

In the last demo of the second day of TECHED 2015 – two hours and all about code pushdown – an SAP developer from Walldorf wrote some SQLScript and kept getting syntax errors and he could not figure out for the life of him what was wrong even with his colleague (and the audience) making suggestions. In the end he copied some – seemingly identical code – from another working application, and everything was fine so he invited the entire audience to join him in doing a conga round the entirety of the Venetian hotel.

 

In my code pushdown example I wanted the Baron’s monsters to kill and eat customers who did not pay their bills on time, but I had to tone that down to just having the monster destroy the customers property – which is not quite as drastic – so for example the phrase ”the date of the customers horrible, horrible, death” became “the date the customer defaulted on his debt”.

 

BOPF

Some people were not best impressed with the way I wrote the BOPF chapter in the first edition and informed me of all sorts of errors I had made, some real, some imaginary.

 

I have taken some of the suggestions on board for the second version, for example I changed the interfaces to make sure I had totally decoupled my generic classes from the BOPF framework. My fundamental approach however has not changed.

 

My monster business logic is used by not only BOPF, but Gateway Services, Web Dynpro, Business Workflow, classic DYNPRO applications and all sorts of other technology and I am not going to have a different class for each one. I am also convinced that one day the BOPF will be superseded by yet another new framework, and I want to be ready for that day.

 

There were several things in the first edition I said could not be done, as they could not be done in the version of NetWeaver I was using to write that book, but now they can, so I have amended the chapter accordingly.

 

ALV

I wrote about the new CL_SALV_IDA which has an option to read from CDS views. In a blog few weeks back I was wondering about an experiment where I could programmatically read the annotations from the CDS views, using a standard SAP class for just that purpose, and pass that information into the CL_SALV.

 

As it transpires I read another blog a few days afterwards which implied that this happens automatically anyway, which is good, i.e. you put a tooltip as an annotation inside the CDS view and this shows up on the column on the ALV grid.

 

Nonetheless you would still have to read the CDS view annotation data programmatically, if you were using a CDS view as a data source and an older sort of ALV like CL_GUI_ALV_GRID, which you still need to use if you want the user to be able to edit the data, which they always desire to be able to do.

 

Maybe the new CL_SALV classes allow you to edit the data, but I bet they do not. It will soon be February and time for “International Editable SALV day” once again.

 

UI5 / BUILD

As the years have gone by the integration between various SAP technologies has become tighter and tighter. Now technologies like BOPF entities and SEGW services, or CDS views and SEGW services, go together like bees and honey, like bankers and your money, like eggs and bacon, like aliens and ray guns. These technologies allow you to automatically create the model for a UI5 application rather than manually coding it via SEGW.

 

If  John Travolta and Oliva Newton John were technology integration specialists they would say that these various technologies go together like Rama lama lama ka dinga da dinga dong, Shoo-bop sha wadda wadda yippity boom de boom, Chang chang changitty chang sha-bop, Dip da-dip da-dip doo-wop da doo-bee doo, Boogedy boogedy boogedy boogedy.

 

One of those integration technologies, that I highlighted in the chapter on UI5 was BUILD and what I wrote turned out not be as accurate as I thought at the time. I had it in my head that the BUILD tool, with the monkey logo, was an open-source free type of thing with no licence to pay.

 

Just to recap – this technology lets people like business analysts design working UI prototypes, with mocked up data, and get feedback off the end users before development has even started.  Then the prototype is handed over to development, who press a button and all the UI5 code is generated, and then the developers can hook it up to the SAP system and start making code changes. The idea is to speed up the development process dramatically whilst simultaneously not shocking the end users because they were involved in the UI design right from the start.

 

That way no end user says, upon seeing the application for the first time, the day before go-live “Yuck! Yuck! Yuck! Yuck! And by the way, Yuck! That’s horrible, we can’t use that our people would be physically sick the instant they saw that screen, and we just have not got the budget for the sick bags, go off and do it again, properly this time”.

 

BUILD solves all these problems – and all for free! I thought that was too good to be true and sadly it was. The official release of BUILD was on 13/09/2016, after the book had come out, and at that point it was clarified that 5 projects were free, thereafter it was time to buy an Enterprise Licence. Oh well, at least it is not raining. I was right about the ever changing name of the product – I noted that the naming used to alternate between SPLASH and BUILD. I have it on good authority the name BUILD was the eventual winner because you cannot sing “Splish BUILD I was having a bath” and senior SAP management hate that song.

 

Some people do not like all these new technologies that generate JavaScript code for you. The problem with any form of generated code is that some naughty people don’t bother to learn how the generated code works and so naturally cannot make any changes for fear of breaking it.

 

Nonetheless, I thought, when writing the first edition of this book that maybe there could be a happy medium here, with the tool generating the boiler plate code that never changes, and then the developer adds or changes anything they feel like.

 

After all when writing my ABAP programs I often start from a generic template (of my own invention) especially for SALV reports, and re-use heaps of standard and Z functions. Not to mention the ever popular SAP GUI screen painter which generates all the table control code for you which looks terrible but at least provides a starting point.

 

So two years ago I went looking to see if SAP had any auto-generation tools for the UI5 front end bits. Almost at once I found such a beast, but from my perspective it seemed that 0.1 seconds later I got an email from the responsible SAP product owner saying “don’t use that, whatever you do. It was only a joke – we are withdrawing this from the world”. As I recall it was some sort of add-on to Eclipse, and sure enough, now you saw it, now you didn’t, and it vanished forever, or so I thought.

 

I thought that maybe that the powers that be at SAP did not like the concept, but it seems that maybe it was just the first stab at implementation they did not like, because at TECHED 2015 the evil twin brother of the original tool came back with a vengeance.

 

Virtually all of the presentations at TechEd 2015 started with a demonstration of turning a CDS view into a SAPUI5 application by auto-generating the front end from a template.

 

Though in some sense this was just the 50 year old “create a program without writing one line of code” nonsense, which you think software companies would have grown out of by now, as long as the generated code could be changed afterwards I thought this would be just the thing for my experiment, so that is just what I did in the second edition.

 

Push Channels

I had such a fight with SAP over this chapter. I like to talk almost exclusively about the SAP GUI flavour of the Push Channel, which is not officially released and might get pulled out of the next release of NetWeaver. Nonetheless I think this technology is the best thing since sliced bread, so I had to mention it.

 

I know I am no longer supposed to be using the SAP GUI but it is still in wide use at my company, and I suspect, many others.

 

The SAP GUI is the “grandfather” of the more modern UI technologies, as  in the song by Herbie Flowers and Kenny Pickett:-

 

“Grandad we love you, Grandad we do,

Even though you’re old and gray, we still love you”

 

They probably were not thinking of the SAP GUI specifically when they wrote that, but it is a more than apt description.

 

For someone like me who has been dealing with SAP programming for some time what this new technology brings to the SAP GUI table is literally too good to be true. So of course SAP the company don’t want me to use it, but I am going to anyway, as UK singers Chas and Dave sang :  I don’t care, I don’t care, I don’t care if they come round here. I’ve got my push channels on the sideboard here; let your mother sort it out if they come round here.

 

Leaving aside the specific example of the SAP GUI the Push Channel technology is all about replacing polling with a publish and subscribe mechanism to improve system performance.

 

When applications are slow the users complain. They will tell you your program “runs like a dog” which is a bit of misnomer as dogs run really fast. What they mean is that your application runs as fast as a dead dog that has been nailed to the floor.

 

In a browser based application that is running slowly due to the use of polling what gets polled is the back end system (server). An SAP GUI application is running in the server itself and what gets polled is usually the database. Naturally when a browser based system polls the server the database usually gets queried as well.

 

If the polling is happening every second (say) that generates an enormous amount of network traffic, and degrades system performance considerably – leading to the aforementioned “dead dog” experience.

 

In this chapter – which is new to the second edition – I talk about the theory of push channels and since a lot of new technologies fall into the category of a “solution looking for a problem” I then move from abstract theory into the real world of monsters and take a look at two examples of how this “channel” technology can give a tangible benefit to the Baron’s (and most probably your) company.

 

Epilogue

The world of monsters is constantly evolving. There were two new Frankenstein films in 2015 (at least) and a new one in 2016 with Harry Potter cast as the Barons’ assistant, Igor. If you look really closely you can see my ABAP book on the shelf in the laboratory in all those films.

 

What better reward could I ever have hoped for? I imagine the second edition will be on the shelf in all the new Frankenstein films being made this year and next. For the moment I can get back to writing normal blogs … I have two in the pipeline already….

Meanwhile, here is how Frankenstein saved humanity from extinction….
http://phys.org/print396852969.html

Cheersy Cheers

Paul

Linx

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

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Jānis B

    I don’t know much about CDS views, but I’m struggling to imagine where they can possibly come into play in a monstrous application, which is built around shoving very intricate and arcane monsters states inputs into function modules with intimidating looking interfaces, meant to validate and eventually save said states… Somewhere in the “last” function module layer designed to read and write the database (who even cares about that layer)? New read only Fiori applications?

    I mean, this is just the “top level” of monster state changes input:

    * type of automation data for objecttype installation
    TYPES: BEGIN OF isu01_instln_auto,
             key    LIKE eanlhkey,         "key: not to be changed
             BEGIN OF data.
            INCLUDE STRUCTURE eanldata.
            INCLUDE STRUCTURE eanlhdata.
            INCLUDE STRUCTURE isu_admin.
    TYPES:   END OF data,
             rcat  LIKE isu_aittyp,        "autodata of ratecategory
             facts TYPE isu20_instln_facts_auto,   "autodata of facts
             pod   TYPE eui_ext_obj_auto,  "autodata of pod
             contr TYPE isu01_instln_auto_contr,   "control-structure
           END OF isu01_instln_auto.
    

    it goes on:

    *      Automationsdaten für Anlagefakten
    TYPES: BEGIN OF isu20_instln_facts_auto,
             facts_auto    TYPE isu20_facts_auto,
             refvalue_auto TYPE isu20_refvalue_auto,
           END OF isu20_instln_facts_auto.
    

    and on:

    * Automationsdaten für normale Fakten
    TYPES: BEGIN OF isu20_facts_auto,
             iquant       TYPE isu20_quant_auto    OCCURS 3,
             idemand      TYPE isu20_demand_auto   OCCURS 3,
             itquant      TYPE isu20_tquant_auto   OCCURS 3,
             iqprice      TYPE isu20_qprice_auto   OCCURS 3,
             iamount      TYPE isu20_amount_auto   OCCURS 3,
             ifactor      TYPE isu20_factor_auto   OCCURS 3,
             iflag        TYPE isu20_flag_auto     OCCURS 3,
             iinteger     TYPE isu20_integer_auto  OCCURS 3,
             iratetype    TYPE isu20_ratetype_auto OCCURS 3,
             iadiscabs    TYPE isu20_adiscabs_auto OCCURS 3,
             iadiscper    TYPE isu20_adiscper_auto OCCURS 3,
             iddiscnt     TYPE isu20_ddiscnt_auto  OCCURS 3,
             ipdiscnt     TYPE isu20_pdiscnt_auto  OCCURS 3,
             iqdiscnt     TYPE isu20_qdiscnt_auto  OCCURS 3,
             ilprice      TYPE isu20_lprice_auto   OCCURS 3,
             iseason      TYPE isu20_season_auto   OCCURS 3,
             isprice      TYPE isu20_sprice_auto   OCCURS 3,
             itprice      TYPE isu20_tprice_auto   OCCURS 3,
             iuserdef     TYPE isu20_userdef_auto  OCCURS 3,
    *        ...
           END OF isu20_facts_auto.
    

    and on

    and on…

    (0) 

Leave a Reply