[Home] [Help]
PACKAGE BODY: APPS.IGF_AW_FISAP_REP_PKG
Source
1 PACKAGE BODY igf_aw_fisap_rep_pkg AS
2 /* $Header: IGFWI74B.pls 120.0 2005/09/13 09:52:46 appldev noship $ */
3
4 l_rowid VARCHAR2(25);
5 old_references igf_aw_fisap_rep%ROWTYPE;
6 new_references igf_aw_fisap_rep%ROWTYPE;
7
8 PROCEDURE set_column_values (
9 p_action IN VARCHAR2,
10 x_rowid IN VARCHAR2,
11 x_fisap_dtls_id IN NUMBER,
12 x_batch_id IN NUMBER,
13 x_isir_id IN NUMBER,
14 x_dependency_status IN VARCHAR2,
15 x_career_level IN VARCHAR2,
16 x_auto_zero_efc_flag IN VARCHAR2,
17 x_fisap_income_amt IN NUMBER,
18 x_enrollment_status IN VARCHAR2,
19 x_perkins_disb_amt IN NUMBER,
20 x_fws_disb_amt IN NUMBER,
21 x_fseog_disb_amt IN NUMBER,
22 x_part_ii_section_f_flag IN VARCHAR2,
23 x_part_vi_section_a_flag IN VARCHAR2,
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 : Uday Kiran Reddy
32 || Created On : 13-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 igf_aw_fisap_rep
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.fisap_dtls_id := x_fisap_dtls_id;
64 new_references.batch_id := x_batch_id;
65 new_references.isir_id := x_isir_id;
66 new_references.dependency_status := x_dependency_status;
67 new_references.career_level := x_career_level;
68 new_references.auto_zero_efc_flag := x_auto_zero_efc_flag;
69 new_references.fisap_income_amt := x_fisap_income_amt;
70 new_references.enrollment_status := x_enrollment_status;
71 new_references.perkins_disb_amt := x_perkins_disb_amt;
72 new_references.fws_disb_amt := x_fws_disb_amt;
73 new_references.fseog_disb_amt := x_fseog_disb_amt;
74 new_references.part_ii_section_f_flag := x_part_ii_section_f_flag;
75 new_references.part_vi_section_a_flag := x_part_vi_section_a_flag;
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 : Uday Kiran Reddy
95 || Created On : 13-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.batch_id = new_references.batch_id)) OR
105 ((new_references.batch_id IS NULL))) THEN
106 NULL;
107 ELSIF NOT igf_aw_fisap_batch_pkg.get_pk_for_validation (
108 new_references.batch_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 END check_parent_existance;
116
117
118 FUNCTION get_pk_for_validation (
119 x_fisap_dtls_id IN NUMBER
120 ) RETURN BOOLEAN AS
121 /*
122 || Created By : Uday Kiran Reddy
123 || Created On : 13-JUN-2005
124 || Purpose : Validates the Primary Key of the table.
125 || Known limitations, enhancements or remarks :
126 || Change History :
127 || Who When What
128 || (reverse chronological order - newest change first)
129 */
130 CURSOR cur_rowid IS
131 SELECT rowid
132 FROM igf_aw_fisap_rep
133 WHERE fisap_dtls_id = x_fisap_dtls_id
134 FOR UPDATE NOWAIT;
135
136 lv_rowid cur_rowid%RowType;
137
138 BEGIN
139
140 OPEN cur_rowid;
141 FETCH cur_rowid INTO lv_rowid;
142 IF (cur_rowid%FOUND) THEN
143 CLOSE cur_rowid;
144 RETURN(TRUE);
145 ELSE
146 CLOSE cur_rowid;
147 RETURN(FALSE);
148 END IF;
149
150 END get_pk_for_validation;
151
152
153 PROCEDURE get_fk_igf_aw_fisap_batch (
154 x_batch_id IN NUMBER
155 ) AS
156 /*
157 || Created By : Uday Kiran Reddy
158 || Created On : 13-JUN-2005
159 || Purpose : Validates the Foreign Keys for the table.
160 || Known limitations, enhancements or remarks :
161 || Change History :
162 || Who When What
163 || (reverse chronological order - newest change first)
164 */
165 CURSOR cur_rowid IS
166 SELECT rowid
167 FROM igf_aw_fisap_rep
168 WHERE ((batch_id = x_batch_id));
169
170 lv_rowid cur_rowid%RowType;
171
172 BEGIN
173
174 OPEN cur_rowid;
175 FETCH cur_rowid INTO lv_rowid;
176 IF (cur_rowid%FOUND) THEN
177 CLOSE cur_rowid;
178 fnd_message.set_name ('IGS', 'IGS_FOREIGN_KEY_REFERENCE');
179 igs_ge_msg_stack.add;
180 app_exception.raise_exception;
181 RETURN;
182 END IF;
183 CLOSE cur_rowid;
184
185 END get_fk_igf_aw_fisap_batch;
186
187
188 PROCEDURE before_dml (
189 p_action IN VARCHAR2,
190 x_rowid IN VARCHAR2,
191 x_fisap_dtls_id IN NUMBER,
192 x_batch_id IN NUMBER,
193 x_isir_id IN NUMBER,
194 x_dependency_status IN VARCHAR2,
195 x_career_level IN VARCHAR2,
196 x_auto_zero_efc_flag IN VARCHAR2,
197 x_fisap_income_amt IN NUMBER,
198 x_enrollment_status IN VARCHAR2,
199 x_perkins_disb_amt IN NUMBER,
200 x_fws_disb_amt IN NUMBER,
201 x_fseog_disb_amt IN NUMBER,
202 x_part_ii_section_f_flag IN VARCHAR2,
203 x_part_vi_section_a_flag IN VARCHAR2,
204 x_creation_date IN DATE,
205 x_created_by IN NUMBER,
206 x_last_update_date IN DATE,
207 x_last_updated_by IN NUMBER,
208 x_last_update_login IN NUMBER
209 ) AS
210 /*
211 || Created By : Uday Kiran Reddy
212 || Created On : 13-JUN-2005
213 || Purpose : Initialises the columns, Checks Constraints, Calls the
214 || Trigger Handlers for the table, before any DML operation.
215 || Known limitations, enhancements or remarks :
216 || Change History :
217 || Who When What
218 || (reverse chronological order - newest change first)
219 */
220 BEGIN
221
222 set_column_values (
223 p_action,
224 x_rowid,
225 x_fisap_dtls_id,
226 x_batch_id,
227 x_isir_id,
228 x_dependency_status,
229 x_career_level,
230 x_auto_zero_efc_flag,
231 x_fisap_income_amt,
232 x_enrollment_status,
233 x_perkins_disb_amt,
234 x_fws_disb_amt,
235 x_fseog_disb_amt,
236 x_part_ii_section_f_flag,
237 x_part_vi_section_a_flag,
238 x_creation_date,
239 x_created_by,
240 x_last_update_date,
241 x_last_updated_by,
242 x_last_update_login
243 );
244
245 IF (p_action = 'INSERT') THEN
246 -- Call all the procedures related to Before Insert.
247 IF ( get_pk_for_validation(
248 new_references.fisap_dtls_id
249 )
250 ) THEN
251 fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
252 igs_ge_msg_stack.add;
253 app_exception.raise_exception;
254 END IF;
255 check_parent_existance;
256 ELSIF (p_action = 'UPDATE') THEN
257 -- Call all the procedures related to Before Update.
258 check_parent_existance;
259 ELSIF (p_action = 'VALIDATE_INSERT') THEN
260 -- Call all the procedures related to Before Insert.
261 IF ( get_pk_for_validation (
262 new_references.fisap_dtls_id
263 )
264 ) THEN
265 fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
266 igs_ge_msg_stack.add;
267 app_exception.raise_exception;
268 END IF;
269 END IF;
270
271 END before_dml;
272
273
274 PROCEDURE insert_row (
275 x_rowid IN OUT NOCOPY VARCHAR2,
276 x_fisap_dtls_id IN OUT NOCOPY NUMBER,
277 x_batch_id IN NUMBER,
278 x_isir_id IN NUMBER,
279 x_dependency_status IN VARCHAR2,
280 x_career_level IN VARCHAR2,
281 x_auto_zero_efc_flag IN VARCHAR2,
282 x_fisap_income_amt IN NUMBER,
283 x_enrollment_status IN VARCHAR2,
284 x_perkins_disb_amt IN NUMBER,
285 x_fws_disb_amt IN NUMBER,
286 x_fseog_disb_amt IN NUMBER,
287 x_part_ii_section_f_flag IN VARCHAR2,
288 x_part_vi_section_a_flag IN VARCHAR2,
289 x_mode IN VARCHAR2
290 ) AS
291 /*
292 || Created By : Uday Kiran Reddy
293 || Created On : 13-JUN-2005
294 || Purpose : Handles the INSERT DML logic for the table.
295 || Known limitations, enhancements or remarks :
296 || Change History :
297 || Who When What
298 || (reverse chronological order - newest change first)
299 */
300
301 x_last_update_date DATE;
302 x_last_updated_by NUMBER;
303 x_last_update_login NUMBER;
304 x_request_id NUMBER;
305 x_program_id NUMBER;
306 x_program_application_id NUMBER;
307 x_program_update_date DATE;
308
309 BEGIN
310
311 x_last_update_date := SYSDATE;
312 IF (x_mode = 'I') THEN
313 x_last_updated_by := 1;
314 x_last_update_login := 0;
315 ELSIF (x_mode = 'R') THEN
316 x_last_updated_by := fnd_global.user_id;
317 IF (x_last_updated_by IS NULL) THEN
318 x_last_updated_by := -1;
319 END IF;
320 x_last_update_login := fnd_global.login_id;
321 IF (x_last_update_login IS NULL) THEN
322 x_last_update_login := -1;
323 END IF;
324 x_request_id := fnd_global.conc_request_id;
325 x_program_id := fnd_global.conc_program_id;
326 x_program_application_id := fnd_global.prog_appl_id;
327
328 IF (x_request_id = -1) THEN
329 x_request_id := NULL;
330 x_program_id := NULL;
331 x_program_application_id := NULL;
332 x_program_update_date := NULL;
333 ELSE
334 x_program_update_date := SYSDATE;
335 END IF;
336 ELSE
337 fnd_message.set_name ('FND', 'SYSTEM-INVALID ARGS');
338 fnd_message.set_token ('ROUTINE', 'IGF_AW_FISAP_REP_PKG.INSERT_ROW');
339 igs_ge_msg_stack.add;
340 app_exception.raise_exception;
341 END IF;
342
343 x_fisap_dtls_id := NULL;
344
345 before_dml(
346 p_action => 'INSERT',
347 x_rowid => x_rowid,
348 x_fisap_dtls_id => x_fisap_dtls_id,
349 x_batch_id => x_batch_id,
350 x_isir_id => x_isir_id,
351 x_dependency_status => x_dependency_status,
352 x_career_level => x_career_level,
353 x_auto_zero_efc_flag => x_auto_zero_efc_flag,
354 x_fisap_income_amt => x_fisap_income_amt,
355 x_enrollment_status => x_enrollment_status,
356 x_perkins_disb_amt => x_perkins_disb_amt,
357 x_fws_disb_amt => x_fws_disb_amt,
358 x_fseog_disb_amt => x_fseog_disb_amt,
359 x_part_ii_section_f_flag => x_part_ii_section_f_flag,
360 x_part_vi_section_a_flag => x_part_vi_section_a_flag,
364 x_last_updated_by => x_last_updated_by,
361 x_creation_date => x_last_update_date,
362 x_created_by => x_last_updated_by,
363 x_last_update_date => x_last_update_date,
365 x_last_update_login => x_last_update_login
366 );
367
368 INSERT INTO igf_aw_fisap_rep (
369 fisap_dtls_id,
370 batch_id,
371 isir_id,
372 dependency_status,
373 career_level,
374 auto_zero_efc_flag,
375 fisap_income_amt,
376 enrollment_status,
377 perkins_disb_amt,
378 fws_disb_amt,
379 fseog_disb_amt,
380 part_ii_section_f_flag,
381 part_vi_section_a_flag,
382 creation_date,
383 created_by,
384 last_update_date,
385 last_updated_by,
386 last_update_login,
387 request_id,
388 program_id,
389 program_application_id,
390 program_update_date
391 ) VALUES (
392 igf_aw_fisap_rep_s.NEXTVAL,
393 new_references.batch_id,
394 new_references.isir_id,
395 new_references.dependency_status,
396 new_references.career_level,
397 new_references.auto_zero_efc_flag,
398 new_references.fisap_income_amt,
399 new_references.enrollment_status,
400 new_references.perkins_disb_amt,
401 new_references.fws_disb_amt,
402 new_references.fseog_disb_amt,
403 new_references.part_ii_section_f_flag,
404 new_references.part_vi_section_a_flag,
405 x_last_update_date,
406 x_last_updated_by,
407 x_last_update_date,
408 x_last_updated_by,
409 x_last_update_login ,
410 x_request_id,
411 x_program_id,
412 x_program_application_id,
413 x_program_update_date
414 ) RETURNING ROWID, fisap_dtls_id INTO x_rowid, x_fisap_dtls_id;
415
416 END insert_row;
417
418
419 PROCEDURE lock_row (
420 x_rowid IN VARCHAR2,
421 x_fisap_dtls_id IN NUMBER,
422 x_batch_id IN NUMBER,
423 x_isir_id IN NUMBER,
424 x_dependency_status IN VARCHAR2,
425 x_career_level IN VARCHAR2,
426 x_auto_zero_efc_flag IN VARCHAR2,
427 x_fisap_income_amt IN NUMBER,
428 x_enrollment_status IN VARCHAR2,
429 x_perkins_disb_amt IN NUMBER,
430 x_fws_disb_amt IN NUMBER,
431 x_fseog_disb_amt IN NUMBER,
432 x_part_ii_section_f_flag IN VARCHAR2,
433 x_part_vi_section_a_flag IN VARCHAR2
434 ) AS
435 /*
436 || Created By : Uday Kiran Reddy
437 || Created On : 13-JUN-2005
438 || Purpose : Handles the LOCK mechanism for the table.
439 || Known limitations, enhancements or remarks :
440 || Change History :
441 || Who When What
442 || (reverse chronological order - newest change first)
443 */
444 CURSOR c1 IS
445 SELECT
446 batch_id,
447 isir_id,
448 dependency_status,
449 career_level,
450 auto_zero_efc_flag,
451 fisap_income_amt,
452 enrollment_status,
453 perkins_disb_amt,
454 fws_disb_amt,
455 fseog_disb_amt,
456 part_ii_section_f_flag,
457 part_vi_section_a_flag
458 FROM igf_aw_fisap_rep
459 WHERE rowid = x_rowid
460 FOR UPDATE NOWAIT;
461
462 tlinfo c1%ROWTYPE;
463
464 BEGIN
465
466 OPEN c1;
467 FETCH c1 INTO tlinfo;
468 IF (c1%notfound) THEN
469 fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
470 igs_ge_msg_stack.add;
471 CLOSE c1;
472 app_exception.raise_exception;
473 RETURN;
474 END IF;
475 CLOSE c1;
476
477 IF (
478 (tlinfo.batch_id = x_batch_id)
479 AND (tlinfo.isir_id = x_isir_id)
480 AND (tlinfo.dependency_status = x_dependency_status)
481 AND (tlinfo.career_level = x_career_level)
482 AND (tlinfo.auto_zero_efc_flag = x_auto_zero_efc_flag)
483 AND (tlinfo.fisap_income_amt = x_fisap_income_amt)
484 AND ((tlinfo.enrollment_status = x_enrollment_status) OR ((tlinfo.enrollment_status IS NULL) AND (X_enrollment_status IS NULL)))
485 AND ((tlinfo.perkins_disb_amt = x_perkins_disb_amt) OR ((tlinfo.perkins_disb_amt IS NULL) AND (X_perkins_disb_amt IS NULL)))
486 AND ((tlinfo.fws_disb_amt = x_fws_disb_amt) OR ((tlinfo.fws_disb_amt IS NULL) AND (X_fws_disb_amt IS NULL)))
487 AND ((tlinfo.fseog_disb_amt = x_fseog_disb_amt) OR ((tlinfo.fseog_disb_amt IS NULL) AND (X_fseog_disb_amt IS NULL)))
488 AND ((tlinfo.part_ii_section_f_flag = x_part_ii_section_f_flag) OR ((tlinfo.part_ii_section_f_flag IS NULL) AND (X_part_ii_section_f_flag IS NULL)))
489 AND ((tlinfo.part_vi_section_a_flag = x_part_vi_section_a_flag) OR ((tlinfo.part_vi_section_a_flag IS NULL) AND (X_part_vi_section_a_flag IS NULL)))
490 ) THEN
491 NULL;
492 ELSE
493 fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
494 igs_ge_msg_stack.add;
495 app_exception.raise_exception;
496 END IF;
497
498 RETURN;
499
500 END lock_row;
501
502
503 PROCEDURE update_row (
504 x_rowid IN VARCHAR2,
505 x_fisap_dtls_id IN NUMBER,
506 x_batch_id IN NUMBER,
510 x_auto_zero_efc_flag IN VARCHAR2,
507 x_isir_id IN NUMBER,
508 x_dependency_status IN VARCHAR2,
509 x_career_level IN VARCHAR2,
511 x_fisap_income_amt IN NUMBER,
512 x_enrollment_status IN VARCHAR2,
513 x_perkins_disb_amt IN NUMBER,
514 x_fws_disb_amt IN NUMBER,
515 x_fseog_disb_amt IN NUMBER,
516 x_part_ii_section_f_flag IN VARCHAR2,
517 x_part_vi_section_a_flag IN VARCHAR2,
518 x_mode IN VARCHAR2
519 ) AS
520 /*
521 || Created By : Uday Kiran Reddy
522 || Created On : 13-JUN-2005
523 || Purpose : Handles the UPDATE DML logic for the table.
524 || Known limitations, enhancements or remarks :
525 || Change History :
526 || Who When What
527 || (reverse chronological order - newest change first)
528 */
529 x_last_update_date DATE ;
530 x_last_updated_by NUMBER;
531 x_last_update_login NUMBER;
532 x_request_id NUMBER;
533 x_program_id NUMBER;
534 x_program_application_id NUMBER;
535 x_program_update_date DATE;
536
537 BEGIN
538
539 x_last_update_date := SYSDATE;
540 IF (X_MODE = 'I') THEN
541 x_last_updated_by := 1;
542 x_last_update_login := 0;
543 ELSIF (x_mode = 'R') THEN
544 x_last_updated_by := fnd_global.user_id;
545 IF x_last_updated_by IS NULL THEN
546 x_last_updated_by := -1;
547 END IF;
548 x_last_update_login := fnd_global.login_id;
549 IF (x_last_update_login IS NULL) THEN
550 x_last_update_login := -1;
551 END IF;
552 ELSE
553 fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
554 fnd_message.set_token ('ROUTINE', 'IGF_AW_FISAP_REP_PKG.UPDATE_ROW');
555 igs_ge_msg_stack.add;
556 app_exception.raise_exception;
557 END IF;
558
559 before_dml(
560 p_action => 'UPDATE',
561 x_rowid => x_rowid,
562 x_fisap_dtls_id => x_fisap_dtls_id,
563 x_batch_id => x_batch_id,
564 x_isir_id => x_isir_id,
565 x_dependency_status => x_dependency_status,
566 x_career_level => x_career_level,
567 x_auto_zero_efc_flag => x_auto_zero_efc_flag,
568 x_fisap_income_amt => x_fisap_income_amt,
569 x_enrollment_status => x_enrollment_status,
570 x_perkins_disb_amt => x_perkins_disb_amt,
571 x_fws_disb_amt => x_fws_disb_amt,
572 x_fseog_disb_amt => x_fseog_disb_amt,
573 x_part_ii_section_f_flag => x_part_ii_section_f_flag,
574 x_part_vi_section_a_flag => x_part_vi_section_a_flag,
575 x_creation_date => x_last_update_date,
576 x_created_by => x_last_updated_by,
577 x_last_update_date => x_last_update_date,
578 x_last_updated_by => x_last_updated_by,
579 x_last_update_login => x_last_update_login
580 );
581
582 IF (x_mode = 'R') THEN
583 x_request_id := fnd_global.conc_request_id;
584 x_program_id := fnd_global.conc_program_id;
585 x_program_application_id := fnd_global.prog_appl_id;
586 IF (x_request_id = -1) THEN
587 x_request_id := old_references.request_id;
588 x_program_id := old_references.program_id;
589 x_program_application_id := old_references.program_application_id;
590 x_program_update_date := old_references.program_update_date;
591 ELSE
592 x_program_update_date := SYSDATE;
593 END IF;
594 END IF;
595
596 UPDATE igf_aw_fisap_rep
597 SET
598 batch_id = new_references.batch_id,
599 isir_id = new_references.isir_id,
600 dependency_status = new_references.dependency_status,
601 career_level = new_references.career_level,
602 auto_zero_efc_flag = new_references.auto_zero_efc_flag,
603 fisap_income_amt = new_references.fisap_income_amt,
604 enrollment_status = new_references.enrollment_status,
605 perkins_disb_amt = new_references.perkins_disb_amt,
606 fws_disb_amt = new_references.fws_disb_amt,
607 fseog_disb_amt = new_references.fseog_disb_amt,
608 part_ii_section_f_flag = new_references.part_ii_section_f_flag,
609 part_vi_section_a_flag = new_references.part_vi_section_a_flag,
610 last_update_date = x_last_update_date,
611 last_updated_by = x_last_updated_by,
612 last_update_login = x_last_update_login ,
613 request_id = x_request_id,
614 program_id = x_program_id,
615 program_application_id = x_program_application_id,
616 program_update_date = x_program_update_date
617 WHERE rowid = x_rowid;
618
619 IF (SQL%NOTFOUND) THEN
620 RAISE NO_DATA_FOUND;
621 END IF;
622
623 END update_row;
624
625
626 PROCEDURE add_row (
627 x_rowid IN OUT NOCOPY VARCHAR2,
628 x_fisap_dtls_id IN OUT NOCOPY NUMBER,
629 x_batch_id IN NUMBER,
630 x_isir_id IN NUMBER,
631 x_dependency_status IN VARCHAR2,
632 x_career_level IN VARCHAR2,
633 x_auto_zero_efc_flag IN VARCHAR2,
634 x_fisap_income_amt IN NUMBER,
635 x_enrollment_status IN VARCHAR2,
636 x_perkins_disb_amt IN NUMBER,
637 x_fws_disb_amt IN NUMBER,
638 x_fseog_disb_amt IN NUMBER,
639 x_part_ii_section_f_flag IN VARCHAR2,
640 x_part_vi_section_a_flag IN VARCHAR2,
641 x_mode IN VARCHAR2
642 ) AS
643 /*
644 || Created By : Uday Kiran Reddy
645 || Created On : 13-JUN-2005
646 || Purpose : Adds a row if there is no existing row, otherwise updates existing row in the table.
647 || Known limitations, enhancements or remarks :
648 || Change History :
649 || Who When What
650 || (reverse chronological order - newest change first)
651 */
652 CURSOR c1 IS
653 SELECT rowid
654 FROM igf_aw_fisap_rep
655 WHERE fisap_dtls_id = x_fisap_dtls_id;
656
657 BEGIN
658
659 OPEN c1;
660 FETCH c1 INTO x_rowid;
661 IF (c1%NOTFOUND) THEN
662 CLOSE c1;
663
664 insert_row (
665 x_rowid,
666 x_fisap_dtls_id,
667 x_batch_id,
668 x_isir_id,
669 x_dependency_status,
670 x_career_level,
671 x_auto_zero_efc_flag,
672 x_fisap_income_amt,
673 x_enrollment_status,
674 x_perkins_disb_amt,
675 x_fws_disb_amt,
676 x_fseog_disb_amt,
677 x_part_ii_section_f_flag,
678 x_part_vi_section_a_flag,
679 x_mode
680 );
681 RETURN;
682 END IF;
683 CLOSE c1;
684
685 update_row (
686 x_rowid,
687 x_fisap_dtls_id,
688 x_batch_id,
689 x_isir_id,
690 x_dependency_status,
691 x_career_level,
692 x_auto_zero_efc_flag,
693 x_fisap_income_amt,
694 x_enrollment_status,
695 x_perkins_disb_amt,
696 x_fws_disb_amt,
697 x_fseog_disb_amt,
698 x_part_ii_section_f_flag,
699 x_part_vi_section_a_flag,
700 x_mode
701 );
702
703 END add_row;
704
705
706 PROCEDURE delete_row (
707 x_rowid IN VARCHAR2
708 ) AS
709 /*
710 || Created By : Uday Kiran Reddy
711 || Created On : 13-JUN-2005
712 || Purpose : Handles the DELETE DML logic for the table.
713 || Known limitations, enhancements or remarks :
714 || Change History :
715 || Who When What
716 || (reverse chronological order - newest change first)
717 */
718 BEGIN
719
720 before_dml (
721 p_action => 'DELETE',
722 x_rowid => x_rowid
723 );
724
725 DELETE FROM igf_aw_fisap_rep
726 WHERE rowid = x_rowid;
727
728 IF (SQL%NOTFOUND) THEN
729 RAISE NO_DATA_FOUND;
730 END IF;
731
732 END delete_row;
733
734
735 END igf_aw_fisap_rep_pkg;