CREATE TABLE ITCMDESTORIG (
    CDFILIAL            VARCHAR2(4)            	NOT NULL,
    NRVENDAREST         VARCHAR2(10)           	NOT NULL,
    NRCOMANDA           VARCHAR2(10)           	NOT NULL,
    NRPRODCOMVEN        VARCHAR2(6)            	NOT NULL,
    CDPRODUTO           VARCHAR2(10)          	NOT NULL,
    QTPROCOMEST         FLOAT                 	NOT NULL,
    VRPRECCOMEST        FLOAT                 	NOT NULL,
    VRDESITCOMEST       FLOAT                 	NOT NULL,  
    TXPRODCOMVENEST     VARCHAR2(2000)        	NULL,
    DSOBSPEDDIGEST      VARCHAR2(2000)        	NULL,
	NRORG           NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
	IDATIVO         VARCHAR2(1) 	DEFAULT 'S' NOT NULL
		CONSTRAINT CKC_IDATIVO_ITCMDESTORIG CHECK (IDATIVO IN ('S','N')),
	DTINCLUSAO      DATE        	NULL, 
	DTULTATU        DATE     	   	NULL,
	NRORGINCLUSAO   NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  NULL,
	CDOPERINCLUSAO  VARCHAR2(12)  	DEFAULT '1' NULL,
	NRORGULTATU     NUMBER 			DEFAULT  SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
	CDOPERULTATU    VARCHAR2(12)  	DEFAULT '1',
		CONSTRAINT PK_ITCMDESTORIG PRIMARY KEY (CDFILIAL, NRVENDAREST, NRCOMANDA, NRPRODCOMVEN, CDPRODUTO)
)