CREATE VIEW "SBODEMODE"."B1_Report349StockTransferView" ( "DocEntry", "ObjType", "DocDate", "TaxDate", "DocNum", "CANCELED", "LineTotal", "Quantity", "OrdinLNum", "Dummy_TAX1_CrditDebit", "Dummy_TAX1_SrcLineNum", "Dummy_TAX1_BaseAbsEntry", "Dummy_TAX1_BaseSum", "OVTG_OperationCode", "Dummy_OVTG_Category", "Dummy_OVTG_Code", "OCRD_LicTradNum", "OWTR_CardCode", "OWTR_CardName", "OCRD_CardType", "Shipper_CardCode", "Shipper_CardName", "OWHS_From_FedTaxID", "OWHS_From_Country", "OCRY_From_IsEc", "OWHS_To_Country", "OCRY_To_IsEc" ) AS SELECT T1."DocEntry", T1."ObjType", T1."DocDate", T1."TaxDate", T1."DocNum", T1."CANCELED", T0."LineTotal", T0."Quantity", T11."OrdinLNum", T9."CrditDebit" AS "Dummy_TAX1_CrditDebit", T9."SrcLineNum" AS "Dummy_TAX1_SrcLineNum", T9."BaseAbs" AS "Dummy_TAX1_BaseAbsEntry", T9."BaseSum" AS "Dummy_TAX1_BaseSum", T10."Indicator" AS "OVTG_OperationCode", T10."Category" AS "Dummy_OVTG_Category", T10."Code" AS "Dummy_OVTG_Code", T2."LicTradNum" AS "OCRD_LicTradNum", T1."CardCode" AS "OWTR_CardCode", T1."CardName" AS "OWTR_CardName", T2."CardType" AS "OCRD_CardType", T7."CardCode" AS "Shipper_CardCode", T7."CardName" AS "Shipper_CardName", T3."FedTaxID" AS "OWHS_From_FedTaxID", T3."Country" AS "OWHS_From_Country", T5."IsEC" AS "OCRY_From_IsEc", T4."Country" AS "OWHS_To_Country", T6."IsEC" AS "OCRY_To_IsEc" FROM  "SBODEMODE"."WTR1" T0  INNER  JOIN "SBODEMODE"."OWTR" T1  ON  T0."DocEntry" = T1."DocEntry"    LEFT OUTER  JOIN "SBODEMODE"."OCRD" T2  ON  T1."CardCode" = T2."CardCode"   INNER  JOIN "SBODEMODE"."OWHS" T3  ON  T0."FromWhsCod" = T3."WhsCode"   INNER  JOIN "SBODEMODE"."OWHS" T4  ON  T0."WhsCode" = T4."WhsCode"   INNER  JOIN "SBODEMODE"."OCRY" T5  ON  T3."Country" = T5."Code"   INNER  JOIN "SBODEMODE"."OCRY" T6  ON  T4."Country" = T6."Code"    LEFT OUTER  JOIN "SBODEMODE"."OCRD" T7  ON  T3."Shipper" = T7."CardCode"   INNER  JOIN "SBODEMODE"."OADM" T8  ON  T8."CompnyName" = T8."CompnyName"    LEFT OUTER  JOIN "SBODEMODE"."TAX1" T9  ON  T9."AbsEntry" = -1    LEFT OUTER  JOIN "SBODEMODE"."OVTG" T10  ON  T10."Code" = ''    LEFT OUTER  JOIN "SBODEMODE"."OTAX" T11  ON  T11."AbsEntry" = -1   WHERE (T3."Country" = T8."Country"  AND  T5."IsEC" = ('Y' )  AND  T4."Country" <> T8."Country"  AND  T6."IsEC" = ('Y' ) ) OR  (T3."Country" <> T8."Country"  AND  T5."IsEC" = ('Y' )  AND  T4."Country" = T8."Country"  AND  T6."IsEC" = ('Y' ) ) WITH READ ONLY