DBA Data[Home] [Help]

APPS.OZF_OFFER_BACKDATE_PVT dependencies on OZF_OFFER_ADJUSTMENTS_B

Line 11: -- 11-DEC-2002 julou change ams_offer_adjustments to ozf_offer_adjustments_b

7: -- Purpose
8: --
9: -- History
10: -- 05-DEC-2002 julou 1. sql performance fix
11: -- 11-DEC-2002 julou change ams_offer_adjustments to ozf_offer_adjustments_b
12: -- Tue Dec 02 2003:7/44 PM RSSHARMA Fixed process_new_adjustments removed reference to all ams tables
13: -- Wed Nov 24 2004:4/15 PM RSSHARMA Fixed bug # 4027062(11.5.9),4085552 (11.5.10). Introduced new procedure update_volume_offer_discounts
14: -- to update the disocunts and tiers for Volume Offer.
15: -- Mon Aug 01 2005:2/12 AM rssharma Fixed bug # 4522172. Send arithmetic operator while activating new adjustment lines

Line 63: SELECT ozf_OFFER_ADJUSTMENTS_B_s.NEXTVAL

59: l_OFFER_ADJUSTMENT_ID NUMBER;
60: l_dummy NUMBER;
61:
62: CURSOR c_id IS
63: SELECT ozf_OFFER_ADJUSTMENTS_B_s.NEXTVAL
64: FROM dual;
65:
66: CURSOR c_id_exists (l_id IN NUMBER) IS
67: SELECT 1

Line 68: FROM ozf_OFFER_ADJUSTMENTS_B

64: FROM dual;
65:
66: CURSOR c_id_exists (l_id IN NUMBER) IS
67: SELECT 1
68: FROM ozf_OFFER_ADJUSTMENTS_B
69: WHERE OFFER_ADJUSTMENT_ID = l_id;
70:
71: BEGIN
72: -- Standard Start of API savepoint

Line 252: FROM ozf_offer_adjustments_B

248: IS
249:
250: CURSOR c_get_Offer_Backdate(p_offer_adjustment_id NUMBER) IS
251: SELECT *
252: FROM ozf_offer_adjustments_B
253: WHERE offer_adjustment_id = p_offer_adjustment_id ;
254:
255: CURSOR c_get_offer_status(p_offer_adjustment_id NUMBER) IS
256: SELECT status_code

Line 257: FROM ozf_offer_adjustments_B

253: WHERE offer_adjustment_id = p_offer_adjustment_id ;
254:
255: CURSOR c_get_offer_status(p_offer_adjustment_id NUMBER) IS
256: SELECT status_code
257: FROM ozf_offer_adjustments_B
258: WHERE offer_adjustment_id = p_offer_adjustment_id ;
259:
260: l_current_status_code VARCHAR2(30);
261: l_new_status_code VARCHAR2(30);

Line 607: FROM ozf_OFFER_ADJUSTMENTS_B

603: l_OFFER_ADJUSTMENT_ID NUMBER;
604:
605: CURSOR c_Offer_Backdate IS
606: SELECT OFFER_ADJUSTMENT_ID
607: FROM ozf_OFFER_ADJUSTMENTS_B
608: WHERE OFFER_ADJUSTMENT_ID = p_OFFER_ADJUSTMENT_ID
609: AND object_version_number = p_object_version
610: FOR UPDATE NOWAIT;
611:

Line 714: 'OZF_OFFER_ADJUSTMENTS_B',

710: BEGIN
711: x_return_status := FND_API.g_ret_sts_success;
712: IF p_validation_mode = JTF_PLSQL_API.g_create THEN
713: l_valid_flag := OZF_Utility_PVT.check_uniqueness(
714: 'OZF_OFFER_ADJUSTMENTS_B',
715: 'OFFER_ADJUSTMENT_ID = ''' || p_offer_backdate_rec.OFFER_ADJUSTMENT_ID ||''''
716: );
717: ELSE
718: l_valid_flag := OZF_Utility_PVT.check_uniqueness(

Line 719: 'OZF_OFFER_ADJUSTMENTS_B',

715: 'OFFER_ADJUSTMENT_ID = ''' || p_offer_backdate_rec.OFFER_ADJUSTMENT_ID ||''''
716: );
717: ELSE
718: l_valid_flag := OZF_Utility_PVT.check_uniqueness(
719: 'OZF_OFFER_ADJUSTMENTS_B',
720: 'OFFER_ADJUSTMENT_ID = ''' || p_offer_backdate_rec.OFFER_ADJUSTMENT_ID ||
721: ''' AND OFFER_ADJUSTMENT_ID <> ' || p_offer_backdate_rec.OFFER_ADJUSTMENT_ID
722: );
723: END IF;

Line 828: FROM ozf_offer_adjustments_b

824: l_return_status VARCHAR2(1);
825:
826: CURSOR c_complete IS
827: SELECT *
828: FROM ozf_offer_adjustments_b
829: WHERE offer_adjustment_id = p_offer_backdate_rec.offer_adjustment_id;
830: l_offer_backdate_rec c_complete%ROWTYPE;
831: BEGIN
832: x_complete_rec := p_offer_backdate_rec;

Line 1153: SELECT ozf_OFFER_ADJUSTMENTS_B_s.NEXTVAL

1149: l_operand NUMBER;
1150: L_API_NAME CONSTANT VARCHAR2(30) := 'CREATE_INITIAL_ADJ';
1151: l_count NUMBER := 0;
1152: CURSOR c_id IS
1153: SELECT ozf_OFFER_ADJUSTMENTS_B_s.NEXTVAL
1154: FROM dual;
1155:
1156: CURSOR c_line_id IS
1157: SELECT ozf_OFFER_ADJUSTMENT_LINES_s.NEXTVAL

Line 1162: FROM ozf_OFFER_ADJUSTMENTS_B

1158: FROM dual;
1159:
1160: CURSOR c_id_exists (l_id IN NUMBER) IS
1161: SELECT 1
1162: FROM ozf_OFFER_ADJUSTMENTS_B
1163: WHERE OFFER_ADJUSTMENT_ID = l_id;
1164:
1165: CURSOR c_offer_data (l_id IN NUMBER) IS
1166: select qp.pricing_attribute_id,

Line 1192: INSERT INTO ozf_OFFER_ADJUSTMENTS_B(

1188: CLOSE c_id_exists;
1189: EXIT WHEN l_dummy IS NULL;
1190: END LOOP;
1191:
1192: INSERT INTO ozf_OFFER_ADJUSTMENTS_B(
1193: offer_adjustment_id,
1194: list_header_id,
1195: status_code,
1196: last_update_date,

Line 1343: FROM ozf_offer_adjustments_b

1339: l_qp_rltd_line_detail c_qp_line_detail%ROWTYPE;
1340:
1341: CURSOR c_effectiveDate(cp_offerAdjustmentId NUMBER) IS
1342: SELECT effective_date
1343: FROM ozf_offer_adjustments_b
1344: WHERE offer_adjustment_id = cp_offerAdjustmentId;
1345: l_effectiveDate DATE;
1346:
1347:

Line 1684: FROM ozf_offer_adjustment_products a , ozf_offer_adjustments_b b, ozf_offers c

1680: , product_attribute
1681: , product_attr_value
1682: , apply_discount_flag
1683: , include_volume_flag
1684: FROM ozf_offer_adjustment_products a , ozf_offer_adjustments_b b, ozf_offers c
1685: WHERE a.offer_adjustment_id = b.offer_adjustment_id
1686: AND b.list_header_id = c.qp_list_header_id
1687: AND a.offer_adjustment_id = p_adjustment_id;
1688:

Line 1753: FROM ozf_offer_adjustment_products a, ozf_offer_discount_products b , ozf_offer_discount_lines c , ozf_offers d , ozf_offer_adjustments_b e

1749: , c.discount_type
1750: , e.effective_date
1751: , a.apply_discount_flag
1752: , a.include_volume_flag
1753: FROM ozf_offer_adjustment_products a, ozf_offer_discount_products b , ozf_offer_discount_lines c , ozf_offers d , ozf_offer_adjustments_b e
1754: WHERE a.offer_discount_line_id = c.offer_discount_line_id
1755: AND b.offer_discount_line_id = c.offer_discount_line_id
1756: AND a.product_context = b.product_context
1757: AND a.product_attribute = b.product_attribute

Line 1929: FROM ozf_offer_adjustment_products a, ozf_offer_discount_products b , ozf_offer_adjustments_b c, qp_pricing_attributes d

1925:
1926: DECLARE
1927: /*CURSOR c_disc_reln(p_offer_adjustment_id NUMBER) IS
1928: SELECT distinct b.off_discount_product_id , d.pricing_attribute_id
1929: FROM ozf_offer_adjustment_products a, ozf_offer_discount_products b , ozf_offer_adjustments_b c, qp_pricing_attributes d
1930: WHERE a.offer_discount_line_id = b.offer_discount_line_id
1931: AND a.product_attribute = b.product_attribute
1932: AND a.product_attr_value = b.product_attr_value
1933: AND a.excluder_flag = b.excluder_flag

Line 1941: FROM ozf_offer_adjustment_products a, ozf_offer_discount_lines b, ozf_offer_adjustments_b c, qp_list_lines d

1937: AND a.product_attr_value = d.product_attr_value
1938: AND a.offer_adjustment_id = p_offer_adjustment_id;
1939: CURSOR c_prod_reln(p_offer_adjustment_id NUMBER) IS
1940: SELECT b.offer_discount_line_id , d.list_line_id
1941: FROM ozf_offer_adjustment_products a, ozf_offer_discount_lines b, ozf_offer_adjustments_b c, qp_list_lines d
1942: WHERE a.offer_discount_line_id = DECODE(b.tier_type,'PBH',offer_discount_line_id,parent_discount_line_id)
1943: AND b.offer_adjustment_id = a.offer_adjustment_id
1944: AND a.offer_adjustment_id = p_offer_adjustment_id
1945: AND c.list_header_id = d.list_header_id

Line 1952: FROM ozf_offer_adjustment_products a, ozf_offer_discount_products b, ozf_offer_discount_lines c , ozf_offer_adjustments_b e ,qp_pricing_attributes d

1948: --AND nvl(b.discount_type,'-1') = nvl(d.arithmetic_operator)
1949: */
1950: CURSOR c_create_reln(p_offer_adjustment_id NUMBER) IS
1951: SELECT c.offer_discount_line_id, b.off_discount_product_id , d.list_line_id , d.pricing_attribute_id
1952: FROM ozf_offer_adjustment_products a, ozf_offer_discount_products b, ozf_offer_discount_lines c , ozf_offer_adjustments_b e ,qp_pricing_attributes d
1953: WHERE a.offer_discount_line_id = b.offer_discount_line_id
1954: AND a.product_attr_value = b.product_attr_value
1955: AND a.offer_adjustment_id = p_offer_adjustment_id
1956: AND b.offer_discount_line_id = decode(c.tier_type , 'DIS',c.parent_discount_line_id, c.offer_discount_line_id)

Line 2006: ozf_offer_adjustment_products a, ozf_offer_adjustments_b b , ozf_offer_discount_products c, qp_pricing_attributes d

2002: DECLARE
2003: CURSOR c_dis_products(p_offer_adjustment_id NUMBER) IS
2004: SELECT c.off_discount_product_id , d.pricing_attribute_id
2005: FROM
2006: ozf_offer_adjustment_products a, ozf_offer_adjustments_b b , ozf_offer_discount_products c, qp_pricing_attributes d
2007: WHERE a.offer_adjustment_id = b.offer_adjustment_id
2008: AND a.offer_adjustment_id = p_offer_adjustment_id
2009: AND a.offer_discount_line_id = c.offer_discount_line_id
2010: AND a.product_attribute = c.product_attribute

Line 2153: FROM ozf_offer_adjustment_tiers a, ozf_qp_discounts b , qp_list_Lines c, ozf_offer_adjustments_b d

2149: DECLARE
2150: CURSOR c_qp_list_lines(p_adjustment_id NUMBER)
2151: IS
2152: SELECT c.list_line_id , c.list_header_id , d.effective_date , a.modified_discount, c.arithmetic_operator
2153: FROM ozf_offer_adjustment_tiers a, ozf_qp_discounts b , qp_list_Lines c, ozf_offer_adjustments_b d
2154: WHERE a.offer_discount_line_id = b.offer_discount_line_id
2155: AND b.list_line_id = c.list_line_id
2156: AND a.offer_adjustment_id = d.offer_adjustment_id
2157: AND a.offer_adjustment_id = p_adjustment_id;

Line 2245: , ozf_offer_adjustments_b e, qp_list_lines f

2241: , f.arithmetic_operator arithmetic_operator
2242: , c.pricing_attribute pricing_attribute
2243: , e.effective_date start_date_active
2244: FROM ozf_offer_adjustment_tiers a, ozf_qp_discounts b, qp_pricing_attributes c, qp_rltd_modifiers d
2245: , ozf_offer_adjustments_b e, qp_list_lines f
2246: WHERE a.offer_discount_line_id = b.offer_discount_line_id
2247: AND b.list_line_id = c.list_line_id
2248: AND c.list_line_id = d.to_rltd_modifier_id
2249: AND a.offer_adjustment_id = e.offer_adjustment_id

Line 2295: FROM ozf_offer_adjustment_tiers a, ozf_offer_adjustments_b b , ozf_offer_discount_lines c , qp_list_lines d , qp_pricing_attributes e , ozf_offer_discount_products f

2291: DECLARE
2292: CURSOR c_create_reln(p_offer_adjustment_id NUMBER)
2293: IS
2294: SELECT a.offer_discount_line_id , f.off_discount_product_id , e.pricing_attribute_id , d.list_line_id
2295: FROM ozf_offer_adjustment_tiers a, ozf_offer_adjustments_b b , ozf_offer_discount_lines c , qp_list_lines d , qp_pricing_attributes e , ozf_offer_discount_products f
2296: WHERE a.offer_adjustment_id = b.offer_adjustment_id
2297: AND c.offer_discount_line_id = a.offer_discount_line_id
2298: AND b.list_header_id = d.list_header_id
2299: AND d.list_line_id = e.list_line_id

Line 2489: l_newStatus OZF_OFFER_ADJUSTMENTS_B.STATUS_CODE%TYPE;

2485: ,x_budgetAdjFlag OUT NOCOPY VARCHAR2
2486: )
2487: IS
2488:
2489: l_newStatus OZF_OFFER_ADJUSTMENTS_B.STATUS_CODE%TYPE;
2490: CURSOR c_closeAdjustment(cp_offerAdjustmentId NUMBER) IS
2491: SELECT decode(greatest(a.effective_date,sysdate) , a.effective_date, 'Y','N') close_adjustment
2492: FROM ozf_offer_adjustments_b a
2493: WHERE offer_adjustment_id = cp_offerAdjustmentId;

Line 2492: FROM ozf_offer_adjustments_b a

2488:
2489: l_newStatus OZF_OFFER_ADJUSTMENTS_B.STATUS_CODE%TYPE;
2490: CURSOR c_closeAdjustment(cp_offerAdjustmentId NUMBER) IS
2491: SELECT decode(greatest(a.effective_date,sysdate) , a.effective_date, 'Y','N') close_adjustment
2492: FROM ozf_offer_adjustments_b a
2493: WHERE offer_adjustment_id = cp_offerAdjustmentId;
2494: l_closeAdjustment VARCHAR2(1);
2495: l_budgetAdjFlag VARCHAR2(1);
2496:

Line 2530: l_newStatus OZF_OFFER_ADJUSTMENTS_B.STATUS_CODE%TYPE;

2526: ,x_msg_count OUT NOCOPY NUMBER
2527: ,x_msg_data OUT NOCOPY VARCHAR2
2528: )
2529: IS
2530: l_newStatus OZF_OFFER_ADJUSTMENTS_B.STATUS_CODE%TYPE;
2531:
2532: CURSOR c_closeAdjustment(cp_offerAdjustmentId NUMBER) IS
2533: SELECT decode(greatest(a.effective_date,sysdate) , a.effective_date, 'Y','N') close_adjustment,
2534: list_header_id offer_id

Line 2535: FROM ozf_offer_adjustments_b a

2531:
2532: CURSOR c_closeAdjustment(cp_offerAdjustmentId NUMBER) IS
2533: SELECT decode(greatest(a.effective_date,sysdate) , a.effective_date, 'Y','N') close_adjustment,
2534: list_header_id offer_id
2535: FROM ozf_offer_adjustments_b a
2536: WHERE offer_adjustment_id = cp_offerAdjustmentId;
2537:
2538: l_closeAdjustment VARCHAR2(1);
2539: l_budgetAdjFlag VARCHAR2(1);

Line 2559: UPDATE ozf_offer_adjustments_b

2555: l_newStatus := 'ACTIVE';
2556: l_budgetAdjFlag := null;
2557: END IF;
2558:
2559: UPDATE ozf_offer_adjustments_b
2560: SET budget_adjusted_flag = l_budgetAdjFlag,
2561: object_version_number = object_version_number + 1,
2562: approved_date = sysdate,
2563: status_code = l_newStatus

Line 2633: FROM ozf_offer_adjustments_b a

2629: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2630: END IF;
2631:
2632: SELECT list_header_id into l_list_header_id
2633: FROM ozf_offer_adjustments_b a
2634: WHERE offer_adjustment_id = p_offer_adjustment_id;
2635:
2636: --insert into ozf_events values('After process_adjustment'||p_offer_adjustment_id,sysdate);
2637: OZF_OFFER_PVT.raise_offer_event(l_list_header_id, p_offer_adjustment_id);