DBA Data[Home] [Help]

PACKAGE BODY: APPS.AR_TRX_BULK_PROCESS_LINES

Source


1 PACKAGE BODY AR_TRX_BULK_PROCESS_LINES AS
2 /* $Header: ARINBLLB.pls 120.9 2006/04/17 18:33:36 mraymond noship $ */
3 
4 pg_debug                VARCHAR2(1) := nvl(fnd_profile.value('AFLOG_ENABLED'),'N');
5 
6 PROCEDURE INSERT_ROW(
7     p_trx_header_id         IN      NUMBER,
8     p_trx_line_id           IN      NUMBER,
9     x_errmsg                    OUT NOCOPY  VARCHAR2,
10     x_return_status             OUT NOCOPY  VARCHAR2 )  IS
11 
12 BEGIN
13     IF pg_debug = 'Y'
14     THEN
15         ar_invoice_utils.debug ('AR_TRX_BULK_PROCESS_LINES.INSERT_ROW (+)');
16     END IF;
17     x_return_status := FND_API.G_RET_STS_SUCCESS;
18 
19         INSERT INTO ra_customer_trx_lines
20             (
21                 customer_trx_line_id,
22                 customer_trx_id,
23                 line_number,
24                 line_type,
25                 quantity_credited,
26                 quantity_invoiced,
27                 quantity_ordered,
28                 unit_selling_price,
29                 unit_standard_price,
30                 revenue_amount,
31                 extended_amount,
32                 memo_line_id,
33                 inventory_item_id,
34                 item_exception_rate_id,
35                 description,
36                 item_context,
37                 initial_customer_trx_line_id,
38                 link_to_cust_trx_line_id,
39                 previous_customer_trx_id,
40                 previous_customer_trx_line_id,
41                 accounting_rule_id,
42                 rule_start_date,
43                 autorule_complete_flag,
44                 autorule_duration_processed,
45                 reason_code,
46                 last_period_to_credit,
47                 sales_order,
48                 sales_order_date,
49                 sales_order_line,
50                 sales_order_source,
51                 vat_tax_id,
52                 tax_exempt_flag,
53                 location_segment_id,
54                 tax_exempt_number,
55                 tax_exempt_reason_code,
56                 tax_vendor_return_code,
57                 tax_exemption_id,
58                 tax_precedence,
59                 tax_rate,
60                 uom_code,
61                 autotax,
62                 movement_id,
63                 default_ussgl_transaction_code,
64                 default_ussgl_trx_code_context,
65                 interface_line_context,
66                 interface_line_attribute1,
67                 interface_line_attribute2,
68                 interface_line_attribute3,
69                 interface_line_attribute4,
70                 interface_line_attribute5,
71                 interface_line_attribute6,
72                 interface_line_attribute7,
73                 interface_line_attribute8,
74                 interface_line_attribute9,
75                 interface_line_attribute10,
76                 interface_line_attribute11,
77                 interface_line_attribute12,
78                 interface_line_attribute13,
79                 interface_line_attribute14,
80                 interface_line_attribute15,
81                 attribute_category,
82                 attribute1,
83                 attribute2,
84                 attribute3,
85                 attribute4,
86                 attribute5,
87                 attribute6,
88                 attribute7,
89                 attribute8,
90                 attribute9,
91                 attribute10,
92                 attribute11,
93                 attribute12,
94                 attribute13,
95                 attribute14,
96                 attribute15,
97                 global_attribute_category,
98                 global_attribute1,
99                 global_attribute2,
100                 global_attribute3,
101                 global_attribute4,
102                 global_attribute5,
103                 global_attribute6,
104                 global_attribute7,
105                 global_attribute8,
106                 global_attribute9,
107                 global_attribute10,
108                 global_attribute11,
109                 global_attribute12,
110                 global_attribute13,
111                 global_attribute14,
112                 global_attribute15,
113                 global_attribute16,
114                 global_attribute17,
115                 global_attribute18,
116                 global_attribute19,
117                 global_attribute20,
118                 created_by,
119                 creation_date,
120                 last_updated_by,
121                 last_update_date,
122                 program_application_id,
123                 last_update_login,
124                 program_id,
125                 program_update_date,
126                 set_of_books_id,
127                 gross_unit_selling_price,
128                 gross_extended_amount,
129                 amount_includes_tax_flag,
130                 warehouse_id,
131                 translated_description,
132                 taxable_amount,
133                 request_id,
134                 extended_acctd_amount,
135                 br_ref_customer_trx_id,
136                 br_ref_payment_schedule_id,
137                 br_adjustment_id,
138                 wh_update_date,
139                 payment_set_id,
140                 org_id,
141                 override_auto_accounting_flag,
142 		accounting_rule_duration, /*Bug 4161915*/
143                 rule_end_date,
144                 HISTORICAL_FLAG,
145                 TAXABLE_FLAG,
146                 TAX_CLASSIFICATION_CODE,
147                 interest_line_id
148                 )
149                 Select
150                 customer_trx_line_id, --RA_CUSTOMER_TRX_LINES_S.NEXTVAL,
151                 customer_trx_id,
152                 line_number,
153                 line_type,
154                 quantity_credited,
155                 quantity_invoiced,
156                 quantity_ordered,
157                 unit_selling_price,
158                 unit_standard_price,
159                 revenue_amount,
160                 extended_amount,
161                 memo_line_id,
162                 inventory_item_id,
163                 item_exception_rate_id,
164                 description,
165                 item_context,
166                 null,--initial_customer_trx_line_id,
167                 link_to_cust_trx_line_id,
168                 null, --previous_customer_trx_id,
169                 null, --previous_customer_trx_line_id,
170                 accounting_rule_id,
171                 rule_start_date,
172                 autorule_complete_flag,
173                 autorule_duration_processed,
174                 reason_code,
175                 last_period_to_credit,
176                 sales_order,
177                 sales_order_date,
178                 sales_order_line,
179                 sales_order_source,
180                 vat_tax_id,
181                 tax_exempt_flag,
182                 location_segment_id,
183                 tax_exempt_number,
184                 tax_exempt_reason_code,
185                 tax_vendor_return_code,
186                 tax_exemption_id,
187                 tax_precedence,
188                 tax_rate,
189                 uom_code,
190                 autotax,
191                 movement_id,
192                 default_ussgl_transaction_code,
193                 default_ussgl_trx_code_context,
194                 interface_line_context,
195                 interface_line_attribute1,
196                 interface_line_attribute2,
197                 interface_line_attribute3,
198                 interface_line_attribute4,
199                 interface_line_attribute5,
200                 interface_line_attribute6,
201                 interface_line_attribute7,
202                 interface_line_attribute8,
203                 interface_line_attribute9,
204                 interface_line_attribute10,
205                 interface_line_attribute11,
206                 interface_line_attribute12,
207                 interface_line_attribute13,
208                 interface_line_attribute14,
209                 interface_line_attribute15,
210                 attribute_category,
211                 attribute1,
212                 attribute2,
213                 attribute3,
214                 attribute4,
215                 attribute5,
216                 attribute6,
217                 attribute7,
218                 attribute8,
219                 attribute9,
220                 attribute10,
221                 attribute11,
222                 attribute12,
223                 attribute13,
224                 attribute14,
225                 attribute15,
226                 global_attribute_category,
227                 global_attribute1,
228                 global_attribute2,
229                 global_attribute3,
230                 global_attribute4,
231                 global_attribute5,
232                 global_attribute6,
233                 global_attribute7,
234                 global_attribute8,
235                 global_attribute9,
236                 global_attribute10,
237                 global_attribute11,
238                 global_attribute12,
239                 global_attribute13,
240                 global_attribute14,
241                 global_attribute15,
242                 global_attribute16,
243                 global_attribute17,
244                 global_attribute18,
245                 global_attribute19,
246                 global_attribute20,
247                 fnd_global.user_id, --  created_by
248                 sysdate,                          /* creation_date */
249                 fnd_global.user_id, 		/* last_updated_by */
250                 sysdate,				/* last_update_date */
251                 fnd_global.prog_appl_id, /* program_application_id */
252                 fnd_global.login_id,	/* last_update_login */
253                 null,		/* program_id */
254                 sysdate,				/* program_update_date */
255                 set_of_books_id,	/* set_of_books_id */
256                 gross_unit_selling_price,
257                 gross_extended_amount,
258                 amount_includes_tax_flag,
259                 warehouse_id,
260                 null, --translated_description,
261                 taxable_amount,
262                 request_id, --request_id,
263                 extended_acctd_amount,
264                 null, --br_ref_customer_trx_id,
265                 null, --br_ref_payment_schedule_id,
266                 null, --br_adjustment_id,
267                 null, --wh_update_date,
268                 null, --payment_set_id
269                 arp_standard.sysparm.org_id,
270                 override_auto_accounting_flag,
271 		accounting_rule_duration , /*Bug 4161915*/
272                 rule_end_date,
273                 NVL(HISTORICAL_FLAG,'N'),
274                 TAXABLE_FLAG,
275                 TAX_CLASSIFICATION_CODE,
276                 interest_line_id
277                 FROM ar_trx_lines_gt
278                 WHERE  trx_header_id = nvl(p_trx_header_id, trx_header_id)
279                 AND    trx_line_id  = nvl(p_trx_line_id, trx_line_id);
280 
281     IF pg_debug = 'Y'
282     THEN
283         ar_invoice_utils.debug ('AR_TRX_BULK_PROCESS_LINES.INSERT_ROW (-)');
284     END IF;
285 
286 
287     EXCEPTION
288             WHEN OTHERS THEN
289                 x_errmsg := 'Error in AR_TRX_BULK_PROCESS_LINES.INSERT_ROW '||sqlerrm;
290                 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
291                 return;
292 
293 END INSERT_ROW;
294 END AR_TRX_BULK_PROCESS_LINES;