52: <> pqh_plg_shd.g_old_rec.process_log_id) then
53: --
54: -- raise error as PK has changed
55: --
56: pqh_plg_shd.constraint_error('PQH_PROCESS_LOG_PK');
57: --
58: elsif not l_api_updating then
59: --
60: -- check if PK is null
62: if p_process_log_id is not null then
63: --
64: -- raise error as PK is not null
65: --
66: pqh_plg_shd.constraint_error('PQH_PROCESS_LOG_PK');
67: --
68: end if;
69: --
70: end if;
136: --
137: -- raise error as FK does not relate to PK in pqh_table_route
138: -- table.
139: --
140: pqh_plg_shd.constraint_error('PQH_PROCESS_LOG_FK2');
141: --
142: end if;
143: --
144: close c1;
183: l_dummy varchar2(1);
184: --
185: cursor c1 is
186: select null
187: from pqh_process_log a
188: where a.process_log_id = p_master_process_log_id;
189: --
190: Begin
191: --
200: <> nvl(pqh_plg_shd.g_old_rec.master_process_log_id,hr_api.g_number)
201: or not l_api_updating) and
202: p_master_process_log_id is not null then
203: --
204: -- check if master_process_log_id value exists in pqh_process_log table
205: --
206: open c1;
207: --
208: fetch c1 into l_dummy;
209: if c1%notfound then
210: --
211: close c1;
212: --
213: -- raise error as FK does not relate to PK in pqh_process_log
214: -- table.
215: --
216: pqh_plg_shd.constraint_error('PQH_PROCESS_LOG_FK1');
217: --
212: --
213: -- raise error as FK does not relate to PK in pqh_process_log
214: -- table.
215: --
216: pqh_plg_shd.constraint_error('PQH_PROCESS_LOG_FK1');
217: --
218: end if;
219: --
220: close c1;