Skip to Content

Data declaration within IF statement

Hi all,

I'm looking at someone else's code where it follows the pattern :

IF x = y.

DATA: lv_abc TYPE i.

.... additional processing...


ABAP does of course allow the above, but unless it's an inline declaration (which this isn't), I find DATA declaration inside an IF statement a little strange. Any comments on best practice regarding this ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer