Debugging in SAP GUI – Tips, Tricks & Techniques – Introduction (Part 1)
This post targets the basics of debugging in SAP GUI based applications. Being a functional tester for the past two years I have realized that debugging really proves to be of immense help while testing SAP Applications. So, I thought of sharing this knowledge with whoever maybe interested in it and wants to get their hands dirty on debugging. I am planning to write a series of blogs on this starting with the basics first. So, let’s get started with some basic questions.
- What do we actually mean by Debugging?
Debugging is a way to find the root cause of SAP transaction behavior. If you are unable to determine the root cause by applying the functional methods like checking all customization’s are in place or the master data is present; then we must take a deep dive into the development technicalities behind the business logic of the applications.
Since we are working on SAP ERP systems can you guess what will be dealing with?
Yes, you guessed that right, we need to take a plunge into ABAP. No, no……. DO NOT PANIC right away. You do not need to start learning ABAP right away or get into the nitty-gritty of it. Just calm down and understand the process before delving too much into the technicalities.
To begin with SAP provides us with two types of debuggers (OLD & NEW). These debuggers have a slightly different behavior; think of it as an ‘old employee’ leaving and a ‘new employee’ taking over. Although, both are performing the same duties; the predecessor had its own tricks of getting the job done and the successor will have their own. Nevertheless, they are both packed with features to provide the user with insights to the development secrets of the business application.
The question that arises in our mind is are we making an optimal use of these features provided by SAP? In this series of blogs, we’ll try to uncover the different tips, tricks & techniques that the ABAP Debuggers (OLD & NEW) equip us with. However, please keep in mind, that the vastness of ABAP Debuggers is not limited to the information shared here. We just have the tip of the iceberg. There is a plethora of knowledge hidden below.
Let us start with switching between the ‘Classic Debugger’ and ‘New Debugger’
There is no hard and fast rule regarding which Debugger you can use in SAP GUI. SAP provides us with both the Old & New Debuggers alike. And you are entitled to use them as you wish to. However, your application of these entitlements must not violate the law. Similarly, you must not violate SAP ERP production system’s integrity by tweaking the values in Debugger.
To switch between the Debuggers, go to ABAP Editor (SE38)→Utilities →Settings →ABAP Editor →Debugging and then choose the default Debugger you want you application to trigger.
Sometimes there might be situations where you do not have proper authorizations to access ABAP Editor (SE38). You must have found yourself in such situations frequently. No need to worry !! We have a solution for this as well. Command Line comes to the rescue here. Just go to the transaction you want to debug and type ‘/h’ in the box as shown below and press ‘Enter’.
And Voila !! The Debugger is at your disposal.
All seems to be well till now but what if you do not have access to even the command line like in case of a popup window. Well, no need to worry we have a simple hack for you.
- Create an SAP shortcut with the transaction ‘/h’ in the SAP Logon Window.
2. Create a ‘.txt’ file in your desktop with the following code.
Drag and drop any of these desktop files on the modal/pop-up window. And, as soon as you perform a user interaction; the Debugger will be triggered.
Phew ! time to catch some breath and so should you.
But do not forget to come back soon to have more fun with Debugging in the upcoming blogs.
Till then Adios !