Skip to Content
Technical Articles
Author's profile photo Shivani Dalmia

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

 

Assigned tags

      16 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Alex Necula
      Alex Necula

      I would have never found that tool if it weren't for your post.

      Never looked in that portion of the screen :).

      Thank you.

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      Thank you so much Alex Necula ... this comment means a lot to a newbie at SCN ๐Ÿ™‚

      Author's profile photo Sandra Rossi
      Sandra Rossi

      Instead of steps 3 & 4, the option to delete rows is also in the context menu of the rows of the internal table.

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      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

      Author's profile photo Sandra Rossi
      Sandra Rossi

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      I see. These are both the same things, just the way is different. Though thanks for sharing this , glad to know this too ๐Ÿ™‚

      Author's profile photo ANKIT KIRAN
      ANKIT KIRAN

      Don't know what type of debugging you were doing till now. Good to see blog on this topic also.

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      Thank you so much ANKIT KIRAN ๐Ÿ™‚

      Author's profile photo Jasjeet Singh Sachdeva
      Jasjeet Singh Sachdeva

      Dear Shivani,

      An Informative, well written and aptly articulated Article. Thanks for sharing.

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      Welcome ๐Ÿ™‚

      Author's profile photo Matthew Billingham
      Matthew Billingham

      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.

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      Liked your comment (y) ...will surely write a blog on that too when i ll try my hands on it ๐Ÿ™‚

      Author's profile photo Michelle Crapo
      Michelle Crapo

      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

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      Thank you so much ๐Ÿ™‚

      Author's profile photo Michael Piesche
      Michael Piesche

      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/

      Author's profile photo Shivani Dalmia
      Shivani Dalmia
      Blog Post Author

      ok ๐Ÿ™‚