‎2007 Mar 21 8:00 PM
loop at ztable into wa_ztable.
at new kunnr.
<code>
endat.I get the error VERSION ... ." expected after "ZTABLE".
‎2007 Mar 21 8:02 PM
Hi,
Is ztable an internal table or database table?
If it is database table, please try this.
data: t_ztable type standard table of ztable with header line.
data: wa_ztable type ztable.
select *
from ztable
into table t_ztable
where <condition>.
sort t_ztable.
loop at t_ztable into wa_ztable.
at new kunnr.
...
endat.
endloop.
Regards,
Ferry Lianto
‎2007 Mar 21 8:02 PM
Hi,
Is ztable an internal table or database table?
If it is database table, please try this.
data: t_ztable type standard table of ztable with header line.
data: wa_ztable type ztable.
select *
from ztable
into table t_ztable
where <condition>.
sort t_ztable.
loop at t_ztable into wa_ztable.
at new kunnr.
...
endat.
endloop.
Regards,
Ferry Lianto
‎2007 Mar 21 8:05 PM
‎2007 Mar 21 8:06 PM
You are trying to loop at database table directly instead of internal table.
Check this -
Addition
... VERSION vers
Effect
If the addition VERSION is specified, the database dbtab is not read; instead, the table with a name made up of "T" and the content of vers is read. For vers a data object with a maximum of four characters, of type c must be specified. The content of the row is still assigned to the table work area of dbtab and its type is cast. If the table work area is too short, a runtime error occurs.
Mean your table ZCITORDEROUT is a database table instead of internal table.
Regards,
Amit