CREATE TABLE [import].[Sales_Line] (
   [timestamp] [timestamp] NOT NULL,
   [Document Type] [int] NOT NULL,
   [Document No_] [varchar](20) NOT NULL,
   [Line No_] [int] NOT NULL,
   [Sell-to Customer No_] [varchar](20) NOT NULL,
   [Type] [int] NOT NULL,
   [No_] [varchar](50) NOT NULL,
   [Location Code] [varchar](10) NOT NULL,
   [Posting Group] [varchar](20) NOT NULL,
   [Quantity Disc_ Code] [varchar](30) NOT NULL,
   [Shipment Date] [datetime] NOT NULL,
   [Description] [varchar](255) NOT NULL,
   [Description 2] [varchar](255) NOT NULL,
   [Unit of Measure] [varchar](10) NOT NULL,
   [Quantity] [decimal](38,20) NOT NULL,
   [Outstanding Quantity] [decimal](38,20) NOT NULL,
   [Qty_ to Invoice] [decimal](38,20) NOT NULL,
   [Qty_ to Ship] [decimal](38,20) NOT NULL,
   [Unit Price] [decimal](38,20) NOT NULL,
   [Unit Cost (LCY)] [decimal](38,20) NOT NULL,
   [VAT %] [decimal](38,20) NOT NULL,
   [Quantity Disc_ %] [decimal](38,20) NOT NULL,
   [Line Discount %] [decimal](38,20) NOT NULL,
   [Line Discount Amount] [decimal](38,20) NOT NULL,
   [Amount] [decimal](38,20) NOT NULL,
   [Amount Including VAT] [decimal](38,20) NOT NULL,
   [Allow Invoice Disc_] [tinyint] NOT NULL,
   [Gross Weight] [decimal](38,20) NOT NULL,
   [Net Weight] [decimal](38,20) NOT NULL,
   [Units per Parcel] [decimal](38,20) NOT NULL,
   [Unit Volume] [decimal](38,20) NOT NULL,
   [Appl_-to Item Entry] [int] NOT NULL,
   [Department Code] [varchar](10) NOT NULL,
   [Make Code] [varchar](10) NOT NULL,
   [Price Group Code] [varchar](10) NOT NULL,
   [Allow Quantity Disc_] [tinyint] NOT NULL,
   [Job No_] [varchar](20) NOT NULL,
   [Appl_-to Job Entry] [int] NOT NULL,
   [Phase Code] [varchar](10) NOT NULL,
   [Task Code] [varchar](10) NOT NULL,
   [Step Code] [varchar](10) NOT NULL,
   [Job Applies-to ID] [varchar](20) NOT NULL,
   [Apply and Close (Job)] [tinyint] NOT NULL,
   [Work Type Code] [varchar](10) NOT NULL,
   [Serial No_] [varchar](20) NOT NULL,
   [Cust__Item Disc_ %] [decimal](38,20) NOT NULL,
   [Outstanding Amount] [decimal](38,20) NOT NULL,
   [Qty_ Shipped Not Invoiced] [decimal](38,20) NOT NULL,
   [Shipped Not Invoiced] [decimal](38,20) NOT NULL,
   [Quantity Shipped] [decimal](38,20) NOT NULL,
   [Quantity Invoiced] [decimal](38,20) NOT NULL,
   [Shipment No_] [varchar](20) NOT NULL,
   [Shipment Line No_] [int] NOT NULL,
   [Profit %] [decimal](38,20) NOT NULL,
   [Bill-to Customer No_] [varchar](20) NOT NULL,
   [Inv_ Discount Amount] [decimal](38,20) NOT NULL,
   [Purchase Order No_] [varchar](20) NOT NULL,
   [Purch_ Order Line No_] [int] NOT NULL,
   [Drop Shipment] [tinyint] NOT NULL,
   [Gen_ Bus_ Posting Group] [varchar](10) NOT NULL,
   [Gen_ Prod_ Posting Group] [varchar](10) NOT NULL,
   [VAT Calculation Type] [int] NOT NULL,
   [Transaction Type] [varchar](10) NOT NULL,
   [Transport Method] [varchar](10) NOT NULL,
   [Attached to Line No_] [int] NOT NULL,
   [Exit Point] [varchar](10) NOT NULL,
   [Area] [varchar](10) NOT NULL,
   [Transaction Specification] [varchar](10) NOT NULL,
   [Tax Area Code] [varchar](20) NOT NULL,
   [Tax Liable] [tinyint] NOT NULL,
   [Tax Group Code] [varchar](10) NOT NULL,
   [VAT Bus_ Posting Group] [varchar](10) NOT NULL,
   [VAT Prod_ Posting Group] [varchar](10) NOT NULL,
   [Currency Code] [varchar](10) NOT NULL,
   [Outstanding Amount (LCY)] [decimal](38,20) NOT NULL,
   [Shipped Not Invoiced (LCY)] [decimal](38,20) NOT NULL,
   [Reserved Quantity] [decimal](38,20) NOT NULL,
   [Reserve] [int] NOT NULL,
   [Blanket Order No_] [varchar](20) NOT NULL,
   [Blanket Order Line No_] [int] NOT NULL,
   [VAT Base Amount] [decimal](38,20) NOT NULL,
   [Unit Cost] [decimal](38,20) NOT NULL,
   [System-Created Entry] [tinyint] NOT NULL,
   [Book No_] [varchar](20) NOT NULL,
   [Variant Code] [varchar](10) NOT NULL,
   [Bin Code] [varchar](20) NOT NULL,
   [Qty_ per Unit of Measure] [decimal](38,20) NOT NULL,
   [Planned] [tinyint] NOT NULL,
   [Unit of Measure Code] [varchar](10) NOT NULL,
   [Quantity (Base)] [decimal](38,20) NOT NULL,
   [Outstanding Qty_ (Base)] [decimal](38,20) NOT NULL,
   [Qty_ to Invoice (Base)] [decimal](38,20) NOT NULL,
   [Qty_ to Ship (Base)] [decimal](38,20) NOT NULL,
   [Qty_ Shipped Not Invd_ (Base)] [decimal](38,20) NOT NULL,
   [Qty_ Shipped (Base)] [decimal](38,20) NOT NULL,
   [Qty_ Invoiced (Base)] [decimal](38,20) NOT NULL,
   [Reserved Qty_ (Base)] [decimal](38,20) NOT NULL,
   [Appl_-from Item Entry] [int] NOT NULL,
   [Branch Book No_] [varchar](20) NOT NULL,
   [Order Type] [int] NOT NULL,
   [Item Type] [int] NOT NULL,
   [VIN] [varchar](20) NOT NULL,
   [Vehicle Status] [int] NOT NULL,
   [Registration Date] [datetime] NOT NULL,
   [Mileage] [int] NOT NULL,
   [Expected Shipping Week] [datetime] NOT NULL,
   [License No_] [varchar](11) NOT NULL,
   [From Purch_ Document Type] [int] NOT NULL,
   [From Purch_ Document No_] [varchar](20) NOT NULL,
   [From Purch_ Line No_] [int] NOT NULL,
   [Indentation] [int] NOT NULL,
   [Totaling] [varchar](30) NOT NULL,
   [Service Order No_] [varchar](20) NOT NULL,
   [Service Order Line No_] [int] NOT NULL,
   [Labor Make Code] [varchar](10) NOT NULL,
   [Labor No_] [varchar](20) NOT NULL,
   [Exch_ Parts Tax Base] [decimal](38,20) NOT NULL,
   [Exch_ Parts Tax %] [decimal](38,20) NOT NULL,
   [Exch_ Parts Tax Amount] [decimal](38,20) NOT NULL,
   [Exch_ Parts VAT %] [decimal](38,20) NOT NULL,
   [Allow Discount] [tinyint] NOT NULL,
   [Service Type] [int] NOT NULL,
   [Cockpit Entry No_] [int] NOT NULL,
   [Additional Item] [int] NOT NULL,
   [Service Posting Group] [varchar](10) NOT NULL,
   [Customer Group Code] [varchar](10) NOT NULL,
   [Item Group Code] [varchar](10) NOT NULL,
   [Quantity Multiplier] [decimal](38,20) NOT NULL,
   [Suppress in Order] [tinyint] NOT NULL,
   [Fair Deal] [tinyint] NOT NULL,
   [Automatic Surcharge] [tinyint] NOT NULL,
   [Service Surcharge Code] [varchar](10) NOT NULL,
   [From Veh_ Opt_Inv_ Doc_ Type] [int] NOT NULL,
   [From Veh_ Option Inv_ Doc_ No_] [varchar](20) NOT NULL,
   [From Veh_ Opt_Inv_ Doc_ Line] [int] NOT NULL,
   [From Veh_ Opt_Inv_ Line Type] [int] NOT NULL,
   [From Veh_ Option Inv_ No_] [varchar](20) NOT NULL,
   [From Veh_ Opt_Inv_ IntCode] [varchar](10) NOT NULL,
   [Vehicle Line No_] [int] NOT NULL,
   [Sending Required] [int] NOT NULL,
   [Order No_] [varchar](20) NOT NULL,
   [Order Line No_] [int] NOT NULL,
   [Main Customer] [tinyint] NOT NULL,
   [Vehicle Unit Price Date] [datetime] NOT NULL,
   [Shelf_Bin No_] [varchar](10) NOT NULL,
   [Veh_ Opt_ Line No_] [int] NOT NULL,
   [Line Status] [int] NOT NULL,
   [Availability Entry No_] [int] NOT NULL,
   [Disable for Requisition] [tinyint] NOT NULL,
   [Fair Deal Credit Memo] [tinyint] NOT NULL,
   [Open Autom_ Stock Info_ Form] [tinyint] NOT NULL,
   [SA3 VAT Key ID] [int] NOT NULL,
   [Warranty Add-On Contract No_] [varchar](20) NOT NULL,
   [Warranty Add-On Contract Type] [varchar](20) NOT NULL,
   [Shipment Number] [varchar](20) NOT NULL,
   [Shipment Line Number] [int] NOT NULL,
   [Rush Order] [tinyint] NOT NULL,
   [Not Accident Free] [tinyint] NOT NULL,
   [SRP-MM_MRP Package] [tinyint] NOT NULL,
   [Client_DB] [varchar](20) NOT NULL

   ,CONSTRAINT [Sales_Line$0] PRIMARY KEY CLUSTERED ([Document Type], [Document No_], [Line No_], [Client_DB])
)


GO
