DBA Data[Home] [Help]

APPS.OZF_ALLOCATION_ENGINE_PVT dependencies on OZF_ACCOUNT_ALLOCATIONS

Line 179: SELECT ozf_account_allocations_s.NEXTVAL

175: l_api_name CONSTANT VARCHAR2(30) := 'get_account_allocation_id';
176: l_full_api_name CONSTANT VARCHAR2(60) := g_pkg_name ||'.'|| l_api_name;
177:
178: CURSOR account_seq_csr IS
179: SELECT ozf_account_allocations_s.NEXTVAL
180: FROM DUAL;
181:
182: CURSOR account_alloc_count_csr(p_account_alloc_id in number) IS
183: SELECT count(account_allocation_id)

Line 184: FROM ozf_account_allocations

180: FROM DUAL;
181:
182: CURSOR account_alloc_count_csr(p_account_alloc_id in number) IS
183: SELECT count(account_allocation_id)
184: FROM ozf_account_allocations
185: WHERE account_allocation_id = p_account_alloc_id;
186:
187: l_count number := -1;
188: l_account_alloc_id number := -1;

Line 262: ozf_account_allocations a

258: SELECT
259: a.allocation_for_id,
260: a.site_use_id
261: FROM
262: ozf_account_allocations a
263: WHERE
264: a.account_allocation_id = l_account_allocation_id;
265:
266: l_account_spread_rec account_spread_csr%ROWTYPE;

Line 4807: ozf_account_allocations p

4803: (l_fund_id number) IS
4804: SELECT DISTINCT
4805: p.account_allocation_id
4806: FROM
4807: ozf_account_allocations p
4808: WHERE
4809: p.allocation_for = 'FUND'
4810: AND p.allocation_for_id = l_fund_id;
4811:

Line 4874: DELETE ozf_account_allocations p

4870: AND p.allocation_for_id = account_rec.account_allocation_id;
4871:
4872: END LOOP;
4873:
4874: DELETE ozf_account_allocations p
4875: WHERE p.allocation_for = 'FUND'
4876: AND p.allocation_for_id = l_fund_id;
4877:
4878:

Line 4988: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

4984:
4985: l_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
4986: l_lysp_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
4987:
4988: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
4989: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
4990: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
4991:
4992:

Line 5481: Ozf_Account_Allocations_Pkg.Insert_Row(

5477: p_acct_alloc_rec.lysp_sales := l_total_account_sales;
5478:
5479: l_account_allocation_id := get_account_allocation_id;
5480:
5481: Ozf_Account_Allocations_Pkg.Insert_Row(
5482: px_Account_allocation_id => l_account_allocation_id,
5483: p_allocation_for => p_acct_alloc_rec.allocation_for,
5484: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
5485: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 5808: Ozf_Account_Allocations_Pkg.Insert_Row(

5804: p_acct_alloc_rec.lysp_sales := 0;
5805:
5806: l_account_allocation_id := get_account_allocation_id;
5807:
5808: Ozf_Account_Allocations_Pkg.Insert_Row(
5809: px_Account_allocation_id => l_account_allocation_id,
5810: p_allocation_for => p_acct_alloc_rec.allocation_for,
5811: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
5812: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 5911: FROM OZF_ACCOUNT_ALLOCATIONS a

5907:
5908: BEGIN
5909:
5910: SELECT a.TARGET INTO l_diff_target_1
5911: FROM OZF_ACCOUNT_ALLOCATIONS a
5912: WHERE a.allocation_for = 'FUND'
5913: AND a.allocation_for_id = l_fund_id
5914: AND a.parent_party_id = -9999;
5915:

Line 5920: FROM OZF_ACCOUNT_ALLOCATIONS a

5916: SELECT SUM(t.TARGET) INTO l_diff_target_2
5917: FROM OZF_TIME_ALLOCATIONS t
5918: WHERE t.allocation_for = 'CUST'
5919: AND t.allocation_for_id IN ( SELECT a.account_allocation_id
5920: FROM OZF_ACCOUNT_ALLOCATIONS a
5921: WHERE a.allocation_for = 'FUND'
5922: AND a.allocation_for_id = l_fund_id
5923: AND a.parent_party_id = -9999 );
5924:

Line 5944: FROM OZF_ACCOUNT_ALLOCATIONS a

5940: t.last_update_login = FND_GLOBAL.CONC_LOGIN_ID
5941: WHERE t.time_allocation_id = (SELECT max(x.time_allocation_id) from OZF_TIME_ALLOCATIONS x
5942: WHERE x.allocation_for = 'CUST'
5943: AND x.allocation_for_id IN ( SELECT a.account_allocation_id
5944: FROM OZF_ACCOUNT_ALLOCATIONS a
5945: WHERE a.allocation_for = 'FUND'
5946: AND a.allocation_for_id = l_fund_id
5947: AND a.parent_party_id = -9999 )
5948: );

Line 6099: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

6095:
6096: l_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
6097: l_lysp_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
6098:
6099: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
6100: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
6101: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
6102:
6103:

Line 6593: Ozf_Account_Allocations_Pkg.Insert_Row(

6589: p_acct_alloc_rec.lysp_sales := l_total_account_sales;
6590:
6591: l_account_allocation_id := get_account_allocation_id;
6592:
6593: Ozf_Account_Allocations_Pkg.Insert_Row(
6594: px_Account_allocation_id => l_account_allocation_id,
6595: p_allocation_for => p_acct_alloc_rec.allocation_for,
6596: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
6597: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 6707: UPDATE OZF_ACCOUNT_ALLOCATIONS a

6703: FROM OZF_TIME_ALLOCATIONS ti
6704: WHERE ti.ALLOCATION_FOR = 'CUST'
6705: AND ti.ALLOCATION_FOR_ID = l_account_allocation_id;
6706:
6707: UPDATE OZF_ACCOUNT_ALLOCATIONS a
6708: SET a.TARGET = l_total_account_target,
6709: a.object_version_number = a.object_version_number + 1,
6710: a.last_update_date = SYSDATE,
6711: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 7235: Ozf_Account_Allocations_Pkg.Insert_Row(

7231: p_acct_alloc_rec.lysp_sales := 0;
7232:
7233: l_account_allocation_id := get_account_allocation_id;
7234:
7235: Ozf_Account_Allocations_Pkg.Insert_Row(
7236: px_Account_allocation_id => l_account_allocation_id,
7237: p_allocation_for => p_acct_alloc_rec.allocation_for,
7238: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
7239: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 7338: FROM OZF_ACCOUNT_ALLOCATIONS a

7334:
7335: BEGIN
7336:
7337: SELECT a.TARGET INTO l_diff_target_1
7338: FROM OZF_ACCOUNT_ALLOCATIONS a
7339: WHERE a.allocation_for = 'FUND'
7340: AND a.allocation_for_id = l_fund_id
7341: AND a.parent_party_id = -9999;
7342:

Line 7347: FROM OZF_ACCOUNT_ALLOCATIONS a

7343: SELECT SUM(t.TARGET) INTO l_diff_target_2
7344: FROM OZF_TIME_ALLOCATIONS t
7345: WHERE t.allocation_for = 'CUST'
7346: AND t.allocation_for_id IN ( SELECT a.account_allocation_id
7347: FROM OZF_ACCOUNT_ALLOCATIONS a
7348: WHERE a.allocation_for = 'FUND'
7349: AND a.allocation_for_id = l_fund_id
7350: AND a.parent_party_id = -9999 );
7351:

Line 7379: FROM OZF_ACCOUNT_ALLOCATIONS a

7375: t.last_update_login = FND_GLOBAL.CONC_LOGIN_ID
7376: WHERE t.time_allocation_id = (SELECT max(x.time_allocation_id) from OZF_TIME_ALLOCATIONS x
7377: WHERE x.allocation_for = 'CUST'
7378: AND x.allocation_for_id IN ( SELECT a.account_allocation_id
7379: FROM OZF_ACCOUNT_ALLOCATIONS a
7380: WHERE a.allocation_for = 'FUND'
7381: AND a.allocation_for_id = l_fund_id
7382: AND a.parent_party_id = -9999 )
7383: );

Line 7416: FROM OZF_ACCOUNT_ALLOCATIONS a

7412:
7413: BEGIN
7414:
7415: SELECT SUM(a.TARGET) INTO l_diff_target_1
7416: FROM OZF_ACCOUNT_ALLOCATIONS a
7417: WHERE a.allocation_for = 'FUND'
7418: AND a.allocation_for_id = l_fund_id;
7419:
7420: l_diff_target := (NVL(l_total_root_quota, 0) - NVL(l_diff_target_1, 0));

Line 7441: FROM OZF_ACCOUNT_ALLOCATIONS a

7437: t.last_update_login = FND_GLOBAL.CONC_LOGIN_ID
7438: WHERE t.time_allocation_id = (SELECT max(x.time_allocation_id) from OZF_TIME_ALLOCATIONS x
7439: WHERE x.allocation_for = 'CUST'
7440: AND x.allocation_for_id IN ( SELECT a.account_allocation_id
7441: FROM OZF_ACCOUNT_ALLOCATIONS a
7442: WHERE a.allocation_for = 'FUND'
7443: AND a.allocation_for_id = l_fund_id
7444: AND a.parent_party_id = -9999)
7445: );

Line 7456: UPDATE OZF_ACCOUNT_ALLOCATIONS a

7452: RAISE fnd_api.g_exc_unexpected_error;
7453: END IF;
7454:
7455:
7456: UPDATE OZF_ACCOUNT_ALLOCATIONS a
7457: SET a.TARGET = a.TARGET + l_diff_target,
7458: a.object_version_number = a.object_version_number + 1,
7459: a.last_update_date = SYSDATE,
7460: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 7500: FROM OZF_ACCOUNT_ALLOCATIONS a

7496: WHERE t.time_allocation_id = (SELECT MAX(x.time_allocation_id)
7497: FROM OZF_TIME_ALLOCATIONS x
7498: WHERE x.allocation_for = 'CUST'
7499: AND x.allocation_for_id IN ( SELECT MAX(a.account_allocation_id)
7500: FROM OZF_ACCOUNT_ALLOCATIONS a
7501: WHERE a.allocation_for = 'FUND'
7502: AND a.allocation_for_id = l_fund_id
7503: AND a.target = (SELECT MAX(xyz.target)
7504: FROM OZF_ACCOUNT_ALLOCATIONS xyz

Line 7504: FROM OZF_ACCOUNT_ALLOCATIONS xyz

7500: FROM OZF_ACCOUNT_ALLOCATIONS a
7501: WHERE a.allocation_for = 'FUND'
7502: AND a.allocation_for_id = l_fund_id
7503: AND a.target = (SELECT MAX(xyz.target)
7504: FROM OZF_ACCOUNT_ALLOCATIONS xyz
7505: WHERE xyz.allocation_for = 'FUND'
7506: AND xyz.allocation_for_id = l_fund_id)
7507: )
7508: AND x.target = (SELECT MAX(xyz2.target)

Line 7513: FROM OZF_ACCOUNT_ALLOCATIONS ax

7509: FROM OZF_TIME_ALLOCATIONS xyz2
7510: WHERE xyz2.allocation_for = 'CUST'
7511: AND xyz2.allocation_for_id IN
7512: ( SELECT MAX(ax.account_allocation_id)
7513: FROM OZF_ACCOUNT_ALLOCATIONS ax
7514: WHERE ax.allocation_for = 'FUND'
7515: AND ax.allocation_for_id = l_fund_id
7516: AND ax.target =
7517: (SELECT MAX(yz.target)

Line 7518: FROM OZF_ACCOUNT_ALLOCATIONS yz

7514: WHERE ax.allocation_for = 'FUND'
7515: AND ax.allocation_for_id = l_fund_id
7516: AND ax.target =
7517: (SELECT MAX(yz.target)
7518: FROM OZF_ACCOUNT_ALLOCATIONS yz
7519: WHERE yz.allocation_for = 'FUND'
7520: AND yz.allocation_for_id = l_fund_id)
7521: )
7522: )

Line 7539: UPDATE OZF_ACCOUNT_ALLOCATIONS a

7535:
7536:
7537: -- OZF_UTILITY_PVT.debug_message('4.mkothari--'||'ALL TARGETS AccAllocID=> '||l_temp_account_allocation_id|| ';');
7538:
7539: UPDATE OZF_ACCOUNT_ALLOCATIONS a
7540: SET a.TARGET = a.TARGET + l_diff_target,
7541: a.object_version_number = a.object_version_number + 1,
7542: a.last_update_date = SYSDATE,
7543: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 7778: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

7774:
7775: l_new_ozf_period_tbl OZF_PERIOD_TBL_TYPE;
7776: l_old_ozf_period_tbl OZF_PERIOD_TBL_TYPE;
7777:
7778: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
7779: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
7780: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
7781:
7782:

Line 7824: ozf_account_allocations a

7820: SELECT
7821: SUM(bsmv.sales) sales
7822: FROM
7823: ozf_order_sales_v bsmv,
7824: ozf_account_allocations a
7825: WHERE
7826: a.allocation_for = 'FUND'
7827: AND a.allocation_for_id = l_fund_id
7828: AND bsmv.ship_to_site_use_id = a.site_use_id

Line 7846: ozf_account_allocations a

7842: a.bill_to_location_id bill_to_location_id,
7843: a.parent_party_id parent_party_id,
7844: a.rollup_party_id rollup_party_id
7845: FROM
7846: ozf_account_allocations a
7847: WHERE
7848: a.allocation_for = 'FUND'
7849: AND a.allocation_for_id = l_fund_id;
7850:

Line 8058: ozf_account_allocations a

8054: (l_fund_id NUMBER) IS
8055: SELECT DISTINCT t.time_id
8056: FROM
8057: ozf_time_allocations t,
8058: ozf_account_allocations a
8059: WHERE
8060: a.allocation_for = 'FUND'
8061: AND a.allocation_for_id = l_fund_id
8062: AND t.allocation_for_id = a.account_allocation_id

Line 8265: UPDATE ozf_account_allocations a

8261:
8262: l_total_account_sales := NVL(l_total_account_sales, 0);
8263: l_total_account_target := ROUND( (l_total_account_sales * l_multiplying_factor), 0);
8264:
8265: UPDATE ozf_account_allocations a
8266: SET a.target = a.target + l_total_account_target,
8267: a.lysp_sales = a.lysp_sales + l_total_account_sales,
8268: a.object_version_number = a.object_version_number + 1,
8269: a.last_update_date = SYSDATE,

Line 8490: UPDATE ozf_account_allocations a

8486: OZF_UTILITY_PVT.debug_message('Private API: ' || l_full_api_name ||
8487: ': Begin - Updating UNALLOCATED Account and Populating Time Allocations Records'
8488: || 'FOR FUND_Id = '|| l_fund_id || ' ; ');
8489:
8490: UPDATE ozf_account_allocations a
8491: SET a.target = a.target + l_total_target_unalloc,
8492: a.object_version_number = a.object_version_number + 1,
8493: a.last_update_date = SYSDATE,
8494: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 9041: from ozf_account_allocations

9037:
9038: CURSOR acct_alloc_bes_csr (l_fund_id NUMBER)
9039: IS
9040: select account_allocation_id
9041: from ozf_account_allocations
9042: where allocation_for = 'FUND'
9043: AND allocation_for_id = l_fund_id
9044: AND parent_party_id > 0;
9045:

Line 9381: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

9377:
9378: l_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
9379: l_lysp_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
9380:
9381: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
9382: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
9383: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
9384:
9385:

Line 9663: FROM ozf_account_allocations aa

9659: THEN
9660:
9661: ---read the corr funds existing account rows -----
9662: SELECT * INTO p_acct_alloc_rec
9663: FROM ozf_account_allocations aa
9664: WHERE aa.allocation_for = 'FUND'
9665: and allocation_for_id = p_corr_fund_id
9666: and site_use_code = 'SHIP_TO'
9667: and site_use_id = p_ship_to_site_use_id;

Line 9672: FROM ozf_account_allocations aa

9668: ELSE
9669:
9670: -- read the unallocated row for p_fund_id
9671: SELECT * INTO p_acct_alloc_rec
9672: FROM ozf_account_allocations aa
9673: WHERE aa.allocation_for = 'FUND'
9674: and allocation_for_id = p_fund_id
9675: and site_use_id = -9999;
9676:

Line 9717: Ozf_Account_Allocations_Pkg.Insert_Row(

9713: END IF;
9714:
9715: l_account_allocation_id := get_account_allocation_id;
9716:
9717: Ozf_Account_Allocations_Pkg.Insert_Row(
9718: px_Account_allocation_id => l_account_allocation_id,
9719: p_allocation_for => p_acct_alloc_rec.allocation_for,
9720: p_allocation_for_id => p_fund_id,
9721: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 9839: FROM ozf_account_allocations aa

9835: )
9836: where
9837: tta.allocation_for = 'CUST'
9838: AND tta.allocation_for_id = ( SELECT aa.account_allocation_id
9839: FROM ozf_account_allocations aa
9840: WHERE aa.allocation_for = 'FUND'
9841: and aa.allocation_for_id = p_fund_id
9842: and aa.site_use_id = -9999)
9843: and EXISTS

Line 9865: FROM ozf_account_allocations aa

9861: AND ttb.allocation_for_id = l_account_allocation_id
9862: AND tta.time_id = ttb.time_id
9863: AND tta.allocation_for = 'CUST'
9864: AND tta.allocation_for_id ( SELECT aa.account_allocation_id
9865: FROM ozf_account_allocations aa
9866: WHERE aa.allocation_for = 'FUND'
9867: and aa.allocation_for_id = p_fund_id
9868: and aa.site_use_id = -9999)
9869: and EXISTS

Line 9911: UPDATE OZF_ACCOUNT_ALLOCATIONS aa

9907: -- (ii) for unallocated row
9908:
9909: -- 6. UPDATING NEW SHIPTO and UNALLOCATED ACCOUNT Header RECORDS ....
9910:
9911: UPDATE OZF_ACCOUNT_ALLOCATIONS aa
9912: SET (aa.TARGET, aa.LYSP_SALES) = (
9913: SELECT SUM(ti.TARGET), SUM(ti.lysp_sales)
9914: FROM OZF_TIME_ALLOCATIONS ti
9915: WHERE ti.ALLOCATION_FOR = 'CUST'

Line 10331: FROM ozf_account_allocations aa

10327:
10328: BEGIN
10329:
10330: SELECT aa.account_allocation_id INTO l_account_allocation_id
10331: FROM ozf_account_allocations aa
10332: WHERE aa.allocation_for = 'FUND'
10333: and aa.allocation_for_id = p_fund_id
10334: and aa.site_use_code = 'SHIP_TO'
10335: and aa.site_use_id = p_ship_to_site_use_id;

Line 10339: FROM ozf_account_allocations aa

10335: and aa.site_use_id = p_ship_to_site_use_id;
10336:
10337:
10338: SELECT aa.account_allocation_id INTO l_unalloc_acct_alloc_id
10339: FROM ozf_account_allocations aa
10340: WHERE aa.allocation_for = 'FUND'
10341: and aa.allocation_for_id = p_fund_id
10342: and aa.site_use_id = -9999;
10343:

Line 10392: UPDATE OZF_ACCOUNT_ALLOCATIONS aa

10388: BEGIN
10389: Ozf_Utility_pvt.write_conc_log(' - '||l_full_api_name|| ' - 1(b). ADJUSTING UNALLOCATED Account record....');
10390:
10391: -- Rollup the total targets to the unallocated records
10392: UPDATE OZF_ACCOUNT_ALLOCATIONS aa
10393: SET (aa.TARGET, aa.LYSP_SALES) = (
10394: SELECT SUM(ti.TARGET), SUM(ti.lysp_sales)
10395: FROM OZF_TIME_ALLOCATIONS ti
10396: WHERE ti.ALLOCATION_FOR = 'CUST'

Line 10438: UPDATE OZF_ACCOUNT_ALLOCATIONS aa

10434: BEGIN
10435: Ozf_Utility_pvt.write_conc_log(' - '||l_full_api_name|| ' - 2(b). ADJUSTING SHIP TO Account record....');
10436:
10437: -- Rollup the total targets to the shipTo record
10438: UPDATE OZF_ACCOUNT_ALLOCATIONS aa
10439: SET (aa.TARGET, aa.LYSP_SALES) = (
10440: SELECT SUM(ti.TARGET), SUM(ti.lysp_sales)
10441: FROM OZF_TIME_ALLOCATIONS ti
10442: WHERE ti.ALLOCATION_FOR = 'CUST'

Line 10602: FROM OZF_ACCOUNT_ALLOCATIONS AA

10598: AND FF.STATUS_CODE <> 'CANCELLED'
10599: AND FF.NODE_ID = NVL(p_terr_id, FF.NODE_ID)
10600: AND EXISTS
10601: (SELECT 'x'
10602: FROM OZF_ACCOUNT_ALLOCATIONS AA
10603: WHERE AA.ALLOCATION_FOR = 'FUND'
10604: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10605: );
10606:

Line 10622: FROM OZF_ACCOUNT_ALLOCATIONS AA

10618: AND FF.STATUS_CODE <> 'CANCELLED'
10619: AND FF.NODE_ID = NVL(p_terr_id, FF.NODE_ID)
10620: AND EXISTS
10621: (SELECT 'x'
10622: FROM OZF_ACCOUNT_ALLOCATIONS AA
10623: WHERE AA.ALLOCATION_FOR = 'FUND'
10624: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10625: )
10626: ----------

Line 10636: FROM OZF_ACCOUNT_ALLOCATIONS AA

10632: FF.FUND_TYPE = 'QUOTA'
10633: AND FF.STATUS_CODE <> 'CANCELLED'
10634: AND EXISTS
10635: (SELECT 'x'
10636: FROM OZF_ACCOUNT_ALLOCATIONS AA
10637: WHERE AA.ALLOCATION_FOR = 'FUND'
10638: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10639: )
10640: AND FF.NODE_ID IN

Line 10763: FROM OZF_ACCOUNT_ALLOCATIONS AA

10759: AND FF.STATUS_CODE <> 'CANCELLED'
10760: AND FF.NODE_ID = l_terr_id
10761: AND EXISTS
10762: (SELECT 'x'
10763: FROM OZF_ACCOUNT_ALLOCATIONS AA
10764: WHERE AA.ALLOCATION_FOR = 'FUND'
10765: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10766: AND AA.site_use_id <> l_ship_to_id -- newly added to the FUND
10767: );

Line 10779: FROM OZF_ACCOUNT_ALLOCATIONS AA

10775: AND FF.STATUS_CODE <> 'CANCELLED'
10776: AND FF.NODE_ID = l_terr_id
10777: AND EXISTS
10778: (SELECT 'x'
10779: FROM OZF_ACCOUNT_ALLOCATIONS AA
10780: WHERE AA.ALLOCATION_FOR = 'FUND'
10781: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10782: AND AA.site_use_id = l_ship_to_id -- the one deleted from the FUND targets
10783: );

Line 10819: FROM OZF_ACCOUNT_ALLOCATIONS AA

10815: AND FF.STATUS_CODE <> 'CANCELLED'
10816: AND FF.FUND_ID = a.act_metric_used_by_id
10817: AND EXISTS
10818: (SELECT 'x'
10819: FROM OZF_ACCOUNT_ALLOCATIONS AA
10820: WHERE AA.ALLOCATION_FOR = 'FUND'
10821: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10822: AND AA.site_use_id = l_ship_to_site_use_id -- new added
10823: )

Line 10977: FROM ozf_account_allocations aa, ozf_funds_all_b ff

10973: aa.bill_to_site_use_id,
10974: aa.bill_to_location_id,
10975: aa.parent_party_id,
10976: aa.rollup_party_id
10977: FROM ozf_account_allocations aa, ozf_funds_all_b ff
10978: WHERE FF.FUND_TYPE = 'QUOTA'
10979: AND FF.STATUS_CODE <> 'CANCELLED'
10980: AND aa.allocation_for = 'FUND'
10981: AND aa.allocation_for_id = FF.FUND_ID