/*
================================================================================
档案代号:aps_saj
档案名称:APS 存货预配记录维护档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table aps_saj
(
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 aps_saj_pk on aps_saj (pid,oid,wh_id,stk_loc);
alter table aps_saj add  constraint aps_saj_pk primary key  (pid,oid,wh_id,stk_loc) enable validate;
grant select on aps_saj to public;
grant index on aps_saj to public;
grant update on aps_saj to public;
grant delete on aps_saj to public;
grant insert on aps_saj to public;