‎2007 Jul 26 3:51 AM
Hi,Everyone
The following statement exists an error:
DELETE ITAB_YMIT00100 WHERE SOBKZ IN (' ','K').
Error Message:
Comma without preceding colon(after DELETE?)
About the above error, I do not know why?
So I have to change the statement and pass debug.
DELETE ITAB_YMIT00100 WHERE SOBKZ = ' ' OR SOBKZ = 'K'.
Could anyone help me?
‎2007 Jul 26 3:59 AM
Hi,
In DELETE statement's WHERE you cannot use this form of IN.
What you need to do is create RANGE object, similar to select-options. Then you can use it in .
DATA: range_sobkz type tange of sobkz.
range_sobkz-low = ' '.
append range_sobkz.
range-sobkz-low = 'K'.
append range_sobkz.
now use
DELETE ITAB_YMIT00100 WHERE SOBKZ IN range_sobkz.
Regards,
Sesh
‎2007 Jul 26 4:00 AM
Hi,
Basically SAP doesnt support first syntax.
Basic syntax for delete is
DELETE TABLE <itab> FROM <wa>.
or
DELETE TABLE <itab> WITH TABLE KEY <k1> = <f 1> ... <k n> = <f n>.
you can write 'IN' in select statement like,
select * from ... where a in (...)
Reward if useful!
‎2007 Jul 26 5:57 AM
DELETE ITAB_YMIT00100 WHERE <b>SOBKZ = ' ' OR SOBKZ = 'K'</b>.
This statement is correct and only thing is you should give space in between them then you will get tha desired result .
It usefull .
if it is usefull reward pionts.
khalid.
‎2007 Jul 26 6:00 AM
‎2007 Jul 26 6:03 AM
hi,
check whether ur internal table is with or with out heder line. if it is with out header line then ur syntax is wrong.
n try like this
DELETE TABLE <itab> WITH TABLE KEY <k1> = <f 1> ... <k n> = <f n>.
ex:DELETE ITAB_YMIT00100 FROM [WORKAREA] WITH KEY SOBKZ IN (' ','K').
when it is with header line then,
ex:DELETE ITAB_YMIT00100 WITH KEY SOBKZ IN (' ','K').
IF HELPFUL REWARD SOME POINTS.
WITH REGARDS,
suresh aluri.