Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
hardyp180
Active Contributor

IT’S ALIVE! IT’S ALIVE!

Writing a Book for SAP Press – Part One


Table of Contents

Background

First Step - Accessing a 740 Trial System

Next Step – What to put in the book?

To Be Continued


Once Upon A Time….


On the 29th of January 2014 I had published the following blog on SCN:-


http://scn.sap.com/community/abap/blog/2014/01/29/team-procedural-vs-team-oo

That blog was discussing the merits of OO Programming vs Procedural Programming. A great deal has been written about that subject on SCN, but what may possibly have made my blog unique was that it contained two songs, one about each style of programming.


By co-incidence or otherwise, when I woke up the next day and looked to see if there were any comments, I got one from Tammy Powlas saying that a lady called Kelly Weaver from SAP Press wanted to talk to me about writing a book.

Well, I jumped at the chance, and my book comes out on April the 3rd. Now I was very wary about doing a puff piece of advertising for the book masquerading as a blog, so I checked with Matthew Billingham and he said to talk about the process of writing the book, with just a link to the relevant part of the SAP Press Web Site at the end.


So I am not going to try not to talk about the book at all, but the process of writing it. Who knows, you may end up writing one yourself one day in the not too distant future.


I will split this into several blogs and this blog will concentrate on the first two steps of that process.


First of all I needed to get access to a trial SAP 740 system, so I will talk about how to do that, it is not as easy as you might think, so I will step through the process.


Then I will talk about the reasoning behind how I worked out what new technologies to put in the book and what sort of running example would best tie them all together.


Life Begins at 740


Now I did not get to choose the topic of the book, which was fine by me – I would have written about anything they wanted. It turned out I was to be covering the topic that Thomas Jung & Rich Heilman used to publish books about – theirs was called “Next Generation ABAP Development” and they (Thomas & Rich) did not want to write a third edition, so SAP Press turned to me instead to write a similar sort of book (but not a sequel) which was very flattering.


However my company is many years away from getting a 740 ABAP system, so I had to lay my hands on one in a hurry. Luckily it is possible for anyone to get their hands on a “free” trial SAP system with a 740 ABAP system and a HANA database. It took me a while to work out how to do this, so I thought I would guide you through the process.


The first thing you need is an SCN ID – I would presume you have one, as you are reading this. The second thing you need is to sign up with Amazon Web Services (AWS). That part is ludicrously easy as (a) since you have to pay they (Amazon not SAP) want your money and (b) as might be expected Amazon make their web site as intuitive as possible.


https://console.aws.amazon.com/iam/home

Since that is so easy there is no point on dwelling on it, or even saying one word about it. I was amazed by how technically advanced that company is – during the process a robot phones you up, and as you talk to it the screen in front of you changes without you touching it. This is the sufficiently advanced technology which appears to be magic to me.

The cost is the important bit – just having an AWS account costs you about five dollars a month, plus about a dollar for every hour you have the trail SAP system in existence. Not the end of the world, especially if you can get your company to pay for it.

Cloud Cuckoo Land

Now you have all your credentials it is time to navigate the “SAP Cloud Appliance Library”.

https://cal.sap.com/

You will then get a screen saying “cloud appliance library loading” which may take a long while. The website seems really slow, it may just be me, but I wonder. If you press the “login” button you should get a message to the effect that you have been authenticated and are being directed to the main site. That is, if you normally log in to SCN and/or the SAP support portal using a certificate with your “S” number (SCN ID). You then see a nice picture of a hot air balloon, not that SAP is full of hot air or anything.

Up up and away in my beautiful – yes beautiful - balloon

Now you might think that to get started you might go to the “get started” section at the bottom of the screen – how wrong you would be. Try that and half way through you will get asked if you want to pay ten billion dollars for a new SAP system.

Instead, navigate to the “accounts” tab where you can create an account which links your SCN ID to your AWS ID.

Silence you User

So far so good. The next cab off the rank is to go to the “solutions” tab where you get a huge list of possible trial systems. The ones that are free are highlighted with big blue boxes.

Solutions looking for Problems

When I first started playing with this I thought the round circles that looked like radio buttons were in fact radio buttons, but they are not – they are just status indicators. That is obviously what you must do to your users – give them familiar looking icons which do something utterly different from what they are used to. That is rather like the icon in transaction MIRO which normally means “refresh” but there means “delete”.


Watch Out! – Not a Refresh Icon- it means DELETE

Anyway, getting back to the matter at hand, what you need to do is click on “try now” on the right hand side. I was on Internet Explorer 9 and had all sorts of problems, but now I am on version 11 all is well. You get the usual “terms and conditions” to click through and there is an interim, apparently pointless, step where the text reads “activate” and you press that and then you get to a stage where the text reads “create instance”.

This is the important bit – an instance is an SAP system in the cloud where you are the only user. You choose how long the instance is to remain alive i.e. you enter a “termination” date and time. Like the enamel on your teeth, when it’s gone its gone forever so you lose all your work, so be sure to download any custom objects you have created you feel like keeping for posterity using SAPLINK. As I said you get charged about a dollar for every hour the system is alive, and you get an estimate of the cost before you press “go”. When you are finished a so called PEM file gets downloaded to your PC which will be used to enable a remote desktop connection.

You then have to wait an hour whilst the new SAP instance creates itself, which is nothing in the grand scheme of things. Then the fun really starts.

Instance Coffee

After an hour, navigate to the “instances” tab. If there is a clock on the left hand side the instance has not finished creating itself, if there is a big green square you are good to go and there will be text on the right hand side saying “connect”.

When you press “connect” you get a “connect to the instance” pop-up box and you choose “remote desktop” and are then asked if you want to open the PEM file that was downloaded to your PC earlier. You say yes, and then after assorted security warnings a remote desktop session opens up, with icons for Eclipse and SAP.

Note – I have found that if you are inside a corporate firewall the remote desktop session will most likely not work. At the SAP Developer summit in Sydney last year most people were using their work PC’s and had noticed the same thing.

Pull That Branch Three Times

Now this SAP system has no ERP content – you can’t create sales orders or purchase orders or any of that nonsense. All that exists is the ABAP content, so you can muck about writing programs and the like – here is what is installed.

Software components in the Trial SAP 740 System that are installed, by the old gasworks wall

Sadly the BOPF framework is not there, as that is part of the “Business Suite Foundation”, but one day the BOPF will officially join the NetWeaver club and become part of such trial systems.

Now I want to stress something here:-

·         You are the only user on this system so nothing you can do can affect any other user

·         There is no Business Suite content, so the only thing you can do is play around with ABAP, creating custom objects and the like, trying out new ABAP syntax and so forth.

You have a user name DEVELOPER and you would expect, given the only possible thing you can do in this system is develop, that this user would have a developer key. How wrong you would be.

I will now step through the process for granting the DEVELOPER user a developer key. Be warned, this is going to be rather like following a Da Vinci Code trail of clues. When I explained the process to my colleagues at work and they realised what one had to do they all fell about laughing.

First off, log into the trial SAP system using Client 000 and user SAP*. Then call transaction code SLICENSE which looks like this:-

Transaction SLICENSE - to kill

You will see a randomly generated hardware key. The lights will all be red at the start, not like they are in the picture. You have to make a note of this really long code, put it on the clipboard or write it on a beermat or something.

Then go to the following website:-

http://www.sap.com/minisap

You will see a screen asking you for your name, email address and “S” number.

MINISAP / Mini Me

You need to choose the “A4H – SAP Netweaver 7.4 AS ABAP / HANA DB / Linux” choice. The F4 drop down looks crazy on my screen, the boxes with the two choices are half the size of the screen, and if you try it twice the screen locks up and you have to start again.

Anyway, I press “submit” and then I get a message that an email will be sent to me with the licence key. As I need my corporate email I log into the company system, which breaks the remote desktop connection. I then wait about ten minutes until the email arrives.

I open the email and paste the contents of the attached text file onto the clipboard.

I then log out of the corporate system and restart the remote connection.

I then open a new text file in the remote system and paste the licence key into it, then save this new file.

I then, in transaction SLICENCE press the “install” button and upload the file. The lights go green.

I then go into the forest and pull the third branch of the fifth tree on the left three times.

I then need to go into transaction SECSTORE and then press the “execute” button and the screen fills up with green lights.

Transaction SECSTORE

What is happening is that client 000 is making an RFC call to system 001 saying that the DEVELOPER user account is allowed to develop.

Now, I can go into client 001 as DEVELOPER and will now be able to create Z objects. But only if the **** crows three times after midnight and the hen lays four addled eggs and Jupiter is in conjunction with Uranus.

There, that was easy, was it not? You hardly took even one hour of the time you are paying for doing housekeeping tasks for no apparent reason. It’s like going into a hotel room and finding the bathroom and cupboard padlocked, but with a note on the table saying the keys to the padlocks are hidden in the room somewhere and here are some clues to their location in rhyme. All the hotels I stay in do that – you probably find the same yourself.

Anyway, you soon get used to it, and the upside is that you have an (almost – no BOPF) fully functional 740 system to play with. Oh and you have to go into transaction SICF and activate assorted services if you want things like BRF+ and Web Dynpro to work.

Choosing what to Put in the Pot

Having got the technical barriers out of the way, I had a lovely brand spanking new 740 system to play chock full of new technologies. The task now was to choose which of the myriad of those new SAP technologies to write about.

Where do new technologies come from? There are several possibilities:-

·         The stork brings them

·         You find them behind the mulberry bush

·         They get delivered as part of an upgrade to your SAP system

I have often said that going through an SAP Upgrade is like building an extra storey on top of your house. It is really expensive and takes time and effort, and in the end you have a whole new floor where you can go up and try out all the exciting new things that are up there.

The funny thing is though, after all that effort most companies never bother going upstairs and don’t use any of the new functionality. This is why so much ABAP development is for the purpose of adding “missing functionality” i.e. functionality available in SAP standard that no-one knows is there. The problem is compounded by all the new (business facing) functionality in enhancement packs being delivered in a dormant state – my experience is that companies are too scared to turn it on.

With an enhancement pack installation (upgrade in other words) you also get a new version of ABAP and naturally that is not dormant so you can start using all the new goodies from day one. Again, very few people ever do, they just stick to programming using DYNPRO screens and function modules and pretty much the exact same toolset they were using in 2000.

This is partially to do with resistance to change, but also to do with the problem that people just don’t seem to know about all the new things in their system. Let us say you have been on 7.02 for a while – have you ever used ABAP Unit? Or BRF+? Or Shared Memory? Do you even know what they are for? Do you know you can use UI5 with a 7.02 if you install an add-on?

And that is just in 7.02. More things followed in 7.31, and in 7.40 a whacking great sea change came along, completely renovating the ABAP language and making it possible to write programs with half the lines of code.

Just to make things scary, there are a new generation of young programmers sneaking up beside us old fogies and they do know what these things are, and have no fear of them.

“These kids [of the current generation] have no fear of technology … sort of like I have no fear of a refrigerator.”

Don Tapscott: Four principles for the open world

So, in theory at least, there should be a need for a book to tell programmers all about the new tools they have which are hiding in plain sight, and they should become conversant with if they don’t want to get edged out by the younger generation. And I could have my cake and eat it too; as such a book would also be of interest to the new young programmers so they could learn about new things in order to displace the older generation.

So I was told I need to make a list of 15 chapters, each covering a recently introduced ABAP based SAP technology. At first I thought I was never going to be able to come up with fifteen different new technologies to talk about. I took a piece of paper and divided into sixteen squares and started writing down things like “BOPF” and “BRF+” in each square. After the first few I ran out and started to panic, but then a few more started popping into my head, and before I knew it I had filled up all the squares and was writing extra things around the edges. Then it was a question of what topics to remove.

So, with the technical topics sorted out, the next thing to think about was the best way to type out these technologies to the waiting world, as Bob Geldof would say.

The Style Council

Next was the question of style – good as the book by Thomas Jung and Rich Heilman was, I wanted to do something as different as possible, and so I could not talk about a programmer at a university called “Bustle” or some such.

Nonetheless there has to be a running example, to give some sort of continuity between assorted chapters which all be concerned with different subjects.

Surprising as it may seem the easiest part of each chapter (to write at any rate) is to explain how to technically do “whatever it is” that is covered in the chapter. After all there is half a ton of online SAP help for each subject. However, having read all this myself and watched assorted TECHED videos online, I can see that sometimes there is a need to present this material in a somewhat more flamboyant manner. You can be delivering the most exciting innovation the world has ever seen, but if the audience falls asleep half way through, you have failed to get the message across.


A common complaint with the standard documentation you are directed to is that it is a bit abstract / divorced from reality, even when examples are given. I grant you that the SFLIGHT model is something we can all relate to, but I spend half of my life at airports due to business, and sometimes I would like to think about something else.


When writing about “Domain Specific Languages” Michael Feathers also said most of the examples he found in the Java field were just plain boring, so he made up an example based on a certain film genre. The Head First Design books use frivolous examples also. It is easy to relate to fictitious situations because we watch so much TV, and watch so many films (movies), and some of us even read novels. The difference is we do all these things for pleasure, but we go to the airport because we have to.


So, if I really want to show how to do the “whatever it is” from each chapter in a realistic way, then I need a sample application which runs throughout the book - which is normal in the SAP ABAP series – and for which the reader can look at the source code from magic realm in the internet where it will be stored, but is entertaining at the same time - more like the movie “Airplane” (called “Flying High” in some countries) than SFLIGHT.


So I chose for the running example a common situation most programmers find themselves in at some point in their lives – working for Baron Frankenstein, programming an SAP system to make monsters. I mean, who hasn’t done that? So it’s something everyone can relate to.


The Right Tool for the Right Job


Another departure is that a lot of books just say that the new technology is wonderful, and would not dream of saying a single negative thing for fear of upsetting SAP – I imagine this must cross the minds of authors who are also SAP employees.


So I decided that sometimes in my examples you would see me demonstrate the new “whatever it is” in my example application, and then decide to change it back to the way it was before. This is not because I came to the conclusion that the new tool is useless – if I thought that, I would not include it in the book – but because no new technology can be a panacea for every single problematic situation you come across.


In regard to the lack of effectiveness of such “magic bullets” I always like to draw analogies, and in this case I am going to bring up the plot of a UK comedy / drama from about 25 years ago called “A Very Peculiar Practice”. This was about a group of doctors who worked at a university.


In one episode they were being pushed to test a new wonder drug that was supposed to cure everything in the world. One doctor was really taken with the promise of this new drug and prescribed it to everyone who came to him, or even came near him. The hero of the piece (Doctor Who actor Peter Davison), however, only prescribed it where it seemed to make sense, and then only in conjunction with established medical techniques.


In other words, with all the new ABAP goodies we have all these new hammers, what is to stop us running round looking for nails to hit them with?

So I thought I would try and give my two cents worth on when to use “whatever it is” and when NOT to i.e. use it when it makes sense, not for the sake of using it because it is new.


Coping with a lack of perfection

I wonder how many times someone looks at something new from SAP and says “that is not exactlywhat I want” and so goes off and gets the development department to build something similar from scratch. I am thinking of business facing applications here e.g. a company building its own EHS system because they don’t like the SAP one, but developers can be just as picky, or maybe even more so and looking at something new like BRF+ and saying “that is quite good, but it cannot do the ABC123 task so I won’t bother with it”.


In other words the new tool is not perfect. After coming to Australia I explained to my father what my new job involved. He asked me “What happens when everything is working perfectly and all the end users are happy?” the inference being that when that day dawned I would be out on my ear.


Luckily for me, and for every programmer in the world, the end users will never be happy, because being satisfied with something appears to be contrary to human nature. In the same way, once you become familiar with a given new SAP innovation you may say “well that’s not good enough, what about the X, what about the Y, that won’t work at all when I want to do Z”.


I think the innovations from SAP I wanted to put in the book are really good, but they are not perfect due to the fact that nothing can be. Once you get to perfection then you don’t need to innovate any more, and that would be the end of the world.


Some SAP salesman will tell you that all the lovely new toys do everything you need right out of the box. Nobody would want anything more. Of course they wouldn’t. Or would they? We asked The Black Adder.


“Nonsense, nonsense …. but just in case it’s true….” – Black Adder II, Ben Elton / Richard Curtis.


I am as picky as the next person, and often when I have tried out the new technology there have been aspects I have disliked, or features I felt were missing. In such cases I wanted to say how I personally have got around these perceived shortcomings using my own ABAP code, often adapting solution I found on SCN. Even better, in some cases, suchas ABAP in Eclipse, or BRFPlus, it is possible to enhance the standard tool with your own improvements till the cows come home to roost.


To be Continued


I am going to do a few follow up blogs, in which I will talk about the book writing process, and spice things up with assorted content which was cut from the final edition from the book. The vast bulk of that (the cut material) relates to the philosophy of programming i.e. the why the bit that rarely changes, as opposed to the how which changes all the time as new technologies come out.

Cheersy Cheers

Paul

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

52 Comments