DBA Data[Home] [Help]

PACKAGE BODY: APPS.OTA_TPM_SWI

Source


1 PACKAGE BODY OTA_TPM_SWI AS
2 /* $Header: ottpmswi.pkb 115.8 2004/09/01 13:44:07 asud noship $ */
3 --
4 -- Package variables
5 --
6 g_package  VARCHAR2(33) := 'ota_tpm_swi.';
7 --
8 
9 -- ----------------------------------------------------------------------------
10 -- |----------------------< create_training_plan_member >---------------------|
11 -- ----------------------------------------------------------------------------
12 PROCEDURE create_training_plan_member
13   (p_validate                     IN     NUMBER    DEFAULT hr_api.g_false_num
14   ,p_effective_date               IN     date
15   ,p_business_group_id            IN     number
16   ,p_training_plan_id             IN     number    DEFAULT NULL
17   ,p_activity_version_id          IN     NUMBER
18   ,p_activity_definition_id       IN     NUMBER    DEFAULT NULL
19   ,p_member_status_type_id        IN     VARCHAR2  DEFAULT NULL
20   ,p_target_completion_date       IN     date
21   ,p_attribute_category           IN     VARCHAR2  DEFAULT NULL
22   ,p_attribute1                   IN     VARCHAR2  DEFAULT NULL
23   ,p_attribute2                   IN     VARCHAR2  DEFAULT NULL
24   ,p_attribute3                   IN     VARCHAR2  DEFAULT NULL
25   ,p_attribute4                   IN     VARCHAR2  DEFAULT NULL
26   ,p_attribute5                   IN     VARCHAR2  DEFAULT NULL
27   ,p_attribute6                   IN     VARCHAR2  DEFAULT NULL
28   ,p_attribute7                   IN     VARCHAR2  DEFAULT NULL
29   ,p_attribute8                   IN     VARCHAR2  DEFAULT NULL
30   ,p_attribute9                   IN     VARCHAR2  DEFAULT NULL
31   ,p_attribute10                  IN     VARCHAR2  DEFAULT NULL
32   ,p_attribute11                  IN     VARCHAR2  DEFAULT NULL
33   ,p_attribute12                  IN     VARCHAR2  DEFAULT NULL
34   ,p_attribute13                  IN     VARCHAR2  DEFAULT NULL
35   ,p_attribute14                  IN     VARCHAR2  DEFAULT NULL
36   ,p_attribute15                  IN     VARCHAR2  DEFAULT NULL
37   ,p_attribute16                  IN     VARCHAR2  DEFAULT NULL
38   ,p_attribute17                  IN     VARCHAR2  DEFAULT NULL
39   ,p_attribute18                  IN     VARCHAR2  DEFAULT NULL
40   ,p_attribute19                  IN     VARCHAR2  DEFAULT NULL
41   ,p_attribute20                  IN     VARCHAR2  DEFAULT NULL
42   ,p_attribute21                  IN     VARCHAR2  DEFAULT NULL
43   ,p_attribute22                  IN     VARCHAR2  DEFAULT NULL
44   ,p_attribute23                  IN     VARCHAR2  DEFAULT NULL
45   ,p_attribute24                  IN     VARCHAR2  DEFAULT NULL
46   ,p_attribute25                  IN     VARCHAR2  DEFAULT NULL
47   ,p_attribute26                  IN     VARCHAR2  DEFAULT NULL
48   ,p_attribute27                  IN     VARCHAR2  DEFAULT NULL
49   ,p_attribute28                  IN     VARCHAR2  DEFAULT NULL
50   ,p_attribute29                  IN     VARCHAR2  DEFAULT NULL
51   ,p_attribute30                  IN     VARCHAR2  DEFAULT NULL
52   ,p_assignment_id                IN     NUMBER    DEFAULT NULL
53   ,p_source_id                    IN     NUMBER    DEFAULT NULL
54   ,p_source_function              IN     VARCHAR2  DEFAULT NULL
55   ,p_cancellation_reason          IN     VARCHAR2  DEFAULT NULL
56   ,p_earliest_start_date          IN     date
57   ,p_training_plan_member_id      IN     number
58   ,p_creator_person_id            IN    number
59   ,p_person_id                    IN    NUMBER    DEFAULT NULL
60   ,p_plan_start_date              IN    DATE    DEFAULT NULL
61   ,p_object_version_NUMBER           OUT NOCOPY number
62   ,p_return_status                   OUT NOCOPY VARCHAR2
63   ) IS
64   --
65   -- Variables for API Boolean parameters
66   l_validate                      boolean;
67   --
68   -- Variables for IN/OUT parameters
69   --
70   -- Other variables
71   l_training_plan_member_id      number;
72   l_training_plan_id             NUMBER := p_training_plan_id;
73   l_object_version_number        NUMBER;
74   l_return_status                varchar2(30);
75   l_member_status_type_id        varchar2(30) := p_member_status_type_id;
76   l_person_full_name             varchar2(240);
77   l_exists                       NUMBER;
78   -- for disabling the descriptive flex field
79 l_add_struct_d hr_dflex_utility.l_ignore_dfcode_varray :=
80                            hr_dflex_utility.l_ignore_dfcode_varray();
81 
82   l_proc    VARCHAR2(72) := g_package ||'create_training_plan_member';
83   l_lp_id       ota_training_plans.learning_path_id%TYPE := null;
84 
85   cursor csr_person_full_name is
86     select ppf.full_name
87     from per_all_people_f ppf
88     where ppf.person_id = p_person_id
89       and p_effective_date between ppf.effective_start_date and ppf.effective_end_date;
90 
91  Cursor csr_get_lp_id IS
92         Select learning_path_id
93         From ota_training_plans
94         Where training_plan_id = p_training_plan_id;
95 
96 BEGIN
97   hr_utility.set_location(' Entering:' || l_proc,10);
98   --
99   -- Issue a savepoint
100   --
101   SAVEPOINT create_trng_plan_member_swi;
102   --
103   -- Initialise Multiple Message Detection
104   --
105   hr_multi_message.enable_message_list;
106   --
107   -- Remember IN OUT parameter IN values
108   --
109   --
110   -- Convert constant values to their corresponding boolean value
111   --
112   l_validate :=
113     hr_api.constant_to_boolean
114       (p_constant_value => p_validate);
115 
116   --
117   -- Check if the call is from SSHR - Appraisal / Suitability Matching / Succession Planning
118   --
119   if (p_training_plan_id is null) then
120 
121       -- SSHR call should have person Id. Mandatory check for personId.
122       hr_api.mandatory_arg_error
123           (p_api_name       =>  l_proc
124           ,p_argument       => 'p_person_id'
125           ,p_argument_value =>  p_person_id
126           );
127 
128              l_exists := ota_trng_plan_util_ss.chk_src_func_tlntmgt(p_person_id  => p_person_id,
129                                                         p_earliest_start_date    => p_earliest_start_date,
130                                                         p_target_completion_date => p_target_completion_date,
131                                                       -- Added for Bug#3108246
132                                                         p_business_group_id      => p_business_group_id);
133 
134      -- value of 0 implies there is no training plan of type talent Managment
135      -- existing for the training plan member being added.
136      -- so first create a training plan
137     IF l_exists = 0 THEN
138 
139      open csr_person_full_name;
140      fetch csr_person_full_name into l_person_full_name;
141      close csr_person_full_name;
142 
143      ota_tps_swi.create_training_plan
144      (  p_validate                     => p_validate
145        ,p_effective_date               => p_effective_date
146        ,p_business_group_id            => p_business_group_id
147        ,p_plan_status_type_id          => 'ACTIVE'
148        ,p_person_id                    => p_person_id
149        ,p_budget_currency              => hr_general.default_currency_code(p_business_group_id => p_business_group_id)
150        ,p_name                         => l_person_full_name ||' Talent Management '||nvl(p_plan_start_date,p_earliest_start_date)
151        ,p_plan_source                  => 'TALENT_MGMT'
152        ,p_start_date                   => nvl(p_plan_start_date,p_earliest_start_date)
153        ,p_end_date                     => hr_api.g_eot
154        ,p_training_plan_id             => l_training_plan_id
155        ,p_creator_person_id            => p_creator_person_id
156        ,p_object_version_NUMBER        => l_object_version_number
157        ,p_return_status                => l_return_status
158      );
159 
160      -- If Training Plan is not created, rollback and return
161      if (l_return_status = 'E') then
162         ROLLBACK TO create_trng_plan_member_swi;
163         p_object_version_NUMBER        := NULL;
164         p_return_status := hr_multi_message.get_return_status_disable;
165         return;
166     end if;
167 
168       -- Fetch the Training Plan Id Created.
169       l_training_plan_id := ota_trng_plan_util_ss.chk_src_func_tlntmgt(
170                                             p_person_id              => p_person_id,
171                                             p_earliest_start_date    => p_earliest_start_date,
172                                             p_target_completion_date => p_target_completion_date,
173                                           -- Added for Bug#3018246
174                                             p_business_group_id      => p_business_group_id);
175 
176    ELSE
177      l_training_plan_id := l_exists;
178   END IF;  -- End Create Training Plan
179 
180 
181     -- Default PLAN MEMBER STATUS to OTA_AWAITING_APPROVAL if the Call is from SSHR
182     if p_member_status_type_id is null then
183           l_member_status_type_id := 'OTA_AWAITING_APPROVAL';
184     end if;
185   END IF;  -- End check for call from SSHR /OTA
186 
187        FOR rec IN csr_get_lp_id
188       LOOP
189            l_lp_id :=rec.learning_path_id;
190            EXIT;
191        END LOOP;
192 
193 	 -- Ignore dff validation if being called from sshr
194 
195       IF  l_member_status_type_id = 'OTA_AWAITING_APPROVAL' OR l_lp_id is not null THEN
196 
197         l_add_struct_d.extend(1);
198         l_add_struct_d(l_add_struct_d.count) := 'OTA_TRAINING_PLAN_MEMBERS';
199 
200         hr_dflex_utility.create_ignore_df_validation(p_rec => l_add_struct_d);
201 
202       END IF;
203 
204 
205   --
206   -- Register Surrogate ID or user key values
207   --
208   ota_tpm_ins.set_base_key_value
209     (p_training_plan_member_id => p_training_plan_member_id
210     );
211   --
212   -- Call API
213   --
214   ota_tpm_api.create_training_plan_member
215     (p_validate                     => l_validate
216     ,p_effective_date               => p_effective_date
217     ,p_business_group_id            => p_business_group_id
218     ,p_training_plan_id             => l_training_plan_id
219     ,p_activity_version_id          => p_activity_version_id
220     ,p_activity_definition_id       => p_activity_definition_id
221     ,p_member_status_type_id        => l_member_status_type_id
222     ,p_target_completion_date       => p_target_completion_date
223     ,p_attribute_category           => p_attribute_category
224     ,p_attribute1                   => p_attribute1
225     ,p_attribute2                   => p_attribute2
226     ,p_attribute3                   => p_attribute3
227     ,p_attribute4                   => p_attribute4
228     ,p_attribute5                   => p_attribute5
229     ,p_attribute6                   => p_attribute6
230     ,p_attribute7                   => p_attribute7
231     ,p_attribute8                   => p_attribute8
232     ,p_attribute9                   => p_attribute9
233     ,p_attribute10                  => p_attribute10
234     ,p_attribute11                  => p_attribute11
235     ,p_attribute12                  => p_attribute12
236     ,p_attribute13                  => p_attribute13
237     ,p_attribute14                  => p_attribute14
238     ,p_attribute15                  => p_attribute15
239     ,p_attribute16                  => p_attribute16
240     ,p_attribute17                  => p_attribute17
241     ,p_attribute18                  => p_attribute18
242     ,p_attribute19                  => p_attribute19
243     ,p_attribute20                  => p_attribute20
244     ,p_attribute21                  => p_attribute21
245     ,p_attribute22                  => p_attribute22
246     ,p_attribute23                  => p_attribute23
247     ,p_attribute24                  => p_attribute24
248     ,p_attribute25                  => p_attribute25
249     ,p_attribute26                  => p_attribute26
250     ,p_attribute27                  => p_attribute27
251     ,p_attribute28                  => p_attribute28
252     ,p_attribute29                  => p_attribute29
253     ,p_attribute30                  => p_attribute30
254     ,p_assignment_id                => p_assignment_id
255     ,p_source_id                    => p_source_id
256     ,p_source_function              => p_source_function
257     ,p_cancellation_reason          => p_cancellation_reason
258     ,p_earliest_start_date          => p_earliest_start_date
259     ,p_training_plan_member_id      => l_training_plan_member_id
260     ,p_object_version_NUMBER        => p_object_version_number
261     ,p_creator_person_id            => p_creator_person_id
262     );
263   --
264   -- Convert API warning boolean parameter values to specific
265   -- messages and add them to Multiple Message List
266   --
267   --
268   -- Convert API non-warning boolean parameter values
269   --
270   --
271   -- Derive the API return status value based on whether
272   -- messages of any type exist in the Multiple Message List.
273   -- Also disable Multiple Message Detection.
274   --
275   p_return_status := hr_multi_message.get_return_status_disable;
276   hr_utility.set_location(' Leaving:' || l_proc,20);
277   --
278 EXCEPTION
279   WHEN hr_multi_message.error_message_exist THEN
280     --
281     -- Catch the Multiple Message List exception which
282     -- indicates API processing has been aborted because
283     -- at least one message exists in the list.
284     --
285     ROLLBACK TO create_trng_plan_member_swi;
286     --
287     -- Reset IN OUT parameters and set OUT parameters
288     --
289     p_object_version_NUMBER        := NULL;
290     p_return_status := hr_multi_message.get_return_status_disable;
291     hr_utility.set_location(' Leaving:' || l_proc, 30);
292 
293   WHEN others THEN
294     --
295     -- When Multiple Message Detection is enabled catch
296     -- any Application specific or other unexpected
297     -- exceptions.  Adding appropriate details to the
298     -- Multiple Message List.  Otherwise re-raise the
299     -- error.
300     --
301     ROLLBACK TO create_trng_plan_member_swi;
302     IF hr_multi_message.unexpected_error_add(l_proc) THEN
303        hr_utility.set_location(' Leaving:' || l_proc,40);
304        RAISE;
305     END IF;
306     --
307     -- Reset IN OUT and set OUT parameters
308     --
309     p_object_version_NUMBER        := NULL;
310     p_return_status := hr_multi_message.get_return_status_disable;
311     hr_utility.set_location(' Leaving:' || l_proc,50);
312 END create_training_plan_member;
313 
314 
315 -- ----------------------------------------------------------------------------
316 -- |----------------------< delete_training_plan_member >---------------------|
317 -- ----------------------------------------------------------------------------
318 PROCEDURE delete_training_plan_member
319   (p_validate                     IN     NUMBER    DEFAULT hr_api.g_false_num
320   ,p_training_plan_member_id      IN     number
321   ,p_object_version_NUMBER        IN     number
322   ,p_return_status                   OUT NOCOPY VARCHAR2
323   ) IS
324   --
325   -- Variables for API Boolean parameters
326   l_validate                      boolean;
327   --
328   -- Variables for IN/OUT parameters
329   --
330   -- Other variables
331   l_proc    VARCHAR2(72) := g_package ||'delete_training_plan_member';
332 BEGIN
333   hr_utility.set_location(' Entering:' || l_proc,10);
334   --
335   -- Issue a savepoint
336   --
337   SAVEPOINT delete_trng_plan_member_swi;
338   --
339   -- Initialise Multiple Message Detection
340   --
341   hr_multi_message.enable_message_list;
342   --
343   -- Remember IN OUT parameter IN values
344   --
345   --
346   -- Convert constant values to their corresponding boolean value
347   --
348   l_validate :=
349     hr_api.constant_to_boolean
350       (p_constant_value => p_validate);
351   --
352   -- Register Surrogate ID or user key values
353   --
354   --
355   -- Call API
356   --
357   ota_tpm_api.delete_training_plan_member
358     (p_validate                     => l_validate
359     ,p_training_plan_member_id      => p_training_plan_member_id
360     ,p_object_version_NUMBER        => p_object_version_number
361     );
362   --
363   -- Convert API warning boolean parameter values to specific
364   -- messages and add them to Multiple Message List
365   --
366   --
367   -- Convert API non-warning boolean parameter values
368   --
369   --
370   -- Derive the API return status value based on whether
371   -- messages of any type exist in the Multiple Message List.
372   -- Also disable Multiple Message Detection.
373   --
374   p_return_status := hr_multi_message.get_return_status_disable;
375   hr_utility.set_location(' Leaving:' || l_proc,20);
376   --
377 EXCEPTION
378   WHEN hr_multi_message.error_message_exist THEN
379     --
380     -- Catch the Multiple Message List exception which
381     -- indicates API processing has been aborted because
382     -- at least one message exists in the list.
383     --
384     ROLLBACK TO delete_trng_plan_member_swi;
385     --
386     -- Reset IN OUT parameters and set OUT parameters
387     --
388     p_return_status := hr_multi_message.get_return_status_disable;
389     hr_utility.set_location(' Leaving:' || l_proc, 30);
390   WHEN others THEN
391     --
392     -- When Multiple Message Detection is enabled catch
393     -- any Application specific or other unexpected
394     -- exceptions.  Adding appropriate details to the
395     -- Multiple Message List.  Otherwise re-raise the
396     -- error.
397     --
398     ROLLBACK TO delete_trng_plan_member_swi;
399     IF hr_multi_message.unexpected_error_add(l_proc) THEN
400        hr_utility.set_location(' Leaving:' || l_proc,40);
401        RAISE;
402     END IF;
403     --
404     -- Reset IN OUT and set OUT parameters
405     --
406     p_return_status := hr_multi_message.get_return_status_disable;
407     hr_utility.set_location(' Leaving:' || l_proc,50);
408 END delete_training_plan_member;
409 -- ----------------------------------------------------------------------------
410 -- |----------------------< update_training_plan_member >---------------------|
411 -- ----------------------------------------------------------------------------
412 PROCEDURE update_training_plan_member
413   (p_validate                     IN     NUMBER    DEFAULT hr_api.g_false_num
414   ,p_effective_date               IN     date
415   ,p_training_plan_member_id      IN     number
416   ,p_object_version_NUMBER        IN OUT NOCOPY number
417   ,p_activity_version_id          IN     NUMBER    DEFAULT hr_api.g_number
418   ,p_activity_definition_id       IN     NUMBER    DEFAULT hr_api.g_number
419   ,p_member_status_type_id        IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
420   ,p_target_completion_date       IN     date      DEFAULT hr_api.g_date
421   ,p_attribute_category           IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
422   ,p_attribute1                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
423   ,p_attribute2                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
424   ,p_attribute3                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
425   ,p_attribute4                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
426   ,p_attribute5                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
427   ,p_attribute6                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
428   ,p_attribute7                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
429   ,p_attribute8                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
430   ,p_attribute9                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
431   ,p_attribute10                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
432   ,p_attribute11                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
433   ,p_attribute12                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
434   ,p_attribute13                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
435   ,p_attribute14                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
436   ,p_attribute15                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
437   ,p_attribute16                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
438   ,p_attribute17                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
439   ,p_attribute18                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
440   ,p_attribute19                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
441   ,p_attribute20                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
442   ,p_attribute21                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
443   ,p_attribute22                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
444   ,p_attribute23                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
445   ,p_attribute24                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
446   ,p_attribute25                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
447   ,p_attribute26                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
448   ,p_attribute27                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
449   ,p_attribute28                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
450   ,p_attribute29                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
451   ,p_attribute30                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
452   ,p_assignment_id                IN     NUMBER    DEFAULT hr_api.g_number
453   ,p_source_id                    IN     NUMBER    DEFAULT hr_api.g_number
454   ,p_source_function              IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
455   ,p_cancellation_reason          IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
456   ,p_earliest_start_date          IN     date      DEFAULT hr_api.g_date
457   ,p_creator_person_id             IN    NUMBER
458   ,p_return_status                   OUT NOCOPY VARCHAR2
459   ) IS
460   --
461   -- Variables for API Boolean parameters
462   l_validate                      boolean;
463   --
464   -- Variables for IN/OUT parameters
465   l_object_version_NUMBER         number;
466   --
467   -- Other variables
468   l_proc    VARCHAR2(72) := g_package ||'update_training_plan_member';
469 
470 BEGIN
471   hr_utility.set_location(' Entering:' || l_proc,10);
472   --
473   -- Issue a savepoint
474   --
475   SAVEPOINT update_trng_plan_member_swi;
476   --
477   -- Initialise Multiple Message Detection
478   --
479   hr_multi_message.enable_message_list;
480   --
481   -- Remember IN OUT parameter IN values
482   --
483   l_object_version_NUMBER         := p_object_version_number;
484   --
485   -- Convert constant values to their corresponding boolean value
486   --
487   l_validate :=
488     hr_api.constant_to_boolean
489       (p_constant_value => p_validate);
490   --
491   -- Register Surrogate ID or user key values
492   --
493   --
494   -- Call API
495   --
496   ota_tpm_api.update_training_plan_member
497     (p_validate                     => l_validate
498     ,p_effective_date               => p_effective_date
499     ,p_training_plan_member_id      => p_training_plan_member_id
500     ,p_object_version_NUMBER        => p_object_version_number
501     ,p_activity_version_id          => p_activity_version_id
502     ,p_activity_definition_id       => p_activity_definition_id
503     ,p_member_status_type_id        => p_member_status_type_id
504     ,p_target_completion_date       => p_target_completion_date
505     ,p_attribute_category           => p_attribute_category
506     ,p_attribute1                   => p_attribute1
507     ,p_attribute2                   => p_attribute2
508     ,p_attribute3                   => p_attribute3
509     ,p_attribute4                   => p_attribute4
510     ,p_attribute5                   => p_attribute5
511     ,p_attribute6                   => p_attribute6
512     ,p_attribute7                   => p_attribute7
513     ,p_attribute8                   => p_attribute8
514     ,p_attribute9                   => p_attribute9
515     ,p_attribute10                  => p_attribute10
516     ,p_attribute11                  => p_attribute11
517     ,p_attribute12                  => p_attribute12
518     ,p_attribute13                  => p_attribute13
519     ,p_attribute14                  => p_attribute14
520     ,p_attribute15                  => p_attribute15
521     ,p_attribute16                  => p_attribute16
522     ,p_attribute17                  => p_attribute17
523     ,p_attribute18                  => p_attribute18
524     ,p_attribute19                  => p_attribute19
525     ,p_attribute20                  => p_attribute20
526     ,p_attribute21                  => p_attribute21
527     ,p_attribute22                  => p_attribute22
528     ,p_attribute23                  => p_attribute23
529     ,p_attribute24                  => p_attribute24
530     ,p_attribute25                  => p_attribute25
531     ,p_attribute26                  => p_attribute26
532     ,p_attribute27                  => p_attribute27
533     ,p_attribute28                  => p_attribute28
534     ,p_attribute29                  => p_attribute29
535     ,p_attribute30                  => p_attribute30
536     ,p_assignment_id                => p_assignment_id
537     ,p_source_id                    => p_source_id
538     ,p_source_function              => p_source_function
539     ,p_cancellation_reason          => p_cancellation_reason
540     ,p_earliest_start_date          => p_earliest_start_date
541     ,p_creator_person_id           => p_creator_person_id
542     );
543   --
544   -- Convert API warning boolean parameter values to specific
545   -- messages and add them to Multiple Message List
546   --
547   --
548   -- Convert API non-warning boolean parameter values
549   --
550   --
551   -- Derive the API return status value based on whether
552   -- messages of any type exist in the Multiple Message List.
553   -- Also disable Multiple Message Detection.
554   --
555   p_return_status := hr_multi_message.get_return_status_disable;
556   hr_utility.set_location(' Leaving:' || l_proc,20);
557   --
558 EXCEPTION
559   WHEN hr_multi_message.error_message_exist THEN
560     --
561     -- Catch the Multiple Message List exception which
562     -- indicates API processing has been aborted because
563     -- at least one message exists in the list.
564     --
565     ROLLBACK TO update_trng_plan_member_swi;
566     --
567     -- Reset IN OUT parameters and set OUT parameters
568     --
569     p_object_version_NUMBER        := l_object_version_number;
570     p_return_status := hr_multi_message.get_return_status_disable;
571     hr_utility.set_location(' Leaving:' || l_proc, 30);
572   WHEN others THEN
573     --
574     -- When Multiple Message Detection is enabled catch
575     -- any Application specific or other unexpected
576     -- exceptions.  Adding appropriate details to the
577     -- Multiple Message List.  Otherwise re-raise the
578     -- error.
579     --
580     ROLLBACK TO update_trng_plan_member_swi;
581     IF hr_multi_message.unexpected_error_add(l_proc) THEN
582        hr_utility.set_location(' Leaving:' || l_proc,40);
583        RAISE;
584     END IF;
585     --
586     -- Reset IN OUT and set OUT parameters
587     --
588     p_object_version_NUMBER        := l_object_version_number;
589     p_return_status := hr_multi_message.get_return_status_disable;
590     hr_utility.set_location(' Leaving:' || l_proc,50);
591 END update_training_plan_member;
592 END ota_tpm_swi;