Hi Experts,
I am getting an error in a select statement using '<b>for all entries'</b>.
The code is as following:
select * from vbkd
into table i_temp
where vbeln IN s_vbeln
and posnr = p_posnr.
sort i_temp by vbeln posnr.
if not i_temp[] is initial.
select * from vbak
into table i_vbak
for all entries in i_temp
where vbtyp = 'K'.
I am getting an error: <i><b>The WHERE condition does not refer to the FOR ALL ENTRIES table.-</b></i>
Can anybody please let me know what's wrong with the select statement?
Thanks a lot.
The error message tells you exactly what the problem is. Try:
SELECT * FROM vbkd INTO TABLE i_temp WHERE vbeln IN s_vbeln AND posnr = p_posnr. SORT i_temp BY vbeln posnr. IF NOT i_temp[] IS INITIAL. SELECT * FROM vbak INTO TABLE i_vbak FOR ALL ENTRIES IN i_temp WHERE vbeln = i_temp-vbeln "<==== AND vbtyp = 'K'. ENDIF.
Rob
Message was edited by:
Rob Burbank
Add a comment