Skip to Content

Is there a bug in ABAP debugger?

Hi,

I recently noticed a weird behaviour while debugging some custom ABAP coding.

First we thought of some buffer problem with newly generated code. You might have seen the debugger showing you new code while some old code is executed. There might be some odd behaviour then. But when you restart the program everything is fine again.

Now we managed to break down the issue to these few lines:

The debugger stops at line 13. Apparently it shouldn't.
Coding in this line is not executed, so it seems to be a debugger-only problem.

Can anyone explain this? Is this a known issue?

I ran this on SAP Netweaver 7.4.

Thanks & Regards,

Jonathan

For copy/paste:

DATA(lt_laiso) = VALUE laiso_tab( ( 'FR' ) ).

IF 1 EQ 2.
lt_laiso = COND #( WHEN 1 EQ 1 THEN VALUE #( ( 'DE' ) ) ELSE lt_laiso ).
ENDIF.

WRITE: / lt_laiso[ 1 ].

Add comment
10|10000 characters needed characters exceeded

  • It seems to me that it is something to do with the ELSE statement :). If you move the ELSE statement to the next line, the control jumps to that line and if you remove it, it doesn't get in the IF block at all. Odd anyways!

  • Get RSS Feed

2 Answers

  • Oct 24, 2017 at 08:02 AM

    If you set a breakpoint, it doesn't stop. If you execute->debugging, then it does stop at that line. However, in all cases, the output is "FR". So it looks like the line isn't, in fact, being executed.

    Most odd

    Paging Horst Keller

    Add comment
    10|10000 characters needed characters exceeded

    • This intrigued me so I gave it a quick test.

      On 7.5 SP6 it behaves as expected and hits the breakpoint in ADT and SAPGUI.

      BUT... then it steps into the IF branch. The value isn't changed so, as Matthew observed, it isn't executed. Morgana indeed.

  • Dec 04, 2017 at 02:12 PM

    Hey,

    I saw this and got curious. In 7.4 SP 13 and up it is working as expected (breaks at line 10, in you example).

    Add comment
    10|10000 characters needed characters exceeded