DBA Data[Home] [Help]

APPS.OZF_OFFER_PVT dependencies on QP_LIST_LINES

Line 63: -- 26-Nov-2002 RSSHARMA Added Flex Field to qp_list_lines

59: -- LUMPSUM/SCAN_DATA
60: -- 01-NOV-2002 julou pass list_header_id to qualifiers tbl to fix copy API not copying
61: -- order_value_from and order_value_to.
62: -- 15-Nov-2002 RSSHARNA Added Flex Fields to QP_List_headers
63: -- 26-Nov-2002 RSSHARMA Added Flex Field to qp_list_lines
64: -- 12-DEC-2002 julou 1. parent as budget source update issue and creating budget request
65: -- 2. activation issue with LUMPSUM and SCAN_DATA offers
66: -- moved update after posting offers
67: -- 26-DEC-2002 julou enhancement 2465253: added profile value for override flag.

Line 96: -- Wed Nov 26 2003:3/0 PM rssharma Made process_qp_list_lines public and added an out variable

92: -- populate IEB from cue card if offer is ACTIVE and IEB is null
93: -- Tue Jun 17 2003:2/47 PM RSSHARMA Changed procedure offer_dates. Create the Order and Ship
94: -- Dates with different Group Numbers
95: -- Tue Jul 15 2003:3/35 PM RSSHARMA Added AMOUNT as new Discount Type for Order Value Offers
96: -- Wed Nov 26 2003:3/0 PM rssharma Made process_qp_list_lines public and added an out variable
97: -- Mon Dec 01 2003:7/33 PM RSSHARMA Changed process_regular_discounts to allow creating inactive discount rules.
98: -- Tue Dec 02 2003:1/51 PM RSSHARMA Added Creating inactive discount rules for regular, Order Value , Promotional Goods Offers
99: -- And Skip Validation for minimum 1 discount line for an offer to become active for Soft Fund
100: -- with Custom Setup Id = 110

Line 136: -- DOnt push discount rules to qp if qp_list_lines already exist.

132: -- Thu Aug 19 1999:6/50 AM RSSHARMA Added process to relate ozf and qp discounts and products. Also changed signature of create_offer_tiers
133: -- Tue Sep 27 2005:7/30 PM RSSHARMA Pass end date properly for end dating Discount lines using adjustments.
134: -- issues with trade deal remain. Only one line is end dated
135: -- Wed Sep 28 2005:12/18 PM RSSHARMA Push Accum attribute47 to qp during volume Offer activation.
136: -- DOnt push discount rules to qp if qp_list_lines already exist.
137: -- Wed Sep 28 2005:6/2 PM RSSHARMA During Volume Offer Activation push formula into proper column(price_by_formula_id) in qp_list_lines
138: -- Thu Sep 29 2005:1/46 PM RSSHARMA Corrected Accum Attribute to PRICING_ATTRIBUTE19 from PRICING_ATTRIBUTE47
139: -- Sat Oct 01 2005:5/40 PM RSSHARMA Corrected Qualifier Attribute used for creating sales method Qualifier
140: -- Wed Oct 12 2005:11/47 AM RSSHARMA Added new method debug_message to add debug messages to fnd only if the profile FND: Message Level Threshold level is high.

Line 137: -- Wed Sep 28 2005:6/2 PM RSSHARMA During Volume Offer Activation push formula into proper column(price_by_formula_id) in qp_list_lines

133: -- Tue Sep 27 2005:7/30 PM RSSHARMA Pass end date properly for end dating Discount lines using adjustments.
134: -- issues with trade deal remain. Only one line is end dated
135: -- Wed Sep 28 2005:12/18 PM RSSHARMA Push Accum attribute47 to qp during volume Offer activation.
136: -- DOnt push discount rules to qp if qp_list_lines already exist.
137: -- Wed Sep 28 2005:6/2 PM RSSHARMA During Volume Offer Activation push formula into proper column(price_by_formula_id) in qp_list_lines
138: -- Thu Sep 29 2005:1/46 PM RSSHARMA Corrected Accum Attribute to PRICING_ATTRIBUTE19 from PRICING_ATTRIBUTE47
139: -- Sat Oct 01 2005:5/40 PM RSSHARMA Corrected Qualifier Attribute used for creating sales method Qualifier
140: -- Wed Oct 12 2005:11/47 AM RSSHARMA Added new method debug_message to add debug messages to fnd only if the profile FND: Message Level Threshold level is high.
141: -- Create a pbh line, with same tier but "0" discounts for volume offer products with apply_discount flag set to "NO"

Line 623: FROM qp_list_lines

619: )
620: IS
621: CURSOR cur_get_lines IS
622: SELECT list_line_id,modifier_level_code,price_break_type_code
623: FROM qp_list_lines
624: WHERE list_header_id = p_advanced_options_rec.list_header_id;
625:
626: -- bug 3435528 populate cust_account_id to beneficiary_account_id
627: CURSOR c_cust_account_id(p_site_use_id NUMBER, p_site_use_code VARCHAR2) IS

Line 843: FROM qp_list_lines

839: print_on_invoice_flag ,
840: pricing_phase_id ,
841: modifier_level_code ,
842: automatic_flag
843: FROM qp_list_lines
844: WHERE list_line_id = parent_list_line_id;
845:
846: CURSOR cur_get_prod_info( parent_list_line_id NUMBER) IS
847: SELECT product_attribute_context,

Line 3878: FROM qp_list_lines

3874: CURSOR c_exists_in_qp_list_line(l_list_header_id NUMBER) IS
3875: SELECT 1
3876: FROM DUAL
3877: WHERE EXISTS (SELECT 1
3878: FROM qp_list_lines
3879: WHERE list_header_id = l_list_header_id);
3880: l_exists_in_qp_list_line NUMBER;
3881: -- nepanda : end : fix for bug 8507709
3882: -- fix for bug 7004273 and 7201785

Line 4151: -- nepanda : start : fix for bug 8507709 : check if line data is not there in qp_list_lines table already, then only call process_offer_activation

4147: END IF;
4148:
4149: debug_message('Calling Process Offer Activation');
4150:
4151: -- nepanda : start : fix for bug 8507709 : check if line data is not there in qp_list_lines table already, then only call process_offer_activation
4152: l_exists_in_qp_list_line := NULL;
4153: OPEN c_exists_in_qp_list_line(p_offer_rec.qp_list_header_id);
4154: FETCH c_exists_in_qp_list_line INTO l_exists_in_qp_list_line;
4155: CLOSE c_exists_in_qp_list_line;

Line 4539: --nepanda : fix for bug 8507709 : call process_offer_activation only when status is changing from DRAFT to ACTIVE (in order to prevent populating qp_list_lines table in case of ON-HOLD to ACTIVE

4535: l_modifier_list_rec.active_flag := 'N';
4536: ELSIF p_modifier_list_rec.modifier_operation = 'UPDATE' THEN
4537: IF (p_modifier_list_rec.user_status_id <> FND_API.g_miss_num)
4538: AND (p_modifier_list_rec.user_status_id <> p_old_status_id) THEN
4539: --nepanda : fix for bug 8507709 : call process_offer_activation only when status is changing from DRAFT to ACTIVE (in order to prevent populating qp_list_lines table in case of ON-HOLD to ACTIVE
4540: IF p_new_status_code = 'ACTIVE' THEN
4541: IF p_approval_type is NULL AND p_modifier_list_rec.offer_type NOT IN ('LUMPSUM', 'SCAN_DATA') THEN
4542: l_modifier_list_rec.active_flag := 'Y';
4543: IF ozf_utility_pvt.get_system_status_code(p_old_status_id) = 'DRAFT' THEN

Line 6123: FROM qp_list_lines

6119: CURSOR c_adv_options_exist(l_list_header_id NUMBER) IS
6120: SELECT 1
6121: FROM DUAL
6122: WHERE EXISTS (SELECT 1
6123: FROM qp_list_lines
6124: WHERE list_header_id = l_list_header_id);
6125:
6126: CURSOR c_adv_options(l_list_header_id NUMBER) IS
6127: SELECT pricing_phase_id,print_on_invoice_flag,incompatibility_grp_code,pricing_group_sequence,product_precedence

Line 6128: FROM qp_list_lines

6124: WHERE list_header_id = l_list_header_id);
6125:
6126: CURSOR c_adv_options(l_list_header_id NUMBER) IS
6127: SELECT pricing_phase_id,print_on_invoice_flag,incompatibility_grp_code,pricing_group_sequence,product_precedence
6128: FROM qp_list_lines
6129: WHERE list_header_id = l_list_header_id;
6130:
6131: l_adv_options_exist NUMBER;
6132:

Line 7020: FROM qp_list_lines

7016: CURSOR c_adv_options_exist(l_list_header_id NUMBER) IS
7017: SELECT 1
7018: FROM DUAL
7019: WHERE EXISTS (SELECT 1
7020: FROM qp_list_lines
7021: WHERE list_header_id = l_list_header_id);
7022:
7023: CURSOR c_adv_options(l_list_header_id NUMBER) IS
7024: SELECT pricing_phase_id,print_on_invoice_flag,incompatibility_grp_code,pricing_group_sequence,product_precedence

Line 7025: FROM qp_list_lines

7021: WHERE list_header_id = l_list_header_id);
7022:
7023: CURSOR c_adv_options(l_list_header_id NUMBER) IS
7024: SELECT pricing_phase_id,print_on_invoice_flag,incompatibility_grp_code,pricing_group_sequence,product_precedence
7025: FROM qp_list_lines
7026: WHERE list_header_id = l_list_header_id;
7027:
7028: l_adv_options_exist NUMBER;
7029: l_override_flag VARCHAR2(1);

Line 7577: FROM qp_list_lines

7573: l_related_modifier_id NUMBER := 0;
7574:
7575: CURSOR cur_get_PRG_line_id(p_list_header_id NUMBER) IS
7576: SELECT list_line_id
7577: FROM qp_list_lines
7578: WHERE list_header_id = p_list_header_id
7579: AND list_line_type_code = 'PRG';
7580:
7581: l_use_modifier_index boolean;

Line 7595: FROM qp_list_lines

7591: CURSOR c_adv_options_exist(l_list_header_id NUMBER) IS
7592: SELECT 1
7593: FROM DUAL
7594: WHERE EXISTS (SELECT 1
7595: FROM qp_list_lines
7596: WHERE list_header_id = l_list_header_id);
7597:
7598: CURSOR c_adv_options(l_list_header_id NUMBER) IS
7599: SELECT pricing_phase_id,print_on_invoice_flag,incompatibility_grp_code,pricing_group_sequence,product_precedence

Line 7600: FROM qp_list_lines

7596: WHERE list_header_id = l_list_header_id);
7597:
7598: CURSOR c_adv_options(l_list_header_id NUMBER) IS
7599: SELECT pricing_phase_id,print_on_invoice_flag,incompatibility_grp_code,pricing_group_sequence,product_precedence
7600: FROM qp_list_lines
7601: WHERE list_header_id = l_list_header_id;
7602:
7603: l_adv_options_exist NUMBER;
7604:

Line 8711: PROCEDURE process_qp_list_lines

8707: END LOOP;
8708: END IF;
8709: END validateQpListLines;
8710:
8711: PROCEDURE process_qp_list_lines
8712: (
8713: x_return_status OUT NOCOPY VARCHAR2
8714: ,x_msg_count OUT NOCOPY NUMBER
8715: ,x_msg_data OUT NOCOPY VARCHAR2

Line 8723: l_api_name CONSTANT VARCHAR2(30) := 'process_qp_list_lines';

8719: ,x_modifier_line_tbl OUT NOCOPY qp_modifiers_pub.modifiers_tbl_type
8720: ,x_error_location OUT NOCOPY NUMBER
8721: )IS
8722: l_api_version CONSTANT NUMBER := 1.0;
8723: l_api_name CONSTANT VARCHAR2(30) := 'process_qp_list_lines';
8724: l_full_name CONSTANT VARCHAR2(60) := g_pkg_name ||'.'|| l_api_name;
8725: l_modifier_line_tbl qp_modifiers_pub.modifiers_tbl_type;
8726: -- RSSHARMA changed on 06-Feb-2003
8727: CURSOR c_volume_offer_type IS

Line 8737: SAVEPOINT process_qp_list_lines;

8733: l_modifier_line_rec_tbl MODIFIER_LINE_TBL_TYPE := p_modifier_line_tbl;
8734:
8735: BEGIN
8736:
8737: SAVEPOINT process_qp_list_lines;
8738:
8739: x_return_status := Fnd_Api.g_ret_sts_success;
8740: x_error_location := 0;
8741: validateQpListLines

Line 8835: ROLLBACK TO process_qp_list_lines;

8831: END IF;
8832: EXCEPTION
8833: WHEN Fnd_Api.G_EXC_ERROR THEN
8834: x_return_status := Fnd_Api.g_ret_sts_error ;
8835: ROLLBACK TO process_qp_list_lines;
8836: Fnd_Msg_Pub.Count_AND_Get
8837: ( p_count => x_msg_count,
8838: p_data => x_msg_data,
8839: p_encoded => Fnd_Api.G_FALSE

Line 8843: ROLLBACK TO process_qp_list_lines;

8839: p_encoded => Fnd_Api.G_FALSE
8840: );
8841: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
8842: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
8843: ROLLBACK TO process_qp_list_lines;
8844: Fnd_Msg_Pub.Count_AND_Get
8845: ( p_count => x_msg_count,
8846: p_data => x_msg_data,
8847: p_encoded => Fnd_Api.G_FALSE

Line 8851: ROLLBACK TO process_qp_list_lines;

8847: p_encoded => Fnd_Api.G_FALSE
8848: );
8849: WHEN OTHERS THEN
8850: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8851: ROLLBACK TO process_qp_list_lines;
8852: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8853: THEN
8854: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8855: END IF;

Line 8990: FROM qp_list_lines

8986: IS
8987: l_lines_count NUMBER := 0;
8988: CURSOR c_list_line(l_list_header_id NUMBER) IS
8989: SELECT COUNT(*)
8990: FROM qp_list_lines
8991: WHERE list_header_id = l_list_header_id
8992: AND decode(greatest(end_date_active, sysdate), sysdate,'N','Y') = 'Y';
8993:
8994: CURSOR c_offerType(cp_listHeaderId NUMBER) IS

Line 9273: FROM qp_list_lines

9269: AND act_product_used_by_id = p_modifier_list_rec.qp_list_header_id;
9270:
9271: CURSOR c_list_line IS
9272: SELECT COUNT(*)
9273: FROM qp_list_lines
9274: WHERE list_header_id = p_modifier_list_rec.qp_list_header_id;
9275:
9276: CURSOR c_na_line IS
9277: SELECT COUNT(*)

Line 9284: FROM qp_list_lines

9280: (SELECT offer_id FROM ozf_offers WHERE qp_list_header_id = p_modifier_list_rec.qp_list_header_id);
9281:
9282: CURSOR c_prg_buy_count IS
9283: SELECT COUNT(*)
9284: FROM qp_list_lines
9285: WHERE list_header_id = p_modifier_list_rec.qp_list_header_id
9286: AND TRUNC(SYSDATE) <= TRUNC(NVL(end_date_active, SYSDATE))
9287: AND list_line_type_code = 'PRG';
9288:

Line 9291: FROM qp_list_lines

9287: AND list_line_type_code = 'PRG';
9288:
9289: CURSOR c_prg_get_count IS
9290: SELECT COUNT(*)
9291: FROM qp_list_lines
9292: WHERE list_header_id = p_modifier_list_rec.qp_list_header_id
9293: AND TRUNC(SYSDATE) <= TRUNC(NVL(end_date_active, SYSDATE))
9294: AND list_line_type_code = 'DIS';
9295:

Line 10188: process_qp_list_lines

10184:
10185: END IF;
10186: debug_message('p_modifier_line_tbl.COUNT :'|| p_modifier_line_tbl.COUNT);
10187: IF p_modifier_line_tbl.COUNT > 0 THEN
10188: process_qp_list_lines
10189: (
10190: x_return_status => x_return_status,
10191: x_msg_count => x_msg_count,
10192: x_msg_data => x_msg_data,

Line 10199: debug_message('process_qp_list_lines x_return_status '||x_return_status);

10195: p_list_header_id => temp_modifier_list_rec.qp_list_header_id,
10196: x_modifier_line_tbl => v_modifier_line_tbl,
10197: x_error_location => x_error_location
10198: );
10199: debug_message('process_qp_list_lines x_return_status '||x_return_status);
10200: IF x_return_status = Fnd_Api.g_ret_sts_error THEN
10201: RAISE Fnd_Api.g_exc_error;
10202: ELSIF x_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
10203: RAISE Fnd_Api.g_exc_unexpected_error;

Line 10274: relations for discounts(ozf_discount_lines and qp_list_lines) are stored only if the OZF Products that have apply discount = y.

10270:
10271: /*
10272: LOgic for buliding relations
10273: 1. Discounts
10274: relations for discounts(ozf_discount_lines and qp_list_lines) are stored only if the OZF Products that have apply discount = y.
10275:
10276: If the OZF Product has apply discount = n (which may be a discount or an exclusion) and is not an exclusion
10277: then a single qp discount line with list line type code DIS and 0% discount is created.
10278: -- This line can be related to the ozf_product since the ozf product in this case has a one to one relation with qp pricing attribute.

Line 11341: columns in tables qp_list_lines and qp_pricing_attributes

11337:
11338: /*
11339: This procedure creates SD offer discount line records.
11340: The mapping b/w QP and SDR lines is stored in orig_sys_line_ref and orig_sys_header_ref
11341: columns in tables qp_list_lines and qp_pricing_attributes
11342: */
11343:
11344: PROCEDURE populateSDDiscountRulesRec(
11345: x_return_status OUT NOCOPY VARCHAR2

Line 11389: FROM qp_list_lines

11385: AND vendor_approved_flag='Y';
11386:
11387: CURSOR cur_get_sys_line_ref_id(p_request_line_id NUMBER,p_qp_list_header_id NUMBER) IS
11388: SELECT list_line_no,list_line_id
11389: FROM qp_list_lines
11390: WHERE list_line_no = to_char(p_request_line_id)
11391: AND list_header_id = p_qp_list_header_id ;
11392:
11393: CURSOR cur_get_header_info IS