create table TRABCURVAABCPED
(
    CDFILIAL            VARCHAR2(4)            not null,
    NRCURVAABCPED       VARCHAR2(10)           not null,
    NRSEQCURVA          INTEGER                not null,
    NRPEDIDO            VARCHAR2(10)           null,
    DTPEDIDO            DATE                   null,
    DTENTPED            DATE                   null,
    IDSITPEDIDO         VARCHAR2(01)           null,
    CDCLIENTE           VARCHAR2(21)           null,
    IDTPENDECLIE        VARCHAR2(01)           null,
    CDGRUPCLIE          VARCHAR2(10)           null,
    CDVENDEDOR          VARCHAR2(04)           null,
    CDTIPOOPER          VARCHAR2(02)           null,
    CDTIPOOPERDEV       VARCHAR2(02)           null,
    NRITEMPED           VARCHAR2(10)           null,
    CDPRODUTO           VARCHAR2(10)           null,
    QTITEMPED           FLOAT                  null,
    VRPREUNITPED        FLOAT                  null,
    VRDESITPED          FLOAT                  null,
    VRITEM              FLOAT                  null,
    IDTIPO              VARCHAR2(01)           null,
    NRLANCTONF          VARCHAR2(10)           null,
    NRNOTAFISC          VARCHAR2(20)           null,
    DTEMISSAO           DATE                   null,
    DTENTRSAID          DATE                   null,
    CDSERIE             VARCHAR2(05)           null,
    IDCURVAPED          VARCHAR2(01)           null,
    NRORG               NUMBER 	               DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NOT NULL,
    IDATIVO             VARCHAR2(1)            DEFAULT 'S'					                NOT NULL,
    DTINCLUSAO          DATE                   DEFAULT SYSDATE,
    DTULTATU            DATE                   DEFAULT SYSDATE,
    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 CKC_IDATIVO_TRABCURVAABCPED CHECK (IDATIVO IN ('S','N')),
        CONSTRAINT PK_TRABCURVAABCPED PRIMARY KEY (CDFILIAL, NRCURVAABCPED, NRSEQCURVA)
)
/