Skip to Content

Mechanism of inline declaration?

Jan 27, 2017 at 12:40 PM


avatar image
Former Member

Mechanism of inline declaration in abap 7.4 i.e. how the variables gets declared before the execution of report ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Horst Keller
Jan 27, 2017 at 12:50 PM

A valid statement with an inline declaration of a variable can generally be interpreted as a short form for a declaration statement used as a direct prefix.

DATA var TYPE ... 
... var ... 
Show 2 Share
10 |10000 characters needed characters left characters exceeded

I can't quite tell from the Twitter like question of the original poster (He still had 27 more characters to go there!), but I am curious about the "mechanism" too. But, I will ask with a little more substance to my question. I am using Eclipse and am wondering about the behavior here. I noticed that subsequent code completion works only if the inline declaration is done properly. This is great, so much so, that I if I don't see the code completion I was looking for I go looking for issues with my inline declaration.

So, my curiosity here is, how does this work in the background. Is the code completion logic attempting to "compile" portions of the code on the go?


There are two mechanisms. What the compiler does, that's what counts in the end, and what the tools do, that's convenience. The ABAP documentation describes what counts.

Further commenting has been locked.