Authorisations When writing programs using open SQL, one has to bear in mind the concepts of authorisation in an SAP system. An SAP system has its own security tools to ensure that users can only access data which they are authorised to see. This includes individual fields as well as individual records. The way authorisations […]
SAP ABAP Debugger Scripting is a new tool added in SAP Netweaver 7.0 EHP2. It is a feature available in the new ABAP debugger. However, just like some of the other debugger options, you need to check whether the security team has provided access for the debugger script tool.
Most of ABAP programmers regularly use Break-Points & Watch-Points for debugging. These are necessary in an ABAP programmers role to find the bugs in custom developments, analyze the Standard SAP program or find a BADi for that matter. So where does this Debugger scripting come into play?
Designed To Make Debugging ABAP Code Easy
The debugger scripting is a tool is designed to make debugging easy. Sometimes debugging can be very tiresome, especially when debugging SAP standard code is involved. The debugger scripting tool can sometimes come to the rescue of ABAP programmers, as it helps automate the process of debugging.
Some of the benefits of Debugger Scripting are:
- Automation of repeatedly changing the value of some variable in debugging – You can write a script to do all the changes required.
- Perform any custom trace possible – Even track the call to the ABAP stack. It can be used to trace when new programs are called, as the ABAP stack is updated every time a new program is called.
- Create custom (conditional) watch-points and break-points. script watch-points & break-point are different from the normal debugger watch-points or break-points. Scripts can be implemented for these to work only when required.
- Program Tools for standard tasks like checking data consistency, test error handling, etc.
- It can help make the debugging to be user interactive (pop-up based) where one can enter the value, rather can each time double clicking on the variable to change the value. Since the script can be saved and loaded again, this makes the task for programmer easier to use.
A Debugger script is simply a local Object Oriented ABAP program that is run by the New ABAP Debugger. The script uses the ADI (ABAP Debugger Interface) to automate actions and to add capabilities that otherwise would not be available.
So Let’s Take A Look At The Debugger Scripting Tool.
In the new ABAP debugger there is a separate TAB “Script” after the TAB “Diff”(Diff-Tool).
In this TAB, are various options for creating and executing an ABAP script. Let us explore these options.
There is a standard create button, to create a new script, as per our debugging requirement. Each new script that is created has four methods that can be implemented. These methods are triggered at specific moments and thus it defines their purpose. Also as you can see in Fig 1, all this code is generated automatically whenever a script is created.
I’ve just been laughing to myself how odd coders must sound when discussing technical stuff. My wife just read an answer to a question in the ABAP Objects course and gave me the most confused of looks. Here’s what she read… Hi Peter (and class), On the right hand side of the first slide of […]
We have just released a new way for you to get access to all the courses we offer! Learning your way around SAP and getting access to affordable training just got a whole lot easier. For the month of March you can get access all of the premium SAP Training courses for 1 low price […]
Events For selection screens to be built and used in a program, the first things to understand are events. Events are processing blocks, sections of code specific to the selection screens. The structure of an event starts with the event keyword, but does not have an ending keyword. The end of the event block of […]
Today I am going to answer a question from one of the students in the SAP ABAP Beginners course: Hi , I am little bit not sure about how low and high field work here . when we can set the max or min value that we want to include or exclude in our report […]
Think about a hobby you have. Any hobby. Do you play a musical instrument? Have you ever played sports? Are you a closet writer? A knitter? Now, think about how you first started out on that hobby. The first notes you ever played on your instrument: how did they sound? What happened the first time […]