CREATE VIEW "SBODEMODE"."B1_NLAuditFileOpeningDocView" ( "TransId", "ObjType", "DocEntry", "CardCode", "CardType", "DocDate", "DocDueDate", "Comments" ) AS ((((((((SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."OINV" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."Account" <> T1."ShortName"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T0."DocStatus" = ('O' )  AND  T0."Confirmed" = ('Y' )  AND  (T0."InvntSttus" = ('O' )  OR  T0."isIns" = ('N' ) )) UNION ALL (SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."OPCH" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."Account" <> T1."ShortName"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T0."DocStatus" = ('O' )  AND  T0."Confirmed" = ('Y' )  AND  (T0."InvntSttus" = ('O' )  OR  T0."isIns" = ('N' ) ))) UNION ALL (SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."ORIN" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."Account" <> T1."ShortName"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T0."DocStatus" = ('O' )  AND  T0."Confirmed" = ('Y' ))) UNION ALL (SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."ORPC" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."Account" <> T1."ShortName"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T0."DocStatus" = ('O' )  AND  T0."Confirmed" = ('Y' ))) UNION ALL (SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."ODPI" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."Account" <> T1."ShortName"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T0."DocStatus" = ('O' )  AND  T0."Confirmed" = ('Y' ))) UNION ALL (SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."ODPO" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."Account" <> T1."ShortName"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T0."DocStatus" = ('O' )  AND  T0."Confirmed" = ('Y' ))) UNION ALL (SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."OVPM" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."ShortName" = T0."CardCode"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T1."BalDueDeb" <> T1."BalDueCred")) UNION ALL (SELECT T0."TransId", T0."ObjType", T0."DocEntry", T2."CardCode", T2."CardType", T0."DocDate", T0."DocDueDate", T0."Comments" FROM  "SBODEMODE"."ORCT" T0   LEFT OUTER  JOIN "SBODEMODE"."JDT1" T1  ON  T1."TransId" = T0."TransId"  AND  T1."ShortName" = T0."CardCode"   INNER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."ShortName" = T2."CardCode"   WHERE T1."BalDueDeb" <> T1."BalDueCred")) WITH READ ONLY