DBA Data[Home] [Help]

PACKAGE BODY: APPS.ARP_UPDATE_ADJ_COVER

Source


1 PACKAGE BODY ARP_UPDATE_ADJ_COVER AS
2 /* $Header: ARTADJUB.pls 120.4.12010000.1 2008/07/24 16:54:19 appldev ship $ */
3 
4 pg_msg_level_debug    binary_integer;
5 
6 PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
7 
8 PROCEDURE update_adj_cover(
9            p_form_name                      IN varchar2,
10            p_form_version                   IN number,
11            p_acctd_amount                   IN
12               ar_adjustments.acctd_amount%type,
13            p_adjustment_id                  IN
14               ar_adjustments.adjustment_id%type,
15            p_adjustment_number              IN
16               ar_adjustments.adjustment_number%type,
17            p_adjustment_type                IN
18               ar_adjustments.adjustment_type%type,
19            p_amount                         IN
20               ar_adjustments.amount%type,
21            p_apply_date                     IN
22               ar_adjustments.apply_date%type,
23            p_approved_by                    IN
24               ar_adjustments.approved_by%type,
25            p_associated_application_id      IN
26               ar_adjustments.associated_application_id%type,
27            p_associated_cash_receipt_id     IN
28               ar_adjustments.associated_cash_receipt_id%type,
29            p_attribute1                     IN
30               ar_adjustments.attribute1%type,
31            p_attribute10                    IN
32               ar_adjustments.attribute10%type,
33            p_attribute11                    IN
34               ar_adjustments.attribute11%type,
35            p_attribute12                    IN
36               ar_adjustments.attribute12%type,
37            p_attribute13                    IN
38               ar_adjustments.attribute13%type,
39            p_attribute14                    IN
40               ar_adjustments.attribute14%type,
41            p_attribute15                    IN
42               ar_adjustments.attribute15%type,
43            p_attribute2                     IN
44               ar_adjustments.attribute2%type,
45            p_attribute3                     IN
46               ar_adjustments.attribute3%type,
47            p_attribute4                     IN
48               ar_adjustments.attribute4%type,
49            p_attribute5                     IN
50               ar_adjustments.attribute5%type,
51            p_attribute6                     IN
52               ar_adjustments.attribute6%type,
53            p_attribute7                     IN
54               ar_adjustments.attribute7%type,
55            p_attribute8                     IN
56               ar_adjustments.attribute8%type,
57            p_attribute9                     IN
58               ar_adjustments.attribute9%type,
59            p_attribute_category             IN
60               ar_adjustments.attribute_category%type,
61            p_automatically_generated        IN
62               ar_adjustments.automatically_generated%type,
63            p_batch_id                       IN
64               ar_adjustments.batch_id%type,
65            p_chargeback_customer_trx_id     IN
66               ar_adjustments.chargeback_customer_trx_id%type,
67            p_code_combination_id            IN
68               ar_adjustments.code_combination_id%type,
69            p_comments                       IN
70               ar_adjustments.comments%type,
71            p_created_by                     IN
72               ar_adjustments.created_by%type,
73            p_created_from                   IN
74               ar_adjustments.created_from%type,
75            p_creation_date                  IN
76               ar_adjustments.creation_date%type,
77            p_customer_trx_id                IN
78               ar_adjustments.customer_trx_id%type,
79            p_customer_trx_line_id           IN
80               ar_adjustments.customer_trx_line_id%type,
81            p_distribution_set_id            IN
82               ar_adjustments.distribution_set_id%type,
83            p_doc_sequence_id                IN
84               ar_adjustments.doc_sequence_id%type,
85            p_doc_sequence_value             IN
86               ar_adjustments.doc_sequence_value%type,
87            p_freight_adjusted               IN
88               ar_adjustments.freight_adjusted%type,
89            p_gl_date                        IN
90               ar_adjustments.gl_date%type,
91            p_gl_posted_date                 IN
92               ar_adjustments.gl_posted_date%type,
93            p_last_updated_by                IN
94               ar_adjustments.last_updated_by%type,
95            p_last_update_date               IN
96               ar_adjustments.last_update_date%type,
97            p_last_update_login              IN
98               ar_adjustments.last_update_login%type,
99            p_line_adjusted                  IN
100               ar_adjustments.line_adjusted%type,
101            p_org_id                         IN
102               ar_adjustments.org_id%type,
103            p_payment_schedule_id            IN
104               ar_adjustments.payment_schedule_id%type,
105            p_postable                       IN
106               ar_adjustments.postable%type,
107            p_posting_control_id             IN
108               ar_adjustments.posting_control_id%type,
109            p_program_application_id         IN
110               ar_adjustments.program_application_id%type,
111            p_program_id                     IN
112               ar_adjustments.program_id%type,
113            p_program_update_date            IN
114               ar_adjustments.program_update_date%type,
115            p_reason_code                    IN
116               ar_adjustments.reason_code%type,
117            p_receivables_charges_adjusted   IN
118               ar_adjustments.receivables_charges_adjusted%type,
119            p_receivables_trx_id             IN
120               ar_adjustments.receivables_trx_id%type,
121            p_request_id                     IN
122               ar_adjustments.request_id%type,
123            p_set_of_books_id                IN
124               ar_adjustments.set_of_books_id%type,
125            p_status                         IN
126               ar_adjustments.status%type,
127            p_subsequent_trx_id              IN
128               ar_adjustments.subsequent_trx_id%type,
129            p_tax_adjusted                   IN
130               ar_adjustments.tax_adjusted%type,
131            p_type                           IN
132               ar_adjustments.type%type,
133            p_ussgl_transaction_code         IN
134               ar_adjustments.ussgl_transaction_code%type,
135            p_ussgl_transaction_code_conte IN
136               ar_adjustments.ussgl_transaction_code_context%type)
137 
138 IS
139 
140       l_adj_rec ar_adjustments%rowtype ;
141 
142 BEGIN
143 
144       IF PG_DEBUG in ('Y', 'C') THEN
145          arp_util.debug('arp_process_adjustment.update_adj_cover()+',
146                       pg_msg_level_debug);
147       END IF;
148 
149      /*------------------------------------------------+
150       |  Populate the adj record group with            |
151       |  the values passed in as parameters.           |
152       +------------------------------------------------*/
153 
154       arp_adjustments_pkg.set_to_dummy(l_adj_rec);
155 
156       l_adj_rec.adjustment_id                  := p_adjustment_id;
157       l_adj_rec.adjustment_number              := p_adjustment_number;
158       l_adj_rec.adjustment_type                := p_adjustment_type;
159       l_adj_rec.amount                         := p_amount;
160       l_adj_rec.apply_date                     := p_apply_date;
161       l_adj_rec.approved_by                    := p_approved_by;
162       l_adj_rec.attribute1                     := p_attribute1;
163       l_adj_rec.attribute10                    := p_attribute10;
164       l_adj_rec.attribute11                    := p_attribute11;
165       l_adj_rec.attribute12                    := p_attribute12;
166       l_adj_rec.attribute13                    := p_attribute13;
167       l_adj_rec.attribute14                    := p_attribute14;
168       l_adj_rec.attribute15                    := p_attribute15;
169       l_adj_rec.attribute2                     := p_attribute2;
170       l_adj_rec.attribute3                     := p_attribute3;
171       l_adj_rec.attribute4                     := p_attribute4;
172       l_adj_rec.attribute5                     := p_attribute5;
173       l_adj_rec.attribute6                     := p_attribute6;
174       l_adj_rec.attribute7                     := p_attribute7;
175       l_adj_rec.attribute8                     := p_attribute8;
176       l_adj_rec.attribute9                     := p_attribute9;
177       l_adj_rec.attribute_category             := p_attribute_category;
178       l_adj_rec.code_combination_id            := p_code_combination_id;
179       l_adj_rec.comments                       := p_comments;
180       l_adj_rec.customer_trx_id                := p_customer_trx_id;
181       l_adj_rec.customer_trx_line_id           := p_customer_trx_line_id;
182       l_adj_rec.doc_sequence_id                := p_doc_sequence_id;
183       l_adj_rec.doc_sequence_value             := p_doc_sequence_value;
184       l_adj_rec.gl_date                        := p_gl_date;
185       l_adj_rec.last_updated_by                := p_last_updated_by;
186       l_adj_rec.last_update_date               := p_last_update_date;
187       l_adj_rec.payment_schedule_id            := p_payment_schedule_id;
188       l_adj_rec.reason_code                    := p_reason_code;
189       l_adj_rec.receivables_trx_id             := p_receivables_trx_id;
190       l_adj_rec.status                         := p_status;
191       l_adj_rec.ussgl_transaction_code         := p_ussgl_transaction_code;
192       l_adj_rec.ussgl_transaction_code_context := p_ussgl_transaction_code_conte;
193       /* Bug 6378577 */
194       l_adj_rec.line_adjusted                  := p_line_adjusted;
195       l_adj_rec.receivables_charges_adjusted   := p_receivables_charges_adjusted;
196       l_adj_rec.freight_adjusted               := p_freight_adjusted;
197       l_adj_rec.tax_adjusted                   := p_tax_adjusted;
198      /*-----------------------------------------------+
199       |  Call the standard adj entity handler         |
200       +-----------------------------------------------*/
201 
202       arp_process_adjustment.update_adjustment(
203                   p_form_name     => p_form_name,
204                   p_form_version  => p_form_version,
205                   p_adj_rec       => l_adj_rec,
206                   p_adjustment_id => p_adjustment_id);
207 
208 
209       IF PG_DEBUG in ('Y', 'C') THEN
210          arp_util.debug('arp_process_adjustment.update_adj_cover()-',
211                      pg_msg_level_debug);
212       END IF;
213 
214 EXCEPTION
215   WHEN OTHERS THEN
216 
217     IF PG_DEBUG in ('Y', 'C') THEN
218        arp_util.debug('EXCEPTION:  arp_process_adjustment.update_adj_cover()',
219                    pg_msg_level_debug);
220        arp_util.debug('------- parameters for update_adj_cover() ' ||
221                    '---------',
222                    pg_msg_level_debug);
223        arp_util.debug('update_adj_cover: ' || 'p_form_name                      = ' || p_form_name, pg_msg_level_debug);
224        arp_util.debug('update_adj_cover: ' || 'p_form_version                   = ' || p_form_version, pg_msg_level_debug);
225        arp_util.debug('update_adj_cover: ' || 'p_acctd_amount                   = '|| p_acctd_amount, pg_msg_level_debug);
226        arp_util.debug('update_adj_cover: ' || 'p_adjustment_id                  = '|| p_adjustment_id, pg_msg_level_debug);
227        arp_util.debug('update_adj_cover: ' || 'p_adjustment_number              = '|| p_adjustment_number, pg_msg_level_debug);
228        arp_util.debug('update_adj_cover: ' || 'p_adjustment_type                = '|| p_adjustment_type, pg_msg_level_debug);
229        arp_util.debug('update_adj_cover: ' || 'p_amount                         = '|| p_amount, pg_msg_level_debug);
230        arp_util.debug('update_adj_cover: ' || 'p_apply_date                     = '|| p_apply_date, pg_msg_level_debug);
231        arp_util.debug('update_adj_cover: ' || 'p_approved_by                    = '|| p_approved_by, pg_msg_level_debug);
232        arp_util.debug('update_adj_cover: ' || 'p_associated_application_id      = '|| p_associated_application_id, pg_msg_level_debug);
233        arp_util.debug('update_adj_cover: ' || 'p_associated_cash_receipt_id     = '|| p_associated_cash_receipt_id, pg_msg_level_debug);
234        arp_util.debug('update_adj_cover: ' || 'p_attribute1                     = '|| p_attribute1, pg_msg_level_debug);
235        arp_util.debug('update_adj_cover: ' || 'p_attribute10                    = '|| p_attribute10, pg_msg_level_debug);
236        arp_util.debug('update_adj_cover: ' || 'p_attribute11                    = '|| p_attribute11, pg_msg_level_debug);
237        arp_util.debug('update_adj_cover: ' || 'p_attribute12                    = '|| p_attribute12, pg_msg_level_debug);
238        arp_util.debug('update_adj_cover: ' || 'p_attribute13                    = '|| p_attribute13, pg_msg_level_debug);
239        arp_util.debug('update_adj_cover: ' || 'p_attribute14                    = '|| p_attribute14, pg_msg_level_debug);
240        arp_util.debug('update_adj_cover: ' || 'p_attribute15                    = '|| p_attribute15, pg_msg_level_debug);
241        arp_util.debug('update_adj_cover: ' || 'p_attribute2                     = '|| p_attribute2, pg_msg_level_debug);
242        arp_util.debug('update_adj_cover: ' || 'p_attribute3                     = '|| p_attribute3, pg_msg_level_debug);
243        arp_util.debug('update_adj_cover: ' || 'p_attribute4                     = '|| p_attribute4, pg_msg_level_debug);
244        arp_util.debug('update_adj_cover: ' || 'p_attribute5                     = '|| p_attribute5, pg_msg_level_debug);
245        arp_util.debug('update_adj_cover: ' || 'p_attribute6                     = '|| p_attribute6, pg_msg_level_debug);
246        arp_util.debug('update_adj_cover: ' || 'p_attribute7                     = '|| p_attribute7, pg_msg_level_debug);
247        arp_util.debug('update_adj_cover: ' || 'p_attribute8                     = '|| p_attribute8, pg_msg_level_debug);
248        arp_util.debug('update_adj_cover: ' || 'p_attribute9                     = '|| p_attribute9, pg_msg_level_debug);
249        arp_util.debug('update_adj_cover: ' || 'p_attribute_category             = '|| p_attribute_category, pg_msg_level_debug);
250        arp_util.debug('update_adj_cover: ' || 'p_automatically_generated        = '|| p_automatically_generated, pg_msg_level_debug);
251        arp_util.debug('update_adj_cover: ' || 'p_batch_id                       = '|| p_batch_id, pg_msg_level_debug);
252        arp_util.debug('update_adj_cover: ' || 'p_chargeback_customer_trx_id     = '|| p_chargeback_customer_trx_id, pg_msg_level_debug);
253        arp_util.debug('update_adj_cover: ' || 'p_code_combination_id            = '|| p_code_combination_id, pg_msg_level_debug);
254        arp_util.debug('update_adj_cover: ' || 'p_comments                       = '|| p_comments, pg_msg_level_debug);
255        arp_util.debug('update_adj_cover: ' || 'p_created_by                     = '|| p_created_by, pg_msg_level_debug);
256        arp_util.debug('update_adj_cover: ' || 'p_created_from                   = '|| p_created_from, pg_msg_level_debug);
257        arp_util.debug('update_adj_cover: ' || 'p_creation_date                  = '|| p_creation_date, pg_msg_level_debug);
258        arp_util.debug('update_adj_cover: ' || 'p_customer_trx_id                = '|| p_customer_trx_id, pg_msg_level_debug);
259        arp_util.debug('update_adj_cover: ' || 'p_customer_trx_line_id           = '|| p_customer_trx_line_id, pg_msg_level_debug);
260        arp_util.debug('update_adj_cover: ' || 'p_distribution_set_id            = '|| p_distribution_set_id, pg_msg_level_debug);
261        arp_util.debug('update_adj_cover: ' || 'p_doc_sequence_id                = '|| p_doc_sequence_id, pg_msg_level_debug);
262        arp_util.debug('update_adj_cover: ' || 'p_doc_sequence_value             = '|| p_doc_sequence_value, pg_msg_level_debug);
263        arp_util.debug('update_adj_cover: ' || 'p_freight_adjusted               = '|| p_freight_adjusted, pg_msg_level_debug);
264        arp_util.debug('update_adj_cover: ' || 'p_gl_date                        = '|| p_gl_date, pg_msg_level_debug);
265        arp_util.debug('update_adj_cover: ' || 'p_gl_posted_date                 = '|| p_gl_posted_date, pg_msg_level_debug);
266        arp_util.debug('update_adj_cover: ' || 'p_last_updated_by                = '|| p_last_updated_by, pg_msg_level_debug);
267        arp_util.debug('update_adj_cover: ' || 'p_last_update_date               = '|| p_last_update_date, pg_msg_level_debug);
268        arp_util.debug('update_adj_cover: ' || 'p_last_update_login              = '|| p_last_update_login, pg_msg_level_debug);
269        arp_util.debug('update_adj_cover: ' || 'p_line_adjusted                  = '|| p_line_adjusted, pg_msg_level_debug);
270        arp_util.debug('update_adj_cover: ' || 'p_org_id                         = '|| p_org_id, pg_msg_level_debug);
271        arp_util.debug('update_adj_cover: ' || 'p_payment_schedule_id            = '|| p_payment_schedule_id, pg_msg_level_debug);
272        arp_util.debug('update_adj_cover: ' || 'p_postable                       = '|| p_postable, pg_msg_level_debug);
273        arp_util.debug('update_adj_cover: ' || 'p_posting_control_id             = '|| p_posting_control_id, pg_msg_level_debug);
274        arp_util.debug('update_adj_cover: ' || 'p_program_application_id         = '|| p_program_application_id, pg_msg_level_debug);
275        arp_util.debug('update_adj_cover: ' || 'p_program_id                     = '|| p_program_id, pg_msg_level_debug);
276        arp_util.debug('update_adj_cover: ' || 'p_program_update_date            = '|| p_program_update_date, pg_msg_level_debug);
277        arp_util.debug('update_adj_cover: ' || 'p_reason_code                    = '|| p_reason_code, pg_msg_level_debug);
278        arp_util.debug('update_adj_cover: ' || 'p_receivables_charges_adjusted   = '|| p_receivables_charges_adjusted, pg_msg_level_debug);
279        arp_util.debug('update_adj_cover: ' || 'p_receivables_trx_id             = '|| p_receivables_trx_id, pg_msg_level_debug);
280        arp_util.debug('update_adj_cover: ' || 'p_request_id                     = '|| p_request_id, pg_msg_level_debug);
281        arp_util.debug('update_adj_cover: ' || 'p_set_of_books_id                = '|| p_set_of_books_id, pg_msg_level_debug);
282        arp_util.debug('update_adj_cover: ' || 'p_status                         = '|| p_status, pg_msg_level_debug);
283        arp_util.debug('update_adj_cover: ' || 'p_subsequent_trx_id              = '|| p_subsequent_trx_id, pg_msg_level_debug);
284        arp_util.debug('update_adj_cover: ' || 'p_tax_adjusted                   = '|| p_tax_adjusted, pg_msg_level_debug);
285        arp_util.debug('update_adj_cover: ' || 'p_type                           = '|| p_type, pg_msg_level_debug);
286        arp_util.debug('update_adj_cover: ' || 'p_ussgl_transaction_code         = '|| p_ussgl_transaction_code, pg_msg_level_debug);
287        arp_util.debug('update_adj_cover: ' || 'p_ussgl_transaction_code_conte = '|| p_ussgl_transaction_code_conte, pg_msg_level_debug);
288     END IF;
289 
290 
291 
292 
293     RAISE;
294 
295 END update_adj_cover;
296 
297   /*---------------------------------------------+
298    |   Package initialization section.           |
299    +---------------------------------------------*/
300 
301 BEGIN
302 
303    pg_msg_level_debug := arp_global.MSG_LEVEL_DEBUG;
304 
305 END ARP_UPDATE_adj_COVER;