DBA Data[Home] [Help]

APPS.FA_MASS_RET_PKG dependencies on FA_MASS_EXT_RETIREMENTS

Line 410: insert into fa_mass_ext_retirements

406:
407: error varchar2(100);
408: BEGIN
409:
410: insert into fa_mass_ext_retirements
411: (batch_name,
412: mass_external_retire_id,
413: book_type_code,
414: review_status,

Line 436: fa_mass_ext_retirements_s.nextval,

432: )
433: VALUES
434: (
435: g_batch_name,
436: fa_mass_ext_retirements_s.nextval,
437: g_book_type_code,
438: 'POST',
439: p_asset_id,
440: 'YES', -- calc_gain_loss_flag

Line 1086: From fa_mass_ext_retirements mer,

1082: mer.mass_external_retire_id,
1083: mer.code_combination_id,
1084: mer.location_id,
1085: mer.assigned_to
1086: From fa_mass_ext_retirements mer,
1087: fa_books bk,
1088: fa_additions ad
1089: Where mer.batch_name = G_batch_name -- current batch
1090: And mer.asset_id = bk.asset_id

Line 1273: from fa_mass_ext_retirements

1269:
1270:
1271: cursor c_mer is
1272: select units
1273: from fa_mass_ext_retirements
1274: where book_type_code = G_book_type_code
1275: and asset_id = l_asset_id
1276: and review_status = 'POST'
1277: and units is not null

Line 1344: -- this solution assumes that units are entered in fa_mass_ext_retirements records.(verified ok).

1340: fa_debug_pkg.add(l_calling_fn, 'In aurec-loop: asset_id',aurec.asset_Id , p_log_level_rec => g_log_level_rec);
1341: fa_debug_pkg.add(l_calling_fn, 'In aurec-loop: mer_units',aurec.mer_units, p_log_level_rec => g_log_level_rec);
1342: end if;
1343:
1344: -- this solution assumes that units are entered in fa_mass_ext_retirements records.(verified ok).
1345:
1346: if l_asset_id <> aurec.asset_id then
1347:
1348: l_asset_id := aurec.asset_id;

Line 1371: Update fa_mass_ext_retirements

1367: end if;
1368:
1369: l_remaining_units := l_remaining_units - aurec.mer_units;
1370:
1371: Update fa_mass_ext_retirements
1372: Set review_status = 'POST',
1373: calc_gain_loss_flag = 'YES'
1374: Where mass_external_retire_id = aurec.mass_external_retire_id;
1375:

Line 1389: from fa_mass_ext_retirements

1385:
1386:
1387: select nvl(sum(units),0)
1388: into l_asset_post_units
1389: from fa_mass_ext_retirements
1390: where book_type_code = g_book_type_code
1391: and asset_id = l_asset_id
1392: and review_status = 'POST'
1393: and batch_name <> g_batch_name;

Line 1421: from fa_mass_ext_retirements

1417: -- 1. check if any asset exists with distribution info
1418:
1419: select nvl(sum(units),0)
1420: into l_dist_post_units
1421: from fa_mass_ext_retirements
1422: where book_type_code = g_book_type_code
1423: and asset_id = l_asset_id
1424: and review_status = 'POST'
1425: and batch_name <> g_batch_name

Line 1545: from fa_mass_ext_retirements

1541: if aurec.current_units > l_asset_post_units then
1542:
1543: select nvl(sum(units),0)
1544: into l_dist_post_units
1545: from fa_mass_ext_retirements
1546: where book_type_code = g_book_type_code
1547: and asset_id = l_asset_id
1548: and review_status = 'POST'
1549: and batch_name <> g_batch_name

Line 1727: from fa_mass_ext_retirements

1723: end if;
1724:
1725: select nvl(sum(units),0)
1726: into l_asset_post_units
1727: from fa_mass_ext_retirements
1728: where book_type_code = g_book_type_code
1729: and asset_id = l_asset_id
1730: and review_status = 'POST'
1731: and batch_name <> g_batch_name;

Line 1758: from fa_mass_ext_retirements

1754:
1755:
1756: select nvl(sum(units),0)
1757: into l_dist_post_units
1758: from fa_mass_ext_retirements
1759: where book_type_code = g_book_type_code
1760: and asset_id = l_asset_id
1761: and review_status = 'POST'
1762: and batch_name <> g_batch_name

Line 1946: from fa_mass_ext_retirements

1942:
1943:
1944: select nvl(sum(units),0)
1945: into l_dist_post_units
1946: from fa_mass_ext_retirements
1947: where book_type_code = g_book_type_code
1948: and asset_id = l_asset_id
1949: and review_status = 'POST'
1950: and batch_name <> g_batch_name

Line 2187: from fa_mass_ext_retirements

2183:
2184: -- need to prorate the units over distributions.....
2185: select nvl(sum(units),0)
2186: into l_asset_post_units
2187: from fa_mass_ext_retirements
2188: where book_type_code = g_book_type_code
2189: and asset_id = l_asset_id
2190: and review_status = 'POST'
2191: and batch_name <> g_batch_name;

Line 2226: from fa_mass_ext_retirements

2222: end if;
2223:
2224: select nvl(sum(units),0)
2225: into l_dist_post_units
2226: from fa_mass_ext_retirements
2227: where book_type_code = g_book_type_code
2228: and asset_id = l_asset_id
2229: and review_status = 'POST'
2230: and batch_name <> g_batch_name

Line 2328: from fa_mass_ext_retirements

2324:
2325: if l_2nd_current_units > l_asset_post_units then
2326: select nvl(sum(units),0)
2327: into l_dist_post_units
2328: from fa_mass_ext_retirements
2329: where book_type_code = g_book_type_code
2330: and asset_id = l_asset_id
2331: and review_status = 'POST'
2332: and batch_name <> g_batch_name

Line 2495: from fa_mass_ext_retirements

2491:
2492:
2493: select nvl(sum(units),0)
2494: into l_asset_post_units
2495: from fa_mass_ext_retirements
2496: where book_type_code = g_book_type_code
2497: and asset_id = l_asset_id
2498: and review_status = 'POST'
2499: and batch_name <> g_batch_name;

Line 2514: from fa_mass_ext_retirements

2510:
2511:
2512: select nvl(sum(units),0)
2513: into l_dist_post_units
2514: from fa_mass_ext_retirements
2515: where book_type_code = g_book_type_code
2516: and asset_id = l_asset_id
2517: and review_status = 'POST'
2518: and batch_name <> g_batch_name

Line 2663: from fa_mass_ext_retirements

2659: if l_2nd_current_units > l_asset_post_units then
2660:
2661: select nvl(sum(units),0)
2662: into l_dist_post_units
2663: from fa_mass_ext_retirements
2664: where book_type_code = g_book_type_code
2665: and asset_id = l_asset_id
2666: and review_status = 'POST'
2667: and batch_name <> g_batch_name

Line 2765: Delete from fa_mass_ext_retirements

2761: if (g_log_level_rec.statement_level) then
2762: fa_debug_pkg.add(l_calling_fn, 'Update status',l_remaining_units , p_log_level_rec => g_log_level_rec);
2763: end if;
2764:
2765: Delete from fa_mass_ext_retirements
2766: Where batch_name = g_batch_name;
2767:
2768: Update fa_mass_retirements
2769: Set status = 'ON_HOLD'

Line 2787: -- inserted into fa_mass_ext_retirements

2783:
2784:
2785: Elsif l_remaining_units <= 0 then
2786: -- Not enough units provided, assets have been
2787: -- inserted into fa_mass_ext_retirements
2788: -- but will not get any units assigned for certain of these rows.
2789: if (g_log_level_rec.statement_level) then
2790: fa_debug_pkg.add(l_calling_fn, 'Update status <= 0 ',l_remaining_units , p_log_level_rec => g_log_level_rec);
2791: end if;

Line 2796: Delete from fa_mass_ext_retirements

2792:
2793:
2794: -- rn Delete review_status have been set in initial insert.
2795:
2796: Delete from fa_mass_ext_retirements
2797: Where batch_name = g_batch_name
2798: And review_status = 'DELETE';
2799:
2800: -- rn print messages to outfile now.

Line 3313: FROM fa_mass_ext_retirements

3309:
3310: CURSOR mass_ret_assets (p_batch_name varchar2) IS
3311: SELECT asset_id,
3312: cost_retired
3313: FROM fa_mass_ext_retirements
3314: WHERE batch_name = p_batch_name;
3315:
3316: /* Bug 8647381 - Starts */
3317: -- Bug 9694294 : Changed date_ineffective to trx_hdr_id_out

Line 3522: delete from fa_mass_ext_retirements

3518: fa_srvr_msg.add_message(name => 'FA_MASSRET_INVALID_STATUS',
3519: calling_fn => l_calling_fn, p_log_level_rec => g_log_level_rec);
3520: raise error_found;
3521: else -- purge any prior / incomplete data from mass ext ret
3522: delete from fa_mass_ext_retirements
3523: where batch_name = g_batch_name;
3524: commit;
3525: end if;
3526:

Line 3705: -- because some of these assets may be deleted from fa_mass_ext_retirements

3701:
3702:
3703: end if;
3704: -- rn Print message during allocate_units when there are units to prorate,
3705: -- because some of these assets may be deleted from fa_mass_ext_retirements
3706: -- due to unit buckets are emptied.
3707: If nvl(G_UNITS,0) = 0 then
3708: Write_Message(l_sc_Asset_Number(l_loop_count_sub),'FA_SHARED_INSERT_DEBUG','','');
3709: End if;

Line 3875: insert into fa_mass_ext_retirements

3871: 'Before insert into fa_mass_ext_ret ccid',
3872: l_asset_dist_tbl(l_dist_count).expense_ccid );
3873: end if;
3874:
3875: insert into fa_mass_ext_retirements
3876: (batch_name,
3877: mass_external_retire_id,
3878: book_type_code,
3879: review_status,

Line 3933: fa_mass_ext_retirements_s.nextval,

3929: recognize_gain_loss
3930: )
3931: values
3932: (g_batch_name,
3933: fa_mass_ext_retirements_s.nextval,
3934: G_book_type_code,
3935: decode(nvl(g_units,0),'0','POST','DELETE'),
3936: l_candidate_asset_id(l_count),
3937: 'NO',

Line 3990: 'After insert into FA_MASS_EXT_RETIREMENTS table, asset_id',

3986: );
3987:
3988: if (g_log_level_rec.statement_level) then
3989: fa_debug_pkg.add(l_calling_fn,
3990: 'After insert into FA_MASS_EXT_RETIREMENTS table, asset_id',
3991: l_candidate_asset_id(l_count));
3992: fa_debug_pkg.add(l_calling_fn,
3993: 'After insert into FA_MASS_EXT_RETIREMENTS table, units_assigned',
3994: l_asset_dist_tbl(l_dist_count).units_assigned );

Line 3993: 'After insert into FA_MASS_EXT_RETIREMENTS table, units_assigned',

3989: fa_debug_pkg.add(l_calling_fn,
3990: 'After insert into FA_MASS_EXT_RETIREMENTS table, asset_id',
3991: l_candidate_asset_id(l_count));
3992: fa_debug_pkg.add(l_calling_fn,
3993: 'After insert into FA_MASS_EXT_RETIREMENTS table, units_assigned',
3994: l_asset_dist_tbl(l_dist_count).units_assigned );
3995: fa_debug_pkg.add(l_calling_fn,
3996: 'After insert into FA_MASS_EXT_RETIREMENTS table, cost_retired',
3997: l_candidate_cost_retired(l_count));

Line 3996: 'After insert into FA_MASS_EXT_RETIREMENTS table, cost_retired',

3992: fa_debug_pkg.add(l_calling_fn,
3993: 'After insert into FA_MASS_EXT_RETIREMENTS table, units_assigned',
3994: l_asset_dist_tbl(l_dist_count).units_assigned );
3995: fa_debug_pkg.add(l_calling_fn,
3996: 'After insert into FA_MASS_EXT_RETIREMENTS table, cost_retired',
3997: l_candidate_cost_retired(l_count));
3998:
3999: fa_debug_pkg.add(l_calling_fn,
4000: 'After insert into FA_MASS_EXT_RETIREMENTS table',

Line 4000: 'After insert into FA_MASS_EXT_RETIREMENTS table',

3996: 'After insert into FA_MASS_EXT_RETIREMENTS table, cost_retired',
3997: l_candidate_cost_retired(l_count));
3998:
3999: fa_debug_pkg.add(l_calling_fn,
4000: 'After insert into FA_MASS_EXT_RETIREMENTS table',
4001: l_candidate_units(l_count) );
4002:
4003: end if;
4004:

Line 4064: from fa_mass_ext_retirements

4060: select count(*),
4061: sum(abs(cost_retired))
4062: into l_total_count_retired,
4063: l_total_cost_retired
4064: from fa_mass_ext_retirements
4065: where batch_name = g_batch_name;
4066:
4067: if (g_log_level_rec.statement_level) then
4068: fa_debug_pkg.add(l_calling_fn,

Line 4099: from fa_mass_ext_retirements

4095: LIMIT l_batch_size;
4096:
4097: select count(*)
4098: into l_msg_count
4099: from fa_mass_ext_retirements
4100: where batch_name = g_batch_name;
4101:
4102: if (g_log_level_rec.statement_level) then
4103: fa_debug_pkg.add(l_calling_fn,

Line 4165: UPDATE fa_mass_ext_retirements

4161: end if;
4162: END LOOP;
4163:
4164: FORALL l_count in 1..l_asset_id.count
4165: UPDATE fa_mass_ext_retirements
4166: SET cost_of_removal = l_prorated_cost_of_removal(l_count),
4167: proceeds_of_sale = l_prorated_proceeds_of_sale(l_count)
4168: where asset_id = l_asset_id(l_count)
4169: and batch_name = g_batch_name;