Home » Developer & Programmer » Forms » How to Register Primary Key in Apps
How to Register Primary Key in Apps [message #234839] Thu, 03 May 2007 05:07 Go to next message
siva27
Messages: 34
Registered: April 2007
Location: Chennai
Member

Hi all,

I have 2tables dept and emp,i have registered the table n columns in apps.
I'm trying ti register Primary Key & Primary Key columns.
I will show the table structure

create table dept(
deptno number(4) primary key
,dname varchar2(10)
,loc varchar2(10)
,LAST_UPDATE_DATE date
,LAST_UPDATED_BY number(15)
,CREATION_DATE date
,CREATED_BY number(15)
,LAST_UPDATE_LOGIN number(15)
)

create table emp(
empno number(4) primary key
,ename varchar2(10)
,job varchar2(10)
,deptno number(4) references dept(deptno)
,LAST_UPDATE_DATE date
,LAST_UPDATED_BY number(15)
,CREATION_DATE date
,CREATED_BY number(15)
,LAST_UPDATE_LOGIN number(15)
)

procedure register_primary_key
(p_appl_short_name in varchar2,
p_key_name in varchar2,
p_tab_name in varchar2,
p_description in varchar2,
p_key_type in varchar2,
p_audit_flag in varchar2,
p_enabled_flag in varchar2);


procedure register_primary_key_column
(p_appl_short_name in varchar2,
p_key_name in varchar2,
p_tab_name in varchar2,
p_col_name in varchar2,
p_col_sequence in number);


execute ad_dd.register_primary_key('application short name', 'primary key
column name', 'table name','description of key column', 'S', 'Y','Y');

execute ad_dd.register_primary_key_column('application short name', 'primary
key column name', 'table name', 'column name', 1);


Begin
ad_dd.register_primary_key('INV','DEPT_PKEY_JVG','DEPT','number','S','Y','Y');
end;

commit

BEGIN
ad_dd.register_primary_key_column('INV','DEPT_PKEY_JVG','DEPT','DEPTNO',1);
END;


Begin
ad_dd.register_primary_key('INV','EMP_PKEY_JVG','EMP','number','S','Y','Y');
end;

BEGIN
ad_dd.register_primary_key_column('INV','EMP_PKEY_JVG','EMP','EMPNO',1);
END;

This is how i have done to register Primary key.But whn i'm trying to insert the data throught Front-end itis saying that
ORA-02291: integrity constraint (APPS.SYS_C00153953) violated - parent key not found

can any help me in this itis urget

Re: How to Register Primary Key in Apps [message #236483 is a reply to message #234839] Thu, 10 May 2007 01:41 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Previous Topic: Icon not getting displayed over the Pushbuttons after forms migration.
Next Topic: Creating Forms in Oracle Application Environment
Goto Forum:
  


Current Time: Sat Dec 10 05:25:01 CST 2016

Total time taken to generate the page: 0.09211 seconds