Technical Articles
Delete internal table contents while in debugging mode using new Debugger tools
Many a times we come across a situation in which we need to alter the contents of an internal table to reach out to a desired outcome. I also fell into the same situation while creating a POC (Proof of Concept).
Hi, I am Shivani Dalmia, an Associate Developer working in IBSO Oil & Gas industry. Currently I was working on a POC for SCI reporting tool automation. For a particular use case, I needed the internal table to be empty. Doing that manually was a cumbersome process as it has over 1000+ number of records. After some research on internet, I stumbled upon the following outcome : ” Use ABAP New Debugger Tools“.
The new ABAP debugger tools has many amazing functionalities and one of them is to play with the contents of internal table at the time of debugging.
To delete the contents of internal table while debugging, I followed the following steps:
1. Load the target internal table into Variable section
Here LT_WORK is the target internal table for which I need to delete the entries.
2. Double click on the target internal table to see the table contents
3. Click on “Services of Tool” iconย positioned at the middle right of debugging screen
4. Select ‘Delete Whole Table/Row Area’ and press the tick icon
5. Select the Range for which the deletion needs to be done (Leave default in order to delete the whole table/row area)
6. After pressing the tick icon, targeted internal table will be left with zero(0) records ( success message at bottom left corner of debugging screen )
Conclusion
This way, I solved my problem of deleting the records of internal table at the time of debugging. This was a small tip but at times comes out be very helpful. Do tell in the comment section below if you find it helpful in any scenario.
Cite: https://answers.sap.com/questions/1678814/deleting-records-from-internal-table-in-debugging-.html
I would have never found that tool if it weren't for your post.
Never looked in that portion of the screen :).
Thank you.
Thank you so much Alex Necula ... this comment means a lot to a newbie at SCN ๐
Instead of steps 3 & 4, the option to delete rows is also in the context menu of the rows of the internal table.
Hi Sandra Rossi , Thank you for the comment . However, I checked again but could not find the above stated thing. Can you please throw more light on it.
Thanks
I see. These are both the same things, just the way is different. Though thanks for sharing this , glad to know this too ๐
Don't know what type of debugging you were doing till now. Good to see blog on this topic also.
Thank you so much ANKIT KIRAN ๐
Dear Shivani,
An Informative, well written and aptly articulated Article. Thanks for sharing.
Welcome ๐
New debugger? 20 years old is new? I guess the realย new debugger is that in Eclipse.
The services of the various tools does contain some very cool stuff.
Liked your comment (y) ...will surely write a blog on that too when i ll try my hands on it ๐
Another very nice option of the "tools" button is to display your table in an ALV.ย ย I find I use that one a lot.
Nice post,
Michelle
Thank you so much ๐
I was also expecting to read something new to me.
But nevertheless, you wrote a nice blog about it.
Everyone who is still struggling with the debugger might want to sign up for this course in case you have missed out on some of the other โnewโ things the debugger can do ๐
https://training.sap.com/course/bc403-advanced-abap-debugging-and-analysis-classroom-015-us-en/
ok ๐