The language used to write most programs in SAP is called ABAP (Advanced Business Application Programming). This is an extremely powerful tool. ABAP programs sit directly on the foundation of the SAP system and can be used to change the behavior of existing programs (for example the T-Codes you use every day to perform your tasks), as well as write complete new functionality. Unfortunately, ABAP is so powerful that it cannot be used to automate activities for free, because any development in ABAP must be strictly controlled. It needs to be written by an experienced ABAP developer and needs to go through a strict set of testing cycles before being used in production. Not only do you need to make sure that the new code works as expected, you also (even more importantly) need to make sure that ’nothing else gets broken’ by the new code. You will need to employ experienced programmers and testers and you will have to deal with the expensive overhead that comes with making everyone at IT comfortable with your shiny new automation.
A development in ABAP is therefore going to require, even for an experienced programmer, an investment in both time and money.
But what if you just wanted to automate the clicking and the typing that a user performs on screen without adding any logic inside the SAP system?
In this case, Robotic Process Automation (RPA) comes to mind. RPA is a software that allows virtual ’Robots’ to interact with any application available on screen, much like a human does. RPA, unlike ABAP, can only interact with the GUI (Graphical User Interface – i.e. the SAP screen) so there is no risk of causing damage to your SAP system – at least, no more damage than a human end user could cause.
Figure 1: Example of a SAP GUI screen
RPA is perfect if you need to interact with multiple applications and it usually also comes packaged with a handy infrastructure that can take care of audit trails, monitoring dashboards, version control systems, logging systems, centralized credential management, licensing management and much more.
While this sounds very promising, in most cases you cannot automate SAP for free using RPA. Vendors of RPA provide free trials or even free-for-private-use ’community editions’, but in most cases you will still need to buy licenses to use RPA in production.
But what if you just wanted to automate the clicking and the typing that a user performs on screen, if you did not need to add any logic inside the SAP system? If you only wanted to interact with a handful of applications – let’s say SAP and Excel – and you were not interested in all the fancy extra features that come packaged with RPA?
In this case, you can use another tool called SAP GUI Scripting API. Just like with RPA, you can use the SAP GUI Scripting API to emulate the activities that the user would perform on the SAP GUI screen. You can even record the activities the user performs and use the automatically generated code as a starting point for your automation.
You can write scripts in your favorite language, but since Excel <-> SAP interaction is popular, you often see SAP GUI Scripting API being used in a VBA Macro in Excel. All you need to do is add the reference to the API in your VBA editor and you can then start programming which buttons you want to click, what you want to type or what you want to read from the SAP GUI.
Figure 2: Adding the reference to SAP Scripting API in the BVA Editor
And now the recurring question: can you automate SAP for free using SAP GUI Scripting API? Yes! If you have SAP GUI installed on your machine, you should already have access to the Scripting API. You do not need to purchase additional licenses (or wait for the long procurement process to take place).
Okay, SAP GUI Scripting API is free. But is it safe?
Yes, absolutely. Quoting the official SAP GUI Scripting Security Guide: “From the SAP server’s point of view there is no difference between SAP GUI communication generated by a script and SAP GUI communication generated by a user. For this reason, a script has the same rights to run SAP transactions and enter data as the user starting it. In addition, the same data verification rules are applied to data entered by a user and data entered by a script.”
In other words:
- A script cannot corrupt the SAP system’s data, because all changes done from a script are subject to the same data validation rules as end user interaction.
- An end user cannot use a script to access data they would not otherwise have the necessary privileges for. The script only has access to the data that the end user has the access rights for.
- A script cannot record passwords. A script cannot be played back if the user running it does not have an account on the SAP system.
- A script cannot be run in the background without the end user’s knowledge. By default, the end user will be notified when the scripting starts. Furthermore, the SAP GUI needs to be displayed when the script is running.
So, SAP GUI Scripting API is free and it is safe. But is it useful?
Yes, it is. We have used this technology extensively and we have saved ourselves and our clients thousands of hours of repetitive work. Recently, a custom Process Automation tool Zanders developed for British American Tobacco was chosen by the jury of treasurytoday magazine as the winner of the Best Fintech Solution – Adam Smith Award. This award-winning tool was built by leveraging the power of SAP GUI Scripting API.
The key advantage with the SAP GUI Scripting API is that you can use a native SAP functionality designed to allow end users (and not only experienced developers) to automate activities safely and effectively. The IT and procurement overhead is kept to the minimum, allowing you to efficiently avoid those repetitive clicking and typing kind of tasks (and the errors they cause) and to instead focus on what really matters.
Are you interested in knowing more on how you can use ABAP, RPA or SAP Scripting API to automate activities in SAP? Please contact Philip Costa Hibberd for more information.