You are on page 1of 123

miniSAP Installation – Part 1

Sérgio Serra
August 9, 2017

Share on Facebook

Tweet on Twitter

When I started working with ABAP, I was lucky enough that my previous
company provided me with two weeks training. That way, I could learn
everything that I needed to be able to start my SAP
adventure. However, when I got home, I always felt that I needed
something to sharpen my newly acquired tools. However, I couldn’t.

Several years later, ABAP 7.4 and 7.5 came along and I was really
excited about its new functionalities. I went to work, loaded up a
development system and started experimenting. Compilation/Syntax
error! At that point, I was ignorant of the syntaxes/requirements
needed to be able to write the new lines of code I had just now read
That was a moment that took me back to that first year as an SAP ABAP
novice. I needed to have something, somewhere, in which I could
practice the new skills required for my work. If only I could install
SAP on my home computer…

Enter miniSAP!!! MiniSAP is a BASIS SAP system, without the business

modules (no FI, no CO, no nothing, so my apologies to everyone that
thought we could make mini purchase orders or mini invoices), allowing
us to practice ABAP or BASIS administration from our own personal

So, hopefully, after you finish this article you would be one of the proud
owners of an SAP installation with which you can play around with. It
had been handy for the novice Sérgioand I hope it will be handy for
anyone trying to learn ABAP or for anyone trying to get up-to-date with
its new functionalities

You already have SAP System? Write your first HANA ABAP Program.

A computer with Windows, Linux or MacOS, 64-bit version

We will use a Virtual Machine on our computers,

like VirtualBox or VMWare. In this tutorial, we will go with Oracle’s

So, it is for the best to have at least 6 GB of RAM (recommended, not

necessary) that we can spare.

For the VM image, we’ll need around 100 GB of hard disk space. If you
have an SSD, go for it, you’ll thank yourself later.
Since you’re reading this on SAPYard, I believe you have an internet

connection. The downloaded files are quite large, so it helps to

have a decent internet speed.

Patience. Some of the steps listed here require a considerable amount

of time to get through. If you don’t have patience, I suggest a six pack
of beer and a recording of one your most memorable Football (or Usian
Bolt’s sprints or Cricket or American Football :D)matches playing on TV
to help you spend the time.

What is not required is to have a knowledge of Linux based systems,

although it can help, since we’re installing a Linux image.

So, let’s get started!

Getting the SAP files

Go to

Save this page for later, because you’ll need to access it from time to
time to renew your license.

Disclaimer: The Reddit user ndboost generously provided us with a

mirror to download the SAP files. If you have trouble downloading from
the official page, you can find the mirror here. He has told me that he
doesn’t plan to delete them. However, if they aren’t there anymore,
blame me for nagging him and asking for these files and not him. Thank
you ndboost!

Once you’re on the official page, click on Trials and Downloads.

You’ll see a list of SAP products to download. In our case, we want to
download SAP Netweaver AS ABAP 7.x Developer Edition. At the
time of writing this tutorial, the version is 7.5 SP2:
By clicking on Download, we have our first scary prospect.
That’s right!
You’ll be downloading 8 files, each with around 1500MB. This is when

you canpop open the first beer in your six pack.

Put all these files to download and we’ll get back to them as soon as it is

Remember, as I’ve mentioned before, you may download the files from
a mirror site kindly provided by the Reddit user ndboost, here. In my
case, it was faster, but your mileage may vary. Thanks again, ndboost!

In the meantime…

Installing Linux in VirtualBox

Go to and download the

version corresponding to your operating system.

In my case, I’ll download the Windows version of VirtualBox.

To install VirtualBox you just click on the installation file and we’ll be just
like that aunt everyone has that constantly installs malware on her

computer by clicking Next all the way to the end. You’ll be safe this
time, I promise. You may want to uncheck the boxes to create Desktop
icons and such, but if you just click Next all the way to end, you’ll be
fine. This procedure is the same either you have a macOS machine or
a Linux powered one.

When we have VirtualBox up and running, we are greeted with a screen

similar to this.
Ignore the virtual machines already installed on my computer. I will
start one from scratch alongside you.

We need to have an operating system to run

SAP on VirtualBox and my personal preference is Linux
Mint. Ubuntu is more generally known so if you want to install Ubuntu,
go ahead. Just read the rest of my article with a scornful tone of voice,
instead of a happy one. :O

To install Linux Mint, go

to and select your favourite
flavour. It doesn’t matter which one, although I recommend
either Cinnamon or Mate. I use Cinnamon on my personal computer as a
full fledged OS, but to use in a VM I’ll go with Mate since it’s lighter on
resources. Choose 64-bit, it is required for the SAP installation:
Next, choose the country from which you want to download from
(usually yours or the one closest to you) and we’re off.

Now that we have Linux’s image file, we can start the installation. For
that, in VirtualBox, click on New.

On the following screen, choose a name for your system. I’ll call
it Linux4SAP. Make sure that the Type is Linux and that
the Version is the 64-bit version.
Clicking Next brings us to a screen where we will have to select the RAM
size that will be used by our system. This option depends on how much
we have available on our own system. My computer has 16GB of RAM,
so I have enough to spare. I think we can run well enough with just 4GB
of RAM, but I prefer to go a bit higher than that. Let’s go with 6GB.

You can drag the slider or just write 6000 on the box. Yes, I know 6GB is

actually 6144MB, but let’s play along.

Click Next and choose Create a virtual hard disk now, and
click Create.
On the next screen choose Expert Mode:
You can just copy my settings from the next screen. Notice that while we
are selecting 100GB of space, the dynamically allocated option means
that this is the amount of hard disk space that the virtual
machine may occupy, not the amount that it will. According to your
needs, it can grow in size, but only up to 100GB.
Be sure to use VHD and Dynamically allocated.

Next, we click on the icon in the File location, to choose where the
virtual machine files will reside on our computer:
You can use an external hard drive, to avoid cluttering the hard drive
on your computer. Since I’ve been a bit of a megalomaniac (mean: a
person who is obsessed with their own power) while building my own
computer, I have three internal hard drives, one of which is being used
to store SAP exclusively:
Click Save, and finally click Create:
We are brought to the following screen, detailing the several
components of our virtual machine.
We are almost good to go, but first, let us change some Settings:
In Network, choose Bridged Adapter.
And choose your network card from the drop-down menu. This will
allow us to be connected to the internet while we’re running our virtual
machine later.
Also, go to Shared Folders and press the Plus button:
In Folder Path choose Other…
… and create a new folder in the same folder you’ve located your Linux
image in VirtualBox earlier.
It is not really necessary to be in this exact folder, but I like to have
things organized this way. Anything you place in this folder will be seen
both from your computer and from inside the virtual machine, which
makes it handy to be able to copy files from one system to the other.
Now press Select Folder and tick Auto-mount on the options shown
below. This way, every time your virtual machine starts, this folder is
automatically mounted on it, allowing us to access it.
Click OK twice and we’re back to VirtualBox’s main screen. Here we will
now Start the virtual machine.
After a while (sometimes it takes a minute, so take another sip of that
beer), the following screen shows up and you’ll click on the folder icon.
You’ll select the ISO file that you downloaded from the Linux website
earlier, and click Open.
Click Start…
… and let it run for a bit.

After a while, we have something like this.

First I want to talk to you about the first message on top. What it means
is that every time you have VirtualBox on focus, it will capture the
keyboard inputs that you give. That is if you are on Windows and you
run VirtualBox and suddenly you want to ALT+TAB out of it… good luck,
because you’ll be ALT+TABing on Linux. Try it out, see how frustrating it

can get. But there’s a way out of this.

By clicking the key indicated on the bottom right corner (in my case it’s
the CTRL DIREITO – for non-Portuguese speakers, that is the right
CTRL key). By pressing it once (no need to hold it), I can ALT+TAB out
of VirtualBox. Of course, you can click with your mouse anywhere
outside the VirtualBox window to achieve the same thing, but where’s
the fun in using the mouse? It’s one less hand to hold your beer bottle

For a break: Create your first OData Service in SAP Netweaver

But enough of that. Let’s install Linux! Wait! Isn’t it installed

already? No… Sorry. This is just a live image, a Linux image that we can
play with for testing. To properly install Linux, just click on the Install
Linux Mint icon that is on the desktop.
Let’s skip through most of these screens. First, select your preferred

Click on Install third-party software for graphics, etc.

If you’re installing with Ubuntu, select also the Download updates while
installing Ubuntu. Although why would you install Ubuntu instead of

Mint? Mint is so pretty…

Then choose Erase disk and install Linux Mint and press Install Now.
Click Continue:

Choose your time zone and click Continue:

Choose your keyboard and press Continue. If you are not so sure about
your keyboard layout, then press Detect Keyboard Layout. It will ask you
some questions and it will make the decision for you.
And finally, fill the next form to choose a username and password.

ATTENTION: We are going to be using the same password for this

system and the SAP installation. For the SAP installation, the password
needs to meet the following requirements – at least 7 characters, with at
least a capital letter, small letters, digits and no other characters. We’re
going to go here with Abap2017.

ATTENTION-2: In the Computer name field we really must put the

following – vhcalnplci– and nothing else would work. What I’ve read is
that somewhere in the miniSAP instance there are some hard-coded
values referring to this computer name and as such, nothing else would

The rest can be up to your preference:

I also chose Log in automatically because I am quite confident on my
home network and I think it’s a nag to enter my username and password
when entering the system.

Press Continue and you can pop open the other beer that you left in the
fridge and wait for the Linux installation to finish – this is where the HDD
owners have an advantage over the SSD owners, you have more

excuses to drink your beer.

When it is finished, click Restart Now:

We’ll open the next screen and just press ENTER:

And here you go. Linux is installed:

Since this post is getting quite big, let’s make a break here and continue
on Part 2.

To relax your tired self, Lazy Vs Smart ABAPers.

The complete parts of this article can be accessed on the following links
(all the parts would be LIVE soon):

Part 1 – Linux Mint Installation

Part 2 – Configuring Linux for the SAP installation

Part 3 – Install SAP on Linux System

Part 4 – Installing and configuring SAPGUI miniSAP

Installation – Part 2
Sérgio Serra
August 10, 2017

Share on Facebook

Tweet on Twitter
Configuring Linux for the SAP Installation

Now that we have Linux Mint installed (in Part 1), we’ll do some
configuration to it.

One thing we need to do is to allow access to our Shared Folder.

Remember that? Well, if you simply click on the sf_SharedFolder icon
that is on your Linux’s desktop, you’ll see an error.

Bummer!!!. But it can be solved.

Go to the Menu bar, where it says Devices and click on Insert Guest
Additions CD image…
Now you have the following on your desktop. Click it:
Double click on

Authenticate yourself with the password that you’ve created when

installing Linux:
The next message may not show up for you. It is showing up for me
because I have another installation running.

If it does show up, just write yes and press ENTER.

When you see this message, just press ENTER again:

And restart the Linux instance by going to Menu, and
choosing Quit and Restart.
After Linux has rebooted, click on Menu, write term and press ENTER or,
how I prefer it, press CTRL+ALT+T to call the terminal.

The terminal will open:

Once there, write the following.

2 sudo adduser <USERNAME> vboxsf

where <USERNAME> is the username that you’ve entered in your Linux

installation. In my case, I’ve used sapyard.
It will ask you for your password and you should see a screen similar to
the previous image. Not identical, though… because I mistyped my

password the first time. Damn beer!!!

Also Read: 7 Issues faced by ABAPers in SAPUI5

Next, we reboot. We can reboot by going to Menu, Quit, etc… but since
we’re in the terminal, let’s do it our way… the Geek way (using the
terminal, yeah)!

2 sudo reboot
And after the reboot, we can finally see the content of our Shared
OK, I admit that seeing an empty folder was a bit anti-climatic. We’ll

populate it on our next section.

But before we move on, we just need to install a couple of things on

Linux, to prepare for the SAP installation.

Open the terminal (hope by now you know how to open the
terminal) and write the following.

2 sudo apt-get update

(this will check all the Linux packages on the Linux servers and see
which need updating)
2 sudo apt-get upgrade

(this will download upgrades for those packages that need upgrading, to
make sure they are on their newest versions – press ENTER whenever
you are prompted – have another sip of beer, it may take a while).

While you wait: Check SAP ABAP on HANA Tutorials

2 sudo apt-get install csh

(this will install the C shell which is used by the SAP system to process
some commands)
2 sudo apt-get install uuid

(this is used by the SAP system to create unique table keys)

2 sudo apt-get install libaio-dev

(according to the Debian package description, it “enables userspace

to use Linux Kernel asynchronous I/O system calls, important
for the performance of databases and other advanced
applications“, so I’m guessing it’s a big deal that we need to
install this, but I don’t really know exactly what it does).
And we’re done!… for now.

Let’s head to Part 3, to install SAP on our brand new Linux system.

miniSAP Installation – Part 3

Sérgio Serra
August 11, 2017

Share on Facebook

Tweet on Twitter
Installing miniSAP on our new Linux system

You are one step closer to owning your own Personal SAP System.
In Part 1, we Installed Linux Mint for our SAP system and in Part 2,
we Configured the Linux system for our SAP Installation. In this part, we
will install miniSAP on the Linux system which we have installed and

Now is the time to pop open another beer. A big one, if you bought them

in several sizes.

Remember all the .rar files that we’ve downloaded, containing the SAP
system? Let’s decompress them to the Shared Folder. First copy the files
to the Shared Folder.
Now let’s extract them. I use 7Zip, which I’ve grown fond of, but there
are several programs to extract .rar files available. Use the one you
Sit back. Watch a couple of episodes of that amazing show that is on TV
that you love so much, and let’s wait for the extraction to be completed.
I’ll be here when you get back.

So you’ve extracted the files into the Shared Folder. Now it’s time to
start the SAP installation, per se. Just write the following commands:

2 cd /media/<your shared folder name>

…where <your shared folder name> is the name of the Shared Folder, in
my case sf_SharedFolder.

2 ls

This command lists the files on the current folder. You should see
something like this.

In case you still have them, you can get rid of the .rar files, since they’re
only taking up space:

2 rm *.rar
Then you set the permissions for the install script to be executed.

2 sudo chmod +x

And run the installation script (the -g flag means that we will be running
the GUI version of the installer. If you want to have just the command
line version, omit the -g):

2 sudo ./ -g

Oops! Error!
This is because we’re missing one final step. You know when you enter a
new server on SAPGui. How would we do that in this case, since we
don’t know the IP address of our SAP system?

First, write.

2 ifconfig

on the terminal.
See where it says inet addr? That’s our IP address. Save it on a paper
somewhere. We’ll need it now and later on when we’re configuring

Now write.

2 sudo nano /etc/hosts

(I prefer vim, but nano is more user friendly for beginners, and I don’t

want to enter an emacs vs vim war, so let’s go with that).

On the second line, we see our hostname, but the IP address is a local
one. We’ll have to comment this line and add our own IP address. To
comment, you use a # symbol. In the end, it should be something like
Just use your own IP address and not the own shown above, and we’re
all set. To leave this program, press CTRL+X, press Y to confirm that
you want to save, and press ENTER to confirm the file name:
Now we can repeat the sudo ./ -g command from before.
Press ENTER and read carefully the licence agreement… or scroll down
(tip, to scroll down faster, keep pressing SPACE – it works like PAGE
DOWN on these unix walls of text).

At the end of the license agreement write yes and press ENTER.

Now choose a password. I’ve used the same one as my Linux system, so
I don’t forget it. It will be used for administrative purposes, and
remember the rules (at least 7 characters, with at least a capital letter,
small letters, digits and no other characters. Again, we’re going to go
here with Abap2017).
And now you can get the rest of the six pack because it will take a
while… actually, go buy another one from the grocery store. This screen

will be greeting you when you come back home.

Are you back? OK, then. After a while, you’ll see some more

familiar SAP colors.

If some error happened, you can contact us through the comments

section, and we’ll try our best to help you out. In my case, I had a
failure on the first installation and so I repeated it. If that happened to
you, I suggest you to delete everything in the /sapmntfolder.

Attention – do only the following line of code if the installation

failed for some reason.

2 sudo rm -fr /sapmnt

In my case, I tried to reinstall without deleting, so for those to which

that happened, the following screen may appear. You’ll just
click Next while selecting the first option.
Here we won’t change anything as well, so just click Next (and another

– tiny – sip of beer…).

For a change: Just 4 Versions of the same program to understand

This next screen seems scary, but we’ll continue using the old aunt

approach, by clicking Next.

And then we will disobey a bit by saying No (otherwise it would repeat
the pre-requisites check):
Guess what button we will be pressing now? That’s right, Next.
This next screen is a bit more serious. We need to setup the password
for the npladmuser, which is the user responsible for starting our SAP
instance. It’s better if we use the same password we’ve used before, to
keep consistency. After all, this is not a production machine. This is a
machine used for our own training, and as long as we keep our personal
computer safe, there shouldn’t be a problem in using the same password
throughout our SAP system. As long as we don’t forget that one
After the password is set, you can press… Next (notice that it is using
the csh login shellthat we installed earlier. Later we will see it in

The same applies to the following screen.

In this screen, we leave the default settings and press… Next (hey! I just
remembered a nice drinking game!).
In the next screen, we’ll leave it as it is and press Next. This screen is
for the setting of the database users’ passwords. (Note: I don’t know if
we can set our own passwords here. The installation always worked fine
without touching this screen, so I prefer to err on the side of caution. If
someone has any information regarding this, please leave a comment).
Here we change to Default Key and press Next.
Since we won’t be executing our SAP system from outside our home, we
leave the default DNS settings (we would have to set up a server to
access it from outside our local network. That is something we’ll not be
getting into here).

Press Next.
Again here, press Next.
And here… Next.
In the next screen, we have a summary of all the settings we’ve chosen,
which allows us to change anything, in case we made any mistakes.
Since we are happy with our work so far, let’s click Next.
Did you actually manage to get another six pack from the grocery store?

No? Then go back. This will take a while – SAP is finally installing.
During this part of the installation, you may face some errors, like this.
My best tip to take care of these errors is to delete the temporary
installation folder and the SAP NPL installation folder and try to do it
again. If that doesn’t work, then install Linux again and be careful to
provide a password that complies with the restrictions mentioned before.

But the best tip that I’ve read concerns the error Unable to generate a
new password for database login ‘sa’. This error occurred to me several
times but the only way I’ve managed to address it is by following the
instructions contained on the PDF of this URL, and also by deleting the temp
and SAP NPL installation directories.

To delete the folders, write the following on the terminal.

2 sudo rm -fr /tmp/sap*
4 sudo rm -fr /sapmnt/NPL/*

This is the step in which your patience is required, because some

things can go wrong and you have to keep trying to make it work. Be
patient, delete the folders, follow the (thankfully short) instructions on
the PDF mentioned above and it eventually work out. I’ve installed SAP
on four computers, two of them went without a hitch, another went…
OK… and the last one went totally berserk. But we got there!

Also Read: Struggle of an ABAPer in SAPUI5.

And finally, if all goes well, you’ll reach something like this, in which you
just press OK and we’re done.

The next highlighted sentence should be a good reason to take a good

swig at your beer.

A final configuration is needed, in case we want to
develop WebDynpro or SAPUI5applications – that require the browser
to recognize your hostname.

List the files in /usr/sap/NPL/SYS/profile.

2 ls /usr/sap/NPL/SYS/profile

Notice the NPL_D00_vhcalnplci file? Open it:

2 sudo nano /usr/sap/NPL/SYS/profile/NPL_D00_vhcalnplci

Go to the SAPLOCALHOST line and write under it:

2 icm/host_name_full = $(SAPLOCALHOST).dummy.nodomain

It should look like this.

Save it and then we can proceed to install SAPGui… I promise, that
would be our last part and you would be able to write your first Program

on your virgin SAP system.

…on Part 4!

miniSAP Installation – Part 4

Sérgio Serra
August 12, 2017

Share on Facebook

Tweet on Twitter
Installing and configuring SAPGui

In Part 1, Part 2 and Part 3, we Installed Linux Mint for our SAP
system, we Configured the Linux system for our SAP Installation and we
installed miniSAP on the Linux system respectively. In this concluding
part, we would hit the last nail on the coffin. Our SAPGUI and SAP
System would be ready for us to write our first “Hello Beer” (Yes, Hello
Beer, not Hello World) program and do some Basis Admin work.

Now let’s install SAPGui, by going to our client folder.

Open the SAPGUI4Windows folder and run the installer file as
administrator (right click, Run as administrator).
Press Next.
Select the SAPGui package and press Next.
Then press Close:
Now open SAP Logon, that is probably on your desktop.

Click on the New button.

Press Next.
Fill out the fields accordingly:

Description: Chose a description for your SAP machine. I went with


Application Server: The IP address that we obtained previously with

the ifconfig command. In my case, it’s

Instance Number: 00 (Attention, these are two zero’s, not two o’s).

System ID: NPL

Press Next:
Now press Finish.
And double click on our machine description on the list that shows up on
SAP Logon.
If you get the following error, it’s because the SAP server is not running.

To fix this, in the Linux terminal, write:

2 su npladm
4 startsap ALL

After a while, the message is displayed showing that the SAP server is
Now let’s try again to double click the machine instance in the list of SAP
Success! We can now enter with the following credentials.

User: sap*

Password: Appl1ance

Finally. So much beer later and we are inside our SAP system!

However, there are still some things to do…

Getting a license!

First, let’s obtain a developer license.

Go to transaction SLICENSE.
Here we see until when our SAP trial is available.

But don’t worry, because we can renew it.

Just copy the Active Hardware Key to your clipboard (to use the
clipboard in both your Virtual Machine and on your host machine,
in VirtualBox go to Devices->Shared Clipboard->Bidirectional).

Go back to the SAP License Keys webpage, here.

Scroll down to NPL – SAP Netweaver 7.x (Sybase ASE) and select it.
Fill out your information below the selection:

Click on I Agree and press Generate:

A download dialog will show up. Save the file in the Shared Folder.

On SAP, press on Install New License.

And upload the NPL license file that you’ve just downloaded.
Delete the previous license.

This will update your license and you need to do this at least
every 90 days, to keep your SAP system valid.
Stopping the SAP server

To stop our SAP system, go to the terminal and write.

2 su npladm
4 stopsap

If you had the SAP window running, you’ll notice that everything

To run it again, it’s the same procedure. But instead of stopsap you’ll
write startsap ALL.

2 startsap ALL

And after a while, you can enter your SAP system again normally.

Adding a new user

This is actually optional because we can’t program with this user – we

have no developer key for this. To those who want to program, we’ll
use another username in the next section. This is a user to just
explore our system. So for those that want to create one, here are the

Go to the SU01 transaction.

Enter your desired username and click New:

Assign a company name.

Fill out the mandatory fields.
Fill out your first and last name.

And go to the Profiles tab, to fill out the two

profiles SAP_ALL and SAP_NEW – just write that in the Profile column
– which will give you the authorizations execute whatever you want.
Then go to Logon Data and fill out the initial password.
This password will only be requested once, so don’t think too much
about it. You’ll just need to remember it once… It is common practice to
use initial<year> for these passwords. So in this case I went
with initial2017.

Press Save and you have your new user. You can close this SAP session
now (write /nex on the command line):

Now we can enter with our new user.

It will ask for a new password. This one you should remember, so
choose wisely.
And that’s it!

You can now finish your beer. We’ll continue with the testing of our

system after your hangover is done with you.

Making a test program – Hello Beer, of course

To develop, we need to use the DEVELOPER user with the Appl1ance


Go to the SE38 transaction:

For those new to ABAP, every custom program – that is, a program that
is not provided by SAP, but is made entirely by us -, has to start with
the letter Z or Y. So we’ll name our program ZHELLO_BEER.

Write ZHELLO_BEER in Program and press Create (notice that

in Subobjects the option Source Code needs to be chosen):
If it asks us for the developer key, we need to insert the
following: 35408798513176413512

Write the name of the program and choose its type and press Save.
Press Local Object, since we don’t have any other system to transport
our developments to.

Copy the following code:

2 write: 'Hello Beer and thank you for getting me through this tutorial!'.

Press Activate or CTRL+F3 (notice that our program is still inactive, so it

won’t execute).

Press the Direct processing icon or F8 on your keyboard – as everyone

does… (I don’t know, I get the shivers every time someone presses the
button instead of pressing F8 on the keyboard, but I’m not looking, so

go ahead).

And here we have it, your first program (or not, sorry if that is the case)
running in your own SAP system.
If you want to get back into the program to make changes,
press Back or F3 on your keyboard and open that ABAP learning book

you’ve been saving for this moment.

We have provided you the Yard. Now play around… and have fun!

Disclaimer: Nothing in this article has been written under the influence
of alcohol, I’m just a bad writer. And remember, don’t drink and code!