如何将用户表注册到EBS中
用户开发的表通常不需要注册到EBS中,依然可以正常使用,如果需要使用弹性域、预警、审计或值集功能,则需要将客制化的表注册到EBS里,与EBS应用相关联。
在应用开发员→用户产品→数据库→表中可以查看到已经注册到EBS中的表,但该模块不能添加,如果需要注册,需要使用EBS提供的API:
注册表:
EXECUTE AD_DD.REGISTER_TABLE('所有者','表名','T自动扩展/S非自动扩展','下一区','自由','已使用')
eg:
EXECUTE AD_DD.REGISTER_TABLE('CVT','CVT_WF_DEMO','T',2,10,40);
注册行:
EXECUTE AD_DD.REGISTER_COLUMN('所有者','表名', '字段名',序号,'类型',字段宽度,是否为空,是否可以转换)
eg:
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','DOCUMENT_ID',1,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','DOCUMENT_AMOUNT',2,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','DOCUMENT_SUBMITER',3,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','DOCUMENT_APPROVER',4,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','DOCUEMNT_TEXT',5,'VARCHAR2',100,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','DOCUMENT_NUMBER',6,'VARCHAR2',10,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','LAST_UPDATE_DATE',7,'DATE',9,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','LAST_UPDATED_BY',8,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','CREATION_DATE',9,'DATE',9,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','CREATED_BY',10,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','LAST_UPDATE_LOGIN',11,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','SUBMITE_TIME',12,'DATE',9,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','APPROVE_REPLY',13,'VARCHAR2',100,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','APPROVE_TIME',14,'DATE',9,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('CVT','CVT_WF_DEMO','STATUS',15,'VARCHAR2',10,'Y','N');
API每个参数的使用,请参考hand_plsql_autocreate原程序
注册主键
EXECUTE AD_DD.REGISTER_PRIMARY_KEY('所有者','键名','表名','描述','S','Y审计','Y启用');
eg:
EXECUTE AD_DD.REGISTER_PRIMARY_KEY('CVT', 'DOCUMENT_NUMBER_PK', 'CVT_WF_DEMO','DOCUMENT_NUMBER_PK', 'S', 'Y','Y');
注册主键字段
EXECUTE AD_DD.REGISTER_PRIMARY_KEY_COLUMN('所有者','键名','表','字段',序列)
eg:
EXECUTE AD_DD.REGISTER_PRIMARY_KEY_COLUMN('CVT', 'DOCUMENT_NUMBER_PK', 'CVT_WF_DEMO', 'DOCUMENT_NUMBER', 6);