/*
================================================================================
档案代号:apsiam
档案名称:APS 存货预配记录
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table apsiam
(
pid         varchar2(40) NOT NULL,   /*料号                                   */
oid         varchar2(32) NOT NULL,   /*需求订单或制令                         */
wh_id       varchar2(32) NOT NULL,   /*库房编号                               */
stk_loc     varchar2(32) NOT NULL,   /*库房储位                               */
fed_qty     number(16,4),            /*分配量                                 */
dm_qty      number(16,4),            /*需求数量                               */
is_mt       number(4),               /*是否原物料存货                         */
location    varchar2(32),            /*库房位置                               */
is_lock     number(4),               /*是否锁定                               */
is_do       number(4)                /*是否为需求订单                         */
);

create unique index apsiam_pk on apsiam (pid,oid,wh_id,stk_loc);
alter table apsiam add  constraint apsiam_pk primary key  (pid,oid,wh_id,stk_loc) enable validate;
grant select on apsiam to public;
grant index on apsiam to public;
grant update on apsiam to public;
grant delete on apsiam to public;
grant insert on apsiam to public;