Skip to Content
4

Is there a bug in ABAP debugger?

Oct 24, 2017 at 07:21 AM

164

avatar image

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 ].

10 |10000 characters needed characters left 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!

1
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Matthew Billingham
Oct 24, 2017 at 08:02 AM
2

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Found the same (strange) behavior and forwarded to debugger colleagues. -> It is a "Debugga Morgana"

5

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.

0
Iftah Peretz
Dec 04, 2017 at 02:12 PM
0

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).

Share
10 |10000 characters needed characters left characters exceeded