/*
================================================================================
档案代号:abh_file
档案名称:传票项次冲帐异动档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table abh_file
(
abh00       varchar2(5) NOT NULL,    /*帐别                                   */
abh01       varchar2(16) NOT NULL,   /*传票编号                               */
                                     /*传票编号(冲帐)                         */
abh02       number(5) NOT NULL,      /*项次                                   */
abh021      date,                    /*传票日期                               */
                                     /*传票日期(冲帐)                         */
abh03       varchar2(24),            /*科目编号                               */
abh04       varchar2(80),            /*摘要                                   */
abh05       varchar2(10),            /*部门                                   */
abh06       number(5) NOT NULL,      /*行序                                   */
abh07       varchar2(16) NOT NULL,   /*立帐传票编号                           */
abh08       number(5) NOT NULL,      /*项次                                   */
abh09       number(20,6) NOT NULL,   /*冲帐金额                               */
abh11       varchar2(30),            /*异动码-1                               */
abh12       varchar2(30),            /*异动码-2                               */
abh13       varchar2(30),            /*异动码-3                               */
abh14       varchar2(30),            /*异动码-4                               */
abh15       varchar2(1),             /*No Use                                 */
abh16       varchar2(1),             /*No Use                                 */
abh17       varchar2(1),             /*No Use                                 */
abhconf     varchar2(1),             /*确认码                                 */
                                     /*'X'为无效资料                          */
abh31       varchar2(30),            /*异动码-5                               */
                                     /*#FUN-5C0015                            */
abh32       varchar2(30),            /*异动码-6                               */
                                     /*#FUN-5C0015                            */
abh33       varchar2(30),            /*异动码-7                               */
                                     /*#FUN-5C0015                            */
abh34       varchar2(30),            /*异动码-8                               */
                                     /*#FUN-5C0015                            */
abh35       varchar2(30),            /*异动码-9                               */
                                     /*#FUN-5C0015                            */
abh36       varchar2(30),            /*异动码-10                              */
                                     /*#FUN-5C0015                            */
abh37       varchar2(30)             /*No Use                                 */
);

create        index abh_02 on abh_file (abh03);
create unique index abh_pk on abh_file (abh01,abh02,abh00,abh06,abh07,abh08);
alter table abh_file add  constraint abh_pk primary key  (abh01,abh02,abh00,abh06,abh07,abh08) enable 
validate;
grant select on abh_file to public;
grant index on abh_file to public;
grant update on abh_file to public;
grant delete on abh_file to public;
grant insert on abh_file to public;