CREATE VIEW "SBODEMODE"."B1_SnBOpenQtyInnerView" ( "ApplyType", "ApplyEntry", "ApplyLine", "AppSubLine", "ManagedBy", "LogEntry", "ItemCode", "SysNumber", "LocCode", "TransId", "Quantity" ) AS ((((((SELECT T0."ApplyType", T0."ApplyEntry", T0."ApplyLine", T0."AppSubLine", T0."ManagedBy", T1."LogEntry", T0."ItemCode", T1."SysNumber", T0."LocCode", T0."TransId", T1."Quantity" FROM  "SBODEMODE"."OITL" T0  INNER  JOIN "SBODEMODE"."ITL1" T1  ON  T1."LogEntry" = T0."LogEntry"    LEFT OUTER  JOIN "SBODEMODE"."B1_AllDocumentsView" T2  ON  T2."DocEntry" = T0."ApplyEntry"  AND  TO_NUMBER(T2."ObjType") = T0."ApplyType"   WHERE T0."ApplyType" > (0 )  AND  T2."CANCELED" <> ('Y' )) UNION (SELECT T0."BaseType", T0."BaseEntry", T0."BaseLine", T0."BSubLineNo", T0."ManagedBy", T1."LogEntry", T0."ItemCode", T1."SysNumber", T0."LocCode", T0."TransId", T1."Quantity" FROM  "SBODEMODE"."OITL" T0  INNER  JOIN "SBODEMODE"."ITL1" T1  ON  T1."LogEntry" = T0."LogEntry"    LEFT OUTER  JOIN "SBODEMODE"."B1_AllDocumentsView" T2  ON  T2."DocEntry" = T0."ApplyEntry"  AND  TO_NUMBER(T2."ObjType") = T0."ApplyType"   WHERE T0."BaseType" > (0 )  AND  T0."StockEff" = (1 )  AND  T2."CANCELED" <> ('Y' ))) UNION (SELECT T0."ApplyType", T0."ApplyEntry", T0."ApplyLine", T0."AppSubLine", T0."ManagedBy", T1."LogEntry", T0."ItemCode", T1."SysNumber", T0."LocCode", T0."TransId", T1."Quantity" FROM  "SBODEMODE"."OITL" T0  INNER  JOIN "SBODEMODE"."ITL1" T1  ON  T1."LogEntry" = T0."LogEntry"    LEFT OUTER  JOIN "SBODEMODE"."OWTR" T2  ON  T2."DocEntry" = T0."ApplyEntry"  AND  TO_NUMBER(T2."ObjType") = T0."ApplyType"   WHERE T0."ApplyType" > (0 )  AND  T2."CANCELED" <> ('Y' ))) UNION (SELECT T0."BaseType", T0."BaseEntry", T0."BaseLine", T0."BSubLineNo", T0."ManagedBy", T1."LogEntry", T0."ItemCode", T1."SysNumber", T0."LocCode", T0."TransId", T1."Quantity" FROM  "SBODEMODE"."OITL" T0  INNER  JOIN "SBODEMODE"."ITL1" T1  ON  T1."LogEntry" = T0."LogEntry"    LEFT OUTER  JOIN "SBODEMODE"."OWTR" T2  ON  T2."DocEntry" = T0."ApplyEntry"  AND  TO_NUMBER(T2."ObjType") = T0."ApplyType"   WHERE T0."BaseType" > (0 )  AND  T0."StockEff" = (1 )  AND  T2."CANCELED" <> ('Y' ))) UNION (SELECT T0."ApplyType", T0."ApplyEntry", T0."ApplyLine", T0."AppSubLine", T0."ManagedBy", T1."LogEntry", T0."ItemCode", T1."SysNumber", T0."LocCode", T0."TransId", T1."Quantity" FROM  "SBODEMODE"."OITL" T0  INNER  JOIN "SBODEMODE"."ITL1" T1  ON  T1."LogEntry" = T0."LogEntry"    LEFT OUTER  JOIN "SBODEMODE"."OIQR" T2  ON  T2."DocEntry" = T0."ApplyEntry"  AND  TO_NUMBER(T2."ObjType") = T0."ApplyType"   WHERE T0."ApplyType" = (10000071 ))) UNION (SELECT T0."BaseType", T0."BaseEntry", T0."BaseLine", T0."BSubLineNo", T0."ManagedBy", T1."LogEntry", T0."ItemCode", T1."SysNumber", T0."LocCode", T0."TransId", T1."Quantity" FROM  "SBODEMODE"."OITL" T0  INNER  JOIN "SBODEMODE"."ITL1" T1  ON  T1."LogEntry" = T0."LogEntry"    LEFT OUTER  JOIN "SBODEMODE"."OIQR" T2  ON  T2."DocEntry" = T0."ApplyEntry"  AND  TO_NUMBER(T2."ObjType") = T0."ApplyType"   WHERE T0."BaseType" > (0 )  AND  T0."StockEff" = (1 )  AND  T0."ApplyType" = (10000071 ))) WITH READ ONLY