DBA Data[Home] [Help]

PACKAGE BODY: APPS.IGS_FI_FAI_DTLS_PKG

Source


1 PACKAGE BODY igs_fi_fai_dtls_pkg AS
2 /* $Header: IGSSIF5B.pls 120.0 2005/09/09 17:48:33 appldev noship $ */
3 
4   l_rowid VARCHAR2(25);
5   old_references igs_fi_fai_dtls%ROWTYPE;
6   new_references igs_fi_fai_dtls%ROWTYPE;
7 
8   PROCEDURE set_column_values (
9     p_action                            IN     VARCHAR2,
10     x_rowid                             IN     VARCHAR2,
11     x_fee_as_item_dtl_id                IN     NUMBER,
12     x_fee_ass_item_id                   IN     NUMBER,
13     x_fee_cat                           IN     VARCHAR2,
14     x_course_cd                         IN     VARCHAR2,
15     x_crs_version_number                IN     NUMBER,
16     x_unit_attempt_status               IN     VARCHAR2,
17     x_org_unit_cd                       IN     VARCHAR2,
18     x_class_standing                    IN     VARCHAR2,
19     x_location_cd                       IN     VARCHAR2,
20     x_uoo_id                            IN     NUMBER,
21     x_unit_set_cd                       IN     VARCHAR2,
22     x_us_version_number                 IN     NUMBER,
23     x_chg_elements                      IN     NUMBER,
24     x_creation_date                     IN     DATE,
25     x_created_by                        IN     NUMBER,
26     x_last_update_date                  IN     DATE,
27     x_last_updated_by                   IN     NUMBER,
28     x_last_update_login                 IN     NUMBER
29   ) AS
30   /*
31   ||  Created By : [email protected]
32   ||  Created On : 27-JUN-2005
33   ||  Purpose : Initialises the Old and New references for the columns of the table.
34   ||  Known limitations, enhancements or remarks :
35   ||  Change History :
36   ||  Who             When            What
37   ||  (reverse chronological order - newest change first)
38   */
39 
40     CURSOR cur_old_ref_values IS
41       SELECT   *
42       FROM     igs_fi_fai_dtls
43       WHERE    rowid = x_rowid;
44 
45   BEGIN
46 
47     l_rowid := x_rowid;
48 
49     -- Code for setting the Old and New Reference Values.
50     -- Populate Old Values.
51     OPEN cur_old_ref_values;
52     FETCH cur_old_ref_values INTO old_references;
53     IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
54       CLOSE cur_old_ref_values;
55       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
56       igs_ge_msg_stack.add;
57       app_exception.raise_exception;
58       RETURN;
59     END IF;
60     CLOSE cur_old_ref_values;
61 
62     -- Populate New Values.
63     new_references.fee_as_item_dtl_id                := x_fee_as_item_dtl_id;
64     new_references.fee_ass_item_id                   := x_fee_ass_item_id;
65     new_references.fee_cat                           := x_fee_cat;
66     new_references.course_cd                         := x_course_cd;
67     new_references.crs_version_number                := x_crs_version_number;
68     new_references.unit_attempt_status               := x_unit_attempt_status;
69     new_references.org_unit_cd                       := x_org_unit_cd;
70     new_references.class_standing                    := x_class_standing;
71     new_references.location_cd                       := x_location_cd;
72     new_references.uoo_id                            := x_uoo_id;
73     new_references.unit_set_cd                       := x_unit_set_cd;
74     new_references.us_version_number                 := x_us_version_number;
75     new_references.chg_elements                      := x_chg_elements;
76 
77     IF (p_action = 'UPDATE') THEN
78       new_references.creation_date                   := old_references.creation_date;
79       new_references.created_by                      := old_references.created_by;
80     ELSE
81       new_references.creation_date                   := x_creation_date;
82       new_references.created_by                      := x_created_by;
83     END IF;
84 
85     new_references.last_update_date                  := x_last_update_date;
86     new_references.last_updated_by                   := x_last_updated_by;
87     new_references.last_update_login                 := x_last_update_login;
88 
89   END set_column_values;
90 
91 
92   PROCEDURE check_parent_existance AS
93   /*
94   ||  Created By : [email protected]
95   ||  Created On : 27-JUN-2005
96   ||  Purpose : Checks for the existance of Parent records.
97   ||  Known limitations, enhancements or remarks :
98   ||  Change History :
99   ||  Who             When            What
100   ||  (reverse chronological order - newest change first)
101   */
102   BEGIN
103 
104     IF (((old_references.fee_ass_item_id = new_references.fee_ass_item_id)) OR
105         ((new_references.fee_ass_item_id IS NULL))) THEN
106       NULL;
107     ELSIF NOT igs_fi_fee_as_items_pkg.get_pk_for_validation (
108                 new_references.fee_ass_item_id
109               ) THEN
110       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
111       igs_ge_msg_stack.add;
112       app_exception.raise_exception;
113     END IF;
114 
115     IF (((old_references.unit_set_cd = new_references.unit_set_cd) AND
116          (old_references.us_version_number = new_references.us_version_number)) OR
117         ((new_references.unit_set_cd IS NULL) OR
118          (new_references.us_version_number IS NULL))) THEN
119       NULL;
120     ELSIF NOT igs_en_unit_set_pkg.get_pk_for_validation (
121                 new_references.unit_set_cd,
122                 new_references.us_version_number
123               ) THEN
124       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
125       igs_ge_msg_stack.add;
126       app_exception.raise_exception;
127     END IF;
128 
129     IF (((old_references.uoo_id = new_references.uoo_id)) OR
130         ((new_references.uoo_id IS NULL))) THEN
131       NULL;
132     ELSIF NOT igs_ps_unit_ofr_opt_pkg.get_uk_for_validation (
133                 new_references.uoo_id
134               ) THEN
135       fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
136       igs_ge_msg_stack.add;
137       app_exception.raise_exception;
138     END IF;
139 
140   END check_parent_existance;
141 
142 
143   FUNCTION get_pk_for_validation (
144     x_fee_as_item_dtl_id                IN     NUMBER
145   ) RETURN BOOLEAN AS
146   /*
147   ||  Created By : [email protected]
148   ||  Created On : 27-JUN-2005
149   ||  Purpose : Validates the Primary Key of the table.
150   ||  Known limitations, enhancements or remarks :
151   ||  Change History :
152   ||  Who             When            What
153   ||  (reverse chronological order - newest change first)
154   */
155     CURSOR cur_rowid IS
156       SELECT   rowid
157       FROM     igs_fi_fai_dtls
158       WHERE    fee_as_item_dtl_id = x_fee_as_item_dtl_id
159       FOR UPDATE NOWAIT;
160 
161     lv_rowid cur_rowid%RowType;
162 
163   BEGIN
164 
165     OPEN cur_rowid;
166     FETCH cur_rowid INTO lv_rowid;
167     IF (cur_rowid%FOUND) THEN
168       CLOSE cur_rowid;
169       RETURN(TRUE);
170     ELSE
171       CLOSE cur_rowid;
172       RETURN(FALSE);
173     END IF;
174 
175   END get_pk_for_validation;
176 
177   PROCEDURE before_dml (
178     p_action                            IN     VARCHAR2,
179     x_rowid                             IN     VARCHAR2,
180     x_fee_as_item_dtl_id                IN     NUMBER,
181     x_fee_ass_item_id                   IN     NUMBER,
182     x_fee_cat                           IN     VARCHAR2,
183     x_course_cd                         IN     VARCHAR2,
184     x_crs_version_number                IN     NUMBER,
185     x_unit_attempt_status               IN     VARCHAR2,
186     x_org_unit_cd                       IN     VARCHAR2,
187     x_class_standing                    IN     VARCHAR2,
188     x_location_cd                       IN     VARCHAR2,
189     x_uoo_id                            IN     NUMBER,
190     x_unit_set_cd                       IN     VARCHAR2,
191     x_us_version_number                 IN     NUMBER,
192     x_chg_elements                      IN     NUMBER,
193     x_creation_date                     IN     DATE,
194     x_created_by                        IN     NUMBER,
195     x_last_update_date                  IN     DATE,
196     x_last_updated_by                   IN     NUMBER,
197     x_last_update_login                 IN     NUMBER
198   ) AS
199   /*
200   ||  Created By : [email protected]
201   ||  Created On : 27-JUN-2005
202   ||  Purpose : Initialises the columns, Checks Constraints, Calls the
203   ||            Trigger Handlers for the table, before any DML operation.
204   ||  Known limitations, enhancements or remarks :
205   ||  Change History :
206   ||  Who             When            What
207   ||  (reverse chronological order - newest change first)
208   */
209   BEGIN
210 
211     set_column_values (
212       p_action,
213       x_rowid,
214       x_fee_as_item_dtl_id,
215       x_fee_ass_item_id,
216       x_fee_cat,
217       x_course_cd,
218       x_crs_version_number,
219       x_unit_attempt_status,
220       x_org_unit_cd,
221       x_class_standing,
222       x_location_cd,
223       x_uoo_id,
224       x_unit_set_cd,
225       x_us_version_number,
226       x_chg_elements,
227       x_creation_date,
228       x_created_by,
229       x_last_update_date,
230       x_last_updated_by,
231       x_last_update_login
232     );
233 
234     IF (p_action = 'INSERT') THEN
235       -- Call all the procedures related to Before Insert.
236       IF ( get_pk_for_validation(
237              new_references.fee_as_item_dtl_id
238            )
239          ) THEN
240         fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
241         igs_ge_msg_stack.add;
242         app_exception.raise_exception;
243       END IF;
244       check_parent_existance;
245     ELSIF (p_action = 'UPDATE') THEN
246       -- Call all the procedures related to Before Update.
247       check_parent_existance;
248     ELSIF (p_action = 'VALIDATE_INSERT') THEN
249       -- Call all the procedures related to Before Insert.
250       IF ( get_pk_for_validation (
251              new_references.fee_as_item_dtl_id
252            )
253          ) THEN
254         fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
255         igs_ge_msg_stack.add;
256         app_exception.raise_exception;
257       END IF;
258     END IF;
259 
260   END before_dml;
261 
262 
263   PROCEDURE insert_row (
264     x_rowid                             IN OUT NOCOPY VARCHAR2,
265     x_fee_as_item_dtl_id                IN OUT NOCOPY NUMBER,
266     x_fee_ass_item_id                   IN     NUMBER,
267     x_fee_cat                           IN     VARCHAR2,
268     x_course_cd                         IN     VARCHAR2,
269     x_crs_version_number                IN     NUMBER,
270     x_unit_attempt_status               IN     VARCHAR2,
271     x_org_unit_cd                       IN     VARCHAR2,
272     x_class_standing                    IN     VARCHAR2,
273     x_location_cd                       IN     VARCHAR2,
274     x_uoo_id                            IN     NUMBER,
275     x_unit_set_cd                       IN     VARCHAR2,
276     x_us_version_number                 IN     NUMBER,
277     x_chg_elements                      IN     NUMBER,
278     x_mode                              IN     VARCHAR2
279   ) AS
280   /*
281   ||  Created By : [email protected]
282   ||  Created On : 27-JUN-2005
283   ||  Purpose : Handles the INSERT DML logic for the table.
284   ||  Known limitations, enhancements or remarks :
285   ||  Change History :
286   ||  Who             When            What
287   ||  (reverse chronological order - newest change first)
288   */
289 
290     x_last_update_date           DATE;
291     x_last_updated_by            NUMBER;
292     x_last_update_login          NUMBER;
293 
294   BEGIN
295 
296     x_last_update_date := SYSDATE;
297     IF (x_mode = 'I') THEN
298       x_last_updated_by := 1;
299       x_last_update_login := 0;
300     ELSIF (x_mode = 'R') THEN
301       x_last_updated_by := fnd_global.user_id;
302       IF (x_last_updated_by IS NULL) THEN
303         x_last_updated_by := -1;
304       END IF;
305       x_last_update_login := fnd_global.login_id;
306       IF (x_last_update_login IS NULL) THEN
307         x_last_update_login := -1;
308       END IF;
309     ELSE
310       fnd_message.set_name ('FND', 'SYSTEM-INVALID ARGS');
311       fnd_message.set_token ('ROUTINE', 'IGS_FI_FAI_DTLS_PKG.INSERT_ROW');
312       igs_ge_msg_stack.add;
313       app_exception.raise_exception;
314     END IF;
315 
316     x_fee_as_item_dtl_id := NULL;
317 
318     before_dml(
319       p_action                            => 'INSERT',
320       x_rowid                             => x_rowid,
321       x_fee_as_item_dtl_id                => x_fee_as_item_dtl_id,
322       x_fee_ass_item_id                   => x_fee_ass_item_id,
323       x_fee_cat                           => x_fee_cat,
324       x_course_cd                         => x_course_cd,
325       x_crs_version_number                => x_crs_version_number,
326       x_unit_attempt_status               => x_unit_attempt_status,
327       x_org_unit_cd                       => x_org_unit_cd,
328       x_class_standing                    => x_class_standing,
329       x_location_cd                       => x_location_cd,
330       x_uoo_id                            => x_uoo_id,
331       x_unit_set_cd                       => x_unit_set_cd,
332       x_us_version_number                 => x_us_version_number,
333       x_chg_elements                      => x_chg_elements,
334       x_creation_date                     => x_last_update_date,
335       x_created_by                        => x_last_updated_by,
336       x_last_update_date                  => x_last_update_date,
337       x_last_updated_by                   => x_last_updated_by,
338       x_last_update_login                 => x_last_update_login
339     );
340 
341     INSERT INTO igs_fi_fai_dtls (
342       fee_as_item_dtl_id,
343       fee_ass_item_id,
344       fee_cat,
345       course_cd,
346       crs_version_number,
347       unit_attempt_status,
348       org_unit_cd,
349       class_standing,
350       location_cd,
351       uoo_id,
352       unit_set_cd,
353       us_version_number,
354       chg_elements,
355       creation_date,
356       created_by,
357       last_update_date,
358       last_updated_by,
359       last_update_login
360     ) VALUES (
361       igs_fi_fai_dtls_s.NEXTVAL,
362       new_references.fee_ass_item_id,
363       new_references.fee_cat,
364       new_references.course_cd,
365       new_references.crs_version_number,
366       new_references.unit_attempt_status,
367       new_references.org_unit_cd,
368       new_references.class_standing,
369       new_references.location_cd,
370       new_references.uoo_id,
371       new_references.unit_set_cd,
372       new_references.us_version_number,
373       new_references.chg_elements,
374       x_last_update_date,
375       x_last_updated_by,
376       x_last_update_date,
377       x_last_updated_by,
378       x_last_update_login
379     ) RETURNING ROWID, fee_as_item_dtl_id INTO x_rowid, x_fee_as_item_dtl_id;
380 
381   END insert_row;
382 
383 
384   PROCEDURE lock_row (
385     x_rowid                             IN     VARCHAR2,
386     x_fee_as_item_dtl_id                IN     NUMBER,
387     x_fee_ass_item_id                   IN     NUMBER,
388     x_fee_cat                           IN     VARCHAR2,
389     x_course_cd                         IN     VARCHAR2,
390     x_crs_version_number                IN     NUMBER,
391     x_unit_attempt_status               IN     VARCHAR2,
392     x_org_unit_cd                       IN     VARCHAR2,
393     x_class_standing                    IN     VARCHAR2,
394     x_location_cd                       IN     VARCHAR2,
395     x_uoo_id                            IN     NUMBER,
396     x_unit_set_cd                       IN     VARCHAR2,
397     x_us_version_number                 IN     NUMBER,
398     x_chg_elements                      IN     NUMBER
399   ) AS
400   /*
401   ||  Created By : [email protected]
402   ||  Created On : 27-JUN-2005
403   ||  Purpose : Handles the LOCK mechanism for the table.
404   ||  Known limitations, enhancements or remarks :
405   ||  Change History :
406   ||  Who             When            What
407   ||  (reverse chronological order - newest change first)
408   */
409     CURSOR c1 IS
410       SELECT
411         fee_ass_item_id,
412         fee_cat,
413         course_cd,
414         crs_version_number,
415         unit_attempt_status,
416         org_unit_cd,
417         class_standing,
418         location_cd,
419         uoo_id,
420         unit_set_cd,
421         us_version_number,
422         chg_elements
423       FROM  igs_fi_fai_dtls
424       WHERE rowid = x_rowid
425       FOR UPDATE NOWAIT;
426 
427     tlinfo c1%ROWTYPE;
428 
429   BEGIN
430 
431     OPEN c1;
432     FETCH c1 INTO tlinfo;
433     IF (c1%notfound) THEN
434       fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
435       igs_ge_msg_stack.add;
436       CLOSE c1;
437       app_exception.raise_exception;
438       RETURN;
439     END IF;
440     CLOSE c1;
441 
442     IF (
443         (tlinfo.fee_ass_item_id = x_fee_ass_item_id)
444         AND (tlinfo.fee_cat = x_fee_cat)
445         AND (tlinfo.course_cd = x_course_cd)
446         AND (tlinfo.crs_version_number = x_crs_version_number)
447         AND (tlinfo.unit_attempt_status = x_unit_attempt_status)
448         AND ((tlinfo.org_unit_cd = x_org_unit_cd) OR ((tlinfo.org_unit_cd IS NULL) AND (X_org_unit_cd IS NULL)))
449         AND ((tlinfo.class_standing = x_class_standing) OR ((tlinfo.class_standing IS NULL) AND (X_class_standing IS NULL)))
450         AND (tlinfo.location_cd = x_location_cd)
451         AND (tlinfo.uoo_id = x_uoo_id)
452         AND ((tlinfo.unit_set_cd = x_unit_set_cd) OR ((tlinfo.unit_set_cd IS NULL) AND (X_unit_set_cd IS NULL)))
453         AND ((tlinfo.us_version_number = x_us_version_number) OR ((tlinfo.us_version_number IS NULL) AND (X_us_version_number IS NULL)))
454         AND ((tlinfo.chg_elements = x_chg_elements) OR ((tlinfo.chg_elements IS NULL) AND (X_chg_elements IS NULL)))
455        ) THEN
456       NULL;
457     ELSE
458       fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
459       igs_ge_msg_stack.add;
460       app_exception.raise_exception;
461     END IF;
462 
463     RETURN;
464 
465   END lock_row;
466 
467 
468   PROCEDURE update_row (
469     x_rowid                             IN     VARCHAR2,
470     x_fee_as_item_dtl_id                IN     NUMBER,
471     x_fee_ass_item_id                   IN     NUMBER,
472     x_fee_cat                           IN     VARCHAR2,
473     x_course_cd                         IN     VARCHAR2,
474     x_crs_version_number                IN     NUMBER,
475     x_unit_attempt_status               IN     VARCHAR2,
476     x_org_unit_cd                       IN     VARCHAR2,
477     x_class_standing                    IN     VARCHAR2,
478     x_location_cd                       IN     VARCHAR2,
479     x_uoo_id                            IN     NUMBER,
480     x_unit_set_cd                       IN     VARCHAR2,
481     x_us_version_number                 IN     NUMBER,
482     x_chg_elements                      IN     NUMBER,
483     x_mode                              IN     VARCHAR2
484   ) AS
485   /*
486   ||  Created By : [email protected]
487   ||  Created On : 27-JUN-2005
488   ||  Purpose : Handles the UPDATE DML logic for the table.
489   ||  Known limitations, enhancements or remarks :
490   ||  Change History :
491   ||  Who             When            What
492   ||  (reverse chronological order - newest change first)
493   */
494     x_last_update_date           DATE ;
495     x_last_updated_by            NUMBER;
496     x_last_update_login          NUMBER;
497 
498   BEGIN
499 
500     x_last_update_date := SYSDATE;
501     IF (X_MODE = 'I') THEN
502       x_last_updated_by := 1;
503       x_last_update_login := 0;
504     ELSIF (x_mode = 'R') THEN
505       x_last_updated_by := fnd_global.user_id;
506       IF x_last_updated_by IS NULL THEN
507         x_last_updated_by := -1;
508       END IF;
509       x_last_update_login := fnd_global.login_id;
510       IF (x_last_update_login IS NULL) THEN
511         x_last_update_login := -1;
512       END IF;
513     ELSE
514       fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
515       fnd_message.set_token ('ROUTINE', 'IGS_FI_FAI_DTLS_PKG.UPDATE_ROW');
516       igs_ge_msg_stack.add;
517       app_exception.raise_exception;
518     END IF;
519 
520     before_dml(
521       p_action                            => 'UPDATE',
522       x_rowid                             => x_rowid,
523       x_fee_as_item_dtl_id                => x_fee_as_item_dtl_id,
524       x_fee_ass_item_id                   => x_fee_ass_item_id,
525       x_fee_cat                           => x_fee_cat,
526       x_course_cd                         => x_course_cd,
527       x_crs_version_number                => x_crs_version_number,
528       x_unit_attempt_status               => x_unit_attempt_status,
529       x_org_unit_cd                       => x_org_unit_cd,
530       x_class_standing                    => x_class_standing,
531       x_location_cd                       => x_location_cd,
532       x_uoo_id                            => x_uoo_id,
533       x_unit_set_cd                       => x_unit_set_cd,
534       x_us_version_number                 => x_us_version_number,
535       x_chg_elements                      => x_chg_elements,
536       x_creation_date                     => x_last_update_date,
537       x_created_by                        => x_last_updated_by,
538       x_last_update_date                  => x_last_update_date,
539       x_last_updated_by                   => x_last_updated_by,
540       x_last_update_login                 => x_last_update_login
541     );
542 
543     UPDATE igs_fi_fai_dtls
544       SET
545         fee_ass_item_id                   = new_references.fee_ass_item_id,
546         fee_cat                           = new_references.fee_cat,
547         course_cd                         = new_references.course_cd,
548         crs_version_number                = new_references.crs_version_number,
549         unit_attempt_status               = new_references.unit_attempt_status,
550         org_unit_cd                       = new_references.org_unit_cd,
551         class_standing                    = new_references.class_standing,
552         location_cd                       = new_references.location_cd,
553         uoo_id                            = new_references.uoo_id,
554         unit_set_cd                       = new_references.unit_set_cd,
555         us_version_number                 = new_references.us_version_number,
556         chg_elements                      = new_references.chg_elements,
557         last_update_date                  = x_last_update_date,
558         last_updated_by                   = x_last_updated_by,
559         last_update_login                 = x_last_update_login
560       WHERE rowid = x_rowid;
561 
562     IF (SQL%NOTFOUND) THEN
563       RAISE NO_DATA_FOUND;
564     END IF;
565 
566   END update_row;
567 
568 
569   PROCEDURE add_row (
570     x_rowid                             IN OUT NOCOPY VARCHAR2,
571     x_fee_as_item_dtl_id                IN OUT NOCOPY NUMBER,
572     x_fee_ass_item_id                   IN     NUMBER,
573     x_fee_cat                           IN     VARCHAR2,
574     x_course_cd                         IN     VARCHAR2,
575     x_crs_version_number                IN     NUMBER,
576     x_unit_attempt_status               IN     VARCHAR2,
577     x_org_unit_cd                       IN     VARCHAR2,
578     x_class_standing                    IN     VARCHAR2,
579     x_location_cd                       IN     VARCHAR2,
580     x_uoo_id                            IN     NUMBER,
581     x_unit_set_cd                       IN     VARCHAR2,
582     x_us_version_number                 IN     NUMBER,
583     x_chg_elements                      IN     NUMBER,
584     x_mode                              IN     VARCHAR2
585   ) AS
586   /*
587   ||  Created By : [email protected]
588   ||  Created On : 27-JUN-2005
589   ||  Purpose : Adds a row if there is no existing row, otherwise updates existing row in the table.
590   ||  Known limitations, enhancements or remarks :
591   ||  Change History :
592   ||  Who             When            What
593   ||  (reverse chronological order - newest change first)
594   */
595     CURSOR c1 IS
596       SELECT   rowid
597       FROM     igs_fi_fai_dtls
598       WHERE    fee_as_item_dtl_id                = x_fee_as_item_dtl_id;
599 
600   BEGIN
601 
602     OPEN c1;
603     FETCH c1 INTO x_rowid;
604     IF (c1%NOTFOUND) THEN
605       CLOSE c1;
606 
607       insert_row (
608         x_rowid,
609         x_fee_as_item_dtl_id,
610         x_fee_ass_item_id,
611         x_fee_cat,
612         x_course_cd,
613         x_crs_version_number,
614         x_unit_attempt_status,
615         x_org_unit_cd,
616         x_class_standing,
617         x_location_cd,
618         x_uoo_id,
619         x_unit_set_cd,
620         x_us_version_number,
621         x_chg_elements,
622         x_mode
623       );
624       RETURN;
625     END IF;
626     CLOSE c1;
627 
628     update_row (
629       x_rowid,
630       x_fee_as_item_dtl_id,
631       x_fee_ass_item_id,
632       x_fee_cat,
633       x_course_cd,
634       x_crs_version_number,
635       x_unit_attempt_status,
636       x_org_unit_cd,
637       x_class_standing,
638       x_location_cd,
639       x_uoo_id,
640       x_unit_set_cd,
641       x_us_version_number,
642       x_chg_elements,
643       x_mode
644     );
645 
646   END add_row;
647 
648 
649   PROCEDURE delete_row (
650     x_rowid IN VARCHAR2
651   ) AS
652   /*
653   ||  Created By : [email protected]
654   ||  Created On : 27-JUN-2005
655   ||  Purpose : Handles the DELETE DML logic for the table.
656   ||  Known limitations, enhancements or remarks :
657   ||  Change History :
658   ||  Who             When            What
659   ||  (reverse chronological order - newest change first)
660   */
661   BEGIN
662 
663     before_dml (
664       p_action => 'DELETE',
665       x_rowid => x_rowid
666     );
667 
668     DELETE FROM igs_fi_fai_dtls
669     WHERE rowid = x_rowid;
670 
671     IF (SQL%NOTFOUND) THEN
672       RAISE NO_DATA_FOUND;
673     END IF;
674 
675   END delete_row;
676 
677 
678 END igs_fi_fai_dtls_pkg;