DBA Data[Home] [Help]

PACKAGE BODY: APPS.ARP_INSERT_ADJ_COVER

Source


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