Skip to Content
-3

can we use for all entries along with case statement in new open sql 7.4

Dec 22, 2016 at 09:16 PM

290

avatar image

Hello Everyone,

When I tried to use case ..endcase and for all entries it throws an error saying " The addition or variable with ID "xxx" is not allowed in conjunction with FOR ALL ENTRIES." i want to develop this using new open sql 7.4 syntax.

sample code :

select counter,

case when raufnr = ' ' then

case when rnplnr = ' ' then ' ' else rnplnr end

else

raufnr
END AS proj_number

FROM catsdb
INTO TABLE @lt_cats
FOR ALL ENTRIES IN @lt_refcounters
WHERE counter = @lt_refcounters-refcounter.

can some body let me know what the issue is.Thanks...

10 |10000 characters needed characters left characters exceeded

I don't understand why the error message is about "xxx" as it does not appear in your Open SQL statement

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Horst Keller
Dec 23, 2016 at 07:43 AM
0
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi All,

Looks like when for all entries used you can't perform any operations on fields of select query. I got same error " The addition or variable with ID "%_#D711" is not allowed in conjunction with FOR ALL ENTRIES."

sample code

select ( netwr * -1) as neg_netwr

from vbap

into corresponding fields of table lt_vbap

for all entries in @lt_vbak

where vbeln = @lt_vbak-vbeln

Precisely, when for all entries used, we can't perform any operations on fields of query. Is my statement valid?

0

See the documentation for ALL ENTRIES mentioned above. There is a list with all restrictions.

0