How can I show the value inside a structure? see below the example:
DATA: BEGIN OF line,
col1 TYPE i,
col2 TYPE i,
END OF line.
DATA: itab LIKE TABLE OF line,
jtab LIKE TABLE OF line.
DO 3 TIMES.
line-col1 = sy-index.
line-col2 = sy-index ** 2.
APPEND line TO itab.
ENDDO.
MOVE itab TO jtab.
line-col1 = 10. line-col2 = 20.
APPEND line TO itab.
IF itab GT jtab.
WRITE / 'ITAB GT JTAB'.
ENDIF.
Write: itab, jtab.
because i want to know why itab is greater than jtab?.
If you want to see the contents of a field purely for debugging purposes you can also just put a break point in your code and look at the contents in debugger.
Just don’t leave the break point in productive code!
EDIT:
You can also just use a session break-point, which does not require you to change the code (and will only be applicable to your user for the duration of the session):
In the system where you are running the program:
Click the session Break-point button
The break-point icon will appear next to the line (you can also just click in the place where the icon appeared, to set/delete the break-point).