DBA Data[Home] [Help]

APPS.OZF_ALLOCATION_ENGINE_PVT dependencies on OZF_ACCOUNT_ALLOCATIONS

Line 160: SELECT ozf_account_allocations_s.NEXTVAL

156: l_api_name CONSTANT VARCHAR2(30) := 'get_account_allocation_id';
157: l_full_api_name CONSTANT VARCHAR2(60) := g_pkg_name ||'.'|| l_api_name;
158:
159: CURSOR account_seq_csr IS
160: SELECT ozf_account_allocations_s.NEXTVAL
161: FROM DUAL;
162:
163: CURSOR account_alloc_count_csr(p_account_alloc_id in number) IS
164: SELECT count(account_allocation_id)

Line 165: FROM ozf_account_allocations

161: FROM DUAL;
162:
163: CURSOR account_alloc_count_csr(p_account_alloc_id in number) IS
164: SELECT count(account_allocation_id)
165: FROM ozf_account_allocations
166: WHERE account_allocation_id = p_account_alloc_id;
167:
168: l_count number := -1;
169: l_account_alloc_id number := -1;

Line 243: ozf_account_allocations a

239: SELECT
240: a.allocation_for_id,
241: a.site_use_id
242: FROM
243: ozf_account_allocations a
244: WHERE
245: a.account_allocation_id = l_account_allocation_id;
246:
247: l_account_spread_rec account_spread_csr%ROWTYPE;

Line 4780: ozf_account_allocations p

4776: (l_fund_id number) IS
4777: SELECT DISTINCT
4778: p.account_allocation_id
4779: FROM
4780: ozf_account_allocations p
4781: WHERE
4782: p.allocation_for = 'FUND'
4783: AND p.allocation_for_id = l_fund_id;
4784:

Line 4847: DELETE ozf_account_allocations p

4843: AND p.allocation_for_id = account_rec.account_allocation_id;
4844:
4845: END LOOP;
4846:
4847: DELETE ozf_account_allocations p
4848: WHERE p.allocation_for = 'FUND'
4849: AND p.allocation_for_id = l_fund_id;
4850:
4851:

Line 4961: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

4957:
4958: l_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
4959: l_lysp_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
4960:
4961: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
4962: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
4963: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
4964:
4965:

Line 5452: Ozf_Account_Allocations_Pkg.Insert_Row(

5448: p_acct_alloc_rec.lysp_sales := l_total_account_sales;
5449:
5450: l_account_allocation_id := get_account_allocation_id;
5451:
5452: Ozf_Account_Allocations_Pkg.Insert_Row(
5453: px_Account_allocation_id => l_account_allocation_id,
5454: p_allocation_for => p_acct_alloc_rec.allocation_for,
5455: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
5456: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 5779: Ozf_Account_Allocations_Pkg.Insert_Row(

5775: p_acct_alloc_rec.lysp_sales := 0;
5776:
5777: l_account_allocation_id := get_account_allocation_id;
5778:
5779: Ozf_Account_Allocations_Pkg.Insert_Row(
5780: px_Account_allocation_id => l_account_allocation_id,
5781: p_allocation_for => p_acct_alloc_rec.allocation_for,
5782: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
5783: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 5882: FROM OZF_ACCOUNT_ALLOCATIONS a

5878:
5879: BEGIN
5880:
5881: SELECT a.TARGET INTO l_diff_target_1
5882: FROM OZF_ACCOUNT_ALLOCATIONS a
5883: WHERE a.allocation_for = 'FUND'
5884: AND a.allocation_for_id = l_fund_id
5885: AND a.parent_party_id = -9999;
5886:

Line 5891: FROM OZF_ACCOUNT_ALLOCATIONS a

5887: SELECT SUM(t.TARGET) INTO l_diff_target_2
5888: FROM OZF_TIME_ALLOCATIONS t
5889: WHERE t.allocation_for = 'CUST'
5890: AND t.allocation_for_id IN ( SELECT a.account_allocation_id
5891: FROM OZF_ACCOUNT_ALLOCATIONS a
5892: WHERE a.allocation_for = 'FUND'
5893: AND a.allocation_for_id = l_fund_id
5894: AND a.parent_party_id = -9999 );
5895:

Line 5915: FROM OZF_ACCOUNT_ALLOCATIONS a

5911: t.last_update_login = FND_GLOBAL.CONC_LOGIN_ID
5912: WHERE t.time_allocation_id = (SELECT max(x.time_allocation_id) from OZF_TIME_ALLOCATIONS x
5913: WHERE x.allocation_for = 'CUST'
5914: AND x.allocation_for_id IN ( SELECT a.account_allocation_id
5915: FROM OZF_ACCOUNT_ALLOCATIONS a
5916: WHERE a.allocation_for = 'FUND'
5917: AND a.allocation_for_id = l_fund_id
5918: AND a.parent_party_id = -9999 )
5919: );

Line 6070: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

6066:
6067: l_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
6068: l_lysp_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
6069:
6070: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
6071: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
6072: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
6073:
6074:

Line 6562: Ozf_Account_Allocations_Pkg.Insert_Row(

6558: p_acct_alloc_rec.lysp_sales := l_total_account_sales;
6559:
6560: l_account_allocation_id := get_account_allocation_id;
6561:
6562: Ozf_Account_Allocations_Pkg.Insert_Row(
6563: px_Account_allocation_id => l_account_allocation_id,
6564: p_allocation_for => p_acct_alloc_rec.allocation_for,
6565: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
6566: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 6676: UPDATE OZF_ACCOUNT_ALLOCATIONS a

6672: FROM OZF_TIME_ALLOCATIONS ti
6673: WHERE ti.ALLOCATION_FOR = 'CUST'
6674: AND ti.ALLOCATION_FOR_ID = l_account_allocation_id;
6675:
6676: UPDATE OZF_ACCOUNT_ALLOCATIONS a
6677: SET a.TARGET = l_total_account_target,
6678: a.object_version_number = a.object_version_number + 1,
6679: a.last_update_date = SYSDATE,
6680: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 7204: Ozf_Account_Allocations_Pkg.Insert_Row(

7200: p_acct_alloc_rec.lysp_sales := 0;
7201:
7202: l_account_allocation_id := get_account_allocation_id;
7203:
7204: Ozf_Account_Allocations_Pkg.Insert_Row(
7205: px_Account_allocation_id => l_account_allocation_id,
7206: p_allocation_for => p_acct_alloc_rec.allocation_for,
7207: p_allocation_for_id => p_acct_alloc_rec.allocation_for_id,
7208: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 7307: FROM OZF_ACCOUNT_ALLOCATIONS a

7303:
7304: BEGIN
7305:
7306: SELECT a.TARGET INTO l_diff_target_1
7307: FROM OZF_ACCOUNT_ALLOCATIONS a
7308: WHERE a.allocation_for = 'FUND'
7309: AND a.allocation_for_id = l_fund_id
7310: AND a.parent_party_id = -9999;
7311:

Line 7316: FROM OZF_ACCOUNT_ALLOCATIONS a

7312: SELECT SUM(t.TARGET) INTO l_diff_target_2
7313: FROM OZF_TIME_ALLOCATIONS t
7314: WHERE t.allocation_for = 'CUST'
7315: AND t.allocation_for_id IN ( SELECT a.account_allocation_id
7316: FROM OZF_ACCOUNT_ALLOCATIONS a
7317: WHERE a.allocation_for = 'FUND'
7318: AND a.allocation_for_id = l_fund_id
7319: AND a.parent_party_id = -9999 );
7320:

Line 7348: FROM OZF_ACCOUNT_ALLOCATIONS a

7344: t.last_update_login = FND_GLOBAL.CONC_LOGIN_ID
7345: WHERE t.time_allocation_id = (SELECT max(x.time_allocation_id) from OZF_TIME_ALLOCATIONS x
7346: WHERE x.allocation_for = 'CUST'
7347: AND x.allocation_for_id IN ( SELECT a.account_allocation_id
7348: FROM OZF_ACCOUNT_ALLOCATIONS a
7349: WHERE a.allocation_for = 'FUND'
7350: AND a.allocation_for_id = l_fund_id
7351: AND a.parent_party_id = -9999 )
7352: );

Line 7385: FROM OZF_ACCOUNT_ALLOCATIONS a

7381:
7382: BEGIN
7383:
7384: SELECT SUM(a.TARGET) INTO l_diff_target_1
7385: FROM OZF_ACCOUNT_ALLOCATIONS a
7386: WHERE a.allocation_for = 'FUND'
7387: AND a.allocation_for_id = l_fund_id;
7388:
7389: l_diff_target := (NVL(l_total_root_quota, 0) - NVL(l_diff_target_1, 0));

Line 7410: FROM OZF_ACCOUNT_ALLOCATIONS a

7406: t.last_update_login = FND_GLOBAL.CONC_LOGIN_ID
7407: WHERE t.time_allocation_id = (SELECT max(x.time_allocation_id) from OZF_TIME_ALLOCATIONS x
7408: WHERE x.allocation_for = 'CUST'
7409: AND x.allocation_for_id IN ( SELECT a.account_allocation_id
7410: FROM OZF_ACCOUNT_ALLOCATIONS a
7411: WHERE a.allocation_for = 'FUND'
7412: AND a.allocation_for_id = l_fund_id
7413: AND a.parent_party_id = -9999)
7414: );

Line 7425: UPDATE OZF_ACCOUNT_ALLOCATIONS a

7421: RAISE fnd_api.g_exc_unexpected_error;
7422: END IF;
7423:
7424:
7425: UPDATE OZF_ACCOUNT_ALLOCATIONS a
7426: SET a.TARGET = a.TARGET + l_diff_target,
7427: a.object_version_number = a.object_version_number + 1,
7428: a.last_update_date = SYSDATE,
7429: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 7469: FROM OZF_ACCOUNT_ALLOCATIONS a

7465: WHERE t.time_allocation_id = (SELECT MAX(x.time_allocation_id)
7466: FROM OZF_TIME_ALLOCATIONS x
7467: WHERE x.allocation_for = 'CUST'
7468: AND x.allocation_for_id IN ( SELECT MAX(a.account_allocation_id)
7469: FROM OZF_ACCOUNT_ALLOCATIONS a
7470: WHERE a.allocation_for = 'FUND'
7471: AND a.allocation_for_id = l_fund_id
7472: AND a.target = (SELECT MAX(xyz.target)
7473: FROM OZF_ACCOUNT_ALLOCATIONS xyz

Line 7473: FROM OZF_ACCOUNT_ALLOCATIONS xyz

7469: FROM OZF_ACCOUNT_ALLOCATIONS a
7470: WHERE a.allocation_for = 'FUND'
7471: AND a.allocation_for_id = l_fund_id
7472: AND a.target = (SELECT MAX(xyz.target)
7473: FROM OZF_ACCOUNT_ALLOCATIONS xyz
7474: WHERE xyz.allocation_for = 'FUND'
7475: AND xyz.allocation_for_id = l_fund_id)
7476: )
7477: AND x.target = (SELECT MAX(xyz2.target)

Line 7482: FROM OZF_ACCOUNT_ALLOCATIONS ax

7478: FROM OZF_TIME_ALLOCATIONS xyz2
7479: WHERE xyz2.allocation_for = 'CUST'
7480: AND xyz2.allocation_for_id IN
7481: ( SELECT MAX(ax.account_allocation_id)
7482: FROM OZF_ACCOUNT_ALLOCATIONS ax
7483: WHERE ax.allocation_for = 'FUND'
7484: AND ax.allocation_for_id = l_fund_id
7485: AND ax.target =
7486: (SELECT MAX(yz.target)

Line 7487: FROM OZF_ACCOUNT_ALLOCATIONS yz

7483: WHERE ax.allocation_for = 'FUND'
7484: AND ax.allocation_for_id = l_fund_id
7485: AND ax.target =
7486: (SELECT MAX(yz.target)
7487: FROM OZF_ACCOUNT_ALLOCATIONS yz
7488: WHERE yz.allocation_for = 'FUND'
7489: AND yz.allocation_for_id = l_fund_id)
7490: )
7491: )

Line 7508: UPDATE OZF_ACCOUNT_ALLOCATIONS a

7504:
7505:
7506: -- OZF_UTILITY_PVT.debug_message('4.mkothari--'||'ALL TARGETS AccAllocID=> '||l_temp_account_allocation_id|| ';');
7507:
7508: UPDATE OZF_ACCOUNT_ALLOCATIONS a
7509: SET a.TARGET = a.TARGET + l_diff_target,
7510: a.object_version_number = a.object_version_number + 1,
7511: a.last_update_date = SYSDATE,
7512: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 7747: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

7743:
7744: l_new_ozf_period_tbl OZF_PERIOD_TBL_TYPE;
7745: l_old_ozf_period_tbl OZF_PERIOD_TBL_TYPE;
7746:
7747: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
7748: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
7749: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
7750:
7751:

Line 7793: ozf_account_allocations a

7789: SELECT
7790: SUM(bsmv.sales) sales
7791: FROM
7792: ozf_order_sales_v bsmv,
7793: ozf_account_allocations a
7794: WHERE
7795: a.allocation_for = 'FUND'
7796: AND a.allocation_for_id = l_fund_id
7797: AND bsmv.ship_to_site_use_id = a.site_use_id

Line 7815: ozf_account_allocations a

7811: a.bill_to_location_id bill_to_location_id,
7812: a.parent_party_id parent_party_id,
7813: a.rollup_party_id rollup_party_id
7814: FROM
7815: ozf_account_allocations a
7816: WHERE
7817: a.allocation_for = 'FUND'
7818: AND a.allocation_for_id = l_fund_id;
7819:

Line 8027: ozf_account_allocations a

8023: (l_fund_id NUMBER) IS
8024: SELECT DISTINCT t.time_id
8025: FROM
8026: ozf_time_allocations t,
8027: ozf_account_allocations a
8028: WHERE
8029: a.allocation_for = 'FUND'
8030: AND a.allocation_for_id = l_fund_id
8031: AND t.allocation_for_id = a.account_allocation_id

Line 8232: UPDATE ozf_account_allocations a

8228:
8229: l_total_account_sales := NVL(l_total_account_sales, 0);
8230: l_total_account_target := ROUND( (l_total_account_sales * l_multiplying_factor), 0);
8231:
8232: UPDATE ozf_account_allocations a
8233: SET a.target = a.target + l_total_account_target,
8234: a.lysp_sales = a.lysp_sales + l_total_account_sales,
8235: a.object_version_number = a.object_version_number + 1,
8236: a.last_update_date = SYSDATE,

Line 8457: UPDATE ozf_account_allocations a

8453: OZF_UTILITY_PVT.debug_message('Private API: ' || l_full_api_name ||
8454: ': Begin - Updating UNALLOCATED Account and Populating Time Allocations Records'
8455: || 'FOR FUND_Id = '|| l_fund_id || ' ; ');
8456:
8457: UPDATE ozf_account_allocations a
8458: SET a.target = a.target + l_total_target_unalloc,
8459: a.object_version_number = a.object_version_number + 1,
8460: a.last_update_date = SYSDATE,
8461: a.last_updated_by = FND_GLOBAL.USER_ID,

Line 9008: from ozf_account_allocations

9004:
9005: CURSOR acct_alloc_bes_csr (l_fund_id NUMBER)
9006: IS
9007: select account_allocation_id
9008: from ozf_account_allocations
9009: where allocation_for = 'FUND'
9010: AND allocation_for_id = l_fund_id
9011: AND parent_party_id > 0;
9012:

Line 9348: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;

9344:
9345: l_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
9346: l_lysp_period_tbl OZF_TIME_API_PVT.G_period_tbl_type;
9347:
9348: p_acct_alloc_rec ozf_account_allocations%ROWTYPE;
9349: p_prod_alloc_rec ozf_product_allocations%ROWTYPE;
9350: p_time_alloc_rec ozf_time_allocations%ROWTYPE;
9351:
9352:

Line 9628: FROM ozf_account_allocations aa

9624: THEN
9625:
9626: ---read the corr funds existing account rows -----
9627: SELECT * INTO p_acct_alloc_rec
9628: FROM ozf_account_allocations aa
9629: WHERE aa.allocation_for = 'FUND'
9630: and allocation_for_id = p_corr_fund_id
9631: and site_use_code = 'SHIP_TO'
9632: and site_use_id = p_ship_to_site_use_id;

Line 9637: FROM ozf_account_allocations aa

9633: ELSE
9634:
9635: -- read the unallocated row for p_fund_id
9636: SELECT * INTO p_acct_alloc_rec
9637: FROM ozf_account_allocations aa
9638: WHERE aa.allocation_for = 'FUND'
9639: and allocation_for_id = p_fund_id
9640: and site_use_id = -9999;
9641:

Line 9682: Ozf_Account_Allocations_Pkg.Insert_Row(

9678: END IF;
9679:
9680: l_account_allocation_id := get_account_allocation_id;
9681:
9682: Ozf_Account_Allocations_Pkg.Insert_Row(
9683: px_Account_allocation_id => l_account_allocation_id,
9684: p_allocation_for => p_acct_alloc_rec.allocation_for,
9685: p_allocation_for_id => p_fund_id,
9686: p_cust_account_id => p_acct_alloc_rec.cust_account_id,

Line 9804: FROM ozf_account_allocations aa

9800: )
9801: where
9802: tta.allocation_for = 'CUST'
9803: AND tta.allocation_for_id = ( SELECT aa.account_allocation_id
9804: FROM ozf_account_allocations aa
9805: WHERE aa.allocation_for = 'FUND'
9806: and aa.allocation_for_id = p_fund_id
9807: and aa.site_use_id = -9999)
9808: and EXISTS

Line 9830: FROM ozf_account_allocations aa

9826: AND ttb.allocation_for_id = l_account_allocation_id
9827: AND tta.time_id = ttb.time_id
9828: AND tta.allocation_for = 'CUST'
9829: AND tta.allocation_for_id ( SELECT aa.account_allocation_id
9830: FROM ozf_account_allocations aa
9831: WHERE aa.allocation_for = 'FUND'
9832: and aa.allocation_for_id = p_fund_id
9833: and aa.site_use_id = -9999)
9834: and EXISTS

Line 9876: UPDATE OZF_ACCOUNT_ALLOCATIONS aa

9872: -- (ii) for unallocated row
9873:
9874: -- 6. UPDATING NEW SHIPTO and UNALLOCATED ACCOUNT Header RECORDS ....
9875:
9876: UPDATE OZF_ACCOUNT_ALLOCATIONS aa
9877: SET (aa.TARGET, aa.LYSP_SALES) = (
9878: SELECT SUM(ti.TARGET), SUM(ti.lysp_sales)
9879: FROM OZF_TIME_ALLOCATIONS ti
9880: WHERE ti.ALLOCATION_FOR = 'CUST'

Line 10296: FROM ozf_account_allocations aa

10292:
10293: BEGIN
10294:
10295: SELECT aa.account_allocation_id INTO l_account_allocation_id
10296: FROM ozf_account_allocations aa
10297: WHERE aa.allocation_for = 'FUND'
10298: and aa.allocation_for_id = p_fund_id
10299: and aa.site_use_code = 'SHIP_TO'
10300: and aa.site_use_id = p_ship_to_site_use_id;

Line 10304: FROM ozf_account_allocations aa

10300: and aa.site_use_id = p_ship_to_site_use_id;
10301:
10302:
10303: SELECT aa.account_allocation_id INTO l_unalloc_acct_alloc_id
10304: FROM ozf_account_allocations aa
10305: WHERE aa.allocation_for = 'FUND'
10306: and aa.allocation_for_id = p_fund_id
10307: and aa.site_use_id = -9999;
10308:

Line 10357: UPDATE OZF_ACCOUNT_ALLOCATIONS aa

10353: BEGIN
10354: Ozf_Utility_pvt.write_conc_log(' - '||l_full_api_name|| ' - 1(b). ADJUSTING UNALLOCATED Account record....');
10355:
10356: -- Rollup the total targets to the unallocated records
10357: UPDATE OZF_ACCOUNT_ALLOCATIONS aa
10358: SET (aa.TARGET, aa.LYSP_SALES) = (
10359: SELECT SUM(ti.TARGET), SUM(ti.lysp_sales)
10360: FROM OZF_TIME_ALLOCATIONS ti
10361: WHERE ti.ALLOCATION_FOR = 'CUST'

Line 10403: UPDATE OZF_ACCOUNT_ALLOCATIONS aa

10399: BEGIN
10400: Ozf_Utility_pvt.write_conc_log(' - '||l_full_api_name|| ' - 2(b). ADJUSTING SHIP TO Account record....');
10401:
10402: -- Rollup the total targets to the shipTo record
10403: UPDATE OZF_ACCOUNT_ALLOCATIONS aa
10404: SET (aa.TARGET, aa.LYSP_SALES) = (
10405: SELECT SUM(ti.TARGET), SUM(ti.lysp_sales)
10406: FROM OZF_TIME_ALLOCATIONS ti
10407: WHERE ti.ALLOCATION_FOR = 'CUST'

Line 10567: FROM OZF_ACCOUNT_ALLOCATIONS AA

10563: AND FF.STATUS_CODE <> 'CANCELLED'
10564: AND FF.NODE_ID = NVL(p_terr_id, FF.NODE_ID)
10565: AND EXISTS
10566: (SELECT 'x'
10567: FROM OZF_ACCOUNT_ALLOCATIONS AA
10568: WHERE AA.ALLOCATION_FOR = 'FUND'
10569: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10570: );
10571:

Line 10587: FROM OZF_ACCOUNT_ALLOCATIONS AA

10583: AND FF.STATUS_CODE <> 'CANCELLED'
10584: AND FF.NODE_ID = NVL(p_terr_id, FF.NODE_ID)
10585: AND EXISTS
10586: (SELECT 'x'
10587: FROM OZF_ACCOUNT_ALLOCATIONS AA
10588: WHERE AA.ALLOCATION_FOR = 'FUND'
10589: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10590: )
10591: ----------

Line 10601: FROM OZF_ACCOUNT_ALLOCATIONS AA

10597: FF.FUND_TYPE = 'QUOTA'
10598: AND FF.STATUS_CODE <> 'CANCELLED'
10599: AND EXISTS
10600: (SELECT 'x'
10601: FROM OZF_ACCOUNT_ALLOCATIONS AA
10602: WHERE AA.ALLOCATION_FOR = 'FUND'
10603: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10604: )
10605: AND FF.NODE_ID IN

Line 10728: FROM OZF_ACCOUNT_ALLOCATIONS AA

10724: AND FF.STATUS_CODE <> 'CANCELLED'
10725: AND FF.NODE_ID = l_terr_id
10726: AND EXISTS
10727: (SELECT 'x'
10728: FROM OZF_ACCOUNT_ALLOCATIONS AA
10729: WHERE AA.ALLOCATION_FOR = 'FUND'
10730: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10731: AND AA.site_use_id <> l_ship_to_id -- newly added to the FUND
10732: );

Line 10744: FROM OZF_ACCOUNT_ALLOCATIONS AA

10740: AND FF.STATUS_CODE <> 'CANCELLED'
10741: AND FF.NODE_ID = l_terr_id
10742: AND EXISTS
10743: (SELECT 'x'
10744: FROM OZF_ACCOUNT_ALLOCATIONS AA
10745: WHERE AA.ALLOCATION_FOR = 'FUND'
10746: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10747: AND AA.site_use_id = l_ship_to_id -- the one deleted from the FUND targets
10748: );

Line 10784: FROM OZF_ACCOUNT_ALLOCATIONS AA

10780: AND FF.STATUS_CODE <> 'CANCELLED'
10781: AND FF.FUND_ID = a.act_metric_used_by_id
10782: AND EXISTS
10783: (SELECT 'x'
10784: FROM OZF_ACCOUNT_ALLOCATIONS AA
10785: WHERE AA.ALLOCATION_FOR = 'FUND'
10786: AND AA.ALLOCATION_FOR_ID = FF.FUND_ID
10787: AND AA.site_use_id = l_ship_to_site_use_id -- new added
10788: )

Line 10942: FROM ozf_account_allocations aa, ozf_funds_all_b ff

10938: aa.bill_to_site_use_id,
10939: aa.bill_to_location_id,
10940: aa.parent_party_id,
10941: aa.rollup_party_id
10942: FROM ozf_account_allocations aa, ozf_funds_all_b ff
10943: WHERE FF.FUND_TYPE = 'QUOTA'
10944: AND FF.STATUS_CODE <> 'CANCELLED'
10945: AND aa.allocation_for = 'FUND'
10946: AND aa.allocation_for_id = FF.FUND_ID