The 26th of October 2017 was the second day of SAP TechEd Las Vegas, but in many senses the first “real” day. I am sure many other people have covered the areas below in greater of lesser detail, so I am just going to regurgitate what I can remember while it is still more or less fresh in my mind. The reason I am posting this so late is that I took four weeks holiday in the USA just after the Las Vegas event. The irony is that now I am back in Australia I am going to Dallas next week on business.
09:00 Opening Keynote – Bjorn Borg
You are probably familiar with the “where are they now” type TV shows which tell you facts like the actor who played the voice of KIT in “Knight Rider” went on to found car sharing company UBER or that the surviving members of “The Brady Bunch” built the world’s largest catapult in 2007 and managed to propel themselves to the planet Mars where they have been living ever since, with Elvis.
In the same way after a highly successful tennis career when Bjorn Borg retired from the game he went on to become the Chief Technology Officer of SAP, and is renowned for doing the most entertaining keynotes possible. This is a welcome change at a technology event.
This year they had a mock-up of the Starship Enterprise Bridge, and Bjorn was dressed as Captain Kirk, and all the other SAP executives and stalwarts like Ian Kimble were dressed as Bones, Spock etc… for their presentations during the keynote.
Spock was a woman, and her uniform was based on that worn by the female Vulcan science officer from the “Star Trek: Enterprise” two part episode “Through a Mirror Darkly” set in the Mirror Universe. So this tells us two things – firstly the staff at SAP do their research very well indeed, and secondly there is no way in a million billion years we who work in IT are ever going to shake off the image of all being science fiction nerds. I would not be surprised if next year all the top SAP executives dress up as Wizards and Halflings and Raistlin and Tanis Haf-Elven and start rolling D20s and playing “Dungeons and Dragons” on stage. this is what the stage will look like in 2018:-
Keynote 2018 Prediction
There were only two buzzwords I made note of – the first was CONCAVE HULL though I cannot remember for the life of me what the context was. The other was that the SAP Data Hub was described as a “warp containment field”.
There were demonstrations of everything that might be expected – Ian Kimble as Bones did the Data Hub presentation from the day before, but this time the audience lapped it up. There were demonstrations of machine learning and co-pilot and all sorts.
However they say people only remember one thing from a presentation and that is certainly true for me, there was one announcement that blew everything else said right out of my mind it was so important.
Up until now if you wanted to build your own applications for the cloud version of S/4 HANA you built them in the SAP WEB IDE using any language you want except ABAP, and then connected to the S/4 HANA system via public APIs. You cannot add your own code to a true cloud product because you share the code base with everyone else, and updates happen every three months and that only works if there are no customer modifications to the code base.
So, I had viewed that as the death knell for ABAP. Everyone told me I was wrong, but my logic was that if SAP want everyone on the cloud version of S/4 HANA (and they surely do, no matter what they say) and you cannot do your Z developments I ABAP, then the usefulness of ABAP would have been limited to SAP employees, as S/4 HANA is still written in ABAP, naturally.
However on this day a man dressed as Captain Kirk sitting on the bridge of the Enterprise announced that henceforth ABAP would be added as a language on the SAP Cloud Platform / HANA Cloud Platform / SAP WEB IDE / whatever it is called this week.
So all the arguments about the death of ABAP have become moot – it is back from the dead, this right from the top of SAP.
If that was not enough good news things got even better – we could see the screen that Bjorn was working off and what should be right in the middle of it but good old “ABAP GIT”. An open source ABAP project being promoted by the CTO of SAP during the opening keynote.
Graham Robinson promotes ABAP GIT all the time – he gave a speech on it during this TechEd. He was sitting two seats away from me during this announcement and although he knew it was probably coming eh still must have been very happy. All the Mentors sit together in one block, rather like a herd of Wildebeest in case a pride of Lions tries to attack us. Not very likely during a keynote presentation, but you never know.
It was just as well none of us were eaten because at the end of the keynote Bjorn started going off about how wonderful the Mentors were and how SAP could not survive without us.
He then called some Mentors – like Jelena – onto the stage and gave them tribbles.
Lastly he put on sunglasses and did the Blues Brothers song “Everybody Needs Somebody to Love” accompanied by Kati who is one of the top dogs at the Mentors program, and the Mentors Jam Band.
Everything is going to be a bit of an anti-climax after that, but it could be argued we were all here to learn about the latest SAP technology, and since there were about ten billion sessions to choose from we had better get on with it.
I printed out all possible sessions and it came to 35 sheets of paper, and that was an Excel spreadsheet with the font as small as I could get it and still read it. So naturally it was virtually impossible to decide what to go to, there were about ten different things vying for your attention every second of every day, ten things and you want to go to them all, even concurrent drinking events. This was my first time attending as a Mentor, so I had even more options, such as the interviews with senior SAP executives.
In some conferences which are much smaller than this everything fits neatly into one hour bands – you look at all the options from, say, ten to eleven, and pick the one you like the most. That does not work here – all the sessions overlap and are different lengths ranging from half an hour to four hours.
The obvious solution was to write an ABAP program to solve the problem. This would be a much more complicated variation of the “travelling salesman” problem. In this case you would enter all possible sessions you would like to attend, ranking them in some way, and the program would loop through thousands of possible agendas coming up with the one that filled the most time, whilst still leaving fifteen minutes between sessions to get from one to the other (you need that, it’s a big hotel). Moreover some sessions are immovable e.g. you get up to 3 hands-on sessions, you need to sign up for them the day they come out, they are so popular. Also, I was presenting two sessions myself, so I had to be there for those, and Mentors have some mandatory things they have to do.
I am still not happy with my creation in this area, but then I am never ever 100% satisfied with any program I write, it looks like a work of genius to me the instant I finish it, the next day I look back and wonder what I was thinking, surely there is a better way to do the same thing. Anyway hopefully by the TechEd season next year I will be happy enough to share the code on SCN. Putting code on SCN always gets you constructive criticism.
11:15 – ABAP in Eclipse Workshop
I like to write about ABAP in Eclipse, and play around in it, but I am pretty much self-taught. You get a tutorial when you first install the tools, and that teaches you the very basics, but otherwise you need to rely on blogs and the monthly Eclipse newsletter and trial and error.
That is not to say the Eclipse IDE is no good – quite the opposite – the problem is that even with all the wonderful things I have discovered I cannot help but wonder if I am missing even more features I have not yet discovered, and have only touched the tip of the iceberg.
Since I bet that is the case, going to an official SAP workshop on using ABAP in Eclipse seemed a wonderful idea. Unfortunately this particular workshop – despite the name – spent about 5% of the time dealing with Eclipse as an IDE and the rest about new ABAP features that came in with 7.40 (Not 7.50, Not 7.51, but 7.40). This prompted me to say that in effect I had sat through the same presentation I had encountered two years earlier.
In defence of this presentation naturally we had to use Eclipse for all the programming, and hopefully that would have converted people had we used any of the features that Eclipse has that SE80 does not. Sadly that was not the case.
Nonetheless those new features do need to be shoved down people’s throats as I think it is highly unlikely many programmers are using them, or indeed know about them, even if they are on a high enough platform. This especially applies to the functional programming elements now available in ABAP.
The idea of functional programming is very sound indeed. I would advocate everyone to look up on the internet “Functional Programming for ABAP programmers”. It is a new addition to ABAP and has its place but the problem is the functional constructs can make the program hard to read which is a Bad Thing. I am not an advocate of using these things willy-nilly, but you need to be aware they are there, and if you can use them without detracting from the readability of the program then I say go for it.
I would quote the 3rd Doctor Who (Jon Pertwee) from “Inferno” (1970)
“I haven’t much time for computers, in fact I hate the things. But they are a tool, and if you have a tool at your disposal, you might as well use it”.
One way to bring back the clarity the new constructs take away is to separate the “what” from the “how” i.e. have a method that says what the complicated unreadable thing is doing, and hide the complexity inside that method.
Also, the problem with the standard SAP examples – as I said the first time I encountered the 7.40 examples, three or four years ago – is instead of real world examples they use variable names like X and Y and A and B so you have no idea of any possible business use for what you are seeing. That is why when Thomas Jung did his version of the examples in Australia once, he replaced all the standard SAP examples with meaningful ones.
This is a vital lesson for people preparing SAP examples to learn – the whole point of the software is to solve business problems, not academic mathematical exercises where saying X = F(Y) * B + Z seems somehow meaningful. People have a go at me for using monster names for my examples but at least the variable names have English names as opposed to X and Y and Z. If you ever look at a university research paper you will see where this naming is coming from, they always say things like F(X)2b – 7Z(Y)^t and expect you to know what they are talking about.
02:00 – ABAP Programming Model for S/4 HANA
One enormous positive is that at any given time SAP has a clear vision for the future, and thus a clear guideline for how you should be writing your programs with one eye on that future. The problem is that every year SAP revise (“improve”) the programming model so what you write today based on current guidelines might have to be changed dramatically in the future. Gateway would be an example, with all the initial signature parameters in the data provider class becoming obsolete, and now the guide line not to use the data provider class at all.
The latter shows the wisdom of Graham Robinson’s recommendation to always use standalone classes for business logic to make them re-usable. I have always advocated this as well, never trying to bind my business logic to a given framework, given that frameworks come and go with the wind.
Someone somewhere once said to me not to use a “model class” for a business object, but it looks like the current SAP programming model requires just that. I will expand on this in a second.
In a nutshell, the new SAP programming mode requires you to start with the data model i.e. a CDS view (more properly a hierarchy of CDS views) which do all the hard yards in the database as opposed to the data manipulation and aggregation we have typically done in the application layer thus far.
The final CDS view for an application would then be annotated such that a BOPF definition is automatically generated so you can then add the logic for what I would call PBO and PAI logic e.g. data consistency, mandatory fields, derived fields, user commands and so on. It is never mentioned but this is where I think the BRF+ business rules have a place.
Also the CDS views would have annotations that would be used by the automatically generated Gateway service which in turn automatically generates the UI5 application.
My hope is that at every level you can manually mess about with the automatically generated code, as nothing that is “out of the box” is ever exactly what you want it to be.
The Goodies once sang a song which contained such lyrics as “Fathers Christmas – DO NOT! and “father Christmas – DO!” and SAP have provided us with something similar, namely a big list of guidelines of what to start doing once you reach a certain ABAP level.
SAP do’s and don’ts
I always think in terms of ERP so note that 7.40 equates to EHP7, 7.50 to EHP8 and 7.51 implies you are already on S/4 HANA. So if you are on EHP6 or below currently you have no need to start doing all the fancy things SAP recommends as yet, which is no excuse for not learning about them.
If you look at the DO NOT section two of them we have been saying for ages – splitting locking, authority checks and database interaction into their own classes is a must for unit testing, so you can start doing that as soon as you have ABAP OO which is 4.6C as I understand it.
Likewise putting actual code in the Gateway DPC_EXT is a non-no as alluded to earlier. Framework specific classes like this should always outsource the business logic to re-usable general classes.
The most interesting “NO” is the instruction not to code read only database access manually. I wonder what they mean by that. My best guess is that they want me always to use CDS views to get data out of the database. That seems very strange however, especially given the enormous amount of effort SAP have recently put into extending the scope of what you can do with OPEN SQL. Surely they would not give you about ten million extra features for your OPEN SQL SELECT statement query and then tell you not to use any of them, or indeed anything you have used before. That would be insanity would it not, so it cannot be true?
There is so much going on in this space (change of ABAP programming model) I cannot do it justice here. As a last point I love acronyms. If someone uses one in a presentation and you do not know what it stands for then you can go into all sorts of flights of fantasy. Take the following:-
“The behaviour definition language (BDL) extends the ABAP language in order to integrate existing business logic into RAP”.
Instantly I get visions of MC Hammer rapping out ABAP code – after all the “open closed principle” says that in regard to existing production code “you can’t touch this”.
What SAP appears to be saying is they want business objects (a la BOPF) to be “first class citizens” whatever that means. I am going to have to do a lot of investigation here but it looks like the BOPF is mutating quickly (e.g. draft functionality), just like CDS views and also how you code (or more properly generate and then change) UI5 applications.
Notably, just to be clear about this, all new innovation is happening in S/4 HANA and the ECC system has reached its final destination even if it does not officially die for another eight years.
Up till now I have been using an ECC 6.0 EHP5 system for my day to day job, and an EHP8 system for my book writing, dipping into the CAL for playing with a HANA database. This time next year I will be using an ECC 6.0 EHP8 system for my day to day job, we are upgrading to a level which is in some senses already obsolete (the norm for IT I would say) and I will have to get a S/4 HANA system for my book writing….
04:00 – Show Floor
Something very strange happened whilst I was wandering around the show floor waiting for my next task. I went to the SAP Professional Journal booth and they said I could have a free book (compilation of articles) on any subject I desired. I picked ABAP programming, as I am not so arrogant to think I have all the answers and want to know what my peers have written on the subject.
Anyway, I went over to what looked like an empty table to open up my backpack (you get one when you register) and put the book inside. Whilst I was fiddling with the straps a voice came out of nowhere saying “Sir, would you like a cold beer?”
There is only one answer to that question so despite not knowing where the voice was coming from I said “Yes Please” and wondered if a glass of beer would materialise from nowhere, which indeed it did. I thought this is a great example of new technology, and thus was really disappointed when I did my backpack up and the stood and found a beer stall right behind me, hidden such that I could not see it initially.
04:30 – Mentor Booth
On the show floor was an area (Community Clubhouse – see Goat photo below) that included SAP Press, the SAP Community (SCN), ASUG, the Mentors and a whole bunch of related booths. Use Mentor types took turns to man our booth but really we didn’t know why we were there. If someone wrote us out a happy tenth birthday card (all materials supplied e.g. sticky stars) then they got a children’s t shirt.
Some people asked me how to become a Mentor, and I gather some were horrified that it involves actually doing something in your spare time and is – gasp – unpaid. I always say you get made a Mentor because of what you were doing already rather than deliberately doing something to become a Mentor and get “in with the in crowd”.
05:00 – The Quest for ABAP Unit
I did this so called “networking session” on the show floor. What is the difference between a networking session and a regular presentation you may ask? Well firstly it occurs on the show floor and secondly it is supposed to be more interactive, not just a presenter showing a bunch of slides. In real life they end up as a presenter showing a bunch of slides whilst everyone listens.
So I dug out my slides from a talk on ABAP Unit I had given in Melbourne four years ago, and my attempt to be “interactive” was to try and ask everyone in the audience what their company had been doing, if anything, in the area of unit testing.
I was happy to see every chair taken, and people standing round the sides who kept standing round the sides and did not wander off, which it is easy to do when on the show floor especially, as I have mentioned, that if you get bored with what the speaker is saying you can wander off and get a free beer. It is much more difficult to do that unobtrusively when you are sitting in the people of a lecture hall six floors up.
Anyway, once again I told the unit testing story.
Above is a blog I wrote on the subject four years ago, and I have been giving speeches about this ever since. This is one of the subjects I will be working with my German programming colleagues in a workshop in Heidelberg next month.
The purpose of unit tests is to stop the code being what is called “legacy code”
It is the “less risky to modify” we want to zero in on. We want to be sure, when we make a change to a big program, that we do not break any existing functionality.
In essence there are three steps:-
Programs need to not mix different things via code in the same routine where a ”thing” is defined as:-
- Database Access / Update
- User Interaction
- Calls to external systems (e.g. TESYs / BCC / Weighbridge / Printer)
- Business Logic
The business logic remains, all the other parts need to be replaced by calls to a method of a class which does that ONE THING. This is called the single responsibility principle.
What is going to be tested is the business logic – conditional logic, business rules, transformations, formulas (mathematical calculations) like the polynomial equations in the BOM calculation. A unit test cannot test any of the other stuff that needs to be tested manually or by an automated framework like the HPQC.
For each such class in your application there needs to be a “mock” class, a subclass of the real class which does not really talk to the database / user / external system or whatever but returns hard coded data (e.g. user said yes, external system said such and such, database returned this value and so on).
Then using the ABAP unit Framework you write tests. What is a unit test, you may ask? One guy who wrote a book defined it thus.
A unit test is an automated piece of code that invokes a unit of work in the system and then checks a single assumption about the behavior of that unit of work.1
A unit of work is a single logical functional use case in the system that can be invoked by some public interface (in most cases). A unit of work can span a single metho1d, a whole class or multiple classes working together to achieve one single logical purpose that can be verified.
I would highlight the term “use case” here.
A use case comes out of the test script attached to the change request. Naturally everyone has highly detailed test scripts given to them as part of the technical specification…. Certainly you do not get a sketch on the back of a post it note and then make everything up yourself. Perish the thought.
The example would be:-
“As a monster dispatcher, I need to make sure the Monster is evil enough, otherwise it will not be able to terrorise the peasants”.
This results in a negative and positive unit test which would read as follows, from a high level.
GIVEN_MONSTER_EVIL_OF( 100 )
GIVEN_MIN_LIMIT_IS( 25 )
WHEN_MONSTER_ATTACKS_VILLAGE( ).”This calls the production code
GIVEN_MONSTER_EVIL_OF( 3 )
GIVEN_MIN_LIMIT_IS( 25 )
WHEN_MONSTER_ATTACKS_VILLAGE( ).”This calls the production code
Unit Test Example
The idea is that if the functional person reads this high level code in the test class of the program they should be able to relate it back to the specification they wrote. In other words the test class says what the program should be doing, and furthermore actually tells you if it is in fact doing that when you take the option PROGRAM =>TEST => UNIT_TEST from SE38 or SE80. Hence the unit tests are called “executable specifications”.
No-one said any of this is easy, but the benefits are enormous for both speed of change and stability, which are going to be vital for example if you have many countries on SAP using the same core programs.
Then I started asking the audience about their experiences and a grand total of one lady said she insisted upon this in her development team, and everyone else had either never heard of the concept, or had heard of the concept and would love to do it, but had never managed to get around to implementing the process for whatever reason.
I can tell when a talk goes well, as afterwards people queue up to talk to you instead f running off at speed. This is especially impressive given the main free drink event was starting up just about when my talk was ending.
06:00 – Networking Reception
For a long while networking receptions used to be called “cocktail parties” (at least in Australia) despite no cocktails ever being served. Nowadays the stated purpose is to talk to people you do not know whist getting the free drink. This led to the following during the closing talk at an SAP event in Australia.
Graham Robinson: Yesterday was the best networking I have ever seen.
Martin English: I Network like a Fish!
The problem is that everyone sticks to talking to people they already know, thus defeating the purpose. I was lucky in that during the early stages (literally the first hour) I had a queue of people wanting to talk to me about my “networking session” on unit testing but after that it was a bit of a challenge trying to talk to strangers.
Nonetheless I managed a fair few.
The last part of the evening was dedicated to working out where I could pick up Capra the Goat for the next day. Luckily the Mentors had a dedicated “Whats App” channel for important things like this, so I was able to meet Christian Brivckmuller in the “Public House” at the hotel at 9PM to discuss important Goat Transfer matters for the morning. He had to take the Goat on a Fun Run early Wednesday morning, thereafter I was to be Goat Herder for that day.
This vitally important subject will be covered further in my next blog…