CREATE VIEW "IMCYC"."B1_DocLinkedDownpaymentsView" ( "ObjType", "DocEntry", "LineNum", "LineSeq", "ArrayType", "LinkedObjType", "LinkedDocEntry", "VatGroup", "TaxCode", "IsLinkedDPMPosted" ) AS ((((SELECT T0."ObjType" AS "ObjType", T0."DocEntry" AS "DocEntry", T0."LineNum" AS "LineNum", T0."LineSeq" AS "LineSeq", 22 AS "ArrayType", T0."BaseType" AS "LinkedObjType", T0."BaseAbs" AS "LinkedDocEntry", T0."VatGroup" AS "VatGroup", T0."TaxCode" AS "TaxCode", T1."Posted" AS "IsLinkedDPMPosted" FROM  "IMCYC"."INV11" T0  INNER  JOIN "IMCYC"."ODPI" T1  ON  T1."DocEntry" = T0."BaseAbs"  AND  TO_NUMBER(T1."ObjType") = T0."BaseType") UNION ALL (SELECT T0."ObjType" AS "ObjType", T0."DocEntry" AS "DocEntry", T0."LineNum" AS "LineNum", T0."LineSeq" AS "LineSeq", 22 AS "ArrayType", T0."BaseType" AS "LinkedObjType", T0."BaseAbs" AS "LinkedDocEntry", T0."VatGroup" AS "VatGroup", T0."TaxCode" AS "TaxCode", T1."Posted" AS "IsLinkedDPMPosted" FROM  "IMCYC"."RIN11" T0  INNER  JOIN "IMCYC"."ODPI" T1  ON  T1."DocEntry" = T0."BaseAbs"  AND  TO_NUMBER(T1."ObjType") = T0."BaseType")) UNION ALL (SELECT T0."ObjType" AS "ObjType", T0."DocEntry" AS "DocEntry", T0."LineNum" AS "LineNum", T0."LineSeq" AS "LineSeq", 22 AS "ArrayType", T0."BaseType" AS "LinkedObjType", T0."BaseAbs" AS "LinkedDocEntry", T0."VatGroup" AS "VatGroup", T0."TaxCode" AS "TaxCode", T1."Posted" AS "IsLinkedDPMPosted" FROM  "IMCYC"."PCH11" T0  INNER  JOIN "IMCYC"."ODPO" T1  ON  T1."DocEntry" = T0."BaseAbs"  AND  TO_NUMBER(T1."ObjType") = T0."BaseType")) UNION ALL (SELECT T0."ObjType" AS "ObjType", T0."DocEntry" AS "DocEntry", T0."LineNum" AS "LineNum", T0."LineSeq" AS "LineSeq", 22 AS "ArrayType", T0."BaseType" AS "LinkedObjType", T0."BaseAbs" AS "LinkedDocEntry", T0."VatGroup" AS "VatGroup", T0."TaxCode" AS "TaxCode", T1."Posted" AS "IsLinkedDPMPosted" FROM  "IMCYC"."RPC11" T0  INNER  JOIN "IMCYC"."ODPO" T1  ON  T1."DocEntry" = T0."BaseAbs"  AND  TO_NUMBER(T1."ObjType") = T0."BaseType")) WITH READ ONLY