18: --
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_COPY_ENTITY_CONTEXTS_UK') Then
23: hr_utility.set_message(8302, 'PQH_COPY_ENTITY_CONTEXTS_UK');
24: -- hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: -- hr_utility.set_message_token('PROCEDURE', l_proc);
26: -- hr_utility.set_message_token('STEP','5');
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_COPY_ENTITY_CONTEXTS_UK') Then
23: hr_utility.set_message(8302, 'PQH_COPY_ENTITY_CONTEXTS_UK');
24: -- hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: -- hr_utility.set_message_token('PROCEDURE', l_proc);
26: -- hr_utility.set_message_token('STEP','5');
27: hr_utility.raise_error;
54: legislation_code,
55: responsibility_key,
56: transaction_short_name,
57: object_version_number
58: from pqh_copy_entity_contexts
59: where context = p_context;
60: --
61: l_proc varchar2(72) := g_package||'api_updating';
62: l_fct_ret boolean;
132: legislation_code,
133: responsibility_key,
134: transaction_short_name,
135: object_version_number
136: from pqh_copy_entity_contexts
137: where context = p_context
138: for update nowait;
139: --
140: l_proc varchar2(72) := g_package||'lck';
175: -- The object is locked therefore we need to supply a meaningful
176: -- error message.
177: --
178: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
179: hr_utility.set_message_token('TABLE_NAME', 'pqh_copy_entity_contexts');
180: hr_utility.raise_error;
181: End lck;
182: --
183: -- ----------------------------------------------------------------------------
235: --
236: l_effective_date date := sysdate ;
237: l_object_version_number number := 1;
238: l_language varchar2(30) ;
239: l_context pqh_copy_entity_contexts.context%TYPE := '';
240: --
241: l_created_by pqh_copy_entity_contexts.created_by%TYPE;
242: l_last_updated_by pqh_copy_entity_contexts.last_updated_by%TYPE;
243: l_creation_date pqh_copy_entity_contexts.creation_date%TYPE;
237: l_object_version_number number := 1;
238: l_language varchar2(30) ;
239: l_context pqh_copy_entity_contexts.context%TYPE := '';
240: --
241: l_created_by pqh_copy_entity_contexts.created_by%TYPE;
242: l_last_updated_by pqh_copy_entity_contexts.last_updated_by%TYPE;
243: l_creation_date pqh_copy_entity_contexts.creation_date%TYPE;
244: l_last_update_date pqh_copy_entity_contexts.last_update_date%TYPE;
245: l_last_update_login pqh_copy_entity_contexts.last_update_login%TYPE;
238: l_language varchar2(30) ;
239: l_context pqh_copy_entity_contexts.context%TYPE := '';
240: --
241: l_created_by pqh_copy_entity_contexts.created_by%TYPE;
242: l_last_updated_by pqh_copy_entity_contexts.last_updated_by%TYPE;
243: l_creation_date pqh_copy_entity_contexts.creation_date%TYPE;
244: l_last_update_date pqh_copy_entity_contexts.last_update_date%TYPE;
245: l_last_update_login pqh_copy_entity_contexts.last_update_login%TYPE;
246: --
239: l_context pqh_copy_entity_contexts.context%TYPE := '';
240: --
241: l_created_by pqh_copy_entity_contexts.created_by%TYPE;
242: l_last_updated_by pqh_copy_entity_contexts.last_updated_by%TYPE;
243: l_creation_date pqh_copy_entity_contexts.creation_date%TYPE;
244: l_last_update_date pqh_copy_entity_contexts.last_update_date%TYPE;
245: l_last_update_login pqh_copy_entity_contexts.last_update_login%TYPE;
246: --
247: cursor c1 is select userenv('LANG') from dual ;
240: --
241: l_created_by pqh_copy_entity_contexts.created_by%TYPE;
242: l_last_updated_by pqh_copy_entity_contexts.last_updated_by%TYPE;
243: l_creation_date pqh_copy_entity_contexts.creation_date%TYPE;
244: l_last_update_date pqh_copy_entity_contexts.last_update_date%TYPE;
245: l_last_update_login pqh_copy_entity_contexts.last_update_login%TYPE;
246: --
247: cursor c1 is select userenv('LANG') from dual ;
248: --
241: l_created_by pqh_copy_entity_contexts.created_by%TYPE;
242: l_last_updated_by pqh_copy_entity_contexts.last_updated_by%TYPE;
243: l_creation_date pqh_copy_entity_contexts.creation_date%TYPE;
244: l_last_update_date pqh_copy_entity_contexts.last_update_date%TYPE;
245: l_last_update_login pqh_copy_entity_contexts.last_update_login%TYPE;
246: --
247: cursor c1 is select userenv('LANG') from dual ;
248: --
249: --
252: l_data_migrator_mode varchar2(1);
253: --
254: cursor csr_contexts(p_context IN varchar2) is
255: select context
256: from pqh_copy_entity_contexts
257: where context = p_context;
258: --
259:
260: Begin
291: --
292: Begin
293: --
294: if l_context IS NULL then
295: -- Insert the row into: pqh_copy_entity_contexts
296: insert into pqh_copy_entity_contexts
297: ( context,
298: application_short_name,
299: legislation_code,
292: Begin
293: --
294: if l_context IS NULL then
295: -- Insert the row into: pqh_copy_entity_contexts
296: insert into pqh_copy_entity_contexts
297: ( context,
298: application_short_name,
299: legislation_code,
300: responsibility_key,
323:
324: else
325:
326: -- update row
327: update pqh_copy_entity_contexts
328: set application_short_name = p_application_short_name,
329: legislation_code = p_legislation_code,
330: responsibility_key = p_responsibility_key,
331: transaction_short_name = p_transaction_short_name,