marianfoo / ztoad

ABAP Open SQL Editor
GNU General Public License v3.0
44 stars 15 forks source link

Error: "The INTO/APPENDING clause must be at the end of the SELECT..." #6

Open Tino-s opened 10 months ago

Tino-s commented 10 months ago

The error message: The INTO/APPENDING clause must be at the end of the SELECT. See the long text." Character String as Message

appears from this statement: SELECT distinct
 VGBEL ,
 count( VBELN ) as cnt_VBELN ,
 max( NETWR ) as sum1
 FROM 
 vbak
where 
VGBEL is not null and VGBEL <> '' and 
VGBEL like '002%' and
AUDAT >= '20221201' and 
VBELN like '001%'
group by VGBEL
having count( VBELN ) > 1
 .

BR Tino