12-17-2008 6:15 PM
Hi All,
I am getting the error 'Comma without preceding colon (after SELECT ?).' with the following select statement. Can someone help me with the error.
select single actdate_from actdate_to
into ( lv_actdate_from, lv_actdate_to )
from zsdcoop
where kunnr = wa-kunnr and pfnum = wa-pfnum.
if ( lv_actdate_from NE wa-actdate_from ) or ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'.
Endif.
Thanks,
Veni.
12-17-2008 6:19 PM
Remove the spaces after & before brackets.
select single actdate_from actdate_to
into (lv_actdate_from, lv_actdate_to)
from zsdcoop
where kunnr = wa-kunnr and pfnum = wa-pfnum
12-17-2008 6:18 PM
if lv_actdate_from NE wa-actdate_from or
lv_actdate_to NE wa-actdate_to .
wa-block = 'X'.
Endif.
12-17-2008 6:19 PM
Remove the spaces after & before brackets.
select single actdate_from actdate_to
into (lv_actdate_from, lv_actdate_to)
from zsdcoop
where kunnr = wa-kunnr and pfnum = wa-pfnum
12-17-2008 6:21 PM
>
> select single actdate_from actdate_to
> into (lv_actdate_from, lv_actdate_to)
> from zsdcoop
> where kunnr = wa-kunnr and pfnum = wa-pfnum.
> Veni.
you could have tried it yourself.
~Suresh
12-17-2008 6:28 PM
Typically, on statements like this, you want to use AND instead of OR. Google "truth tables" for a detailed explanation of why.
if ( lv_actdate_from NE wa-actdate_from ) or ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'.
Should probably be:
if ( lv_actdate_from NE wa-actdate_from ) AND ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'.