Application Development and Automation 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: 
Read only

ABAP 7.40 question SELECT

ralf_wenzel_heuristika
Active Participant
0 Likes
1,145

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.

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
Read only

christian102094
Participant
0 Likes
855

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.

Read only

0 Likes
855

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

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

Read only

0 Likes
855

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

Read only

0 Likes
855

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