CREATE VIEW "SBODEMODE"."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  "SBODEMODE"."INV11" T0  INNER  JOIN "SBODEMODE"."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  "SBODEMODE"."RIN11" T0  INNER  JOIN "SBODEMODE"."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  "SBODEMODE"."PCH11" T0  INNER  JOIN "SBODEMODE"."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  "SBODEMODE"."RPC11" T0  INNER  JOIN "SBODEMODE"."ODPO" T1  ON  T1."DocEntry" = T0."BaseAbs"  AND  TO_NUMBER(T1."ObjType") = T0."BaseType")) WITH READ ONLY