DBA Data[Home] [Help]

APPS.FA_GAINLOSS_UPD_PKG dependencies on FA_DISTRIBUTION_HISTORY

Line 89: from fa_distribution_history

85: begin
86: -- calculate Corp's TRANSFER OUT THID
87: select transaction_header_id_out
88: into l_id_out
89: from fa_distribution_history
90: where retirement_id =
91: (select r.retirement_id
92: from fa_transaction_headers sth
93: ,fa_retirements r

Line 168: from fa_distribution_history

164: if nvl(ret.mrc_sob_type_code,'P') <> 'R' then
165:
166: select 2
167: into l_balance_tfr_in_tax
168: from fa_distribution_history
169: where asset_id = RET.asset_id
170: and transaction_header_id_out is NULL
171: and rownum = 1
172: and distribution_id =

Line 181: from fa_distribution_history

177: and adjustment_amount <> 0
178: and transaction_header_id < RET.th_id_in
179: and distribution_id in( /*12905004 - Select max dist_id in active dists */
180: select distribution_id
181: from fa_distribution_history
182: where asset_id = RET.asset_id
183: and transaction_header_id_out is NULL)),distribution_id);
184:
185: else

Line 189: from fa_distribution_history

185: else
186:
187: select 2 -- this has to be set to 2 to differ from 1 for a regular balance tfr; used for fagurt
188: into l_balance_tfr_in_tax
189: from fa_distribution_history
190: where asset_id = RET.asset_id
191: and transaction_header_id_out is NULL
192: and rownum = 1
193: and distribution_id =

Line 204: from fa_distribution_history

200: and set_of_books_id = ret.set_of_books_id
201: and transaction_header_id < RET.th_id_in
202: and distribution_id in( /*12905004 - Select max dist_id in active dists */
203: select distribution_id
204: from fa_distribution_history
205: where asset_id = RET.asset_id
206: and transaction_header_id_out is NULL)),distribution_id);
207: end if;
208:

Line 517: FROM FA_DISTRIBUTION_HISTORY dist,

513: CODE_COMBINATION_ID,
514: LOCATION_ID,
515: ASSIGNED_TO, -- bug 3519644
516: TRANSACTION_HEADER_ID_OUT
517: FROM FA_DISTRIBUTION_HISTORY dist,
518: FA_BOOK_CONTROLS bc
519: -- Bug 5149832 WHERE RETIREMENT_ID = ret.retirement_id
520: WHERE RETIREMENT_ID = nvl(l_ret_id_in_corp, ret.retirement_id)
521: AND ASSET_ID = ret.asset_id

Line 531: FROM FA_DISTRIBUTION_HISTORY dist,

527: c_location_id number,
528: c_assigned_to number, -- bug 3519644
529: c_th_id_out number) IS
530: SELECT DISTRIBUTION_ID
531: FROM FA_DISTRIBUTION_HISTORY dist,
532: FA_BOOK_CONTROLS bc
533: WHERE dist.TRANSACTION_HEADER_ID_IN = c_th_id_out
534: AND dist.TRANSACTION_HEADER_ID_OUT is NULL
535: AND dist.CODE_COMBINATION_ID = c_ccid

Line 550: FROM FA_DISTRIBUTION_HISTORY dist,

546: c_location_id number,
547: c_assigned_to number,
548: c_th_id_out number) IS
549: SELECT DISTRIBUTION_ID
550: FROM FA_DISTRIBUTION_HISTORY dist,
551: FA_BOOK_CONTROLS bc
552: WHERE
553: dist.CODE_COMBINATION_ID = c_ccid
554: AND dist.LOCATION_ID = c_location_id

Line 584: FROM FA_DISTRIBUTION_HISTORY dist,

580: Modified c_ret_amount cursor to handle TAX book as well */
581: CURSOR c_ret_amount (c_asset_id number) is
582: SELECT DISTRIBUTION_ID,
583: CODE_COMBINATION_ID
584: FROM FA_DISTRIBUTION_HISTORY dist,
585: FA_BOOK_CONTROLS bc
586: WHERE TRANSACTION_HEADER_ID_OUT is NULL
587: AND ASSET_ID = c_asset_id
588: AND bc.book_type_code = ret.book

Line 1322: FROM FA_DISTRIBUTION_HISTORY dist,

1318: if (ret.units_retired is null and NOT (l_unit_ret_in_corp and l_balance_tfr_in_tax = 0)) then
1319:
1320: SELECT count(*)
1321: INTO tot_dist_lines
1322: FROM FA_DISTRIBUTION_HISTORY dist,
1323: FA_BOOK_CONTROLS bc
1324: WHERE TRANSACTION_HEADER_ID_OUT is NULL
1325: AND ASSET_ID = RET.asset_id
1326: AND bc.book_type_code = RET.book

Line 1333: FROM FA_DISTRIBUTION_HISTORY dist,

1329: else
1330:
1331: SELECT count(*)
1332: INTO tot_dist_lines
1333: FROM FA_DISTRIBUTION_HISTORY dist,
1334: FA_BOOK_CONTROLS bc
1335: WHERE dist.RETIREMENT_ID = nvl(l_ret_id_in_corp, ret.retirement_id)
1336: AND dist.ASSET_ID = RET.asset_id
1337: AND bc.book_type_code = RET.book

Line 2108: from fa_distribution_history

2104:
2105: else
2106: select distinct nvl(transaction_header_id_out,0)
2107: into h_id_out
2108: from fa_distribution_history
2109: where asset_id = h_asset_id
2110: and book_type_code = h_book
2111: and retirement_id = h_ret_id;
2112:

Line 2148: from fa_distribution_history

2144:
2145: begin
2146: select 1
2147: into l_dummy
2148: from fa_distribution_history
2149: where asset_id = h_asset_id
2150: and date_ineffective is null
2151: and transaction_header_id_in = h_id_out
2152: and rownum = 1;

Line 2157: from fa_distribution_history

2153:
2154:
2155: select sum(nvl(units_assigned,0))
2156: into h_cur_units
2157: from fa_distribution_history
2158: where asset_id = h_asset_id
2159: and date_ineffective is null
2160: and transaction_header_id_in = h_id_out;
2161:

Line 2423: fa_distribution_history fadh,

2419: nvl(faadj.source_type_code, 'DEPRECIATION'),
2420: fadp.period_counter,
2421: faadj.transaction_header_id
2422: FROM
2423: fa_distribution_history fadh,
2424: fa_deprn_detail fadd,
2425: fa_deprn_periods fadp,
2426: fa_adjustments faadj
2427: WHERE

Line 2472: fa_distribution_history fadh,

2468: nvl(faadj.source_type_code, 'DEPRECIATION'),
2469: fadp.period_counter,
2470: faadj.transaction_header_id
2471: FROM
2472: fa_distribution_history fadh,
2473: fa_deprn_periods fadp,
2474: fa_adjustments faadj
2475: WHERE
2476: fadp.period_num = h_i

Line 2533: fa_distribution_history fadh,

2529: nvl(faadj.source_type_code, 'DEPRECIATION'),
2530: fadp.period_counter,
2531: faadj.transaction_header_id
2532: FROM
2533: fa_distribution_history fadh,
2534: fa_mc_deprn_detail fadd,
2535: fa_deprn_periods fadp,
2536: fa_mc_adjustments faadj
2537: WHERE

Line 2584: fa_distribution_history fadh,

2580: nvl(faadj.source_type_code, 'DEPRECIATION'),
2581: fadp.period_counter,
2582: faadj.transaction_header_id
2583: FROM
2584: fa_distribution_history fadh,
2585: fa_deprn_periods fadp,
2586: fa_mc_adjustments faadj
2587: WHERE
2588: fadp.period_num = h_i

Line 6417: FROM FA_DISTRIBUTION_HISTORY

6413: SELECT DISTRIBUTION_ID,
6414: CODE_COMBINATION_ID,
6415: TRANSACTION_UNITS,
6416: UNITS_ASSIGNED
6417: FROM FA_DISTRIBUTION_HISTORY
6418: WHERE ASSET_ID = RET.asset_id
6419: AND BOOK_TYPE_CODE = h_dist_book
6420: AND RETIREMENT_ID = RET.retirement_id
6421: ORDER BY DISTRIBUTION_ID;

Line 6858: from fa_distribution_history

6854:
6855: begin
6856: select distinct nvl(transaction_header_id_out,0)
6857: into l_id
6858: from fa_distribution_history
6859: where asset_id = h_asset_id
6860: and book_type_code = h_book
6861: and retirement_id = h_ret_id;
6862:

Line 6877: from fa_distribution_history

6873:
6874: begin
6875: select distinct nvl(transaction_header_id_out,0)
6876: into h_id_out
6877: from fa_distribution_history
6878: where asset_id = h_asset_id
6879: and book_type_code = h_book
6880: and retirement_id = h_ret_id;
6881:

Line 6901: from fa_distribution_history

6897: begin
6898:
6899: select sum(nvl(units_assigned,0))
6900: into h_sum_of_part_active_units
6901: from fa_distribution_history
6902: where asset_id = h_asset_id
6903: and transaction_header_id_in = h_id_out
6904: and date_ineffective is null;
6905:

Line 7003: from fa_distribution_history

6999: begin
7000:
7001: select 1
7002: into l_dummy
7003: from fa_distribution_history
7004: where asset_id = h_asset_id
7005: and date_ineffective is null
7006: and transaction_header_id_in = h_id_out
7007: and rownum = 1;

Line 7013: from fa_distribution_history

7009:
7010: /* Fix for Bug#4617352 */
7011: select sum(nvl(units_assigned,0))
7012: into h_cur_units
7013: from fa_distribution_history
7014: where asset_id = h_asset_id
7015: and date_ineffective is null
7016: and transaction_header_id_in = h_id_out;
7017: