DBA Data[Home] [Help]

PACKAGE BODY: APPS.IGS_SS_ADMAPPL_SETUP_PKG

Source


1 PACKAGE BODY igs_ss_admappl_setup_pkg AS
2 /* $Header: IGSAIB6B.pls 115.10 2003/10/30 13:25:47 rghosh ship $ */
3 
4 --hreddych 16-jul-2002  #2464172 removed the default null value in the lock_row procedure
5 --                       for X_DEPENDENT_OF_VETERAN and X_APP_SOURCE_ID
6   l_rowid VARCHAR2(25);
7   old_references igs_ss_admappl_setup%ROWTYPE;
8   new_references igs_ss_admappl_setup%ROWTYPE;
9   PROCEDURE set_column_values (
10     p_action IN VARCHAR2,
11     x_rowid IN VARCHAR2, --DEFAULT NULL,
12     x_admappl_setup_id IN NUMBER,-- DEFAULT NULL,
13     x_alias_type IN VARCHAR2, -- DEFAULT NULL,
14     x_permanent_addr_type IN VARCHAR2, -- DEFAULT NULL,
15     x_mailing_addr_type IN VARCHAR2, -- DEFAULT NULL,
16     x_person_id_type IN VARCHAR2 ,--DEFAULT NULL,
17     x_ps_note_type_id IN NUMBER , --DEFAULT NULL,
18     x_we_note_type_id IN NUMBER , --DEFAULT NULL,
19     x_act_note_type_id IN NUMBER , --DEFAULT NULL,
20     x_dependent_of_veteran  IN NUMBER , --DEFAULT NULL,
21     x_app_source_id  IN NUMBER , --DEFAULT NULL,
22     x_creation_date IN DATE , --DEFAULT NULL,
23     x_created_by IN NUMBER , --DEFAULT NULL,
24     x_last_update_date IN DATE, -- DEFAULT NULL,
25     x_last_updated_by IN NUMBER, -- DEFAULT NULL,
26     x_last_update_login IN NUMBER --DEFAULT NULL
27   ) AS
28   /*
29   ||  Created By : tray
30   ||  Date Created By : 2000/07/31
31   ||  Purpose :
32   ||  Known limitations, enhancements or remarks :
33   ||  Change History :
34   ||  Who             When            What
35   || kumma            16-NOV-2002     REMOVED igs_pe_alias_types_pkg.get_pk_for_validation
36   ||  (reverse chronological order - newest change first)
37   */
38     CURSOR cur_old_ref_values IS
39       SELECT   *
40       FROM     IGS_SS_ADMAPPL_SETUP
41       WHERE    rowid = x_rowid;
42   BEGIN
43     l_rowid := x_rowid;
44     -- Code for setting the Old and New Reference Values.
45     -- Populate Old Values.
46     OPEN cur_old_ref_values;
47     FETCH cur_old_ref_values INTO old_references;
48     IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
49       CLOSE cur_old_ref_values;
50       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
51       igs_ge_msg_stack.add;
52       app_exception.raise_exception;
53       RETURN;
54     END IF;
55     CLOSE cur_old_ref_values;
56     -- Populate New Values.
57     new_references.admappl_setup_id := x_admappl_setup_id;
58     new_references.alias_type := x_alias_type;
59 /*
60     Removed references due to DLD ver 1.7
61     new_references.permanent_addr_type := x_permanent_addr_type;
62     new_references.mailing_addr_type := x_mailing_addr_type;
63 */
64     new_references.person_id_type := x_person_id_type;
65     new_references.ps_note_type_id := x_ps_note_type_id;
66     new_references.we_note_type_id := x_we_note_type_id;
67     new_references.act_note_type_id := x_act_note_type_id;
68     new_references.dependent_of_veteran :=x_dependent_of_veteran;
69      new_references.app_source_id := x_app_source_id;
70 
71     IF (p_action = 'UPDATE') THEN
72       new_references.creation_date := old_references.creation_date;
73       new_references.created_by := old_references.created_by;
74     ELSE
75       new_references.creation_date := x_creation_date;
76       new_references.created_by := x_created_by;
77     END IF;
78     new_references.last_update_date := x_last_update_date;
79     new_references.last_updated_by := x_last_updated_by;
80     new_references.last_update_login := x_last_update_login;
81   END set_column_values;
82 
83   PROCEDURE check_constraints (
84     column_name IN VARCHAR2, -- DEFAULT NULL,
85     column_value IN VARCHAR2 --DEFAULT NULL
86   ) AS
87   /*
88   ||  Created By : tray
89   ||  Date Created By : 2000/07/31
90   ||  Purpose :
91   ||  Known limitations, enhancements or remarks :
92   ||  Change History :
93   ||  Who             When            What
94   ||  (reverse chronological order - newest change first)
95   */
96   BEGIN
97     IF (column_name IS NULL) THEN
98       NULL;
99       NULL;
100     END IF;
101   END check_constraints;
102 
103   PROCEDURE check_parent_existance AS
104   /*
105   ||  Created By : tray
106   ||  Date Created By : 2000/07/31
107   ||  Purpose :
108   ||  Known limitations, enhancements or remarks :
109   ||  Change History :
110   ||  Who             When            What
111   ||  (reverse chronological order - newest change first)
112   */
113   BEGIN
114     IF (((old_references.we_note_type_id = new_references.we_note_type_id)) OR
115         ((new_references.we_note_type_id IS NULL))) THEN
116       NULL;
117     ELSIF NOT igs_ad_note_types_pkg.get_pk_for_validation (
118             new_references.we_note_type_id,
119             'N'
120         )  THEN
121       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
122       igs_ge_msg_stack.add;
123       app_exception.raise_exception;
124     END IF;
125     IF (((old_references.alias_type = new_references.alias_type)) OR
126         ((new_references.alias_type IS NULL))) THEN
127       NULL;
128 /*
129     ELSIF NOT igs_pe_alias_types_pkg.get_pk_for_validation (
130             new_references.alias_type
131         )  THEN
132       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
133       igs_ge_msg_stack.add;
134       app_exception.raise_exception;
135 */
136     END IF;
137 /*
138  Removed Reference due to DLD1.7,  Column Obsoleted
139     IF (((old_references.permanent_addr_type = new_references.permanent_addr_type)) OR
140         ((new_references.permanent_addr_type IS NULL))) THEN
141       NULL;
142     END IF;
143 */
144     IF (((old_references.act_note_type_id = new_references.act_note_type_id)) OR
145         ((new_references.act_note_type_id IS NULL))) THEN
146       NULL;
147     ELSIF NOT igs_ad_note_types_pkg.get_pk_for_validation (
148             new_references.act_note_type_id,
149             'N'
150         )  THEN
151       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
152       igs_ge_msg_stack.add;
153       app_exception.raise_exception;
154     END IF;
155 /*
156  Removed Reference due to DLD1.7,  Column Obsoleted
157     IF (((old_references.mailing_addr_type = new_references.mailing_addr_type)) OR
158         ((new_references.mailing_addr_type IS NULL))) THEN
159       NULL;
160     END IF;
161 */
162     IF (((old_references.person_id_type = new_references.person_id_type)) OR
163         ((new_references.person_id_type IS NULL))) THEN
164       NULL;
165     ELSIF NOT igs_pe_person_id_typ_pkg.get_pk_for_validation (
166             new_references.person_id_type
167         )  THEN
168       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
169       igs_ge_msg_stack.add;
170       app_exception.raise_exception;
171     END IF;
172     IF (((old_references.ps_note_type_id = new_references.ps_note_type_id)) OR
173         ((new_references.ps_note_type_id IS NULL))) THEN
174       NULL;
175     ELSIF NOT igs_ad_note_types_pkg.get_pk_for_validation (
176             new_references.ps_note_type_id,
177             'N'
178         )  THEN
179       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
180       igs_ge_msg_stack.add;
181       app_exception.raise_exception;
182     END IF;
183   END check_parent_existance;
184 
185   FUNCTION get_pk_for_validation (
186     x_admappl_setup_id IN NUMBER
187   ) RETURN BOOLEAN AS
188   /*
189   ||  Created By : tray
190   ||  Date Created By : 2000/07/31
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_ss_admappl_setup
200       WHERE    admappl_setup_id = x_admappl_setup_id
201       FOR UPDATE NOWAIT;
202     lv_rowid cur_rowid%RowType;
203   BEGIN
204     OPEN cur_rowid;
205     FETCH cur_rowid INTO lv_rowid;
206     IF (cur_rowid%FOUND) THEN
207       CLOSE cur_rowid;
208       RETURN(TRUE);
209     ELSE
210       CLOSE cur_rowid;
211       RETURN(FALSE);
212     END IF;
213   END get_pk_for_validation;
214 
215  PROCEDURE get_fk_igs_ad_note_types_we (
216    x_notes_type_id IN NUMBER
217     ) AS
218   /*
219   ||  Created By : tray
220   ||  Date Created By : 2000/07/31
221   ||  Purpose :
222   ||  Known limitations, enhancements or remarks :
223   ||  Change History :
224   ||  Who             When            What
225   ||  (reverse chronological order - newest change first)
226   */
227     CURSOR cur_rowid IS
228       SELECT   rowid
229       FROM     igs_ss_admappl_setup
230       WHERE    we_note_type_id = x_notes_type_id ;
231     lv_rowid cur_rowid%RowType;
232   BEGIN
233     OPEN cur_rowid;
234     FETCH cur_rowid INTO lv_rowid;
235     IF (cur_rowid%FOUND) THEN
236       CLOSE cur_rowid;
237       fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
238       igs_ge_msg_stack.add;
239       app_exception.raise_exception;
240       RETURN;
241     END IF;
242     CLOSE cur_rowid;
243   END get_fk_igs_ad_note_types_we;
244 
245 
246  PROCEDURE get_fk_igs_pe_alias_types (
247    x_alias_type IN VARCHAR2
248     ) AS
249   /*
250   ||  Created By : tray
251   ||  Date Created By : 2000/07/31
252   ||  Purpose :
253   ||  Known limitations, enhancements or remarks :
254   ||  Change History :
255   ||  Who             When            What
256   ||  (reverse chronological order - newest change first)
257   */
258     CURSOR cur_rowid IS
259       SELECT   rowid
260       FROM     igs_ss_admappl_setup
261       WHERE    alias_type = x_alias_type ;
262     lv_rowid cur_rowid%RowType;
263   BEGIN
264     OPEN cur_rowid;
265     FETCH cur_rowid INTO lv_rowid;
266     IF (cur_rowid%FOUND) THEN
267       CLOSE cur_rowid;
268       fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
269       igs_ge_msg_stack.add;
270       app_exception.raise_exception;
271       RETURN;
272     END IF;
273     CLOSE cur_rowid;
274   END get_fk_igs_pe_alias_types;
275 
276  -- Code Removed as Column is Obsoleted in DLD ver 1.7
277  --PROCEDURE get_fk_igs_co_addr_type_pat (
278  -- x_addr_type IN VARCHAR2
279  -- ) AS
280   /*
281   ||  Created By : tray
282   ||  Date Created By : 2000/07/31
283   ||  Purpose :
284   ||  Known limitations, enhancements or remarks :
285   ||  Change History :
286   ||  Who             When            What
287   ||  (reverse chronological order - newest change first)
288   */
289 /*
290 CURSOR cur_rowid IS
291       SELECT   rowid
292       FROM     igs_ss_admappl_setup
293       WHERE    permanent_addr_type = x_addr_type ;
294     lv_rowid cur_rowid%RowType;
295   BEGIN
296     OPEN cur_rowid;
297     FETCH cur_rowid INTO lv_rowid;
298     IF (cur_rowid%FOUND) THEN
299       CLOSE cur_rowid;
300       fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
301       igs_ge_msg_stack.add;
302       app_exception.raise_exception;
303       RETURN;
304     END IF;
305     CLOSE cur_rowid;
306   END get_fk_igs_co_addr_type_pat;
307 */
308  PROCEDURE get_fk_igs_ad_note_types_act (
309    x_notes_type_id IN NUMBER
310     ) AS
311   /*
312   ||  Created By : tray
313   ||  Date Created By : 2000/07/31
314   ||  Purpose :
315   ||  Known limitations, enhancements or remarks :
316   ||  Change History :
317   ||  Who             When            What
318   ||  (reverse chronological order - newest change first)
319   */
320     CURSOR cur_rowid IS
321       SELECT   rowid
322       FROM     igs_ss_admappl_setup
323       WHERE    act_note_type_id = x_notes_type_id ;
324     lv_rowid cur_rowid%RowType;
325   BEGIN
326     OPEN cur_rowid;
327     FETCH cur_rowid INTO lv_rowid;
328     IF (cur_rowid%FOUND) THEN
329       CLOSE cur_rowid;
330       fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
331       igs_ge_msg_stack.add;
332       app_exception.raise_exception;
333       RETURN;
334     END IF;
335     CLOSE cur_rowid;
336   END get_fk_igs_ad_note_types_act;
337 -- Removed Reference due to DLD1.7,  Column Obsoleted
338 -- PROCEDURE get_fk_igs_co_addr_type_mat (
339 --  x_addr_type IN VARCHAR2
340 --  ) AS
341   /*
342   ||  Created By : tray
343   ||  Date Created By : 2000/07/31
344   ||  Purpose :
345   ||  Known limitations, enhancements or remarks :
346   ||  Change History :
347   ||  Who             When            What
348   ||  (reverse chronological order - newest change first)
349   */
350 /*
351     CURSOR cur_rowid IS
352       SELECT   rowid
353       FROM     igs_ss_admappl_setup
354       WHERE    mailing_addr_type = x_addr_type ;
355     lv_rowid cur_rowid%RowType;
356   BEGIN
357     OPEN cur_rowid;
358     FETCH cur_rowid INTO lv_rowid;
359     IF (cur_rowid%FOUND) THEN
360       CLOSE cur_rowid;
361       fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
362       igs_ge_msg_stack.add;
363       app_exception.raise_exception;
364       RETURN;
365     END IF;
366     CLOSE cur_rowid;
367   END get_fk_igs_co_addr_type_mat;
368 */
369  PROCEDURE get_fk_igs_pe_person_id_typ (
370    x_person_id_type IN VARCHAR2
371     ) AS
372   /*
373   ||  Created By : tray
374   ||  Date Created By : 2000/07/31
375   ||  Purpose :
376   ||  Known limitations, enhancements or remarks :
377   ||  Change History :
378   ||  Who             When            What
379   ||  (reverse chronological order - newest change first)
380   */
381     CURSOR cur_rowid IS
382       SELECT   rowid
383       FROM     igs_ss_admappl_setup
384       WHERE    person_id_type = x_person_id_type ;
385     lv_rowid cur_rowid%RowType;
386   BEGIN
387     OPEN cur_rowid;
388     FETCH cur_rowid INTO lv_rowid;
389     IF (cur_rowid%FOUND) THEN
390       CLOSE cur_rowid;
391       fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
392       igs_ge_msg_stack.add;
393       app_exception.raise_exception;
394       RETURN;
395     END IF;
396     CLOSE cur_rowid;
397   END get_fk_igs_pe_person_id_typ;
398  PROCEDURE get_fk_igs_ad_note_types_psnt (
399    x_notes_type_id IN NUMBER
400     ) AS
401   /*
402   ||  Created By : tray
403   ||  Date Created By : 2000/07/31
404   ||  Purpose :
405   ||  Known limitations, enhancements or remarks :
406   ||  Change History :
407   ||  Who             When            What
408   ||  (reverse chronological order - newest change first)
409   */
410     CURSOR cur_rowid IS
411       SELECT   rowid
412       FROM     igs_ss_admappl_setup
413       WHERE    ps_note_type_id = x_notes_type_id ;
414     lv_rowid cur_rowid%RowType;
415   BEGIN
416     OPEN cur_rowid;
417     FETCH cur_rowid INTO lv_rowid;
418     IF (cur_rowid%FOUND) THEN
419       CLOSE cur_rowid;
420       fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
421       igs_ge_msg_stack.add;
422       app_exception.raise_exception;
423       RETURN;
424     END IF;
425     CLOSE cur_rowid;
426   END get_fk_igs_ad_note_types_psnt;
427 
428   PROCEDURE before_dml (
429     p_action IN VARCHAR2,
430     x_rowid IN VARCHAR2 , --DEFAULT NULL,
431     x_admappl_setup_id IN NUMBER, -- DEFAULT NULL,
432     x_alias_type IN VARCHAR2 ,--DEFAULT NULL,
433     x_permanent_addr_type IN VARCHAR2, -- DEFAULT NULL,
434     x_mailing_addr_type IN VARCHAR2 , --DEFAULT NULL,
435     x_person_id_type IN VARCHAR2 , --DEFAULT NULL,
436     x_ps_note_type_id IN NUMBER , --DEFAULT NULL,
437     x_we_note_type_id IN NUMBER , --DEFAULT NULL,
438     x_act_note_type_id IN NUMBER, -- DEFAULT NULL,
439     x_dependent_of_veteran  IN NUMBER , --DEFAULT NULL,
440     x_app_source_id  IN NUMBER , --DEFAULT NULL,
441     x_creation_date IN DATE , --DEFAULT NULL,
442     x_created_by IN NUMBER , --DEFAULT NULL,
443     x_last_update_date IN DATE , --DEFAULT NULL,
444     x_last_updated_by IN NUMBER , --DEFAULT NULL,
445     x_last_update_login IN NUMBER --DEFAULT NULL
446   ) AS
447   /*
448   ||  Created By : tray
449   ||  Date Created By : 2000/07/31
450   ||  Purpose :
451   ||  Known limitations, enhancements or remarks :
452   ||  Change History :
453   ||  Who             When            What
454   ||  (reverse chronological order - newest change first)
455   */
456   BEGIN
457     set_column_values (
458       p_action,
459       x_rowid,
460       x_admappl_setup_id,
461       x_alias_type,
462       x_permanent_addr_type,
463       x_mailing_addr_type,
464       x_person_id_type,
465       x_ps_note_type_id,
466       x_we_note_type_id,
467       x_act_note_type_id,
468       x_dependent_of_veteran,
469       x_app_source_id ,
470       x_creation_date,
471       x_created_by,
472       x_last_update_date,
473       x_last_updated_by,
474       x_last_update_login
475     );
476     IF (p_action = 'INSERT') THEN
477       -- Call all the procedures related to Before Insert.
478       Null;
479       IF (get_pk_for_validation(
480             new_references.admappl_setup_id)) THEN
481         fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
482         igs_ge_msg_stack.add;
483         app_exception.raise_exception;
484       END IF;
485       check_constraints;
486       check_parent_existance;
487     ELSIF (p_action = 'UPDATE') THEN
488       -- Call all the procedures related to Before Update.
489       Null;
490       check_constraints;
491       check_parent_existance;
492     ELSIF (p_action = 'DELETE') THEN
493       -- Call all the procedures related to Before Delete.
494       Null;
495     ELSIF (p_action = 'VALIDATE_INSERT') THEN
496       -- Call all the procedures related to Before Insert.
497       IF (get_pk_for_validation (
498             new_references.admappl_setup_id)) THEN
499         fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
500         igs_ge_msg_stack.add;
501         app_exception.raise_exception;
502       END IF;
503       check_constraints;
504     ELSIF (p_action = 'VALIDATE_UPDATE') THEN
505       check_constraints;
506     ELSIF (p_action = 'VALIDATE_DELETE') THEN
507       NULL;
508     END IF;
509   END before_dml;
510   PROCEDURE after_dml (
511     p_action IN VARCHAR2,
512     x_rowid IN VARCHAR2
513   ) AS
514   /*
515   ||  Created By : tray
516   ||  Date Created By : 2000/07/31
517   ||  Purpose :
518   ||  Known limitations, enhancements or remarks :
519   ||  Change History :
520   ||  Who             When            What
521   ||  (reverse chronological order - newest change first)
522   */
523   BEGIN
524     l_rowid := x_rowid;
525     IF (p_action = 'INSERT') THEN
526       -- Call all the procedures related to After Insert.
527       Null;
528     ELSIF (p_action = 'UPDATE') THEN
529       -- Call all the procedures related to After Update.
530       Null;
531     ELSIF (p_action = 'DELETE') THEN
532       -- Call all the procedures related to After Delete.
533       Null;
534     END IF;
535   END after_dml;
536 
537   PROCEDURE lock_row (
538     x_rowid IN VARCHAR2,
539     x_admappl_setup_id IN NUMBER,
540     x_alias_type IN VARCHAR2,
541     x_permanent_addr_type IN VARCHAR2,
542     x_mailing_addr_type IN VARCHAR2,
543     x_person_id_type IN VARCHAR2,
544     x_ps_note_type_id IN NUMBER,
545     x_we_note_type_id IN NUMBER,
546     x_act_note_type_id IN NUMBER,
547     x_dependent_of_veteran  IN NUMBER,
548     x_app_source_id  IN NUMBER
549   ) AS
550   /*
551   ||  Created By : tray
552   ||  Date Created By : 2000/07/31
553   ||  Purpose :
554   ||  Known limitations, enhancements or remarks :
555   ||  Change History :
556   ||  Who             When            What
557   ||  (reverse chronological order - newest change first)
558   */
559     CURSOR c1 IS SELECT
560       alias_type
561 ,      permanent_addr_type
562 ,      mailing_addr_type
563 ,      person_id_type
564 ,      ps_note_type_id
565 ,      we_note_type_id
566 ,      act_note_type_id
567 ,     dependent_of_veteran
568 ,     app_source_id
569     FROM igs_ss_admappl_setup
570     WHERE ROWID = x_rowid
571     FOR UPDATE NOWAIT;
572     tlinfo c1%ROWTYPE;
573   BEGIN
574     OPEN c1;
575     FETCH c1 INTO tlinfo;
576     IF (c1%notfound) THEN
577       fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
578       igs_ge_msg_stack.add;
579       CLOSE c1;
580       app_exception.raise_exception;
581       RETURN;
582     END IF;
583     CLOSE c1;
584     IF ((  (tlinfo.ALIAS_TYPE = x_ALIAS_TYPE)
585        OR ((tlinfo.ALIAS_TYPE is null)
586       AND (X_ALIAS_TYPE is null)))
587 
588 /*  Code Removed because the columns are obsoleted as part of DLD ver 1.7
589       AND ((tlinfo.PERMANENT_ADDR_TYPE = x_PERMANENT_ADDR_TYPE)
590        OR ((tlinfo.PERMANENT_ADDR_TYPE is null)
591       AND (X_PERMANENT_ADDR_TYPE is null)))
592       AND ((tlinfo.MAILING_ADDR_TYPE = x_MAILING_ADDR_TYPE)
593        OR ((tlinfo.MAILING_ADDR_TYPE is null)
594       AND (X_MAILING_ADDR_TYPE is null)))
595 */
596       AND ((tlinfo.PERSON_ID_TYPE = x_PERSON_ID_TYPE)
597        OR ((tlinfo.PERSON_ID_TYPE is null)
598       AND (X_PERSON_ID_TYPE is null)))
599       AND ((tlinfo.PS_NOTE_TYPE_ID = x_PS_NOTE_TYPE_ID)
600        OR ((tlinfo.PS_NOTE_TYPE_ID is null)
601       AND (X_PS_NOTE_TYPE_ID is null)))
602       AND ((tlinfo.WE_NOTE_TYPE_ID = x_WE_NOTE_TYPE_ID)
603        OR ((tlinfo.WE_NOTE_TYPE_ID is null)
604       AND (X_WE_NOTE_TYPE_ID is null)))
605       AND ((tlinfo.DEPENDENT_OF_VETERAN = x_DEPENDENT_OF_VETERAN)
606        OR ((tlinfo.DEPENDENT_OF_VETERAN is null)
607       AND (X_APP_SOURCE_ID is null)))
608       AND ((tlinfo.APP_SOURCE_ID = x_APP_SOURCE_ID)
609        OR ((tlinfo.APP_SOURCE_ID is null)
610       AND (X_APP_SOURCE_ID is null)))
611      AND ((tlinfo.ACT_NOTE_TYPE_ID = x_ACT_NOTE_TYPE_ID)
612        OR ((tlinfo.ACT_NOTE_TYPE_ID is null)
613       AND (X_ACT_NOTE_TYPE_ID is null)))
614        ) THEN
615       NULL;
616     ELSE
617       fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
618       igs_ge_msg_stack.add;
619       app_exception.raise_exception;
620     END IF;
621     RETURN;
622   END lock_row;
623 
624   PROCEDURE update_row (
625     x_rowid IN  VARCHAR2,
626     x_ADMAPPL_SETUP_ID IN NUMBER,
627     x_ALIAS_TYPE IN VARCHAR2,
628     x_PERMANENT_ADDR_TYPE IN VARCHAR2,
629     x_MAILING_ADDR_TYPE IN VARCHAR2,
630     x_PERSON_ID_TYPE IN VARCHAR2,
631     x_PS_NOTE_TYPE_ID IN NUMBER,
632     x_WE_NOTE_TYPE_ID IN NUMBER,
633     x_ACT_NOTE_TYPE_ID IN NUMBER,
634     x_dependent_of_veteran  IN NUMBER ,
635     x_app_source_id  IN NUMBER ,
636     x_mode IN VARCHAR2 --DEFAULT 'R'
637   ) AS
638   /*
639   ||  Created By : tray
640   ||  Date Created By : 2000/07/31
641   ||  Purpose :
642   ||  Known limitations, enhancements or remarks :
643   ||  Change History :
644   ||  Who             When            What
645   ||  (reverse chronological order - newest change first)
646   */
647     x_last_update_date DATE ;
648     x_last_updated_by NUMBER ;
649     x_last_update_login NUMBER ;
650   BEGIN
651     x_last_update_date := SYSDATE;
652     IF (X_MODE = 'I') THEN
653       x_last_updated_by := 1;
654       x_last_update_login := 0;
655     ELSIF (x_mode = 'R') THEN
656       x_last_updated_by := fnd_global.user_id;
657       IF x_last_updated_by IS NULL THEN
658         x_last_updated_by := -1;
659       END IF;
660       x_last_update_login := fnd_global.login_id;
661       IF (x_last_update_login IS NULL) THEN
662         x_last_update_login := -1;
663       END IF;
664     ELSE
665       fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
666       igs_ge_msg_stack.add;
667       app_exception.raise_exception;
668     END IF;
669     before_dml(
670       p_action=>'UPDATE',
671       x_rowid=>X_ROWID,
672       x_admappl_setup_id => x_ADMAPPL_SETUP_ID,
673       x_alias_type => x_ALIAS_TYPE,
674       x_permanent_addr_type => x_PERMANENT_ADDR_TYPE,
675       x_mailing_addr_type => x_MAILING_ADDR_TYPE,
676       x_person_id_type => x_PERSON_ID_TYPE,
677       x_ps_note_type_id => x_PS_NOTE_TYPE_ID,
678       x_we_note_type_id => x_WE_NOTE_TYPE_ID,
679       x_act_note_type_id => x_ACT_NOTE_TYPE_ID,
680       x_dependent_of_veteran => X_DEPENDENT_OF_VETERAN ,
681       x_app_source_id  => X_APP_SOURCE_ID,
682       x_creation_date=>x_last_update_date,
683       x_created_by=>x_last_updated_by,
684       x_last_update_date=>x_last_update_date,
685       x_last_updated_by=>x_last_updated_by,
686       x_last_update_login=>x_last_update_login
687     );
688     UPDATE igs_ss_admappl_setup SET
689       alias_type =  new_references.alias_type,
690       permanent_addr_type =  new_references.permanent_addr_type,
691       mailing_addr_type =  new_references.mailing_addr_type,
692       person_id_type =  new_references.person_id_type,
693       ps_note_type_id =  new_references.ps_note_type_id,
694       we_note_type_id =  new_references.we_note_type_id,
695       act_note_type_id =  new_references.act_note_type_id,
696       dependent_of_veteran  = new_references.dependent_of_veteran ,
697       app_source_id  = new_references.app_source_id,
698       last_update_date = x_last_update_date,
699       last_updated_by = x_last_updated_by,
700       last_update_login = x_last_update_login
701     WHERE ROWID = x_rowid;
702     IF (SQL%NOTFOUND) THEN
703       RAISE NO_DATA_FOUND;
704     END IF;
705     after_dml (
706       p_action => 'UPDATE',
707       x_rowid => X_ROWID
708     );
709   END update_row;
710 END igs_ss_admappl_setup_pkg;