2007 Apr 24 11:09 AM
HI,
While executing the select statement is showing syntax error,
anybody let me know the correct synatx.
SELECT exidv vpobjkey
FROM vekp
INTO TABLE lt_hu
FOR ALL ENTRIES IN lt_vbeln
WHERE vpobjkey+0(10) = lt_vbeln-vbeln.
thanks in advance.
2007 Apr 24 11:13 AM
what sytax error u are getting ?
u cannt use Offset lengths in where clause.
Regards
Prabhu
2007 Apr 24 11:13 AM
WHERE vpobjkey+0(10) = lt_vbeln-vbeln.
there´s the error.
you cannot check against a whole table.
you probably intended to code
WHERE vpobjkey+0(10) = wa_vbeln-vbeln.
where wa_vbeln-vbeln is a workarea of your table lt_vbeln-vbeln.
2007 Apr 24 11:13 AM
SELECT exidv vpobjkey
FROM vekp
INTO TABLE lt_hu
FOR ALL ENTRIES IN lt_vbeln
WHERE <b>vpobjkey+0(10)</b> = lt_vbeln-vbeln.
U cant use <b>vpobjkey+0(10)</b> in where condition u have to use the cpmlete field name
2007 Apr 24 11:14 AM
2007 Apr 24 11:16 AM
Hi,
You should not use offset when using for all entries in where condition.
join VEKP and VEPO tables and use this VBELN in where condition.
if not lt_vbeln[] is initial.
SELECT aexidv bvbeln
FROM vekp as a join vepo as b
on aexidv = bexidv
INTO TABLE lt_hu
FOR ALL ENTRIES IN lt_vbeln
WHERE b~vbeln = lt_vbeln-vbeln.
endif.
reward points if useful
regards,
Anji