Debugging

How to check different kinds of variables in Debug mode

If you are debugging, chances are you would want to check the value of the variables. There are different kinds of variables:

  1. Normal field
  2. Work Area
  3. Internal table

Let’s see how can we check the values (or manipulate values) of these variables. There is a bonus if you manage to read till the end.

Normal Field – Just double click or type the variable name and the value will come. You can modify the value by clicking on the edit button. If you cannot find the edit button then either that variable is a constant or importing variable to a method. Edit method is the same for all kinds of variables.

Work areas are just like normal fields but a collection of them. You can either see one at a time or all in one view.

If you just click on the work area name, the value field will say it is a structure. Then double click on the work area name on the left, then another view will open with all the field names and their values.

Internal table – Just as a work area is a collection of fields, the internal table is a collection of several such work areas. The values of the internal table will come in similar to what you see in excel. Debugger makes it easy for you to identify an internal table. When you click on the variable, it will show it is a standard table and will also how many rows of records it has.

Double click (on the variable name) and you will see the values.

Although the principles are the same for editing, internal tables require more techniques to effectively check and manipulate the values. A topic for another blog.

Bonus: Internal table with header line – As promised, here is the bonus. Some internal table are internal table + work area together ie they have the same name. Basically, they are internal tables with header line. When you click on such a variable, the debugger will show two entries.

If you like the content, please follow the LinkedIn page for more updates.

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)

Follow by Email
Twitter
LinkedIn
LinkedIn
Share