在EBS的数据库中建一表,但是此表并不是EBS的应用表,在注册弹性域的时候就可以体现到,如果想注册自己在数据库已建的一个表来保存弹性域的值,就会发现找不到该表,因为此表未跟EBS的应用关联,要关联应用必须注册才行。
......................
[@more@]
这里注册两个表,一个用于关键弹性域,另一个用于描述弹性域。
一、注册关键弹性域应用表:
1、建COMBINATIONS表,为了简单只用两段
create table FND_KEYFLEX_T
(
CODE_COMBINATION_ID NUMBER(15) not null,
CHART_OF_ACCOUNTS_ID NUMBER(15) not null,
SEGMENT1 VARCHAR2(25),
SEGMENT2 VARCHAR2(25),
ENABLED_FLAG VARCHAR2(1),
SUMMARY_FLAG VARCHAR2(1),
START_DATE_ACTIVE DATE,
END_DATE_ACTIVE DATE,
LAST_UPDATED_BY NUMBER,
LAST_UPDATE_DATE DATE,
CREATED_BY NUMBER,
CREATION_DATE DATE
)
/
create unique index FND_KEYFLEX_T_U1 on FND_KEYFLEX_T (CODE_COMBINATION_ID)
/
grant select, insert, update, delete on FND_KEYFLEX_T to PUBLIC
/
create public synonym FND_KEYFLEX_T for FND_KEYFLEX_T
/
create sequence FND_KEYFLEX_T_S
minvalue 1
maxvalue 2000000000
start with 1
increment by 1
cache 20
order
/
grant select on FND_KEYFLEX_T_S to public
/
-----------------------
关键弹性域COMBINATIONS表必须包括这几个部分:
(1)唯一的ID列
(2)KEY段,SEGMENT1、SEGMENT2、、、SEGMENTn
(3)ENABLED_FLAG和SUMMARY_FLAG列
(4)START_DATE_ACTIVE和END_DATE_ACTIVE列
(5)一些WHO列
(6)结构ID列
(7)一个序列,名为“表名_S”
-----------------------
2.用AD_DD包注册表关联EBS的应用名SQLGL
begin
ad_dd.register_table('SQLGL','FND_KEYFLEX_T','T',10,10,40);
commit;
end;
3.用AD_DD包注册表的每列
begin
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','CODE_COMBINATION_ID',1,'NUMBER',15,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','CHART_OF_ACCOUNTS_ID',2,'NUMBER',15,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','SEGMENT1',3,'VARCHAR2',25,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','SEGMENT2',4,'VARCHAR2',25,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','ENABLED_FLAG',5,'VARCHAR2',1,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','SUMMARY_FLAG',6,'VARCHAR2',1,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','START_DATE_ACTIVE',7,'DATE',7,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','END_DATE_ACTIVE',8,'DATE',7,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','LAST_UPDATED_BY',9,'NUMBER',22,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','LAST_UPDATE_DATE',10,'DATE',7,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','CREATED_BY',11,'NUMBER',22,'N','N');
ad_dd.register_column('SQLGL','FND_KEYFLEX_T','CREATION_DATE',12,'DATE',7,'N','N');
commit;
end;
二、注册描述弹性域应用表:
1、建表,为了简单只用两个属性段
create table FND_DESCFLEX_T
(
CODE_ID NUMBER(15) not null,
ATTRIBUTE_CATEGORY VARCHAR2(25),ATTRIBUTE1 VARCHAR2(25),
ATTRIBUTE2 VARCHAR2(25),
LAST_UPDATED_BY NUMBER,
LAST_UPDATE_DATE DATE,
CREATED_BY NUMBER,
CREATION_DATE DATE
)
/
create unique index FND_DESCFLEX_T_U1 on FND_DESCFLEX_T (CODE_ID)
/
grant select, insert, update, delete on FND_DESCFLEX_T to PUBLIC
/
create public synonym FND_DESCFLEX_T for FND_DESCFLEX_T
/
-----------------------
描述弹性域表必须包括这两个部分:
(1)CONTEXT列
(2)描述段,ATTRIBUTE1、ATTRIBUTE2、、、ATTRIBUTEn
-----------------------
2、跟关键弹性域的第2步一样,只修改一下表名就行
3、跟关键弹性域的第3步一样,只修改一下表名和列结构就行
注册完后,查看FND_TABLES和FND_COLUMNS可以看到刚注册的两个表和列,并在EBS中可以应用这两个表和列
转载出处:http://blog.itpub.net/7626788/viewspace-853010/
转载于:https://blog.51cto.com/baser/1839480