CREATE VIEW "SBODEMODE"."B1_SnB1stAllocDocView" ( "SnB1stAllocViewLogEntry", "SnB1stAllocViewDocType", "SnB1stAllocViewDocEntry", "SnB1stAllocViewDocNum", "SnB1stAllocViewMngBy", "SnB1stAllocViewSnbMdAbs", "SnB1stAllocViewItemCode", "SnB1stAllocViewSnbSysNum", "SnB1stAllocViewLocCode", "SnB1stAllocViewAllocQty" ) AS SELECT T0."SnBAllocateViewLogEntry" AS "SnB1stAllocViewLogEntry", T0."SnBAllocateViewDocType" AS "SnB1stAllocViewDocType", T0."SnBAllocateViewDocEntry" AS "SnB1stAllocViewDocEntry", T1."DocNum" AS "SnB1stAllocViewDocNum", T0."SnBAllocateViewMngBy" AS "SnB1stAllocViewMngBy", T0."SnBAllocateViewSnbMdAbs" AS "SnB1stAllocViewSnbMdAbs", T0."SnBAllocateViewItemCode" AS "SnB1stAllocViewItemCode", T0."SnBAllocateViewSnbSysNum" AS "SnB1stAllocViewSnbSysNum", T0."SnBAllocateViewLocCode" AS "SnB1stAllocViewLocCode", T0."SnBAllocateViewAllocQty" AS "SnB1stAllocViewAllocQty" FROM  "SBODEMODE"."B1_SnBAllocateDocView" T0  INNER  JOIN "SBODEMODE"."OITL" T1  ON  T1."LogEntry" = T0."SnBAllocateViewLogEntry"   WHERE  NOT EXISTS (SELECT U0.*  FROM  "SBODEMODE"."B1_SnBAllocateDocView" U0  WHERE T0."SnBAllocateViewSnbMdAbs" = U0."SnBAllocateViewSnbMdAbs"  AND  T0."SnBAllocateViewMngBy" = U0."SnBAllocateViewMngBy"  AND  T0."SnBAllocateViewLogEntry" > U0."SnBAllocateViewLogEntry"  ) WITH READ ONLY