DBA Data[Home] [Help]

PACKAGE BODY: APPS.ARP_PROCESS_BATCH

Source


1 PACKAGE BODY ARP_PROCESS_BATCH AS
2 /* $Header: ARTEBATB.pls 115.5 2002/11/18 22:31:30 anukumar ship $ */
3 
4 
5 /*===========================================================================+
6  | PROCEDURE                                                                 |
7  |    check_dup_batch_name()		                                     |
8  |                                                                           |
9  | DESCRIPTION                                                               |
10  |    Determines if a given batch name exists for a given batch source.	     |
11  |                                                                           |
12  | SCOPE - PUBLIC                                                            |
13  |                                                                           |
14  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
15  |    arp_util.debug                                                         |
16  |                                                                           |
17  | ARGUMENTS  : IN:                                                          |
18  |		      p_name						     |
19  |		      p_batch_source_id					     |
20  |              OUT:                                                         |
21  |                    None                                                   |
22  |                                                                           |
23  | RETURNS    : NONE                                                         |
24  |                                                                           |
25  | NOTES                                                                     |
26  |                                                                           |
27  | MODIFICATION HISTORY                                                      |
28  |     05-JUL-95  Charlie Tomberg     Created                                |
29  |                                                                           |
30  |     16-NOV-01  Amit Bhati          Bug868793 : Changed Procedure          |
31  |                                    for making batch name unique           |
32  |                                    across all batch sources.              |
33  |                                                                           |
34  +===========================================================================*/
35 
36 
37 PROCEDURE check_dup_batch_name(p_name            IN varchar2,
38                                p_batch_source_id IN varchar2) IS
39 
40    l_count number := 0;
41 
42 BEGIN
43 
44    arp_util.debug('arp_process_batch.check_dup_batch_name()+');
45 
46 /*Where clause is changed to solve bug 868793 : now batch name should be unique across batch sources */
47    SELECT count(*)
48    INTO   l_count
49    FROM   ra_batches
50    --WHERE  batch_source_id = p_batch_source_id
51    WHERE  name = p_name;
52 
53    IF    (l_count > 0)
54    THEN  fnd_message.set_name('AR', 'AR_DUP_BATCH_NAME');
55          app_exception.raise_exception;
56    END IF;
57 
58    arp_util.debug('arp_process_batch.check_dup_batch_name()-');
59 
60 EXCEPTION
61     WHEN OTHERS THEN
62         arp_util.debug('EXCEPTION:  arp_process_batch.check_dup_batch_name()');
63 
64         arp_util.debug('');
65         arp_util.debug('------ parameters for check_dup_batch_name() -------');
66 
67         arp_util.debug('p_name             = '|| p_name);
68         arp_util.debug('p_batch_source_id  = '|| p_batch_source_id);
69 
70         RAISE;
71 
72 END;
73 
74 /*===========================================================================+
75  | PROCEDURE                                                                 |
76  |    ar_empty_batch			                                     |
77  |                                                                           |
78  | DESCRIPTION                                                               |
79  |    Validates that a batch to be deleted contains no transactions.	     |
80  |                                                                           |
81  | SCOPE - PUBLIC                                                            |
82  |                                                                           |
83  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
84  |    arp_util.debug                                                         |
85  |                                                                           |
86  | ARGUMENTS  : IN:                                                          |
87  |		      p_batch_id	 				     |
88  |              OUT:                                                         |
89  |                    None                                                   |
90  |                                                                           |
91  | RETURNS    : NONE                                                         |
92  |                                                                           |
93  | NOTES                                                                     |
94  |                                                                           |
95  | MODIFICATION HISTORY                                                      |
96  |     05-JUL-95  Charlie Tomberg     Created                                |
97  |                                                                           |
98  +===========================================================================*/
99 
100 
101 PROCEDURE ar_empty_batch ( p_batch_id IN number ) IS
102 
103    l_count number := 0;
104 
105 BEGIN
106 
107    arp_util.debug('arp_process_batch.ar_empty_batch()+');
108 
109    SELECT count(*)
110    INTO   l_count
111    FROM   ra_customer_trx
112    WHERE  batch_id = p_batch_id;
113 
114    /* Bug1894153 : Changed the message name . */
115    IF    (l_count > 0)
116    THEN  fnd_message.set_name('AR', 'AR_DELNA_TRANSACTION_EXISTS');
117          app_exception.raise_exception;
118    END IF;
119 
120    arp_util.debug('arp_process_batch.ar_empty_batch()-');
121 
122 EXCEPTION
123     WHEN OTHERS THEN
124 
125         arp_util.debug('EXCEPTION:  arp_process_batch.ar_empty_batch()');
126 
127         arp_util.debug('');
128         arp_util.debug('------ parameters for ar_empty_batch() -------');
129 
130         arp_util.debug('p_batch_id = '|| p_batch_id);
131 
132         RAISE;
133 
134 END;
135 
136 /*===========================================================================+
137  | PROCEDURE                                                                 |
138  |    val_insert_batch			                                     |
139  |                                                                           |
140  | DESCRIPTION                                                               |
141  |    Does validation that is required when a new batch is inserted.	     |
142  |                                                                           |
143  | SCOPE - PRIVATE                                                           |
144  |                                                                           |
145  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
146  |    arp_util.debug                                                         |
147  |                                                                           |
148  | ARGUMENTS  : IN:                                                          |
149  |		      p_batch_rec					     |
150  |              OUT:                                                         |
151  |                    None                                                   |
152  |                                                                           |
153  | RETURNS    : NONE                                                         |
154  |                                                                           |
155  | NOTES                                                                     |
156  |                                                                           |
157  | MODIFICATION HISTORY                                                      |
158  |     05-JUL-95  Charlie Tomberg     Created                                |
159  |                                                                           |
160  +===========================================================================*/
161 
162 
163 PROCEDURE val_insert_batch ( p_batch_rec IN ra_batches%rowtype ) IS
164 
165 
166 BEGIN
167 
168    arp_util.debug('arp_process_batch.val_insert_batch()+');
169 
170    arp_process_batch.check_dup_batch_name(p_batch_rec.name,
171                                           p_batch_rec.batch_source_id);
172 
173    arp_util.debug('arp_process_batch.val_insert_batch()-');
174 
175 EXCEPTION
176     WHEN OTHERS THEN
177         arp_util.debug('EXCEPTION:  arp_process_batch.val_insert_batch()');
178 
179         arp_util.debug('');
180         arp_util.debug('------ parameters for val_insert_batch() -------');
181 
182         arp_tbat_pkg.display_batch_rec(p_batch_rec);
183 
184         RAISE;
185 
186 END;
187 
188 /*===========================================================================+
189  | PROCEDURE                                                                 |
190  |    val_update_batch			                                     |
191  |                                                                           |
192  | DESCRIPTION                                                               |
193  |    Does validation that is required when a batch is updated.		     |
194  |                                                                           |
195  | SCOPE - PRIVATE                                                           |
196  |                                                                           |
197  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
198  |    arp_util.debug                                                         |
199  |                                                                           |
200  | ARGUMENTS  : IN:                                                          |
201  |		      p_batch_rec					     |
202  |              OUT:                                                         |
203  |                    None                                                   |
204  |                                                                           |
205  | RETURNS    : NONE                                                         |
206  |                                                                           |
207  | NOTES                                                                     |
208  |                                                                           |
209  | MODIFICATION HISTORY                                                      |
210  |     05-JUL-95  Charlie Tomberg     Created                                |
211  |                                                                           |
212  +===========================================================================*/
213 
214 
215 PROCEDURE val_update_batch ( p_batch_rec IN ra_batches%rowtype ) IS
216 
217 
218 BEGIN
219 
220    arp_util.debug('arp_process_batchval_update_batch()+');
221 
222    arp_util.debug('arp_process_batch.val_update_batch()-');
223 
224 EXCEPTION
225     WHEN OTHERS THEN
226         arp_util.debug('EXCEPTION:  arp_process_batch.val_update_batch()');
227 
228         arp_util.debug('');
229         arp_util.debug('------ parameters for val_update_batch() -------');
230 
231         arp_tbat_pkg.display_batch_rec(p_batch_rec);
232 
233         RAISE;
234 
235 END;
236 
237 /*===========================================================================+
238  | PROCEDURE                                                                 |
239  |    val_delete__batch			                                     |
240  |                                                                           |
241  | DESCRIPTION                                                               |
242  |    Does validation that is required when a batch is deleted.		     |
243  |                                                                           |
244  | SCOPE - PRIVATE                                                           |
245  |                                                                           |
246  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
247  |    arp_util.debug                                                         |
248  |                                                                           |
249  | ARGUMENTS  : IN:                                                          |
250  |		      p_batch_rec					     |
251  |              OUT:                                                         |
252  |                    None                                                   |
253  |                                                                           |
254  | RETURNS    : NONE                                                         |
255  |                                                                           |
256  | NOTES                                                                     |
257  |                                                                           |
258  | MODIFICATION HISTORY                                                      |
259  |     05-JUL-95  Charlie Tomberg     Created                                |
260  |                                                                           |
261  +===========================================================================*/
262 
263 
264 PROCEDURE val_delete_batch ( p_batch_rec IN ra_batches%rowtype ) IS
265 
266 
267 BEGIN
268 
269    arp_util.debug('arp_process_batch.val_delete_batch()+');
270 
271    -- verify that the batch does not contain any transactions
272       arp_process_batch.ar_empty_batch(p_batch_rec.batch_id);
273 
274    arp_util.debug('arp_process_batch.val_delete_batch()-');
275 
276 EXCEPTION
277     WHEN OTHERS THEN
278         arp_util.debug('EXCEPTION:  arp_process_batch.val_delete_batch()');
279 
280         arp_util.debug('');
281         arp_util.debug('------ parameters for val_delete_batch() -------');
282 
283         arp_tbat_pkg.display_batch_rec(p_batch_rec);
284 
285         RAISE;
286 
287 END;
288 
289 /*===========================================================================+
290  | PROCEDURE                                                                 |
291  |    insert_batch							     |
292  |                                                                           |
293  | DESCRIPTION                                                               |
294  |    Inserts a record into ra_batches.					     |
295  |                                                                           |
296  | SCOPE - PRIVATE                                                           |
297  |                                                                           |
298  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
299  |    arp_util.debug                                                         |
300  |                                                                           |
301  | ARGUMENTS  : IN:                                                          |
302  |		      p_form_name					     |
303  |		      p_form_version					     |
304  |		      p_batch_rec					     |
305  |              OUT:                                                         |
306  |                    P_batch_id					     |
307  |          IN/ OUT:							     |
308  |                    p_name						     |
309  |                                                                           |
310  | RETURNS    : NONE                                                         |
311  |                                                                           |
312  | NOTES                                                                     |
313  |                                                                           |
314  | MODIFICATION HISTORY                                                      |
315  |     13-JUL-95  Charlie Tomberg     Created                                |
316  |                                                                           |
317  +===========================================================================*/
318 
319 
320 PROCEDURE insert_batch(
321                p_form_name              IN varchar2,
322                p_form_version           IN number,
323                p_batch_rec		ra_batches%rowtype,
324                p_batch_id              OUT NOCOPY ra_batches.batch_id%type,
325                p_name               IN OUT NOCOPY ra_batches.name%type)
326                    IS
327 
328 BEGIN
329 
330       arp_util.debug('arp_process_batch.insert_batch()+');
331 
332       /*----------------------------------------------+
333        |   Check the form version to determine if it  |
334        |   is compatible with the entity handler.     |
335        +----------------------------------------------*/
336 
337       arp_trx_validate.ar_entity_version_check(p_form_name, p_form_version);
338 
339       /*-------------------------+
340        |  Do required validation |
341        +-------------------------*/
342 
343       arp_process_batch.val_insert_batch(p_batch_rec);
344 
345       /*---------------------------------------------+
346        |  Call the table handler to insert the batch |
347        +---------------------------------------------*/
348 
349       arp_tbat_pkg.insert_p( p_batch_rec,
350                              p_batch_id,
351                              p_name);
352 
353       arp_util.debug('arp_process_batch.insert_batch()-');
354 
355 EXCEPTION
356     WHEN OTHERS THEN
357 
358        /*---------------------------------------------+
359         |  Display parameters and raise the exception |
360         +---------------------------------------------*/
361 
362         arp_util.debug('EXCEPTION:  arp_process_batch.insert_batch()');
363 
364         arp_util.debug('');
365         arp_util.debug('---------- parameters for insert_batch() ---------');
366 
367         arp_util.debug('p_form_name     = ' || p_form_name );
368         arp_util.debug('p_form_version  = ' || p_form_version);
369         arp_util.debug('');
370 
371         arp_tbat_pkg.display_batch_rec(p_batch_rec);
372 
373         RAISE;
374 
375 END;
376 
377 
378 /*===========================================================================+
379  | PROCEDURE                                                                 |
380  |    update_batch			                                     |
381  |                                                                           |
382  | DESCRIPTION                                                               |
383  |    Updates a ra_batches record					     |
384  |                                                                           |
385  | SCOPE - PRIVATE                                                           |
386  |                                                                           |
387  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
388  |    arp_util.debug                                                         |
389  |                                                                           |
390  | ARGUMENTS  : IN:                                                          |
391  |		      p_form_name					     |
392  |		      p_form_version					     |
393  |                    p_batch_rec					     |
394  |              OUT:                                                         |
395  |                    None                                                   |
396  |                                                                           |
397  | RETURNS    : NONE                                                         |
398  |                                                                           |
399  | NOTES                                                                     |
400  |                                                                           |
401  | MODIFICATION HISTORY                                                      |
402  |     13-JUL-95  Charlie Tomberg     Created                                |
403  |                                                                           |
404  +===========================================================================*/
405 
406 
407 PROCEDURE update_batch(
408                 p_form_name	      IN varchar2,
409                 p_form_version        IN number,
410                 p_batch_id            IN ra_batches.batch_id%type,
411                 p_batch_rec	      IN ra_batches%rowtype ) IS
412 
413 
414 
415 BEGIN
416 
417       arp_util.debug('arp_process_batch.update_batch()+');
418 
419       /*----------------------------------------------+
420        |   Check the form version to determine if it  |
421        |   is compatible with the entity handler.     |
422        +----------------------------------------------*/
423 
424 
425       arp_trx_validate.ar_entity_version_check(p_form_name, p_form_version);
426 
427 
428       /*-------------------------+
429        |  Do required validation |
430        +-------------------------*/
431 
432       arp_process_batch.val_update_batch(p_batch_rec);
433 
434 
435        /*-----------------------------------------------------+
436         |  call the table-handler to update the batch record  |
437         +-----------------------------------------------------*/
438 
439       arp_tbat_pkg.update_p( p_batch_rec,
440                              p_batch_id);
441 
442       arp_util.debug('arp_process_batch.update_batch()-');
443 
444 EXCEPTION
445     WHEN OTHERS THEN
446 
447        /*---------------------------------------------+
448         |  Display parameters and raise the exception |
449         +---------------------------------------------*/
450 
451         arp_util.debug('EXCEPTION:  arp_process_batch.update_batch()');
452 
453         arp_util.debug('');
454         arp_util.debug('---------- parameters for update_batch() ---------');
455 
456         arp_util.debug('p_form_name     = ' || p_form_name );
457         arp_util.debug('p_form_version  = ' || p_form_version);
458         arp_util.debug('p_batch_id      = ' || p_batch_id);
459         arp_util.debug('');
460 
461         arp_tbat_pkg.display_batch_rec(p_batch_rec);
462 
463         RAISE;
464 
465 END;
466 
467 /*===========================================================================+
468  | PROCEDURE                                                                 |
469  |    delete_batch			                                     |
470  |                                                                           |
471  | DESCRIPTION                                                               |
472  |    Deletes records from ra_batches					     |
473  |                                                                           |
474  | SCOPE - PRIVATE                                                           |
475  |                                                                           |
476  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
477  |    arp_util.debug                                                         |
478  |                                                                           |
479  | ARGUMENTS  : IN:                                                          |
480  |		      p_form_name					     |
481  |		      p_form_version					     |
482  |		      p_batch_id					     |
483  |              OUT:                                                         |
484  |                    None                                                   |
485  |                                                                           |
486  | RETURNS    : NONE                                                         |
487  |                                                                           |
488  | NOTES                                                                     |
489  |                                                                           |
490  | MODIFICATION HISTORY                                                      |
491  |     13-JUL-95  Charlie Tomberg     Created                                |
492  |                                                                           |
493  +===========================================================================*/
494 
495 
496 PROCEDURE delete_batch(p_form_name		IN varchar2,
497                        p_form_version		IN number,
498                        p_batch_id		IN ra_batches.batch_id%type,
499                        p_batch_rec		IN ra_batches%rowtype) IS
500 
501 BEGIN
502 
503    arp_util.debug('arp_process_batch.delete_batch()+');
504 
505       /*----------------------------------------------+
506        |   Check the form version to determine if it  |
507        |   is compatible with the entity handler.     |
508        +----------------------------------------------*/
509 
510       arp_trx_validate.ar_entity_version_check(p_form_name, p_form_version);
511 
512       /*-------------------------+
513        |  Do required validation |
514        +-------------------------*/
515 
516       arp_process_batch.val_delete_batch(p_batch_rec);
517 
518       /*-----------------------------------------------------+
519        |  call the table-handler to delete the batch record  |
520        +-----------------------------------------------------*/
521 
522       arp_tbat_pkg.delete_p( p_batch_id );
523 
524       arp_util.debug('arp_process_batch.delete_batch()-');
525 
526 EXCEPTION
527     WHEN OTHERS THEN
528 
529        /*---------------------------------------------+
530         |  Display parameters and raise the exception |
531         +---------------------------------------------*/
532 
533         arp_util.debug('EXCEPTION:  arp_process_batch.delete_batch()');
534 
535         arp_util.debug('');
536         arp_util.debug('---------- parameters for delete_batch() ---------');
537 
538         arp_util.debug('p_form_name     = ' || p_form_name );
539         arp_util.debug('p_form_version  = ' || p_form_version);
540         arp_util.debug('p_batch_id      = ' || p_batch_id);
541         arp_util.debug('');
542 
543         arp_tbat_pkg.display_batch_rec(p_batch_rec);
544 
545         RAISE;
546 
547 END;
548 
549 /*===========================================================================+
550  | PROCEDURE                                                                 |
551  |    insert_batch_cover                                                     |
552  |                                                                           |
553  | DESCRIPTION                                                               |
554  |    Cover for calling the batch entity handler insert_batch                |
555  |                                                                           |
556  | SCOPE - PRIVATE                                                           |
557  |                                                                           |
558  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
559  |    arp_util.debug                                                         |
560  |                                                                           |
561  | ARGUMENTS  : IN:                                                          |
562  |                    p_form_name                                            |
563  |                    p_form_version                                         |
564  |                    p_batch_source_id                                      |
565  |                    p_batch_date                                           |
566  |                    p_gl_date                                              |
567  |                    p_status                                               |
568  |                    p_type                                                 |
569  |                    p_currency_code                                        |
570  |                    p_exchange_rate_type                                   |
571  |                    p_exchange_date                                        |
572  |                    p_exchange_rate                                        |
573  |                    p_control_count                                        |
574  |                    p_control_amount                                       |
575  |                    p_comments                                             |
576  |                    p_set_of_books_id                                      |
577  |                    p_purged_children_flag                                 |
578  |                    p_attribute_category                                   |
579  |                    p_attribute1 - 15                                      |
580  |              OUT:                                                         |
581  |                    p_batch_id                                             |
582  |          IN  OUT:                                                         |
583  |                    p_name                                                 |
584  |                                                                           |
585  | RETURNS    : NONE                                                         |
586  |                                                                           |
587  | NOTES                                                                     |
588  |                                                                           |
589  | MODIFICATION HISTORY                                                      |
590  |     10-NOV-95  Subash C            Created                                |
591  |                                                                           |
592  +===========================================================================*/
593 
594 PROCEDURE insert_batch_cover(
595   p_form_name              IN varchar2,
596   p_form_version           IN number,
597   p_batch_source_id        IN ra_batches.batch_source_id%type,
598   p_batch_date             IN ra_batches.batch_date%type,
599   p_gl_date                IN ra_batches.gl_date%type,
600   p_status                 IN ra_batches.status%type,
601   p_type                   IN ra_batches.type%type,
602   p_currency_code          IN ra_batches.currency_code%type,
603   p_exchange_rate_type     IN ra_batches.exchange_rate_type%type,
604   p_exchange_date          IN ra_batches.exchange_date%type,
605   p_exchange_rate          IN ra_batches.exchange_rate%type,
606   p_control_count          IN ra_batches.control_count%type,
607   p_control_amount         IN ra_batches.control_amount%type,
608   p_comments               IN ra_batches.comments%type,
609   p_set_of_books_id        IN ra_batches.set_of_books_id%type,
610   p_purged_children_flag   IN ra_batches.purged_children_flag%type,
611   p_attribute_category     IN ra_batches.attribute_category%type,
612   p_attribute1             IN ra_batches.attribute1%type,
613   p_attribute2             IN ra_batches.attribute2%type,
614   p_attribute3             IN ra_batches.attribute3%type,
615   p_attribute4             IN ra_batches.attribute4%type,
616   p_attribute5             IN ra_batches.attribute5%type,
617   p_attribute6             IN ra_batches.attribute6%type,
618   p_attribute7             IN ra_batches.attribute7%type,
619   p_attribute8             IN ra_batches.attribute8%type,
620   p_attribute9             IN ra_batches.attribute9%type,
621   p_attribute10            IN ra_batches.attribute10%type,
622   p_attribute11            IN ra_batches.attribute11%type,
623   p_attribute12            IN ra_batches.attribute12%type,
624   p_attribute13            IN ra_batches.attribute13%type,
625   p_attribute14            IN ra_batches.attribute14%type,
626   p_attribute15            IN ra_batches.attribute15%type,
627   p_batch_id              OUT NOCOPY ra_batches.batch_id%type,
628   p_name               IN OUT NOCOPY ra_batches.name%type)
629 IS
630   l_batch_rec     ra_batches%rowtype;
631   l_batch_id      ra_batches.batch_id%type;
632   l_name          ra_batches.name%type;
633 BEGIN
634     arp_util.debug('arp_process_batch.insert_batch_cover()+');
635 
636     l_batch_rec.batch_source_id      := p_batch_source_id;
637     l_batch_rec.batch_date           := p_batch_date;
638     l_batch_rec.gl_date              := p_gl_date;
639     l_batch_rec.status               := p_status;
640     l_batch_rec.type                 := p_type;
641     l_batch_rec.currency_code        := p_currency_code;
642     l_batch_rec.exchange_rate_type   := p_exchange_rate_type;
643     l_batch_rec.exchange_date        := p_exchange_date;
644     l_batch_rec.exchange_rate        := p_exchange_rate;
645     l_batch_rec.control_count        := p_control_count;
646     l_batch_rec.control_amount       := p_control_amount;
647     l_batch_rec.comments             := p_comments;
648     l_batch_rec.set_of_books_id      := p_set_of_books_id;
649     l_batch_rec.purged_children_flag := p_purged_children_flag;
650     l_batch_rec.attribute_category   := p_attribute_category;
651     l_batch_rec.attribute1           := p_attribute1;
652     l_batch_rec.attribute2           := p_attribute2;
653     l_batch_rec.attribute3           := p_attribute3;
654     l_batch_rec.attribute4           := p_attribute4;
655     l_batch_rec.attribute5           := p_attribute5;
656     l_batch_rec.attribute6           := p_attribute6;
657     l_batch_rec.attribute7           := p_attribute7;
658     l_batch_rec.attribute8           := p_attribute8;
659     l_batch_rec.attribute9           := p_attribute9;
660     l_batch_rec.attribute10          := p_attribute10;
661     l_batch_rec.attribute11          := p_attribute11;
662     l_batch_rec.attribute12          := p_attribute12;
663     l_batch_rec.attribute13          := p_attribute13;
664     l_batch_rec.attribute14          := p_attribute14;
665     l_batch_rec.attribute15          := p_attribute15;
666     l_batch_rec.name                 := p_name;
667 
668     arp_process_batch.insert_batch(p_form_name,
669                                    p_form_version,
670                                    l_batch_rec,
671                                    l_batch_id,
672                                    l_name);
673 
674     p_batch_id   := l_batch_id;
675     p_name       := l_name;
676 
677     arp_util.debug('arp_process_batch.insert_batch_cover()-');
678 
679 EXCEPTION
680   WHEN OTHERS THEN
681     arp_util.debug('EXCEPTION : arp_process_batch.insert_batch_cover');
682     arp_util.debug('p_batch_source_id      : '||p_batch_source_id);
683     arp_util.debug('p_batch_date           : '||p_batch_date);
684     arp_util.debug('p_gl_date              : '||p_gl_date);
685     arp_util.debug('p_status               : '||p_status);
686     arp_util.debug('p_type                 : '||p_type);
687     arp_util.debug('p_currency_code        : '||p_currency_code);
688     arp_util.debug('p_exchange_rate_type   : '||p_exchange_rate_type);
689     arp_util.debug('p_exchange_date        : '||p_exchange_date);
690     arp_util.debug('p_exchange_rate        : '||p_exchange_rate);
691     arp_util.debug('p_control_count        : '||p_control_count);
692     arp_util.debug('p_control_amount       : '||p_control_amount);
693     arp_util.debug('p_comments             : '||p_comments);
694     arp_util.debug('p_set_of_books_id      : '||p_set_of_books_id);
695     arp_util.debug('p_purged_children_flag : '||p_purged_children_flag);
696     arp_util.debug('p_attribute_category   : '||p_attribute_category);
697     arp_util.debug('p_attribute1           : '||p_attribute1);
698     arp_util.debug('p_attribute2           : '||p_attribute2);
699     arp_util.debug('p_attribute3           : '||p_attribute3);
700     arp_util.debug('p_attribute4           : '||p_attribute4);
701     arp_util.debug('p_attribute5           : '||p_attribute5);
702     arp_util.debug('p_attribute6           : '||p_attribute6);
703     arp_util.debug('p_attribute7           : '||p_attribute7);
704     arp_util.debug('p_attribute8           : '||p_attribute8);
705     arp_util.debug('p_attribute9           : '||p_attribute9);
706     arp_util.debug('p_attribute10          : '||p_attribute10);
707     arp_util.debug('p_attribute11          : '||p_attribute11);
708     arp_util.debug('p_attribute12          : '||p_attribute12);
709     arp_util.debug('p_attribute13          : '||p_attribute13);
710     arp_util.debug('p_attribute14          : '||p_attribute14);
711     arp_util.debug('p_attribute15          : '||p_attribute15);
712     arp_util.debug('p_name                 : '||p_name);
713     RAISE;
714 END;
715 
716 /*===========================================================================+
717  | PROCEDURE                                                                 |
718  |    update_batch_cover                                                     |
719  |                                                                           |
720  | DESCRIPTION                                                               |
721  |    Cover for calling the batch entity handler update_batch                |
722  |                                                                           |
723  | SCOPE - PRIVATE                                                           |
724  |                                                                           |
725  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
726  |    arp_util.debug                                                         |
727  |                                                                           |
728  | ARGUMENTS  : IN:                                                          |
729  |                    p_form_name                                            |
730  |                    p_form_version                                         |
731  |                    p_batch_id                                             |
732  |                    p_name                                                 |
733  |                    p_batch_source_id                                      |
734  |                    p_batch_date                                           |
735  |                    p_gl_date                                              |
736  |                    p_status                                               |
737  |                    p_type                                                 |
738  |                    p_currency_code                                        |
739  |                    p_exchange_rate_type                                   |
740  |                    p_exchange_date                                        |
741  |                    p_exchange_rate                                        |
742  |                    p_control_count                                        |
743  |                    p_control_amount                                       |
744  |                    p_comments                                             |
745  |                    p_set_of_books_id                                      |
746  |                    p_purged_children_flag                                 |
747  |                    p_attribute_category                                   |
748  |                    p_attribute1 - 15                                      |
749  |              OUT:                                                         |
750  |                    None                                                   |
751  |          IN  OUT:                                                         |
752  |                    None                                                   |
753  |                                                                           |
754  | RETURNS    : NONE                                                         |
755  |                                                                           |
756  | NOTES                                                                     |
757  |                                                                           |
758  | MODIFICATION HISTORY                                                      |
759  |     10-NOV-95  Subash C            Created                                |
760  |                                                                           |
761  +===========================================================================*/
762 
763 PROCEDURE update_batch_cover(
764   p_form_name              IN varchar2,
765   p_form_version           IN number,
766   p_batch_id               IN ra_batches.batch_id%type,
767   p_name                   IN ra_batches.name%type,
768   p_batch_source_id        IN ra_batches.batch_source_id%type,
769   p_batch_date             IN ra_batches.batch_date%type,
770   p_gl_date                IN ra_batches.gl_date%type,
771   p_status                 IN ra_batches.status%type,
772   p_type                   IN ra_batches.type%type,
773   p_currency_code          IN ra_batches.currency_code%type,
774   p_exchange_rate_type     IN ra_batches.exchange_rate_type%type,
775   p_exchange_date          IN ra_batches.exchange_date%type,
776   p_exchange_rate          IN ra_batches.exchange_rate%type,
777   p_control_count          IN ra_batches.control_count%type,
778   p_control_amount         IN ra_batches.control_amount%type,
779   p_comments               IN ra_batches.comments%type,
780   p_set_of_books_id        IN ra_batches.set_of_books_id%type,
781   p_purged_children_flag   IN ra_batches.purged_children_flag%type,
782   p_attribute_category     IN ra_batches.attribute_category%type,
783   p_attribute1             IN ra_batches.attribute1%type,
784   p_attribute2             IN ra_batches.attribute2%type,
785   p_attribute3             IN ra_batches.attribute3%type,
786   p_attribute4             IN ra_batches.attribute4%type,
787   p_attribute5             IN ra_batches.attribute5%type,
788   p_attribute6             IN ra_batches.attribute6%type,
789   p_attribute7             IN ra_batches.attribute7%type,
790   p_attribute8             IN ra_batches.attribute8%type,
791   p_attribute9             IN ra_batches.attribute9%type,
792   p_attribute10            IN ra_batches.attribute10%type,
793   p_attribute11            IN ra_batches.attribute11%type,
794   p_attribute12            IN ra_batches.attribute12%type,
795   p_attribute13            IN ra_batches.attribute13%type,
796   p_attribute14            IN ra_batches.attribute14%type,
797   p_attribute15            IN ra_batches.attribute15%type)
798 IS
799   l_batch_rec   ra_batches%rowtype;
800 BEGIN
801 
802     arp_util.debug('arp_process_batch.update_batch_cover()+');
803 
804     arp_tbat_pkg.set_to_dummy(l_batch_rec);
805 
806     l_batch_rec.batch_id             := p_batch_id;
807     l_batch_rec.name                 := p_name;
808     l_batch_rec.batch_source_id      := p_batch_source_id;
809     l_batch_rec.batch_date           := p_batch_date;
810     l_batch_rec.gl_date              := p_gl_date;
811     l_batch_rec.status               := p_status;
812     l_batch_rec.type                 := p_type;
813     l_batch_rec.currency_code        := p_currency_code;
814     l_batch_rec.exchange_rate_type   := p_exchange_rate_type;
815     l_batch_rec.exchange_date        := p_exchange_date;
816     l_batch_rec.exchange_rate        := p_exchange_rate;
817     l_batch_rec.control_count        := p_control_count;
818     l_batch_rec.control_amount       := p_control_amount;
819     l_batch_rec.comments             := p_comments;
820     l_batch_rec.set_of_books_id      := p_set_of_books_id;
821     l_batch_rec.purged_children_flag := p_purged_children_flag;
822     l_batch_rec.attribute_category   := p_attribute_category;
823     l_batch_rec.attribute1           := p_attribute1;
824     l_batch_rec.attribute2           := p_attribute2;
825     l_batch_rec.attribute3           := p_attribute3;
826     l_batch_rec.attribute4           := p_attribute4;
827     l_batch_rec.attribute5           := p_attribute5;
828     l_batch_rec.attribute6           := p_attribute6;
829     l_batch_rec.attribute7           := p_attribute7;
830     l_batch_rec.attribute8           := p_attribute8;
831     l_batch_rec.attribute9           := p_attribute9;
832     l_batch_rec.attribute10          := p_attribute10;
833     l_batch_rec.attribute11          := p_attribute11;
834     l_batch_rec.attribute12          := p_attribute12;
835     l_batch_rec.attribute13          := p_attribute13;
836     l_batch_rec.attribute14          := p_attribute14;
837     l_batch_rec.attribute15          := p_attribute15;
838 
839     arp_process_batch.update_batch(p_form_name,
840                                    p_form_version,
841                                    p_batch_id,
842                                    l_batch_rec);
843 
844     arp_util.debug('arp_process_batch.update_batch_cover()-');
845 
846 EXCEPTION
847   WHEN OTHERS THEN
848     arp_util.debug('EXCEPTION : arp_process_batch.update_batch_cover');
849     arp_util.debug('p_batch_id             : '||p_batch_id);
850     arp_util.debug('p_name                 : '||p_name);
851     arp_util.debug('p_batch_source_id      : '||p_batch_source_id);
852     arp_util.debug('p_batch_date           : '||p_batch_date);
853     arp_util.debug('p_gl_date              : '||p_gl_date);
854     arp_util.debug('p_status               : '||p_status);
855     arp_util.debug('p_type                 : '||p_type);
856     arp_util.debug('p_currency_code        : '||p_currency_code);
857     arp_util.debug('p_exchange_rate_type   : '||p_exchange_rate_type);
858     arp_util.debug('p_exchange_date        : '||p_exchange_date);
859     arp_util.debug('p_exchange_rate        : '||p_exchange_rate);
860     arp_util.debug('p_control_count        : '||p_control_count);
861     arp_util.debug('p_control_amount       : '||p_control_amount);
862     arp_util.debug('p_comments             : '||p_comments);
863     arp_util.debug('p_set_of_books_id      : '||p_set_of_books_id);
864     arp_util.debug('p_purged_children_flag : '||p_purged_children_flag);
865     arp_util.debug('p_attribute_category   : '||p_attribute_category);
866     arp_util.debug('p_attribute1           : '||p_attribute1);
867     arp_util.debug('p_attribute2           : '||p_attribute2);
868     arp_util.debug('p_attribute3           : '||p_attribute3);
869     arp_util.debug('p_attribute4           : '||p_attribute4);
870     arp_util.debug('p_attribute5           : '||p_attribute5);
871     arp_util.debug('p_attribute6           : '||p_attribute6);
872     arp_util.debug('p_attribute7           : '||p_attribute7);
873     arp_util.debug('p_attribute8           : '||p_attribute8);
874     arp_util.debug('p_attribute9           : '||p_attribute9);
875     arp_util.debug('p_attribute10          : '||p_attribute10);
876     arp_util.debug('p_attribute11          : '||p_attribute11);
877     arp_util.debug('p_attribute12          : '||p_attribute12);
878     arp_util.debug('p_attribute13          : '||p_attribute13);
879     arp_util.debug('p_attribute14          : '||p_attribute14);
880     arp_util.debug('p_attribute15          : '||p_attribute15);
881 
882     RAISE;
883 END;
884 
885 
886 /*===========================================================================+
887  | PROCEDURE                                                                 |
888  |    delete_batch_cover                                                     |
889  |                                                                           |
890  | DESCRIPTION                                                               |
891  |    Cover for calling the batch entity handler delete_batch                |
892  |                                                                           |
893  | SCOPE - PRIVATE                                                           |
894  |                                                                           |
895  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED                                   |
896  |    arp_util.debug                                                         |
897  |                                                                           |
898  | ARGUMENTS  : IN:                                                          |
899  |                    p_form_name                                            |
900  |                    p_form_version                                         |
901  |                    p_batch_id                                             |
902  |              OUT:                                                         |
903  |                    None                                                   |
904  |          IN  OUT:                                                         |
905  |                    None                                                   |
906  |                                                                           |
907  | RETURNS    : NONE                                                         |
908  |                                                                           |
909  | NOTES                                                                     |
910  |                                                                           |
911  | MODIFICATION HISTORY                                                      |
912  |     10-NOV-95  Subash C            Created                                |
913  |                                                                           |
914  +===========================================================================*/
915 
916 PROCEDURE delete_batch_cover(
917   p_form_name              IN varchar2,
918   p_form_version           IN number,
919   p_batch_id               IN ra_batches.batch_id%type)
920 IS
921   l_batch_rec     ra_batches%rowtype;
922 BEGIN
923     arp_util.debug('arp_process_batch.delete_batch_cover()+');
924 
925     arp_tbat_pkg.set_to_dummy(l_batch_rec);
926     l_batch_rec.batch_id := p_batch_id;
927 
928     arp_process_batch.delete_batch(p_form_name,
929                                    p_form_version,
930                                    p_batch_id,
931                                    l_batch_rec);
932 
933     arp_util.debug('arp_process_batch.delete_batch_cover()-');
934 
935 EXCEPTION
936   WHEN OTHERS THEN
937     arp_util.debug('EXCEPTION : arp_process_batch.delete_batch_cover');
938 
939     arp_util.debug('p_form_name            : '||p_form_name);
940     arp_util.debug('p_form_version         : '||p_form_version);
941     arp_util.debug('p_batch_id             : '||p_batch_id);
942 
943     RAISE;
944 END;
945 
946 END ARP_PROCESS_BATCH;