CREATE VIEW "SBODEMODE"."B1_SnBAllocateDocView" ( "SnBAllocateViewLogEntry", "SnBAllocateViewDocType", "SnBAllocateViewDocEntry", "SnBAllocateViewDocLine", "SnBAllocateViewMngBy", "SnBAllocateViewSnbMdAbs", "SnBAllocateViewItemCode", "SnBAllocateViewSnbSysNum", "SnBAllocateViewLocCode", "SnBAllocateViewAllocQty" ) AS SELECT MIN(T0."LogEntry") AS "SnBAllocateViewLogEntry", T0."AllocateTp" AS "SnBAllocateViewDocType", T0."AllocatEnt" AS "SnBAllocateViewDocEntry", T0."AllocateLn" AS "SnBAllocateViewDocLine", T0."ManagedBy" AS "SnBAllocateViewMngBy", T1."MdAbsEntry" AS "SnBAllocateViewSnbMdAbs", T1."ItemCode" AS "SnBAllocateViewItemCode", T1."SysNumber" AS "SnBAllocateViewSnbSysNum", T0."LocCode" AS "SnBAllocateViewLocCode", SUM(T1."AllocQty") AS "SnBAllocateViewAllocQty" FROM  "SBODEMODE"."OITL" T0  INNER  JOIN "SBODEMODE"."ITL1" T1  ON  T1."LogEntry" = T0."LogEntry"   WHERE T1."AllocQty" <> (0 )   GROUP BY T0."AllocateTp", T0."AllocatEnt", T0."AllocateLn", T0."ManagedBy", T1."MdAbsEntry", T1."ItemCode", T1."SysNumber", T0."LocCode" HAVING SUM(T1."AllocQty") > (0 ) WITH READ ONLY