DBA Data[Home] [Help]

PACKAGE BODY: APPS.IGF_SL_CLCHRS_DTLS_PKG

Source


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