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: 

ABAP 7.40 question SELECT

ralf_wenzel_heuristika
Active Participant
0 Kudos

Hi,

in our system, the command

SELECT SINGLE 'X'

INTO DATA(exists) FROM dbtab

WHERE ....

does not work. Is this SP8 specific? We do have SP5.

I want to use this, because this existence indicator won't ne used in further coding.

4 REPLIES 4

christian102094
Participant
0 Kudos

When you use a inline declaration ( DATA(exists) ), you have to escape the program variables with '@':

SELECT SINGLE 'X'

INTO @DATA(exists) FROM dbtab

WHERE ....

Don't forget if you have some variables (that were declared in your program) in the condition clause WHERE, you have to escape them too.

0 Kudos

ooops, I tried DATA(exists) and DATA(@exists), but not @DATA(exists)

I tried it now, but it does not work (in SP5).

0 Kudos

What's the error message? Please post all the relevant information about the error you are getting.

0 Kudos

The error message said, that offset is not allowed in new OpenSQL syntax. The parser seems to "think", hat (...) is a variable for the offset