12-22-2016 9:16 PM
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...
12-23-2016 7:39 AM
I don't understand why the error message is about "xxx" as it does not appear in your Open SQL statement
12-23-2016 7:43 AM
As documented, you can't.
http://help.sap.com/abapdocu_751/en/index.htm?file=abenwhere_logexp_itab.htm
12-23-2016 3:07 PM
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?
12-23-2016 6:59 PM
See the documentation for ALL ENTRIES mentioned above. There is a list with all restrictions.