[Home] [Help]
PACKAGE BODY: APPS.FA_MASS_ADDITIONS_PKG3
Source
1 PACKAGE BODY FA_MASS_ADDITIONS_PKG3 as
2 /* $Header: faxima3b.pls 120.7 2005/07/25 10:03:41 yyoon ship $ */
3
4 PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
5 X_Mass_Addition_Id IN OUT NOCOPY NUMBER ,
6 X_Asset_Number VARCHAR2 DEFAULT NULL,
7 X_Tag_Number VARCHAR2 DEFAULT NULL,
8 X_Description VARCHAR2 DEFAULT NULL,
9 X_Asset_Category_Id NUMBER DEFAULT NULL,
10 X_Manufacturer_Name VARCHAR2 DEFAULT NULL,
11 X_Serial_Number VARCHAR2 DEFAULT NULL,
12 X_Model_Number VARCHAR2 DEFAULT NULL,
13 X_Book_Type_Code VARCHAR2 DEFAULT NULL,
14 X_Date_Placed_In_Service DATE DEFAULT NULL,
15 X_Fixed_Assets_Cost NUMBER DEFAULT NULL,
16 X_Payables_Units NUMBER DEFAULT NULL,
17 X_Fixed_Assets_Units NUMBER DEFAULT NULL,
18 X_Payables_Code_Combination_Id NUMBER DEFAULT NULL,
19 X_Expense_Code_Combination_Id NUMBER DEFAULT NULL,
20 X_Location_Id NUMBER DEFAULT NULL,
21 X_Assigned_To NUMBER DEFAULT NULL,
22 X_Feeder_System_Name VARCHAR2 DEFAULT NULL,
23 X_Create_Batch_Date DATE DEFAULT NULL,
24 X_Create_Batch_Id NUMBER DEFAULT NULL,
25 X_Last_Update_Date DATE DEFAULT NULL,
26 X_Last_Updated_By NUMBER DEFAULT NULL,
27 X_Reviewer_Comments VARCHAR2 DEFAULT NULL,
28 X_Invoice_Number VARCHAR2 DEFAULT NULL,
29 X_Vendor_Number VARCHAR2 DEFAULT NULL,
30 X_Po_Vendor_Id NUMBER DEFAULT NULL,
31 X_Po_Number VARCHAR2 DEFAULT NULL,
32 X_Posting_Status VARCHAR2 DEFAULT NULL,
33 X_Queue_Name VARCHAR2 DEFAULT NULL,
34 X_Invoice_Date DATE DEFAULT NULL,
35 X_Invoice_Created_By NUMBER DEFAULT NULL,
36 X_Invoice_Updated_By NUMBER DEFAULT NULL,
37 X_Payables_Cost NUMBER DEFAULT NULL,
38 X_Invoice_Id NUMBER DEFAULT NULL,
39 X_Payables_Batch_Name VARCHAR2 DEFAULT NULL,
40 X_Depreciate_Flag VARCHAR2 DEFAULT NULL,
41 X_Parent_Mass_Addition_Id NUMBER DEFAULT NULL,
42 X_Parent_Asset_Id NUMBER DEFAULT NULL,
43 X_Split_Merged_Code VARCHAR2 DEFAULT NULL,
44 X_Ap_Distribution_Line_Number NUMBER DEFAULT NULL,
45 X_Post_Batch_Id NUMBER DEFAULT NULL,
46 X_Add_To_Asset_Id NUMBER DEFAULT NULL,
47 X_Amortize_Flag VARCHAR2 DEFAULT NULL,
48 X_New_Master_Flag VARCHAR2 DEFAULT NULL,
49 X_Asset_Key_Ccid NUMBER DEFAULT NULL,
50 X_Asset_Type VARCHAR2 DEFAULT NULL,
51 X_Deprn_Reserve NUMBER DEFAULT NULL,
52 X_Ytd_Deprn NUMBER DEFAULT NULL,
53 X_Beginning_Nbv NUMBER DEFAULT NULL,
54 X_Created_By NUMBER DEFAULT NULL,
55 X_Creation_Date DATE DEFAULT NULL,
56 X_Last_Update_Login NUMBER DEFAULT NULL,
57 X_Salvage_Value NUMBER DEFAULT NULL,
58 X_Accounting_Date DATE DEFAULT NULL,
59 X_Attribute1 VARCHAR2 DEFAULT NULL,
60 X_Attribute2 VARCHAR2 DEFAULT NULL,
61 X_Attribute3 VARCHAR2 DEFAULT NULL,
62 X_Attribute4 VARCHAR2 DEFAULT NULL,
63 X_Attribute5 VARCHAR2 DEFAULT NULL,
64 X_Attribute6 VARCHAR2 DEFAULT NULL,
65 X_Attribute7 VARCHAR2 DEFAULT NULL,
66 X_Attribute8 VARCHAR2 DEFAULT NULL,
67 X_Attribute9 VARCHAR2 DEFAULT NULL,
68 X_Attribute10 VARCHAR2 DEFAULT NULL,
69 X_Attribute11 VARCHAR2 DEFAULT NULL,
70 X_Attribute12 VARCHAR2 DEFAULT NULL,
71 X_Attribute13 VARCHAR2 DEFAULT NULL,
72 X_Attribute14 VARCHAR2 DEFAULT NULL,
73 X_Attribute15 VARCHAR2 DEFAULT NULL,
74 X_Attribute_Category_Code VARCHAR2 DEFAULT NULL,
75 X_Fully_Rsvd_Revals_Counter NUMBER DEFAULT NULL,
76 X_Merge_Invoice_Number VARCHAR2 DEFAULT NULL,
77 X_Merge_Vendor_Number VARCHAR2 DEFAULT NULL,
78 X_Production_Capacity NUMBER DEFAULT NULL,
79 X_Reval_Amortization_Basis NUMBER DEFAULT NULL,
80 X_Reval_Reserve NUMBER DEFAULT NULL,
81 X_Unit_Of_Measure VARCHAR2 DEFAULT NULL,
82 X_Unrevalued_Cost NUMBER DEFAULT NULL,
83 X_Ytd_Reval_Deprn_Expense NUMBER DEFAULT NULL,
84 X_Attribute16 VARCHAR2 DEFAULT NULL,
85 X_Attribute17 VARCHAR2 DEFAULT NULL,
86 X_Attribute18 VARCHAR2 DEFAULT NULL,
87 X_Attribute19 VARCHAR2 DEFAULT NULL,
88 X_Attribute20 VARCHAR2 DEFAULT NULL,
89 X_Attribute21 VARCHAR2 DEFAULT NULL,
90 X_Attribute22 VARCHAR2 DEFAULT NULL,
91 X_Attribute23 VARCHAR2 DEFAULT NULL,
92 X_Attribute24 VARCHAR2 DEFAULT NULL,
93 X_Attribute25 VARCHAR2 DEFAULT NULL,
94 X_Attribute26 VARCHAR2 DEFAULT NULL,
95 X_Attribute27 VARCHAR2 DEFAULT NULL,
96 X_Attribute28 VARCHAR2 DEFAULT NULL,
97 X_Attribute29 VARCHAR2 DEFAULT NULL,
98 X_Attribute30 VARCHAR2 DEFAULT NULL,
99 X_Merged_Code VARCHAR2 DEFAULT NULL,
100 X_Split_Code VARCHAR2 DEFAULT NULL,
101 X_Merge_Parent_Mass_Add_Id NUMBER DEFAULT NULL,
102 X_Split_Parent_Mass_Add_Id NUMBER DEFAULT NULL,
103 X_Sum_Units VARCHAR2 DEFAULT NULL,
104 X_Context VARCHAR2 DEFAULT NULL,
105 X_GLOBAL_ATTRIBUTE1 VARCHAR2 DEFAULT NULL,
106 X_GLOBAL_ATTRIBUTE10 VARCHAR2 DEFAULT NULL,
107 X_GLOBAL_ATTRIBUTE11 VARCHAR2 DEFAULT NULL,
108 X_GLOBAL_ATTRIBUTE12 VARCHAR2 DEFAULT NULL,
109 X_GLOBAL_ATTRIBUTE13 VARCHAR2 DEFAULT NULL,
110 X_GLOBAL_ATTRIBUTE14 VARCHAR2 DEFAULT NULL,
111 X_GLOBAL_ATTRIBUTE15 VARCHAR2 DEFAULT NULL,
112 X_GLOBAL_ATTRIBUTE16 VARCHAR2 DEFAULT NULL,
113 X_GLOBAL_ATTRIBUTE17 VARCHAR2 DEFAULT NULL,
114 X_GLOBAL_ATTRIBUTE18 VARCHAR2 DEFAULT NULL,
115 X_GLOBAL_ATTRIBUTE19 VARCHAR2 DEFAULT NULL,
116 X_GLOBAL_ATTRIBUTE2 VARCHAR2 DEFAULT NULL,
117 X_GLOBAL_ATTRIBUTE20 VARCHAR2 DEFAULT NULL,
118 X_GLOBAL_ATTRIBUTE3 VARCHAR2 DEFAULT NULL,
119 X_GLOBAL_ATTRIBUTE4 VARCHAR2 DEFAULT NULL,
120 X_GLOBAL_ATTRIBUTE5 VARCHAR2 DEFAULT NULL,
121 X_GLOBAL_ATTRIBUTE6 VARCHAR2 DEFAULT NULL,
122 X_GLOBAL_ATTRIBUTE7 VARCHAR2 DEFAULT NULL,
123 X_GLOBAL_ATTRIBUTE8 VARCHAR2 DEFAULT NULL,
124 X_GLOBAL_ATTRIBUTE9 VARCHAR2 DEFAULT NULL,
125 X_GLOBAL_ATTRIBUTE_CATEGORY VARCHAR2 DEFAULT NULL,
126 X_Inventorial VARCHAR2 DEFAULT NULL,
127 X_Transaction_type_code VARCHAR2 DEFAULT NULL,
128 X_transaction_date DATE DEFAULT NULL,
129 X_warranty_id NUMBER DEFAULT NULL,
130 X_lease_id NUMBER DEFAULT NULL,
131 X_lessor_id NUMBER DEFAULT NULL,
132 X_property_type_code VARCHAR2 DEFAULT NULL,
133 X_property_1245_1250_code VARCHAR2 DEFAULT NULL,
134 X_in_use_flag VARCHAR2 DEFAULT NULL,
135 X_owned_leased VARCHAR2 DEFAULT NULL,
136 X_new_used VARCHAR2 DEFAULT NULL,
137 X_asset_id NUMBER DEFAULT NULL,
138 X_group_asset_id NUMBER DEFAULT NULL,
139 X_invoice_distribution_id NUMBER DEFAULT NULL,
140 X_invoice_line_number NUMBER DEFAULT NULL,
141 X_po_distribution_id NUMBER DEFAULT NULL,
142 X_warranty_number VARCHAR2 DEFAULT NULL,
143 p_log_level_rec in fa_api_types.log_level_rec_type default null) IS
144 CURSOR C IS SELECT rowid FROM fa_mass_additions
145 WHERE mass_addition_id = X_Mass_Addition_Id;
146 CURSOR C2 IS SELECT fa_mass_additions_s.nextval FROM sys.dual;
147 BEGIN
148 if (X_Mass_Addition_Id is NULL) then
149 OPEN C2;
150 FETCH C2 INTO X_Mass_Addition_Id;
151 CLOSE C2;
152 end if;
153
154 INSERT INTO fa_mass_additions(
155
156 mass_addition_id,
157 asset_number,
158 tag_number,
159 description,
160 asset_category_id,
161 manufacturer_name,
162 serial_number,
163 model_number,
164 book_type_code,
165 date_placed_in_service,
166 fixed_assets_cost,
167 payables_units,
168 fixed_assets_units,
169 payables_code_combination_id,
170 expense_code_combination_id,
171 location_id,
172 assigned_to,
173 feeder_system_name,
174 create_batch_date,
175 create_batch_id,
176 last_update_date,
177 last_updated_by,
178 reviewer_comments,
179 invoice_number,
180 vendor_number,
181 po_vendor_id,
182 po_number,
183 posting_status,
184 queue_name,
185 invoice_date,
186 invoice_created_by,
187 invoice_updated_by,
188 payables_cost,
189 invoice_id,
190 payables_batch_name,
191 depreciate_flag,
192 parent_mass_addition_id,
193 parent_asset_id,
194 split_merged_code,
195 ap_distribution_line_number,
196 post_batch_id,
197 add_to_asset_id,
198 amortize_flag,
199 new_master_flag,
200 asset_key_ccid,
201 asset_type,
202 deprn_reserve,
203 ytd_deprn,
204 beginning_nbv,
205 created_by,
206 creation_date,
207 last_update_login,
208 salvage_value,
209 accounting_date,
210 attribute1,
211 attribute2,
212 attribute3,
213 attribute4,
214 attribute5,
215 attribute6,
216 attribute7,
217 attribute8,
218 attribute9,
219 attribute10,
220 attribute11,
221 attribute12,
222 attribute13,
223 attribute14,
224 attribute15,
225 attribute_category_code,
226 fully_rsvd_revals_counter,
227 merge_invoice_number,
228 merge_vendor_number,
229 production_capacity,
230 reval_amortization_basis,
231 reval_reserve,
232 unit_of_measure,
233 unrevalued_cost,
234 ytd_reval_deprn_expense,
235 attribute16,
236 attribute17,
237 attribute18,
238 attribute19,
239 attribute20,
240 attribute21,
241 attribute22,
242 attribute23,
243 attribute24,
244 attribute25,
245 attribute26,
246 attribute27,
247 attribute28,
248 attribute29,
249 attribute30,
250 merged_code,
251 split_code,
252 merge_parent_mass_additions_id,
253 split_parent_mass_additions_id,
254 sum_units,
255 context,
256 global_attribute1,
257 global_attribute2,
258 global_attribute3,
259 global_attribute4,
260 global_attribute5,
261 global_attribute6,
262 global_attribute7,
263 global_attribute8,
264 global_attribute9,
265 global_attribute10,
266 global_attribute11,
267 global_attribute12,
268 global_attribute13,
269 global_attribute14,
270 global_attribute15,
271 global_attribute16,
272 global_attribute17,
273 global_attribute18,
274 global_attribute19,
275 global_attribute20,
276 global_attribute_category,
277 inventorial,
278 transaction_type_code,
279 transaction_date,
280 warranty_id,
281 lease_id,
282 lessor_id,
283 property_type_code,
284 property_1245_1250_code,
285 in_use_flag,
286 owned_leased,
287 new_used,
288 asset_id,
289 group_asset_id,
290 invoice_distribution_id,
291 invoice_line_number,
292 po_distribution_id,
293 warranty_number) VALUES (
294
295 X_Mass_Addition_Id,
296 X_Asset_Number,
297 X_Tag_Number,
298 X_Description,
299 X_Asset_Category_Id,
300 X_Manufacturer_Name,
301 X_Serial_Number,
302 X_Model_Number,
303 X_Book_Type_Code,
304 X_Date_Placed_In_Service,
305 X_Fixed_Assets_Cost,
306 X_Payables_Units,
307 X_Fixed_Assets_Units,
308 X_Payables_Code_Combination_Id,
309 X_Expense_Code_Combination_Id,
310 X_Location_Id,
311 X_Assigned_To,
312 X_Feeder_System_Name,
313 X_Create_Batch_Date,
314 X_Create_Batch_Id,
315 X_Last_Update_Date,
316 X_Last_Updated_By,
317 X_Reviewer_Comments,
318 X_Invoice_Number,
319 X_Vendor_Number,
320 X_Po_Vendor_Id,
321 X_Po_Number,
322 X_Posting_Status,
323 X_Queue_Name,
324 X_Invoice_Date,
325 X_Invoice_Created_By,
326 X_Invoice_Updated_By,
327 X_Payables_Cost,
328 X_Invoice_Id,
329 X_Payables_Batch_Name,
330 X_Depreciate_Flag,
331 X_Parent_Mass_Addition_Id,
332 X_Parent_Asset_Id,
333 X_Split_Merged_Code,
334 X_Ap_Distribution_Line_Number,
335 X_Post_Batch_Id,
336 X_Add_To_Asset_Id,
337 X_Amortize_Flag,
338 X_New_Master_Flag,
339 X_Asset_Key_Ccid,
340 X_Asset_Type,
341 X_Deprn_Reserve,
342 X_Ytd_Deprn,
343 X_Beginning_Nbv,
344 X_Created_By,
345 X_Creation_Date,
346 X_Last_Update_Login,
347 X_Salvage_Value,
348 X_Accounting_Date,
349 X_Attribute1,
350 X_Attribute2,
351 X_Attribute3,
352 X_Attribute4,
353 X_Attribute5,
354 X_Attribute6,
355 X_Attribute7,
356 X_Attribute8,
357 X_Attribute9,
358 X_Attribute10,
359 X_Attribute11,
360 X_Attribute12,
361 X_Attribute13,
362 X_Attribute14,
363 X_Attribute15,
364 X_Attribute_Category_Code,
365 X_Fully_Rsvd_Revals_Counter,
366 X_Merge_Invoice_Number,
367 X_Merge_Vendor_Number,
368 X_Production_Capacity,
369 X_Reval_Amortization_Basis,
370 X_Reval_Reserve,
371 X_Unit_Of_Measure,
372 X_Unrevalued_Cost,
373 X_Ytd_Reval_Deprn_Expense,
374 X_Attribute16,
375 X_Attribute17,
376 X_Attribute18,
377 X_Attribute19,
378 X_Attribute20,
379 X_Attribute21,
380 X_Attribute22,
381 X_Attribute23,
382 X_Attribute24,
383 X_Attribute25,
384 X_Attribute26,
385 X_Attribute27,
386 X_Attribute28,
387 X_Attribute29,
388 X_Attribute30,
389 X_Merged_Code,
390 X_Split_Code,
391 X_Merge_Parent_Mass_Add_Id,
392 X_Split_Parent_Mass_Add_Id,
393 X_Sum_Units,
394 X_Context,
395 X_global_attribute1,
396 X_global_attribute2,
397 X_global_attribute3,
398 X_global_attribute4,
399 X_global_attribute5,
400 X_global_attribute6,
401 X_global_attribute7,
402 X_global_attribute8,
403 X_global_attribute9,
404 X_global_attribute10,
405 X_global_attribute11,
406 X_global_attribute12,
407 X_global_attribute13,
408 X_global_attribute14,
409 X_global_attribute15,
410 X_global_attribute16,
411 X_global_attribute17,
412 X_global_attribute18,
413 X_global_attribute19,
414 X_global_attribute20,
415 X_global_attribute_category,
416 X_Inventorial,
417 X_Transaction_type_code,
418 X_transaction_date,
419 X_warranty_id,
420 X_lease_id,
421 X_lessor_id,
422 X_property_type_code,
423 X_property_1245_1250_code,
424 X_in_use_flag,
425 X_owned_leased,
426 X_new_used,
427 X_asset_id,
428 X_group_asset_id,
429 X_invoice_distribution_id,
430 X_invoice_line_number,
431 X_po_distribution_id,
432 X_warranty_number );
433
434 OPEN C;
435 FETCH C INTO X_Rowid;
436 if (C%NOTFOUND) then
437 CLOSE C;
438 Raise NO_DATA_FOUND;
439 end if;
440 CLOSE C;
441
442 END Insert_Row;
443
444 END FA_MASS_ADDITIONS_PKG3;