CREATE VIEW "SBODEMODE"."B1_MarketingDocumentsView_AR" ( "DocDate", "TaxDate", "VatDate", "DocNum", "LicTradNum", "Series", "CANCELED", "CardCode", "CardName", "CreateDate", "CreateTS", "IsDraft", "BPLId", "FolNumFrom", "FolNumTo", "PTICode", "Letter", "EDocExpFrm", "DocEntry", "ObjType", "FolSeries" ) AS ((((((SELECT T0."DocDate", T0."TaxDate", T0."VatDate", T0."DocNum", T0."LicTradNum", T0."Series", T0."CANCELED", T0."CardCode", T0."CardName", T0."CreateDate", T0."CreateTS", 'N' AS "IsDraft", T0."BPLId", T0."FolNumFrom", T0."FolNumTo", T0."PTICode", T0."Letter", T0."EDocExpFrm", T0."DocEntry", T0."ObjType", T0."FolSeries" FROM  "SBODEMODE"."OINV" T0) UNION ALL (SELECT T0."DocDate", T0."TaxDate", T0."VatDate", T0."DocNum", T0."LicTradNum", T0."Series", T0."CANCELED", T0."CardCode", T0."CardName", T0."CreateDate", T0."CreateTS", 'N' AS "IsDraft", T0."BPLId", T0."FolNumFrom", T0."FolNumTo", T0."PTICode", T0."Letter", T0."EDocExpFrm", T0."DocEntry", T0."ObjType", T0."FolSeries" FROM  "SBODEMODE"."ORIN" T0)) UNION ALL (SELECT T0."DocDate", T0."TaxDate", T0."VatDate", T0."DocNum", T0."LicTradNum", T0."Series", T0."CANCELED", T0."CardCode", T0."CardName", T0."CreateDate", T0."CreateTS", 'N' AS "IsDraft", T0."BPLId", T0."FolNumFrom", T0."FolNumTo", T0."PTICode", T0."Letter", T0."EDocExpFrm", T0."DocEntry", T0."ObjType", T0."FolSeries" FROM  "SBODEMODE"."ODLN" T0)) UNION ALL (SELECT T0."DocDate", T0."TaxDate", T0."VatDate", T0."DocNum", T0."LicTradNum", T0."Series", T0."CANCELED", T0."CardCode", T0."CardName", T0."CreateDate", T0."CreateTS", 'N' AS "IsDraft", T0."BPLId", T0."FolNumFrom", T0."FolNumTo", T0."PTICode", T0."Letter", T0."EDocExpFrm", T0."DocEntry", T0."ObjType", T0."FolSeries" FROM  "SBODEMODE"."ORDN" T0)) UNION ALL (SELECT T0."DocDate", T0."TaxDate", T0."VatDate", T0."DocNum", T0."LicTradNum", T0."Series", T0."CANCELED", T0."CardCode", T0."CardName", T0."CreateDate", T0."CreateTS", 'N' AS "IsDraft", T0."BPLId", T0."FolNumFrom", T0."FolNumTo", T0."PTICode", T0."Letter", T0."EDocExpFrm", T0."DocEntry", T0."ObjType", T0."FolSeries" FROM  "SBODEMODE"."OWTR" T0)) UNION ALL (SELECT T0."DocDate", T0."TaxDate", T0."VatDate", T0."DocNum", T0."LicTradNum", T0."Series", T0."CANCELED", T0."CardCode", T0."CardName", T0."CreateDate", T0."CreateTS", 'N' AS "IsDraft", T0."BPLId", T0."FolNumFrom", T0."FolNumTo", T0."PTICode", T0."Letter", T0."EDocExpFrm", T0."DocEntry", T0."ObjType", T0."FolSeries" FROM  "SBODEMODE"."ORPD" T0)) WITH READ ONLY