Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

The inline declaration "DATA(FOO)" is not possible in this position.

Former Member
0 Kudos

Hello,

I want to use the new DATA inline-declarations in the SCAN SOURCE statement as follows:


SCAN ABAP-SOURCE source_lines

  TOKENS INTO DATA(tokens)

  STATEMENTS INTO DATA(stmts).

However the following error is given: "The inline declaration "DATA(TOKENS)" is not possible in this position."


Why is this not possible?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

It is probably because (tokens) is allowed to have one of these types. STOKES, STOKESX, STOKEN, STOKES.

The possible position of inline data declarations are listed here and scan is not one of them.

http://help.sap.com/abapdocu_740/en/abendeclaration_positions.htm

Documentation also says data type of the variable is determined by the operand type.

In this case, operand type is not fixed, I believe.

2 REPLIES 2

Former Member
0 Kudos

It is probably because (tokens) is allowed to have one of these types. STOKES, STOKESX, STOKEN, STOKES.

The possible position of inline data declarations are listed here and scan is not one of them.

http://help.sap.com/abapdocu_740/en/abendeclaration_positions.htm

Documentation also says data type of the variable is determined by the operand type.

In this case, operand type is not fixed, I believe.

0 Kudos


Sounds plausible thank you!