[Home] [Help]
PACKAGE BODY: APPS.IGS_PE_CONTACT_DTLS_PKG
Source
1 PACKAGE BODY igs_pe_contact_dtls_pkg AS
2 /* $Header: IGSNI73B.pls 120.1 2005/06/28 05:13:47 appldev ship $ */
3
4 l_rowid VARCHAR2(25);
5 old_references igs_pe_contact_dtls%ROWTYPE;
6 new_references igs_pe_contact_dtls%ROWTYPE;
7
8 PROCEDURE set_column_values (
9 p_action IN VARCHAR2,
10 x_rowid IN VARCHAR2 DEFAULT NULL,
11 x_phone_line_type IN VARCHAR2 DEFAULT NULL,
12 x_contact_point_id IN NUMBER DEFAULT NULL,
13 x_location_venue_addr_id IN NUMBER DEFAULT NULL,
14 x_contact_point_type IN VARCHAR2 DEFAULT NULL,
15 x_status IN VARCHAR2 DEFAULT NULL,
16 x_primary_flag IN VARCHAR2 DEFAULT NULL,
17 x_email_format IN VARCHAR2 DEFAULT NULL,
18 x_email_address IN VARCHAR2 DEFAULT NULL,
19 x_telephone_type IN VARCHAR2 DEFAULT NULL,
20 x_phone_area_code IN VARCHAR2 DEFAULT NULL,
21 x_phone_country_code IN VARCHAR2 DEFAULT NULL,
22 x_phone_number IN VARCHAR2 DEFAULT NULL,
23 x_phone_extension IN VARCHAR2 DEFAULT NULL,
24 x_attribute_category IN VARCHAR2 DEFAULT NULL,
25 x_attribute1 IN VARCHAR2 DEFAULT NULL,
26 x_attribute2 IN VARCHAR2 DEFAULT NULL,
27 x_attribute3 IN VARCHAR2 DEFAULT NULL,
28 x_attribute4 IN VARCHAR2 DEFAULT NULL,
29 x_attribute5 IN VARCHAR2 DEFAULT NULL,
30 x_attribute6 IN VARCHAR2 DEFAULT NULL,
31 x_attribute7 IN VARCHAR2 DEFAULT NULL,
32 x_attribute8 IN VARCHAR2 DEFAULT NULL,
33 x_attribute9 IN VARCHAR2 DEFAULT NULL,
34 x_attribute10 IN VARCHAR2 DEFAULT NULL,
35 x_attribute11 IN VARCHAR2 DEFAULT NULL,
36 x_attribute12 IN VARCHAR2 DEFAULT NULL,
37 x_attribute13 IN VARCHAR2 DEFAULT NULL,
38 x_attribute14 IN VARCHAR2 DEFAULT NULL,
39 x_attribute15 IN VARCHAR2 DEFAULT NULL,
40 x_attribute16 IN VARCHAR2 DEFAULT NULL,
41 x_attribute17 IN VARCHAR2 DEFAULT NULL,
42 x_attribute18 IN VARCHAR2 DEFAULT NULL,
43 x_attribute19 IN VARCHAR2 DEFAULT NULL,
44 x_attribute20 IN VARCHAR2 DEFAULT NULL,
45 x_creation_date IN DATE DEFAULT NULL,
46 x_created_by IN NUMBER DEFAULT NULL,
47 x_last_update_date IN DATE DEFAULT NULL,
48 x_last_updated_by IN NUMBER DEFAULT NULL,
49 x_last_update_login IN NUMBER DEFAULT NULL
50 ) AS
51 /*
52 || Created By :
53 || Date Created By :
54 || Purpose :
55 || Known limitations, enhancements or remarks :
56 || Change History :
57 || Who When What
58 || (reverse chronological order - newest change first)
59 */
60
61 CURSOR cur_old_ref_values IS
62 SELECT *
63 FROM IGS_PE_CONTACT_DTLS
64 WHERE rowid = x_rowid;
65
66 BEGIN
67
68 l_rowid := x_rowid;
69
70 -- Code for setting the Old and New Reference Values.
71 -- Populate Old Values.
72 OPEN cur_old_ref_values;
73 FETCH cur_old_ref_values INTO old_references;
74
75 IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
76 CLOSE cur_old_ref_values;
77 fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
78 igs_ge_msg_stack.add;
79 app_exception.raise_exception;
80 RETURN;
81 END IF;
82
83 CLOSE cur_old_ref_values;
84
85 -- Populate New Values.
86 new_references.phone_line_type := x_phone_line_type;
87 new_references.contact_point_id := x_contact_point_id;
88 new_references.location_venue_addr_id := x_location_venue_addr_id;
89 new_references.contact_point_type := x_contact_point_type;
90 new_references.status := x_status;
91 new_references.primary_flag := x_primary_flag;
92 new_references.email_format := x_email_format;
93 new_references.email_address := x_email_address;
94 new_references.telephone_type := x_telephone_type;
95 new_references.phone_area_code := x_phone_area_code;
96 new_references.phone_country_code := x_phone_country_code;
97 new_references.phone_number := x_phone_number;
98 new_references.phone_extension := x_phone_extension;
99 new_references.attribute_category := x_attribute_category;
100 new_references.attribute1 := x_attribute1;
101 new_references.attribute2 := x_attribute2;
102 new_references.attribute3 := x_attribute3;
103 new_references.attribute4 := x_attribute4;
104 new_references.attribute5 := x_attribute5;
105 new_references.attribute6 := x_attribute6;
106 new_references.attribute7 := x_attribute7;
107 new_references.attribute8 := x_attribute8;
108 new_references.attribute9 := x_attribute9;
109 new_references.attribute10 := x_attribute10;
110 new_references.attribute11 := x_attribute11;
111 new_references.attribute12 := x_attribute12;
112 new_references.attribute13 := x_attribute13;
113 new_references.attribute14 := x_attribute14;
114 new_references.attribute15 := x_attribute15;
115 new_references.attribute16 := x_attribute16;
116 new_references.attribute17 := x_attribute17;
117 new_references.attribute18 := x_attribute18;
118 new_references.attribute19 := x_attribute19;
119 new_references.attribute20 := x_attribute20;
120
121 IF (p_action = 'UPDATE') THEN
122 new_references.creation_date := old_references.creation_date;
123 new_references.created_by := old_references.created_by;
124 ELSE
125 new_references.creation_date := x_creation_date;
126 new_references.created_by := x_created_by;
127 END IF;
128
129 new_references.last_update_date := x_last_update_date;
130 new_references.last_updated_by := x_last_updated_by;
131 new_references.last_update_login := x_last_update_login;
132
133 END set_column_values;
134
135 PROCEDURE check_constraints (
136 column_name IN VARCHAR2 DEFAULT NULL,
137 column_value IN VARCHAR2 DEFAULT NULL
138 ) AS
139 /*
140 || Created By :
141 || Date Created By :
142 || Purpose :
143 || Known limitations, enhancements or remarks :
144 || Change History :
145 || Who When What
146 || (reverse chronological order - newest change first)
147 */
148 BEGIN
149
150 IF (column_name IS NULL) THEN
151 NULL;
152 NULL;
153 END IF;
154
155
156
157
158 END check_constraints;
159
160 PROCEDURE check_parent_existance AS
161 /*
162 || Created By :
163 || Date Created By :
164 || Purpose :
165 || Known limitations, enhancements or remarks :
166 || Change History :
167 || Who When What
168 || (reverse chronological order - newest change first)
169 */
170 BEGIN
171
172 IF (((old_references.location_venue_addr_id = new_references.location_venue_addr_id)) OR
173 ((new_references.location_venue_addr_id IS NULL))) THEN
174 NULL;
175 ELSIF NOT igs_ad_locvenue_addr_pkg.get_pk_for_validation (
176 new_references.location_venue_addr_id
177 ) THEN
178 fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
179 igs_ge_msg_stack.add;
180 app_exception.raise_exception;
181 END IF;
182
183 END check_parent_existance;
184
185 FUNCTION get_pk_for_validation (
186 x_contact_point_id IN NUMBER
187 ) RETURN BOOLEAN AS
188 /*
189 || Created By :
190 || Date Created By :
191 || Purpose :
192 || Known limitations, enhancements or remarks :
193 || Change History :
194 || Who When What
195 || (reverse chronological order - newest change first)
196 */
197 CURSOR cur_rowid IS
198 SELECT rowid
199 FROM igs_pe_contact_dtls
200 WHERE contact_point_id = x_contact_point_id
201 FOR UPDATE NOWAIT;
202
203 lv_rowid cur_rowid%RowType;
204
205 BEGIN
206
207 OPEN cur_rowid;
208 FETCH cur_rowid INTO lv_rowid;
209 IF (cur_rowid%FOUND) THEN
210 CLOSE cur_rowid;
211 RETURN(TRUE);
212 ELSE
213 CLOSE cur_rowid;
214 RETURN(FALSE);
215 END IF;
216
217 END get_pk_for_validation;
218
219 PROCEDURE get_fk_igs_ad_locvenue_addr (
220 x_location_venue_addr_id IN NUMBER
221 ) AS
222
223 /*
224 || Created By :
225 || Date Created By :
226 || Purpose :
227 || Known limitations, enhancements or remarks :
228 || Change History :
229 || Who When What
230 || (reverse chronological order - newest change first)
231 */
232 CURSOR cur_rowid IS
233 SELECT rowid
234 FROM igs_pe_contact_dtls
235 WHERE location_venue_addr_id = x_location_venue_addr_id ;
236
237 lv_rowid cur_rowid%RowType;
238
239 BEGIN
240
241 OPEN cur_rowid;
242 FETCH cur_rowid INTO lv_rowid;
243 IF (cur_rowid%FOUND) THEN
244 CLOSE cur_rowid;
245 fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
246 igs_ge_msg_stack.add;
247 app_exception.raise_exception;
248 RETURN;
249 END IF;
250 CLOSE cur_rowid;
251
252 END get_fk_igs_ad_locvenue_addr;
253
254 PROCEDURE before_dml (
255 p_action IN VARCHAR2,
256 x_rowid IN VARCHAR2 DEFAULT NULL,
257 x_phone_line_type IN VARCHAR2 DEFAULT NULL,
258 x_contact_point_id IN NUMBER DEFAULT NULL,
259 x_location_venue_addr_id IN NUMBER DEFAULT NULL,
260 x_contact_point_type IN VARCHAR2 DEFAULT NULL,
261 x_status IN VARCHAR2 DEFAULT NULL,
262 x_primary_flag IN VARCHAR2 DEFAULT NULL,
263 x_email_format IN VARCHAR2 DEFAULT NULL,
264 x_email_address IN VARCHAR2 DEFAULT NULL,
265 x_telephone_type IN VARCHAR2 DEFAULT NULL,
266 x_phone_area_code IN VARCHAR2 DEFAULT NULL,
267 x_phone_country_code IN VARCHAR2 DEFAULT NULL,
268 x_phone_number IN VARCHAR2 DEFAULT NULL,
269 x_phone_extension IN VARCHAR2 DEFAULT NULL,
270 x_attribute_category IN VARCHAR2 DEFAULT NULL,
271 x_attribute1 IN VARCHAR2 DEFAULT NULL,
272 x_attribute2 IN VARCHAR2 DEFAULT NULL,
273 x_attribute3 IN VARCHAR2 DEFAULT NULL,
274 x_attribute4 IN VARCHAR2 DEFAULT NULL,
275 x_attribute5 IN VARCHAR2 DEFAULT NULL,
276 x_attribute6 IN VARCHAR2 DEFAULT NULL,
277 x_attribute7 IN VARCHAR2 DEFAULT NULL,
278 x_attribute8 IN VARCHAR2 DEFAULT NULL,
279 x_attribute9 IN VARCHAR2 DEFAULT NULL,
280 x_attribute10 IN VARCHAR2 DEFAULT NULL,
281 x_attribute11 IN VARCHAR2 DEFAULT NULL,
282 x_attribute12 IN VARCHAR2 DEFAULT NULL,
283 x_attribute13 IN VARCHAR2 DEFAULT NULL,
284 x_attribute14 IN VARCHAR2 DEFAULT NULL,
285 x_attribute15 IN VARCHAR2 DEFAULT NULL,
286 x_attribute16 IN VARCHAR2 DEFAULT NULL,
287 x_attribute17 IN VARCHAR2 DEFAULT NULL,
288 x_attribute18 IN VARCHAR2 DEFAULT NULL,
289 x_attribute19 IN VARCHAR2 DEFAULT NULL,
290 x_attribute20 IN VARCHAR2 DEFAULT NULL,
291 x_creation_date IN DATE DEFAULT NULL,
292 x_created_by IN NUMBER DEFAULT NULL,
293 x_last_update_date IN DATE DEFAULT NULL,
294 x_last_updated_by IN NUMBER DEFAULT NULL,
295 x_last_update_login IN NUMBER DEFAULT NULL
296 ) AS
297 /*
298 || Created By :
299 || Date Created By :
300 || Purpose :
301 || Known limitations, enhancements or remarks :
302 || Change History :
303 || Who When What
304 || (reverse chronological order - newest change first)
305 */
306 BEGIN
307
308 set_column_values (
309 p_action,
310 x_rowid,
311 x_phone_line_type,
312 x_contact_point_id,
313 x_location_venue_addr_id,
314 x_contact_point_type,
315 x_status,
316 x_primary_flag,
317 x_email_format,
318 x_email_address,
319 x_telephone_type,
320 x_phone_area_code,
321 x_phone_country_code,
322 x_phone_number,
323 x_phone_extension,
324 x_attribute_category,
325 x_attribute1,
326 x_attribute2,
327 x_attribute3,
328 x_attribute4,
329 x_attribute5,
330 x_attribute6,
331 x_attribute7,
332 x_attribute8,
333 x_attribute9,
334 x_attribute10,
335 x_attribute11,
336 x_attribute12,
337 x_attribute13,
338 x_attribute14,
339 x_attribute15,
340 x_attribute16,
341 x_attribute17,
342 x_attribute18,
343 x_attribute19,
344 x_attribute20,
345 x_creation_date,
346 x_created_by,
347 x_last_update_date,
348 x_last_updated_by,
349 x_last_update_login
350 );
351
352 IF (p_action = 'INSERT') THEN
353 -- Call all the procedures related to Before Insert.
354 Null;
355 IF (get_pk_for_validation(
356 new_references.contact_point_id)) THEN
357 fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
358 igs_ge_msg_stack.add;
359 app_exception.raise_exception;
360 END IF;
361 check_constraints;
362 check_parent_existance;
363 ELSIF (p_action = 'UPDATE') THEN
364 -- Call all the procedures related to Before Update.
365 Null;
366 check_constraints;
367 check_parent_existance;
368 ELSIF (p_action = 'DELETE') THEN
369 -- Call all the procedures related to Before Delete.
370 Null;
371 ELSIF (p_action = 'VALIDATE_INSERT') THEN
372 -- Call all the procedures related to Before Insert.
373 IF (get_pk_for_validation (
374 new_references.contact_point_id)) THEN
375 fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
376 igs_ge_msg_stack.add;
377 app_exception.raise_exception;
378 END IF;
379 check_constraints;
380 ELSIF (p_action = 'VALIDATE_UPDATE') THEN
381 check_constraints;
382 ELSIF (p_action = 'VALIDATE_DELETE') THEN
383 NULL;
384 END IF;
385
386 END before_dml;
387
388 PROCEDURE after_dml (
389 p_action IN VARCHAR2,
390 x_rowid IN VARCHAR2
391 ) AS
392 /*
393 || Created By :
394 || Date Created By :
395 || Purpose :
396 || Known limitations, enhancements or remarks :
397 || Change History :
398 || Who When What
399 || (reverse chronological order - newest change first)
400 */
401 BEGIN
402
403 l_rowid := x_rowid;
404
405 IF (p_action = 'INSERT') THEN
406 -- Call all the procedures related to After Insert.
407 Null;
408 ELSIF (p_action = 'UPDATE') THEN
409 -- Call all the procedures related to After Update.
410 Null;
411 ELSIF (p_action = 'DELETE') THEN
412 -- Call all the procedures related to After Delete.
413 Null;
414 END IF;
415
416 END after_dml;
417
418 PROCEDURE insert_row (
419 x_rowid IN OUT NOCOPY VARCHAR2,
420 x_phone_line_type IN VARCHAR2,
421 x_contact_point_id IN OUT NOCOPY NUMBER,
422 x_location_venue_addr_id IN NUMBER,
423 x_contact_point_type IN VARCHAR2,
424 x_status IN VARCHAR2,
425 x_primary_flag IN VARCHAR2,
426 x_email_format IN VARCHAR2,
427 x_email_address IN VARCHAR2,
428 x_telephone_type IN VARCHAR2,
429 x_phone_area_code IN VARCHAR2,
430 x_phone_country_code IN VARCHAR2,
431 x_phone_number IN VARCHAR2,
432 x_phone_extension IN VARCHAR2,
433 x_attribute_category IN VARCHAR2,
434 x_attribute1 IN VARCHAR2,
435 x_attribute2 IN VARCHAR2,
436 x_attribute3 IN VARCHAR2,
437 x_attribute4 IN VARCHAR2,
438 x_attribute5 IN VARCHAR2,
439 x_attribute6 IN VARCHAR2,
440 x_attribute7 IN VARCHAR2,
441 x_attribute8 IN VARCHAR2,
442 x_attribute9 IN VARCHAR2,
443 x_attribute10 IN VARCHAR2,
444 x_attribute11 IN VARCHAR2,
445 x_attribute12 IN VARCHAR2,
446 x_attribute13 IN VARCHAR2,
447 x_attribute14 IN VARCHAR2,
448 x_attribute15 IN VARCHAR2,
449 x_attribute16 IN VARCHAR2,
450 x_attribute17 IN VARCHAR2,
451 x_attribute18 IN VARCHAR2,
452 x_attribute19 IN VARCHAR2,
453 x_attribute20 IN VARCHAR2,
454 x_mode IN VARCHAR2 DEFAULT 'R'
455 ) AS
456 /*
457 || Created By :
458 || Date Created By :
459 || Purpose :
460 || Known limitations, enhancements or remarks :
461 || Change History :
462 || Who When What
463 || (reverse chronological order - newest change first)
464 */
465 CURSOR c IS
466 SELECT rowid
467 FROM igs_pe_contact_dtls
468 WHERE contact_point_id = x_contact_point_id
469 ;
470
471 x_last_update_date DATE;
472 x_last_updated_by NUMBER;
473 x_last_update_login NUMBER;
474 x_request_id NUMBER;
475 x_program_id NUMBER;
476 x_program_application_id NUMBER;
477 x_program_update_date DATE;
478
479 BEGIN
480
481 x_last_update_date := SYSDATE;
482 IF (x_mode = 'I') THEN
483 x_last_updated_by := 1;
484 x_last_update_login := 0;
485 ELSIF (X_MODE IN ('R', 'S')) THEN
486 x_last_updated_by := fnd_global.user_id;
487 IF (x_last_updated_by IS NULL) THEN
488 x_last_updated_by := -1;
489 END IF;
490 x_last_update_login := fnd_global.login_id;
491 IF (x_last_update_login IS NULL) THEN
492 x_last_update_login := -1;
493 END IF;
494 x_request_id := fnd_global.conc_request_id;
495 x_program_id := fnd_global.conc_program_id;
496 x_program_application_id := fnd_global.prog_appl_id;
497
498 IF (x_request_id = -1) THEN
499 x_request_id := NULL;
500 x_program_id := NULL;
501 x_program_application_id := NULL;
502 x_program_update_date := NULL;
503 ELSE
504 x_program_update_date := SYSDATE;
505 END IF;
506 ELSE
507 fnd_message.set_name ('FND', 'SYSTEM-INVALID ARGS');
508 igs_ge_msg_stack.add;
509 app_exception.raise_exception;
510 END IF;
511
512 SELECT igs_pe_contact_dtls_s.nextval INTO x_contact_point_id
513 FROM dual;
514
515 before_dml(
516 p_action => 'INSERT',
517 x_rowid => X_ROWID,
518 x_phone_line_type => x_phone_line_type,
519 x_contact_point_id => x_contact_point_id,
520 x_location_venue_addr_id => x_location_venue_addr_id,
521 x_contact_point_type => x_contact_point_type,
522 x_status => x_status,
523 x_primary_flag => x_primary_flag,
524 x_email_format => x_email_format,
525 x_email_address => x_email_address,
526 x_telephone_type => x_telephone_type,
527 x_phone_area_code => x_phone_area_code,
528 x_phone_country_code => x_phone_country_code,
529 x_phone_number => x_phone_number,
530 x_phone_extension => x_phone_extension,
531 x_attribute_category => x_attribute_category,
532 x_attribute1 => x_attribute1,
533 x_attribute2 => x_attribute2,
534 x_attribute3 => x_attribute3,
535 x_attribute4 => x_attribute4,
536 x_attribute5 => x_attribute5,
537 x_attribute6 => x_attribute6,
538 x_attribute7 => x_attribute7,
539 x_attribute8 => x_attribute8,
540 x_attribute9 => x_attribute9,
541 x_attribute10 => x_attribute10,
542 x_attribute11 => x_attribute11,
543 x_attribute12 => x_attribute12,
544 x_attribute13 => x_attribute13,
545 x_attribute14 => x_attribute14,
546 x_attribute15 => x_attribute15,
547 x_attribute16 => x_attribute16,
548 x_attribute17 => x_attribute17,
549 x_attribute18 => x_attribute18,
550 x_attribute19 => x_attribute19,
551 x_attribute20 => x_attribute20,
552 x_creation_date => x_last_update_date,
553 x_created_by => x_last_updated_by,
554 x_last_update_date => x_last_update_date,
555 x_last_updated_by => x_last_updated_by,
556 x_last_update_login => x_last_update_login
557 );
558
559 IF (x_mode = 'S') THEN
560 igs_sc_gen_001.set_ctx('R');
561 END IF;
562 INSERT INTO igs_pe_contact_dtls (
563 phone_line_type
564 ,contact_point_id
565 ,location_venue_addr_id
566 ,contact_point_type
567 ,status
568 ,primary_flag
569 ,email_format
570 ,email_address
571 ,telephone_type
572 ,phone_area_code
573 ,phone_country_code
574 ,phone_number
575 ,phone_extension
576 ,attribute_category
577 ,attribute1
578 ,attribute2
579 ,attribute3
580 ,attribute4
581 ,attribute5
582 ,attribute6
583 ,attribute7
584 ,attribute8
585 ,attribute9
586 ,attribute10
590 ,attribute14
587 ,attribute11
588 ,attribute12
589 ,attribute13
591 ,attribute15
592 ,attribute16
593 ,attribute17
594 ,attribute18
595 ,attribute19
596 ,attribute20
597 ,creation_date
598 ,created_by
599 ,last_update_date
600 ,last_updated_by
601 ,last_update_login
602 ,request_id
603 ,program_id
604 ,program_application_id
605 ,program_update_date
606 ) VALUES (
607 new_references.phone_line_type
608 ,new_references.contact_point_id
609 ,new_references.location_venue_addr_id
610 ,new_references.contact_point_type
611 ,new_references.status
612 ,new_references.primary_flag
613 ,new_references.email_format
614 ,new_references.email_address
615 ,new_references.telephone_type
616 ,new_references.phone_area_code
617 ,new_references.phone_country_code
618 ,new_references.phone_number
619 ,new_references.phone_extension
620 ,new_references.attribute_category
621 ,new_references.attribute1
622 ,new_references.attribute2
623 ,new_references.attribute3
624 ,new_references.attribute4
625 ,new_references.attribute5
626 ,new_references.attribute6
627 ,new_references.attribute7
628 ,new_references.attribute8
629 ,new_references.attribute9
630 ,new_references.attribute10
631 ,new_references.attribute11
632 ,new_references.attribute12
633 ,new_references.attribute13
634 ,new_references.attribute14
635 ,new_references.attribute15
636 ,new_references.attribute16
637 ,new_references.attribute17
638 ,new_references.attribute18
639 ,new_references.attribute19
640 ,new_references.attribute20
641 ,x_last_update_date
642 ,x_last_updated_by
643 ,x_last_update_date
644 ,x_last_updated_by
645 ,x_last_update_login
646 ,x_request_id
647 ,x_program_id
648 ,x_program_application_id
649 ,x_program_update_date
650 );
651 IF (x_mode = 'S') THEN
652 igs_sc_gen_001.unset_ctx('R');
653 END IF;
654
655
656 OPEN c;
657 FETCH c INTO x_rowid;
658 IF (c%NOTFOUND) THEN
659 CLOSE c;
660 RAISE NO_DATA_FOUND;
661 END IF;
662 CLOSE c;
663
664 after_dml (
665 p_action => 'INSERT' ,
666 x_rowid => X_ROWID
667 );
668
669
670 EXCEPTION
671 WHEN OTHERS THEN
672 IF (SQLCODE IN (-28115, -28113, -28111)) THEN
673 fnd_message.set_name ('IGS', 'IGS_SC_POLICY_EXCEPTION');
674 fnd_message.set_token ('ERR_CD', SQLCODE);
675 igs_ge_msg_stack.add;
676 igs_sc_gen_001.unset_ctx('R');
677 app_exception.raise_exception;
678 ELSE
679 igs_sc_gen_001.unset_ctx('R');
680 RAISE;
681 END IF;
682 END insert_row;
683
684 PROCEDURE lock_row (
685 x_rowid IN VARCHAR2,
686 x_phone_line_type IN VARCHAR2,
687 x_contact_point_id IN NUMBER,
688 x_location_venue_addr_id IN NUMBER,
689 x_contact_point_type IN VARCHAR2,
690 x_status IN VARCHAR2,
691 x_primary_flag IN VARCHAR2,
692 x_email_format IN VARCHAR2,
693 x_email_address IN VARCHAR2,
694 x_telephone_type IN VARCHAR2,
695 x_phone_area_code IN VARCHAR2,
696 x_phone_country_code IN VARCHAR2,
697 x_phone_number IN VARCHAR2,
698 x_phone_extension IN VARCHAR2,
699 x_attribute_category IN VARCHAR2,
700 x_attribute1 IN VARCHAR2,
701 x_attribute2 IN VARCHAR2,
702 x_attribute3 IN VARCHAR2,
703 x_attribute4 IN VARCHAR2,
704 x_attribute5 IN VARCHAR2,
705 x_attribute6 IN VARCHAR2,
706 x_attribute7 IN VARCHAR2,
707 x_attribute8 IN VARCHAR2,
708 x_attribute9 IN VARCHAR2,
709 x_attribute10 IN VARCHAR2,
710 x_attribute11 IN VARCHAR2,
711 x_attribute12 IN VARCHAR2,
712 x_attribute13 IN VARCHAR2,
713 x_attribute14 IN VARCHAR2,
714 x_attribute15 IN VARCHAR2,
715 x_attribute16 IN VARCHAR2,
716 x_attribute17 IN VARCHAR2,
717 x_attribute18 IN VARCHAR2,
718 x_attribute19 IN VARCHAR2,
719 x_attribute20 IN VARCHAR2
720 ) AS
721 /*
722 || Created By :
723 || Date Created By :
724 || Purpose :
725 || Known limitations, enhancements or remarks :
726 || Change History :
727 || Who When What
728 || (reverse chronological order - newest change first)
729 */
730 CURSOR c1 IS SELECT
731 phone_line_type
732 , location_venue_addr_id
733 , contact_point_type
734 , status
735 , primary_flag
736 , email_format
737 , email_address
738 , telephone_type
739 , phone_area_code
740 , phone_country_code
741 , phone_number
742 , phone_extension
743 , attribute_category
744 , attribute1
745 , attribute2
746 , attribute3
747 , attribute4
748 , attribute5
749 , attribute6
750 , attribute7
751 , attribute8
752 , attribute9
756 , attribute13
753 , attribute10
754 , attribute11
755 , attribute12
757 , attribute14
758 , attribute15
759 , attribute16
760 , attribute17
761 , attribute18
762 , attribute19
763 , attribute20
764 FROM igs_pe_contact_dtls
765 WHERE ROWID = x_rowid
766 FOR UPDATE NOWAIT;
767
768 tlinfo c1%ROWTYPE;
769
770 BEGIN
771
772 OPEN c1;
773 FETCH c1 INTO tlinfo;
774
775 IF (c1%notfound) THEN
776 fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
777 igs_ge_msg_stack.add;
778 CLOSE c1;
779 app_exception.raise_exception;
780 RETURN;
781 END IF;
782
783 CLOSE c1;
784
785 IF (( (tlinfo.PHONE_LINE_TYPE = x_PHONE_LINE_TYPE)
786 OR ((tlinfo.PHONE_LINE_TYPE is null)
787 AND (X_PHONE_LINE_TYPE is null)))
788 AND (tlinfo.LOCATION_VENUE_ADDR_ID = x_LOCATION_VENUE_ADDR_ID)
789 AND (tlinfo.CONTACT_POINT_TYPE = x_CONTACT_POINT_TYPE)
790 AND (tlinfo.STATUS = x_STATUS)
791 AND ((tlinfo.PRIMARY_FLAG = x_PRIMARY_FLAG)
792 OR ((tlinfo.PRIMARY_FLAG is null)
793 AND (X_PRIMARY_FLAG is null)))
794 AND ((tlinfo.EMAIL_FORMAT = x_EMAIL_FORMAT)
795 OR ((tlinfo.EMAIL_FORMAT is null)
796 AND (X_EMAIL_FORMAT is null)))
797 AND ((tlinfo.EMAIL_ADDRESS = x_EMAIL_ADDRESS)
798 OR ((tlinfo.EMAIL_ADDRESS is null)
799 AND (X_EMAIL_ADDRESS is null)))
800 AND ((tlinfo.TELEPHONE_TYPE = x_TELEPHONE_TYPE)
801 OR ((tlinfo.TELEPHONE_TYPE is null)
802 AND (X_TELEPHONE_TYPE is null)))
803 AND ((tlinfo.PHONE_AREA_CODE = x_PHONE_AREA_CODE)
804 OR ((tlinfo.PHONE_AREA_CODE is null)
805 AND (X_PHONE_AREA_CODE is null)))
806 AND ((tlinfo.PHONE_COUNTRY_CODE = x_PHONE_COUNTRY_CODE)
807 OR ((tlinfo.PHONE_COUNTRY_CODE is null)
808 AND (X_PHONE_COUNTRY_CODE is null)))
809 AND ((tlinfo.PHONE_NUMBER = x_PHONE_NUMBER)
810 OR ((tlinfo.PHONE_NUMBER is null)
811 AND (X_PHONE_NUMBER is null)))
812 AND ((tlinfo.PHONE_EXTENSION = x_PHONE_EXTENSION)
813 OR ((tlinfo.PHONE_EXTENSION is null)
814 AND (X_PHONE_EXTENSION is null)))
815 AND ((tlinfo.ATTRIBUTE_CATEGORY = x_ATTRIBUTE_CATEGORY)
816 OR ((tlinfo.ATTRIBUTE_CATEGORY is null)
817 AND (X_ATTRIBUTE_CATEGORY is null)))
818 AND ((tlinfo.ATTRIBUTE1 = x_ATTRIBUTE1)
819 OR ((tlinfo.ATTRIBUTE1 is null)
820 AND (X_ATTRIBUTE1 is null)))
821 AND ((tlinfo.ATTRIBUTE2 = x_ATTRIBUTE2)
822 OR ((tlinfo.ATTRIBUTE2 is null)
823 AND (X_ATTRIBUTE2 is null)))
824 AND ((tlinfo.ATTRIBUTE3 = x_ATTRIBUTE3)
825 OR ((tlinfo.ATTRIBUTE3 is null)
826 AND (X_ATTRIBUTE3 is null)))
827 AND ((tlinfo.ATTRIBUTE4 = x_ATTRIBUTE4)
828 OR ((tlinfo.ATTRIBUTE4 is null)
829 AND (X_ATTRIBUTE4 is null)))
830 AND ((tlinfo.ATTRIBUTE5 = x_ATTRIBUTE5)
831 OR ((tlinfo.ATTRIBUTE5 is null)
832 AND (X_ATTRIBUTE5 is null)))
833 AND ((tlinfo.ATTRIBUTE6 = x_ATTRIBUTE6)
834 OR ((tlinfo.ATTRIBUTE6 is null)
835 AND (X_ATTRIBUTE6 is null)))
836 AND ((tlinfo.ATTRIBUTE7 = x_ATTRIBUTE7)
837 OR ((tlinfo.ATTRIBUTE7 is null)
838 AND (X_ATTRIBUTE7 is null)))
839 AND ((tlinfo.ATTRIBUTE8 = x_ATTRIBUTE8)
840 OR ((tlinfo.ATTRIBUTE8 is null)
841 AND (X_ATTRIBUTE8 is null)))
842 AND ((tlinfo.ATTRIBUTE9 = x_ATTRIBUTE9)
843 OR ((tlinfo.ATTRIBUTE9 is null)
844 AND (X_ATTRIBUTE9 is null)))
845 AND ((tlinfo.ATTRIBUTE10 = x_ATTRIBUTE10)
846 OR ((tlinfo.ATTRIBUTE10 is null)
847 AND (X_ATTRIBUTE10 is null)))
848 AND ((tlinfo.ATTRIBUTE11 = x_ATTRIBUTE11)
849 OR ((tlinfo.ATTRIBUTE11 is null)
850 AND (X_ATTRIBUTE11 is null)))
851 AND ((tlinfo.ATTRIBUTE12 = x_ATTRIBUTE12)
852 OR ((tlinfo.ATTRIBUTE12 is null)
853 AND (X_ATTRIBUTE12 is null)))
854 AND ((tlinfo.ATTRIBUTE13 = x_ATTRIBUTE13)
855 OR ((tlinfo.ATTRIBUTE13 is null)
856 AND (X_ATTRIBUTE13 is null)))
857 AND ((tlinfo.ATTRIBUTE14 = x_ATTRIBUTE14)
858 OR ((tlinfo.ATTRIBUTE14 is null)
859 AND (X_ATTRIBUTE14 is null)))
860 AND ((tlinfo.ATTRIBUTE15 = x_ATTRIBUTE15)
861 OR ((tlinfo.ATTRIBUTE15 is null)
862 AND (X_ATTRIBUTE15 is null)))
863 AND ((tlinfo.ATTRIBUTE16 = x_ATTRIBUTE16)
864 OR ((tlinfo.ATTRIBUTE16 is null)
865 AND (X_ATTRIBUTE16 is null)))
866 AND ((tlinfo.ATTRIBUTE17 = x_ATTRIBUTE17)
867 OR ((tlinfo.ATTRIBUTE17 is null)
868 AND (X_ATTRIBUTE17 is null)))
869 AND ((tlinfo.ATTRIBUTE18 = x_ATTRIBUTE18)
870 OR ((tlinfo.ATTRIBUTE18 is null)
871 AND (X_ATTRIBUTE18 is null)))
872 AND ((tlinfo.ATTRIBUTE19 = x_ATTRIBUTE19)
873 OR ((tlinfo.ATTRIBUTE19 is null)
874 AND (X_ATTRIBUTE19 is null)))
875 AND ((tlinfo.ATTRIBUTE20 = x_ATTRIBUTE20)
876 OR ((tlinfo.ATTRIBUTE20 is null)
877 AND (X_ATTRIBUTE20 is null)))
878 ) THEN
879 NULL;
880 ELSE
881 fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
882 igs_ge_msg_stack.add;
883 app_exception.raise_exception;
884 END IF;
885
886 RETURN;
887
888 END lock_row;
889
893 x_CONTACT_POINT_ID IN NUMBER,
890 PROCEDURE update_row (
891 x_rowid IN VARCHAR2,
892 x_PHONE_LINE_TYPE IN VARCHAR2,
894 x_LOCATION_VENUE_ADDR_ID IN NUMBER,
895 x_CONTACT_POINT_TYPE IN VARCHAR2,
896 x_STATUS IN VARCHAR2,
897 x_PRIMARY_FLAG IN VARCHAR2,
898 x_EMAIL_FORMAT IN VARCHAR2,
899 x_EMAIL_ADDRESS IN VARCHAR2,
900 x_TELEPHONE_TYPE IN VARCHAR2,
901 x_PHONE_AREA_CODE IN VARCHAR2,
902 x_PHONE_COUNTRY_CODE IN VARCHAR2,
903 x_PHONE_NUMBER IN VARCHAR2,
904 x_PHONE_EXTENSION IN VARCHAR2,
905 x_ATTRIBUTE_CATEGORY IN VARCHAR2,
906 x_ATTRIBUTE1 IN VARCHAR2,
907 x_ATTRIBUTE2 IN VARCHAR2,
908 x_ATTRIBUTE3 IN VARCHAR2,
909 x_ATTRIBUTE4 IN VARCHAR2,
910 x_ATTRIBUTE5 IN VARCHAR2,
911 x_ATTRIBUTE6 IN VARCHAR2,
912 x_ATTRIBUTE7 IN VARCHAR2,
913 x_ATTRIBUTE8 IN VARCHAR2,
914 x_ATTRIBUTE9 IN VARCHAR2,
915 x_ATTRIBUTE10 IN VARCHAR2,
916 x_ATTRIBUTE11 IN VARCHAR2,
917 x_ATTRIBUTE12 IN VARCHAR2,
918 x_ATTRIBUTE13 IN VARCHAR2,
919 x_ATTRIBUTE14 IN VARCHAR2,
920 x_ATTRIBUTE15 IN VARCHAR2,
921 x_ATTRIBUTE16 IN VARCHAR2,
922 x_ATTRIBUTE17 IN VARCHAR2,
923 x_ATTRIBUTE18 IN VARCHAR2,
924 x_ATTRIBUTE19 IN VARCHAR2,
925 x_ATTRIBUTE20 IN VARCHAR2,
926 x_mode IN VARCHAR2 DEFAULT 'R'
927 ) AS
928 /*
929 || Created By :
930 || Date Created By :
931 || Purpose :
932 || Known limitations, enhancements or remarks :
933 || Change History :
934 || Who When What
935 || (reverse chronological order - newest change first)
936 */
937 x_last_update_date DATE ;
938 x_last_updated_by NUMBER ;
939 x_last_update_login NUMBER ;
940 x_request_id NUMBER;
941 x_program_id NUMBER;
942 x_program_application_id NUMBER;
943 x_program_update_date DATE;
944
945 BEGIN
946
947 x_last_update_date := SYSDATE;
948 IF (X_MODE = 'I') THEN
949 x_last_updated_by := 1;
950 x_last_update_login := 0;
951 ELSIF (X_MODE IN ('R', 'S')) THEN
952 x_last_updated_by := fnd_global.user_id;
953 IF x_last_updated_by IS NULL THEN
954 x_last_updated_by := -1;
955 END IF;
956 x_last_update_login := fnd_global.login_id;
957 IF (x_last_update_login IS NULL) THEN
958 x_last_update_login := -1;
959 END IF;
960 ELSE
961 fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
962 igs_ge_msg_stack.add;
963 app_exception.raise_exception;
964 END IF;
965
966 before_dml(
967 p_action=>'UPDATE',
968 x_rowid=>X_ROWID,
969 x_phone_line_type => x_PHONE_LINE_TYPE,
970 x_contact_point_id => x_CONTACT_POINT_ID,
971 x_location_venue_addr_id => x_LOCATION_VENUE_ADDR_ID,
972 x_contact_point_type => x_CONTACT_POINT_TYPE,
973 x_status => x_STATUS,
974 x_primary_flag => x_PRIMARY_FLAG,
975 x_email_format => x_EMAIL_FORMAT,
976 x_email_address => x_EMAIL_ADDRESS,
977 x_telephone_type => x_TELEPHONE_TYPE,
978 x_phone_area_code => x_PHONE_AREA_CODE,
979 x_phone_country_code => x_PHONE_COUNTRY_CODE,
980 x_phone_number => x_PHONE_NUMBER,
981 x_phone_extension => x_PHONE_EXTENSION,
982 x_attribute_category => x_ATTRIBUTE_CATEGORY,
983 x_attribute1 => x_ATTRIBUTE1,
984 x_attribute2 => x_ATTRIBUTE2,
985 x_attribute3 => x_ATTRIBUTE3,
986 x_attribute4 => x_ATTRIBUTE4,
987 x_attribute5 => x_ATTRIBUTE5,
988 x_attribute6 => x_ATTRIBUTE6,
989 x_attribute7 => x_ATTRIBUTE7,
990 x_attribute8 => x_ATTRIBUTE8,
991 x_attribute9 => x_ATTRIBUTE9,
992 x_attribute10 => x_ATTRIBUTE10,
993 x_attribute11 => x_ATTRIBUTE11,
994 x_attribute12 => x_ATTRIBUTE12,
995 x_attribute13 => x_ATTRIBUTE13,
996 x_attribute14 => x_ATTRIBUTE14,
997 x_attribute15 => x_ATTRIBUTE15,
998 x_attribute16 => x_ATTRIBUTE16,
999 x_attribute17 => x_ATTRIBUTE17,
1000 x_attribute18 => x_ATTRIBUTE18,
1001 x_attribute19 => x_ATTRIBUTE19,
1002 x_attribute20 => x_ATTRIBUTE20,
1003 x_creation_date=>x_last_update_date,
1004 x_created_by=>x_last_updated_by,
1005 x_last_update_date=>x_last_update_date,
1006 x_last_updated_by=>x_last_updated_by,
1007 x_last_update_login=>x_last_update_login
1008 );
1009
1010 IF (X_MODE IN ('R', 'S')) THEN
1011 x_request_id := fnd_global.conc_request_id;
1012 x_program_id := fnd_global.conc_program_id;
1013 x_program_application_id := fnd_global.prog_appl_id;
1014 IF (x_request_id = -1) THEN
1015 x_request_id := old_references.request_id;
1016 x_program_id := old_references.program_id;
1017 x_program_application_id := old_references.program_application_id;
1018 x_program_update_date := old_references.program_update_date;
1019 ELSE
1020 x_program_update_date := SYSDATE;
1021 END IF;
1022 END IF;
1023
1024 IF (x_mode = 'S') THEN
1025 igs_sc_gen_001.set_ctx('R');
1026 END IF;
1030 contact_point_type = new_references.contact_point_type,
1027 UPDATE igs_pe_contact_dtls SET
1028 phone_line_type = new_references.phone_line_type,
1029 location_venue_addr_id = new_references.location_venue_addr_id,
1031 status = new_references.status,
1032 primary_flag = new_references.primary_flag,
1033 email_format = new_references.email_format,
1034 email_address = new_references.email_address,
1035 telephone_type = new_references.telephone_type,
1036 phone_area_code = new_references.phone_area_code,
1037 phone_country_code = new_references.phone_country_code,
1038 phone_number = new_references.phone_number,
1039 phone_extension = new_references.phone_extension,
1040 attribute_category = new_references.attribute_category,
1041 attribute1 = new_references.attribute1,
1042 attribute2 = new_references.attribute2,
1043 attribute3 = new_references.attribute3,
1044 attribute4 = new_references.attribute4,
1045 attribute5 = new_references.attribute5,
1046 attribute6 = new_references.attribute6,
1047 attribute7 = new_references.attribute7,
1048 attribute8 = new_references.attribute8,
1049 attribute9 = new_references.attribute9,
1050 attribute10 = new_references.attribute10,
1051 attribute11 = new_references.attribute11,
1052 attribute12 = new_references.attribute12,
1053 attribute13 = new_references.attribute13,
1054 attribute14 = new_references.attribute14,
1055 attribute15 = new_references.attribute15,
1056 attribute16 = new_references.attribute16,
1057 attribute17 = new_references.attribute17,
1058 attribute18 = new_references.attribute18,
1059 attribute19 = new_references.attribute19,
1060 attribute20 = new_references.attribute20,
1061 last_update_date = x_last_update_date,
1062 last_updated_by = x_last_updated_by,
1063 last_update_login = x_last_update_login ,
1064 request_id = x_request_id,
1065 program_id = x_program_id,
1066 program_application_id = x_program_application_id,
1067 program_update_date = x_program_update_date
1068 WHERE ROWID = x_rowid;
1069
1070 IF (SQL%NOTFOUND) THEN
1071 fnd_message.set_name ('IGS', 'IGS_SC_POLICY_UPD_DEL_EXCEP');
1072 igs_ge_msg_stack.add;
1073 igs_sc_gen_001.unset_ctx('R');
1074 app_exception.raise_exception;
1075 END IF;
1076 IF (x_mode = 'S') THEN
1077 igs_sc_gen_001.unset_ctx('R');
1078 END IF;
1079
1080
1081 after_dml (
1082 p_action => 'UPDATE',
1083 x_rowid => X_ROWID
1084 );
1085
1086
1087 EXCEPTION
1088 WHEN OTHERS THEN
1089 IF (SQLCODE = (-28115)) THEN
1090 fnd_message.set_name ('IGS', 'IGS_SC_UPD_POLICY_EXCP');
1091 fnd_message.set_token ('ERR_CD', SQLCODE);
1092 igs_ge_msg_stack.add;
1093 igs_sc_gen_001.unset_ctx('R');
1094 app_exception.raise_exception;
1095 ELSE
1096 igs_sc_gen_001.unset_ctx('R');
1097 RAISE;
1098 END IF;
1099 END update_row;
1100
1101 PROCEDURE add_row (
1102 x_rowid IN OUT NOCOPY VARCHAR2,
1103 x_phone_line_type IN VARCHAR2,
1104 x_contact_point_id IN OUT NOCOPY NUMBER,
1105 x_location_venue_addr_id IN NUMBER,
1106 x_contact_point_type IN VARCHAR2,
1107 x_status IN VARCHAR2,
1108 x_primary_flag IN VARCHAR2,
1109 x_email_format IN VARCHAR2,
1110 x_email_address IN VARCHAR2,
1111 x_telephone_type IN VARCHAR2,
1112 x_phone_area_code IN VARCHAR2,
1113 x_phone_country_code IN VARCHAR2,
1114 x_phone_number IN VARCHAR2,
1115 x_phone_extension IN VARCHAR2,
1116 x_attribute_category IN VARCHAR2,
1117 x_attribute1 IN VARCHAR2,
1118 x_attribute2 IN VARCHAR2,
1119 x_attribute3 IN VARCHAR2,
1120 x_attribute4 IN VARCHAR2,
1121 x_attribute5 IN VARCHAR2,
1122 x_attribute6 IN VARCHAR2,
1123 x_attribute7 IN VARCHAR2,
1124 x_attribute8 IN VARCHAR2,
1125 x_attribute9 IN VARCHAR2,
1126 x_attribute10 IN VARCHAR2,
1127 x_attribute11 IN VARCHAR2,
1128 x_attribute12 IN VARCHAR2,
1129 x_attribute13 IN VARCHAR2,
1130 x_attribute14 IN VARCHAR2,
1131 x_attribute15 IN VARCHAR2,
1132 x_attribute16 IN VARCHAR2,
1133 x_attribute17 IN VARCHAR2,
1134 x_attribute18 IN VARCHAR2,
1135 x_attribute19 IN VARCHAR2,
1136 x_attribute20 IN VARCHAR2,
1137 x_mode IN VARCHAR2 DEFAULT 'R'
1138 ) AS
1139 /*
1140 || Created By :
1141 || Date Created By :
1142 || Purpose :
1143 || Known limitations, enhancements or remarks :
1144 || Change History :
1145 || Who When What
1146 || (reverse chronological order - newest change first)
1147 */
1148 CURSOR c1 IS SELECT rowid FROM igs_pe_contact_dtls
1149 WHERE contact_point_id = x_contact_point_id
1150 ;
1151
1152 BEGIN
1153
1154 OPEN c1;
1155 FETCH c1 INTO x_rowid;
1156 IF (c1%NOTFOUND) THEN
1157 CLOSE c1;
1158
1159 insert_row (
1160 x_rowid,
1161 x_phone_line_type,
1162 x_contact_point_id,
1163 x_location_venue_addr_id,
1164 x_contact_point_type,
1165 x_status,
1166 x_primary_flag,
1167 x_email_format,
1168 x_email_address,
1169 x_telephone_type,
1170 x_phone_area_code,
1171 x_phone_country_code,
1172 x_phone_number,
1173 x_phone_extension,
1174 x_attribute_category,
1175 x_attribute1,
1176 x_attribute2,
1177 x_attribute3,
1178 x_attribute4,
1179 x_attribute5,
1180 x_attribute6,
1181 x_attribute7,
1182 x_attribute8,
1183 x_attribute9,
1184 x_attribute10,
1185 x_attribute11,
1186 x_attribute12,
1187 x_attribute13,
1188 x_attribute14,
1189 x_attribute15,
1190 x_attribute16,
1191 x_attribute17,
1192 x_attribute18,
1193 x_attribute19,
1194 x_attribute20,
1195 x_mode
1196 );
1197 RETURN;
1198 END IF;
1199 CLOSE c1;
1200
1201 update_row (
1202 x_rowid,
1203 x_phone_line_type,
1204 x_contact_point_id,
1205 x_location_venue_addr_id,
1206 x_contact_point_type,
1207 x_status,
1208 x_primary_flag,
1209 x_email_format,
1210 x_email_address,
1211 x_telephone_type,
1212 x_phone_area_code,
1213 x_phone_country_code,
1214 x_phone_number,
1215 x_phone_extension,
1216 x_attribute_category,
1217 x_attribute1,
1218 x_attribute2,
1219 x_attribute3,
1220 x_attribute4,
1221 x_attribute5,
1222 x_attribute6,
1223 x_attribute7,
1224 x_attribute8,
1225 x_attribute9,
1226 x_attribute10,
1227 x_attribute11,
1228 x_attribute12,
1229 x_attribute13,
1230 x_attribute14,
1231 x_attribute15,
1232 x_attribute16,
1233 x_attribute17,
1234 x_attribute18,
1235 x_attribute19,
1236 x_attribute20,
1237 x_mode
1238 );
1239
1240 END add_row;
1241
1242 PROCEDURE delete_row (
1243 x_rowid IN VARCHAR2,
1244 x_mode IN VARCHAR2
1245 ) AS
1246 /*
1247 || Created By :
1248 || Date Created By :
1249 || Purpose :
1250 || Known limitations, enhancements or remarks :
1251 || Change History :
1252 || Who When What
1253 || (reverse chronological order - newest change first)
1254 */
1255 BEGIN
1256
1257 before_dml (
1258 p_action => 'DELETE',
1259 x_rowid => X_ROWID
1260 );
1261
1262 IF (x_mode = 'S') THEN
1263 igs_sc_gen_001.set_ctx('R');
1264 END IF;
1265 DELETE FROM igs_pe_contact_dtls
1266 WHERE ROWID = x_rowid;
1267
1268 IF (SQL%NOTFOUND) THEN
1269 fnd_message.set_name ('IGS', 'IGS_SC_POLICY_UPD_DEL_EXCEP');
1270 igs_ge_msg_stack.add;
1271 igs_sc_gen_001.unset_ctx('R');
1272 app_exception.raise_exception;
1273 END IF;
1274 IF (x_mode = 'S') THEN
1275 igs_sc_gen_001.unset_ctx('R');
1276 END IF;
1277
1278
1279 after_dml (
1280 p_action => 'DELETE',
1281 x_rowid => X_ROWID
1282 );
1283
1284 END delete_row;
1285
1286 END igs_pe_contact_dtls_pkg;