--ABS-90165, ABS-70582
CREATE TABLE EDI_I_TGCONTRACTPO_U
(
  TRANSFER_ID          NUMBER NOT NULL,
  TRANSFER_STATUS      NUMBER DEFAULT 0 NOT NULL,
  PURCHASEORDERNUMBER  VARCHAR2(22),
  TRANSACTIONTYPE      VARCHAR2(2),
  DELTOCUSTOMERNUMBER  VARCHAR2(20),
  POLINENUMBER         VARCHAR2(20),
  POORDERDATE          NUMBER(8),
  POMONTHENDDATE       NUMBER(8),
  POSKUNUMBER          VARCHAR2(48),
  POITEMNUMBER         VARCHAR2(48),
  UNITOFMEASURE        VARCHAR2(2),
  POQUANTITY           NUMBER(15,2),
  POPRICE              NUMBER(17,2),
  RECORDSTATUS         VARCHAR2(1 BYTE),
  CREATINGUSER         VARCHAR2(10 BYTE),
  CREATINGPROGRAM      VARCHAR2(10 BYTE),
  CREATIONDATE         DATE,
  CREATIONTIME         DATE,
  CHANGEUSER           VARCHAR2(10 BYTE),
  CHANGEPROGRAM        VARCHAR2(10 BYTE),
  CHANGEDATE           DATE,
  CHANGETIME           DATE,
  EXT_TRANSFER_ID      VARCHAR2(20 BYTE),
  EXT_INST_ID          VARCHAR2(40 BYTE),
  EXT_PROCESSED_STATUS VARCHAR2(1 BYTE),
  EXT_ERROR_CODE       VARCHAR2(20 BYTE),
  EXT_ERROR_DESC       VARCHAR2(500 BYTE),
  BATCH_ID             NUMBER
);
CREATE INDEX INDX_EDI_I_TGCONTRACTPO_U_01 ON EDI_I_TGCONTRACTPO_U (TRANSFER_STATUS);
ALTER TABLE EDI_I_TGCONTRACTPO_U
  ADD CONSTRAINT PK_EDI_I_TGCONTRACTPO_U PRIMARY KEY (TRANSFER_ID);
-- CREATE/RECREATE CHECK CONSTRAINTS 
ALTER TABLE EDI_I_TGCONTRACTPO_U
  ADD CONSTRAINT EDI_I_TGPO_TRANSF_STAT_VAL1
  CHECK (TRANSFER_STATUS IN (-1, 0, 1));
