116: l_proc varchar2(72) := g_package ||'chk_topic_key';
117: l_found_flag varchar2(10);
118:
119: Begin
120: hr_utility.set_location(' Entering:' || l_proc,10);
121: --
122: hr_api.mandatory_arg_error
123: (p_api_name => l_proc
124: ,p_argument => 'TOPIC_KEY'
128: OPEN csr_tpc_key;
129: FETCH csr_tpc_key into l_found_flag;
130:
131: IF csr_tpc_key%FOUND then
132: hr_utility.set_location(' Topic Key already present:' || l_proc,20);
133: CLOSE csr_tpc_key;
134: fnd_message.set_name( 'PER','PER_449930_TPC_KEY_DUPLICATE');
135: fnd_message.raise_error;
136: END IF;
138: CLOSE csr_tpc_key;
139:
140:
141: --
142: hr_utility.set_location(' Leaving:' || l_proc,30);
143: Exception
144: when app_exception.application_exception then
145: IF hr_multi_message.exception_add
146: (p_associated_column1 => 'HR_KI_TOPICS.TOPIC_KEY'
144: when app_exception.application_exception then
145: IF hr_multi_message.exception_add
146: (p_associated_column1 => 'HR_KI_TOPICS.TOPIC_KEY'
147: ) THEN
148: hr_utility.set_location(' Leaving:'|| l_proc,40);
149: raise;
150: END IF;
151:
152: hr_utility.set_location(' Leaving:'|| l_proc,50);
148: hr_utility.set_location(' Leaving:'|| l_proc,40);
149: raise;
150: END IF;
151:
152: hr_utility.set_location(' Leaving:'|| l_proc,50);
153: --
154: End chk_topic_key ;
155:
156: -- ----------------------------------------------------------------------------
178: procedure chk_handler(p_handler in varchar2)
179: is
180: l_proc varchar2(72) := g_package ||'chk_handler';
181: Begin
182: hr_utility.set_location(' Entering:' || l_proc,10);
183:
184: hr_api.mandatory_arg_error
185: (p_api_name => l_proc
186: ,p_argument => 'HANDLER'
186: ,p_argument => 'HANDLER'
187: ,p_argument_value => p_handler
188: );
189:
190: hr_utility.set_location(' Leaving:' || l_proc,20);
191:
192: Exception
193: when app_exception.application_exception then
194: IF hr_multi_message.exception_add
193: when app_exception.application_exception then
194: IF hr_multi_message.exception_add
195: (p_associated_column1 => 'HR_KI_TOPICS.HANDLER'
196: ) THEN
197: hr_utility.set_location(' Leaving:'|| l_proc,30);
198: raise;
199: END IF;
200:
201: hr_utility.set_location(' Leaving:'|| l_proc,40);
197: hr_utility.set_location(' Leaving:'|| l_proc,30);
198: raise;
199: END IF;
200:
201: hr_utility.set_location(' Leaving:'|| l_proc,40);
202: --
203: End chk_handler;
204:
205:
261: l_proc varchar2(72) := g_package ||'chk_delete';
262:
263: Begin
264:
265: hr_utility.set_location(' Entering:' || l_proc,10);
266:
267: open csr_hnm_id;
268: fetch csr_hnm_id into l_found;
269:
296: end if;
297:
298: close csr_ttl_id;
299:
300: hr_utility.set_location(' Leaving:'|| l_proc,20);
301:
302: Exception
303: when app_exception.application_exception then
304: IF hr_multi_message.exception_add
303: when app_exception.application_exception then
304: IF hr_multi_message.exception_add
305: (p_associated_column1 => 'HR_KI_TOPICS.TOPIC_ID'
306: )THEN
307: hr_utility.set_location(' Leaving:'|| l_proc,30);
308: raise;
309: END IF;
310: hr_utility.set_location(' Leaving:'|| l_proc,40);
311:
306: )THEN
307: hr_utility.set_location(' Leaving:'|| l_proc,30);
308: raise;
309: END IF;
310: hr_utility.set_location(' Leaving:'|| l_proc,40);
311:
312: End chk_delete;
313:
314: --
321: --
322: l_proc varchar2(72) := g_package||'insert_validate';
323: --
324: Begin
325: hr_utility.set_location('Entering:'||l_proc, 5);
326: --
327: -- Call all supporting business operations
328: --
329: --
333: chk_topic_key(p_rec.topic_key);
334: chk_handler(p_rec.handler);
335: --
336: --
337: hr_utility.set_location(' Leaving:'||l_proc, 10);
338: End insert_validate;
339: --
340: -- ----------------------------------------------------------------------------
341: -- |---------------------------< update_validate >----------------------------|
346: --
347: l_proc varchar2(72) := g_package||'update_validate';
348: --
349: Begin
350: hr_utility.set_location('Entering:'||l_proc, 5);
351: --
352: -- Call all supporting business operations
353: --
354: --
361:
362: chk_handler(p_rec.handler);
363: --
364: --
365: hr_utility.set_location(' Leaving:'||l_proc, 10);
366: End update_validate;
367: --
368: -- ----------------------------------------------------------------------------
369: -- |---------------------------< delete_validate >----------------------------|
374: --
375: l_proc varchar2(72) := g_package||'delete_validate';
376: --
377: Begin
378: hr_utility.set_location('Entering:'||l_proc, 5);
379: --
380: -- Call all supporting business operations
381: chk_delete(p_rec.topic_id);
382: --
379: --
380: -- Call all supporting business operations
381: chk_delete(p_rec.topic_id);
382: --
383: hr_utility.set_location(' Leaving:'||l_proc, 10);
384: End delete_validate;
385: --
386: end hr_tpc_bus;