51:
52: BEGIN
53: l_api_name := UPPER(p_api_name);
54:
55: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
56: aso_debug_pub.add('Exception in package : '|| P_PKG_NAME, 1, 'N');
57: aso_debug_pub.add('Exception in API : '|| P_API_NAME, 1, 'N');
58: aso_debug_pub.add('SQLCODE : '|| P_SQLCODE, 1, 'N');
59: aso_debug_pub.add('SQLERRM : '|| P_SQLERRM, 1, 'N');
52: BEGIN
53: l_api_name := UPPER(p_api_name);
54:
55: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
56: aso_debug_pub.add('Exception in package : '|| P_PKG_NAME, 1, 'N');
57: aso_debug_pub.add('Exception in API : '|| P_API_NAME, 1, 'N');
58: aso_debug_pub.add('SQLCODE : '|| P_SQLCODE, 1, 'N');
59: aso_debug_pub.add('SQLERRM : '|| P_SQLERRM, 1, 'N');
60: END IF;
53: l_api_name := UPPER(p_api_name);
54:
55: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
56: aso_debug_pub.add('Exception in package : '|| P_PKG_NAME, 1, 'N');
57: aso_debug_pub.add('Exception in API : '|| P_API_NAME, 1, 'N');
58: aso_debug_pub.add('SQLCODE : '|| P_SQLCODE, 1, 'N');
59: aso_debug_pub.add('SQLERRM : '|| P_SQLERRM, 1, 'N');
60: END IF;
61:
54:
55: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
56: aso_debug_pub.add('Exception in package : '|| P_PKG_NAME, 1, 'N');
57: aso_debug_pub.add('Exception in API : '|| P_API_NAME, 1, 'N');
58: aso_debug_pub.add('SQLCODE : '|| P_SQLCODE, 1, 'N');
59: aso_debug_pub.add('SQLERRM : '|| P_SQLERRM, 1, 'N');
60: END IF;
61:
62: DBMS_TRANSACTION.ROLLBACK_SAVEPOINT(l_api_name || p_package_type);
55: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
56: aso_debug_pub.add('Exception in package : '|| P_PKG_NAME, 1, 'N');
57: aso_debug_pub.add('Exception in API : '|| P_API_NAME, 1, 'N');
58: aso_debug_pub.add('SQLCODE : '|| P_SQLCODE, 1, 'N');
59: aso_debug_pub.add('SQLERRM : '|| P_SQLERRM, 1, 'N');
60: END IF;
61:
62: DBMS_TRANSACTION.ROLLBACK_SAVEPOINT(l_api_name || p_package_type);
63: IF p_exception_level = FND_MSG_PUB.G_MSG_LVL_ERROR
4225: l_order_ref_line_id_tbl Index_Link_Tbl_Type;
4226:
4227: BEGIN
4228:
4229: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4230: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Rows p_qte_header_id: '||p_qte_header_id,1,'Y');
4231: END IF;
4232:
4233: FOR c_qte_line_rec IN c_Qte_Line LOOP
4226:
4227: BEGIN
4228:
4229: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4230: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Rows p_qte_header_id: '||p_qte_header_id,1,'Y');
4231: END IF;
4232:
4233: FOR c_qte_line_rec IN c_Qte_Line LOOP
4234: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4230: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Rows p_qte_header_id: '||p_qte_header_id,1,'Y');
4231: END IF;
4232:
4233: FOR c_qte_line_rec IN c_Qte_Line LOOP
4234: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4235: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.quote_line_id: '
4236: ||c_qte_line_rec.quote_line_id,1,'Y');
4237: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.service_item_flag: '
4238: ||c_qte_line_rec.service_item_flag,1,'Y');
4231: END IF;
4232:
4233: FOR c_qte_line_rec IN c_Qte_Line LOOP
4234: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4235: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.quote_line_id: '
4236: ||c_qte_line_rec.quote_line_id,1,'Y');
4237: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.service_item_flag: '
4238: ||c_qte_line_rec.service_item_flag,1,'Y');
4239: END IF;
4233: FOR c_qte_line_rec IN c_Qte_Line LOOP
4234: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4235: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.quote_line_id: '
4236: ||c_qte_line_rec.quote_line_id,1,'Y');
4237: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.service_item_flag: '
4238: ||c_qte_line_rec.service_item_flag,1,'Y');
4239: END IF;
4240:
4241: IF NVL(c_qte_line_rec.service_item_flag,'N') = 'Y' THEN
4241: IF NVL(c_qte_line_rec.service_item_flag,'N') = 'Y' THEN
4242: OPEN c_qte_line_SVC_ref(c_qte_line_rec.quote_line_id);
4243: FETCH c_qte_line_SVC_ref INTO l_ref_type_code, l_service_ref_line_id;
4244: CLOSE c_qte_line_SVC_ref;
4245: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4246: aso_debug_pub.add('ASO_UTL_PVT: Parent Service Line collection ... ',1,'Y');
4247: END IF;
4248:
4249: IF l_ref_type_code = 'ORDER' THEN
4242: OPEN c_qte_line_SVC_ref(c_qte_line_rec.quote_line_id);
4243: FETCH c_qte_line_SVC_ref INTO l_ref_type_code, l_service_ref_line_id;
4244: CLOSE c_qte_line_SVC_ref;
4245: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4246: aso_debug_pub.add('ASO_UTL_PVT: Parent Service Line collection ... ',1,'Y');
4247: END IF;
4248:
4249: IF l_ref_type_code = 'ORDER' THEN
4250: IF l_order_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4247: END IF;
4248:
4249: IF l_ref_type_code = 'ORDER' THEN
4250: IF l_order_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4251: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4252: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has already been added to l_qte_line_tbl.',1,'Y');
4253: END IF;
4254: ELSE
4255: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4248:
4249: IF l_ref_type_code = 'ORDER' THEN
4250: IF l_order_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4251: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4252: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has already been added to l_qte_line_tbl.',1,'Y');
4253: END IF;
4254: ELSE
4255: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4256: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4253: END IF;
4254: ELSE
4255: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4256: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4257: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4258: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4259: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4260: ||NVL(to_char(l_order_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4261: END IF;
4254: ELSE
4255: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4256: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4257: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4258: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4259: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4260: ||NVL(to_char(l_order_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4261: END IF;
4262: l_qte_line_rec.QUOTE_LINE_ID := c_order_line_rec.LINE_ID;
4255: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4256: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4257: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4258: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4259: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4260: ||NVL(to_char(l_order_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4261: END IF;
4262: l_qte_line_rec.QUOTE_LINE_ID := c_order_line_rec.LINE_ID;
4263: l_qte_line_rec.INVENTORY_ITEM_ID := c_order_line_rec.INVENTORY_ITEM_ID;
4270:
4271: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4272: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4273: l_qte_line_rec.IS_LINE_CHANGED_FLAG := 'Y';
4274: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4275: aso_debug_pub.add('ASO_UTL_PVT:P_change_line_flag:'||P_change_line_flag,1,'Y');
4276: END IF;
4277: If P_change_line_flag = FND_API.G_FALSE Then
4278: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4271: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4272: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4273: l_qte_line_rec.IS_LINE_CHANGED_FLAG := 'Y';
4274: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4275: aso_debug_pub.add('ASO_UTL_PVT:P_change_line_flag:'||P_change_line_flag,1,'Y');
4276: END IF;
4277: If P_change_line_flag = FND_API.G_FALSE Then
4278: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4279: else
4278: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4279: else
4280: l_Qte_Line_tbl(l_qte_line_rec.QUOTE_LINE_ID) := l_Qte_Line_rec;
4281: end if;
4282: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4283: aso_debug_pub.add('Order Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4284: END IF;
4285:
4286: END LOOP;
4279: else
4280: l_Qte_Line_tbl(l_qte_line_rec.QUOTE_LINE_ID) := l_Qte_Line_rec;
4281: end if;
4282: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4283: aso_debug_pub.add('Order Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4284: END IF;
4285:
4286: END LOOP;
4287: END IF;--l_order_ref_line_id_tbl.exists(l_service_ref_line_id)
4286: END LOOP;
4287: END IF;--l_order_ref_line_id_tbl.exists(l_service_ref_line_id)
4288: ELSIF l_ref_type_code = 'CUSTOMER_PRODUCT' THEN
4289: IF l_service_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4290: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4291: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line has already been added to l_qte_line_tbl.',1,'Y');
4292: END IF;
4293: ELSE
4294: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4287: END IF;--l_order_ref_line_id_tbl.exists(l_service_ref_line_id)
4288: ELSIF l_ref_type_code = 'CUSTOMER_PRODUCT' THEN
4289: IF l_service_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4290: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4291: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line has already been added to l_qte_line_tbl.',1,'Y');
4292: END IF;
4293: ELSE
4294: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4295: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4290: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4291: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line has already been added to l_qte_line_tbl.',1,'Y');
4292: END IF;
4293: ELSE
4294: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4295: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4296: END IF;
4297: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4298: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4291: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line has already been added to l_qte_line_tbl.',1,'Y');
4292: END IF;
4293: ELSE
4294: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4295: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4296: END IF;
4297: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4298: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4299: aso_debug_pub.add('ASO_UTL_PVT: c_get_cust_acct_id_rec.cust_account_id:'
4294: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4295: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4296: END IF;
4297: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4298: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4299: aso_debug_pub.add('ASO_UTL_PVT: c_get_cust_acct_id_rec.cust_account_id:'
4300: ||c_get_cust_acct_id_rec.cust_account_id,1,'Y');
4301: END IF;
4302: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4295: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4296: END IF;
4297: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4298: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4299: aso_debug_pub.add('ASO_UTL_PVT: c_get_cust_acct_id_rec.cust_account_id:'
4300: ||c_get_cust_acct_id_rec.cust_account_id,1,'Y');
4301: END IF;
4302: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4303:
4302: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4303:
4304: For c_get_orig_order_line_id_rec IN c_get_orig_order_line_id(l_service_ref_line_id,
4305: c_get_cust_acct_id_rec.cust_account_id) LOOP
4306: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4307: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4308: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4309: ||NVL(to_char(l_service_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4310: END IF;
4303:
4304: For c_get_orig_order_line_id_rec IN c_get_orig_order_line_id(l_service_ref_line_id,
4305: c_get_cust_acct_id_rec.cust_account_id) LOOP
4306: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4307: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4308: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4309: ||NVL(to_char(l_service_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4310: END IF;
4311:
4304: For c_get_orig_order_line_id_rec IN c_get_orig_order_line_id(l_service_ref_line_id,
4305: c_get_cust_acct_id_rec.cust_account_id) LOOP
4306: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4307: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4308: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4309: ||NVL(to_char(l_service_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4310: END IF;
4311:
4312: FOR c_order_line_rec IN c_order_line(c_get_orig_order_line_id_rec.original_order_line_id) LOOP
4321:
4322: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4323: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4324: l_qte_line_rec.IS_LINE_CHANGED_FLAG := 'Y';
4325: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4326: aso_debug_pub.add('ASO_UTL_PVT:P_change_line_flag:'||P_change_line_flag,1,'Y');
4327: END IF;
4328: If P_change_line_flag = FND_API.G_FALSE Then
4329: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4322: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4323: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4324: l_qte_line_rec.IS_LINE_CHANGED_FLAG := 'Y';
4325: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4326: aso_debug_pub.add('ASO_UTL_PVT:P_change_line_flag:'||P_change_line_flag,1,'Y');
4327: END IF;
4328: If P_change_line_flag = FND_API.G_FALSE Then
4329: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4330: else
4329: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4330: else
4331: l_Qte_Line_tbl(l_qte_line_rec.QUOTE_LINE_ID) := l_Qte_Line_rec;
4332: end if;
4333: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4334: aso_debug_pub.add('Instance Line Count '|| l_Qte_line_tbl.COUNT, 1, 'N');
4335: END IF;
4336:
4337: END LOOP;
4330: else
4331: l_Qte_Line_tbl(l_qte_line_rec.QUOTE_LINE_ID) := l_Qte_Line_rec;
4332: end if;
4333: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4334: aso_debug_pub.add('Instance Line Count '|| l_Qte_line_tbl.COUNT, 1, 'N');
4335: END IF;
4336:
4337: END LOOP;
4338:
4426: l_qte_line_rec.PRICING_QUANTITY_UOM := c_qte_line_rec.PRICING_QUANTITY_UOM;
4427: l_qte_line_rec.PRICING_QUANTITY := c_qte_line_rec.PRICING_QUANTITY;
4428: l_qte_line_rec.OBJECT_VERSION_NUMBER := c_qte_line_rec.OBJECT_VERSION_NUMBER;
4429: l_qte_line_rec.IS_LINE_CHANGED_FLAG := 'Y';
4430: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4431: aso_debug_pub.add('ASO_UTL_PVT:P_change_line_flag:'||P_change_line_flag,1,'Y');
4432: END IF;
4433: If P_change_line_flag = FND_API.G_FALSE Then
4434: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4427: l_qte_line_rec.PRICING_QUANTITY := c_qte_line_rec.PRICING_QUANTITY;
4428: l_qte_line_rec.OBJECT_VERSION_NUMBER := c_qte_line_rec.OBJECT_VERSION_NUMBER;
4429: l_qte_line_rec.IS_LINE_CHANGED_FLAG := 'Y';
4430: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4431: aso_debug_pub.add('ASO_UTL_PVT:P_change_line_flag:'||P_change_line_flag,1,'Y');
4432: END IF;
4433: If P_change_line_flag = FND_API.G_FALSE Then
4434: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4435: else
4435: else
4436: l_Qte_Line_tbl(l_qte_line_rec.QUOTE_LINE_ID) := l_Qte_Line_rec;
4437: end if;
4438:
4439: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4440: aso_debug_pub.add('Quote Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4441: END IF;
4442: END LOOP;
4443: RETURN l_Qte_Line_tbl;
4436: l_Qte_Line_tbl(l_qte_line_rec.QUOTE_LINE_ID) := l_Qte_Line_rec;
4437: end if;
4438:
4439: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4440: aso_debug_pub.add('Quote Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4441: END IF;
4442: END LOOP;
4443: RETURN l_Qte_Line_tbl;
4444:
4581: l_Qte_Line_tbl ASO_QUOTE_PUB.Qte_Line_Tbl_Type;
4582: l_service_ref_line_id_tbl Index_Link_Tbl_Type;
4583: l_order_ref_line_id_tbl Index_Link_Tbl_Type;
4584: BEGIN
4585: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4586: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Row p_qte_header_id: '||p_qte_header_id,1,'Y');
4587: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Row P_Qte_Line_Id: '||P_Qte_Line_Id,1,'Y');
4588: END IF;
4589:
4582: l_service_ref_line_id_tbl Index_Link_Tbl_Type;
4583: l_order_ref_line_id_tbl Index_Link_Tbl_Type;
4584: BEGIN
4585: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4586: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Row p_qte_header_id: '||p_qte_header_id,1,'Y');
4587: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Row P_Qte_Line_Id: '||P_Qte_Line_Id,1,'Y');
4588: END IF;
4589:
4590: FOR c_qte_line_rec IN c_Qte_Line LOOP
4583: l_order_ref_line_id_tbl Index_Link_Tbl_Type;
4584: BEGIN
4585: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4586: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Row p_qte_header_id: '||p_qte_header_id,1,'Y');
4587: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Row P_Qte_Line_Id: '||P_Qte_Line_Id,1,'Y');
4588: END IF;
4589:
4590: FOR c_qte_line_rec IN c_Qte_Line LOOP
4591: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4587: aso_debug_pub.add('ASO_UTL_PVT: Start Query Pricing Line Row P_Qte_Line_Id: '||P_Qte_Line_Id,1,'Y');
4588: END IF;
4589:
4590: FOR c_qte_line_rec IN c_Qte_Line LOOP
4591: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4592: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.quote_line_id: '
4593: ||c_qte_line_rec.quote_line_id,1,'Y');
4594: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.service_item_flag: '
4595: ||c_qte_line_rec.service_item_flag,1,'Y');
4588: END IF;
4589:
4590: FOR c_qte_line_rec IN c_Qte_Line LOOP
4591: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4592: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.quote_line_id: '
4593: ||c_qte_line_rec.quote_line_id,1,'Y');
4594: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.service_item_flag: '
4595: ||c_qte_line_rec.service_item_flag,1,'Y');
4596: END IF;
4590: FOR c_qte_line_rec IN c_Qte_Line LOOP
4591: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4592: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.quote_line_id: '
4593: ||c_qte_line_rec.quote_line_id,1,'Y');
4594: aso_debug_pub.add('ASO_UTL_PVT: Inside c_qte_line_rec with c_qte_line_rec.service_item_flag: '
4595: ||c_qte_line_rec.service_item_flag,1,'Y');
4596: END IF;
4597:
4598: IF NVL(c_qte_line_rec.service_item_flag,'N') = 'Y' THEN
4599: OPEN c_qte_line_SVC_ref(c_qte_line_rec.quote_line_id);
4600: FETCH c_qte_line_SVC_ref INTO l_ref_type_code, l_service_ref_line_id;
4601: CLOSE c_qte_line_SVC_ref;
4602:
4603: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4604: aso_debug_pub.add('ASO_UTL_PVT: Parent Service Line collection ... ',1,'Y');
4605: END IF;
4606: IF l_ref_type_code = 'ORDER' THEN
4607: IF l_order_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4600: FETCH c_qte_line_SVC_ref INTO l_ref_type_code, l_service_ref_line_id;
4601: CLOSE c_qte_line_SVC_ref;
4602:
4603: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4604: aso_debug_pub.add('ASO_UTL_PVT: Parent Service Line collection ... ',1,'Y');
4605: END IF;
4606: IF l_ref_type_code = 'ORDER' THEN
4607: IF l_order_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4608: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4604: aso_debug_pub.add('ASO_UTL_PVT: Parent Service Line collection ... ',1,'Y');
4605: END IF;
4606: IF l_ref_type_code = 'ORDER' THEN
4607: IF l_order_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4608: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4609: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has already been added to l_qte_line_tbl.',1,'Y');
4610: END IF;
4611: ELSE
4612: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4605: END IF;
4606: IF l_ref_type_code = 'ORDER' THEN
4607: IF l_order_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4608: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4609: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has already been added to l_qte_line_tbl.',1,'Y');
4610: END IF;
4611: ELSE
4612: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4613: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4610: END IF;
4611: ELSE
4612: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4613: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4614: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4615: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4616: aso_debug_pub.add('ASO_UTL_PVT: l_order_ref_line_id_tbl('||l_service_ref_line_id||').:'
4617: ||NVL(to_char(l_order_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4618: END IF;
4611: ELSE
4612: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4613: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4614: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4615: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4616: aso_debug_pub.add('ASO_UTL_PVT: l_order_ref_line_id_tbl('||l_service_ref_line_id||').:'
4617: ||NVL(to_char(l_order_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4618: END IF;
4619: l_qte_line_rec.QUOTE_LINE_ID := c_order_line_rec.LINE_ID;
4612: FOR c_order_line_rec IN c_order_line(l_service_ref_line_id) LOOP
4613: l_order_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4614: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4615: aso_debug_pub.add('ASO_UTL_PVT: Parent Order Line has not yet been added to l_qte_line_tbl.', 1, 'N');
4616: aso_debug_pub.add('ASO_UTL_PVT: l_order_ref_line_id_tbl('||l_service_ref_line_id||').:'
4617: ||NVL(to_char(l_order_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4618: END IF;
4619: l_qte_line_rec.QUOTE_LINE_ID := c_order_line_rec.LINE_ID;
4620: l_qte_line_rec.INVENTORY_ITEM_ID := c_order_line_rec.INVENTORY_ITEM_ID;
4627:
4628: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4629: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4630: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4631: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4632: aso_debug_pub.add('Order Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4633: END IF;
4634: END LOOP;
4635: END IF;--l_service_ref_line_id_tbl.exists(l_service_ref_line_id)
4628: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4629: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4630: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4631: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4632: aso_debug_pub.add('Order Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4633: END IF;
4634: END LOOP;
4635: END IF;--l_service_ref_line_id_tbl.exists(l_service_ref_line_id)
4636:
4636:
4637: ELSIF l_ref_type_code = 'CUSTOMER_PRODUCT' THEN
4638:
4639: IF l_service_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4640: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4641: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line already added to l_qte_line_tbl.',1,'Y');
4642: END IF;
4643: ELSE
4644: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4637: ELSIF l_ref_type_code = 'CUSTOMER_PRODUCT' THEN
4638:
4639: IF l_service_ref_line_id_tbl.exists(l_service_ref_line_id) THEN
4640: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4641: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line already added to l_qte_line_tbl.',1,'Y');
4642: END IF;
4643: ELSE
4644: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4645: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4640: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4641: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line already added to l_qte_line_tbl.',1,'Y');
4642: END IF;
4643: ELSE
4644: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4645: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4646: END IF;
4647: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4648: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4641: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line already added to l_qte_line_tbl.',1,'Y');
4642: END IF;
4643: ELSE
4644: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4645: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4646: END IF;
4647: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4648: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4649: aso_debug_pub.add('ASO_UTL_PVT: c_get_cust_acct_id_rec.cust_account_id:'
4644: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4645: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4646: END IF;
4647: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4648: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4649: aso_debug_pub.add('ASO_UTL_PVT: c_get_cust_acct_id_rec.cust_account_id:'
4650: ||c_get_cust_acct_id_rec.cust_account_id,1,'Y');
4651: END IF;
4652: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4645: aso_debug_pub.add('ASO_UTL_PVT: Before customer install processing:',1,'Y');
4646: END IF;
4647: FOR c_get_cust_acct_id_rec IN c_get_cust_acct_id LOOP
4648: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4649: aso_debug_pub.add('ASO_UTL_PVT: c_get_cust_acct_id_rec.cust_account_id:'
4650: ||c_get_cust_acct_id_rec.cust_account_id,1,'Y');
4651: END IF;
4652: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4653: For c_get_orig_order_line_id_rec IN c_get_orig_order_line_id(l_service_ref_line_id,
4650: ||c_get_cust_acct_id_rec.cust_account_id,1,'Y');
4651: END IF;
4652: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4653: For c_get_orig_order_line_id_rec IN c_get_orig_order_line_id(l_service_ref_line_id,
4654: c_get_cust_acct_id_rec.cust_account_id) LOOP IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4655: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line not added to l_qte_line_tbl', 1, 'N');
4656: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4657: ||NVL(to_char(l_service_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4658: END IF;
4651: END IF;
4652: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4653: For c_get_orig_order_line_id_rec IN c_get_orig_order_line_id(l_service_ref_line_id,
4654: c_get_cust_acct_id_rec.cust_account_id) LOOP IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4655: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line not added to l_qte_line_tbl', 1, 'N');
4656: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4657: ||NVL(to_char(l_service_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4658: END IF;
4659: FOR c_order_line_rec IN c_order_line(c_get_orig_order_line_id_rec.original_order_line_id) LOOP
4652: l_service_ref_line_id_tbl(l_service_ref_line_id) := l_service_ref_line_id;
4653: For c_get_orig_order_line_id_rec IN c_get_orig_order_line_id(l_service_ref_line_id,
4654: c_get_cust_acct_id_rec.cust_account_id) LOOP IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4655: aso_debug_pub.add('ASO_UTL_PVT: Parent Instance Line not added to l_qte_line_tbl', 1, 'N');
4656: aso_debug_pub.add('ASO_UTL_PVT: l_service_ref_line_id_tbl('||l_service_ref_line_id||').:'
4657: ||NVL(to_char(l_service_ref_line_id_tbl(l_service_ref_line_id)),'null'),1,'Y');
4658: END IF;
4659: FOR c_order_line_rec IN c_order_line(c_get_orig_order_line_id_rec.original_order_line_id) LOOP
4660: l_qte_line_rec.QUOTE_LINE_ID := l_service_ref_line_id;
4668:
4669: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4670: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4671: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4672: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4673: aso_debug_pub.add('Instance Line Count '|| l_Qte_line_tbl.COUNT, 1, 'N');
4674: END IF;
4675: END LOOP;
4676: End LOOP;
4669: l_qte_line_rec.PRICING_QUANTITY := c_order_line_rec.PRICING_QUANTITY;
4670: l_qte_line_rec.PRICING_QUANTITY_UOM := c_order_line_rec.PRICING_QUANTITY_UOM;
4671: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4672: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4673: aso_debug_pub.add('Instance Line Count '|| l_Qte_line_tbl.COUNT, 1, 'N');
4674: END IF;
4675: END LOOP;
4676: End LOOP;
4677: End LOOP;
4760: l_qte_line_rec.PRICING_QUANTITY_UOM := c_qte_line_rec.PRICING_QUANTITY_UOM;
4761: l_qte_line_rec.PRICING_QUANTITY := c_qte_line_rec.PRICING_QUANTITY;
4762: l_qte_line_rec.OBJECT_VERSION_NUMBER := c_qte_line_rec.OBJECT_VERSION_NUMBER;
4763: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4764: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4765: aso_debug_pub.add('Quote Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4766: END IF;
4767: END LOOP;
4768:
4761: l_qte_line_rec.PRICING_QUANTITY := c_qte_line_rec.PRICING_QUANTITY;
4762: l_qte_line_rec.OBJECT_VERSION_NUMBER := c_qte_line_rec.OBJECT_VERSION_NUMBER;
4763: l_Qte_Line_tbl(l_Qte_Line_tbl.COUNT+1) := l_Qte_Line_rec;
4764: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
4765: aso_debug_pub.add('Quote Line Count'|| l_Qte_line_tbl.COUNT, 1, 'N');
4766: END IF;
4767: END LOOP;
4768:
4769: RETURN l_Qte_Line_tbl;
5489:
5490: l_end_date_active date;
5491:
5492: begin
5493: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5494: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: p_profile_name: '||p_profile_name,1,'Y');
5495: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: p_application_id: '||p_application_id,1,'Y');
5496: END IF;
5497:
5490: l_end_date_active date;
5491:
5492: begin
5493: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5494: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: p_profile_name: '||p_profile_name,1,'Y');
5495: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: p_application_id: '||p_application_id,1,'Y');
5496: END IF;
5497:
5498: open c_end_date;
5491:
5492: begin
5493: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5494: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: p_profile_name: '||p_profile_name,1,'Y');
5495: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: p_application_id: '||p_application_id,1,'Y');
5496: END IF;
5497:
5498: open c_end_date;
5499: fetch c_end_date into l_end_date_active;
5497:
5498: open c_end_date;
5499: fetch c_end_date into l_end_date_active;
5500:
5501: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5502: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: l_end_date_active: '||l_end_date_active,1,'Y');
5503: END IF;
5504:
5505: if c_end_date%found then
5498: open c_end_date;
5499: fetch c_end_date into l_end_date_active;
5500:
5501: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5502: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: l_end_date_active: '||l_end_date_active,1,'Y');
5503: END IF;
5504:
5505: if c_end_date%found then
5506:
5503: END IF;
5504:
5505: if c_end_date%found then
5506:
5507: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5508: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: Inside c_end_date%found cond',1,'Y');
5509: END IF;
5510:
5511: close c_end_date;
5504:
5505: if c_end_date%found then
5506:
5507: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5508: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: Inside c_end_date%found cond',1,'Y');
5509: END IF;
5510:
5511: close c_end_date;
5512: return 'F';
5511: close c_end_date;
5512: return 'F';
5513: else
5514:
5515: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5516: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: Inside else c_end_date%found cond',1,'Y');
5517: END IF;
5518:
5519: close c_end_date;
5512: return 'F';
5513: else
5514:
5515: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5516: aso_debug_pub.add('ASO_UTL_PVT: Get_Profile_Obsolete_Status: Inside else c_end_date%found cond',1,'Y');
5517: END IF;
5518:
5519: close c_end_date;
5520: return 'T';
5880: FUNCTION GET_OU_ATTRIBUTE_VALUE(p_attribute IN VARCHAR2, p_organization_id IN NUMBER) RETURN VARCHAR2
5881: IS
5882: l_attribute_value APPS.HR_ORGANIZATION_INFORMATION.ORG_INFORMATION1%TYPE;
5883: BEGIN
5884: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5885: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_attribute '||p_attribute,1,'Y');
5886: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_organization_id '||p_organization_id,1,'Y');
5887: END IF;
5888:
5881: IS
5882: l_attribute_value APPS.HR_ORGANIZATION_INFORMATION.ORG_INFORMATION1%TYPE;
5883: BEGIN
5884: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5885: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_attribute '||p_attribute,1,'Y');
5886: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_organization_id '||p_organization_id,1,'Y');
5887: END IF;
5888:
5889: IF (p_attribute = G_DEFAULT_ORDER_TYPE) THEN
5882: l_attribute_value APPS.HR_ORGANIZATION_INFORMATION.ORG_INFORMATION1%TYPE;
5883: BEGIN
5884: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5885: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_attribute '||p_attribute,1,'Y');
5886: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_organization_id '||p_organization_id,1,'Y');
5887: END IF;
5888:
5889: IF (p_attribute = G_DEFAULT_ORDER_TYPE) THEN
5890: BEGIN
5942: RETURN NULL ;
5943: END;
5944: END IF;
5945:
5946: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5947: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: l_attribute_value '||l_attribute_value,1,'Y');
5948: END IF;
5949:
5950: RETURN l_attribute_value;
5943: END;
5944: END IF;
5945:
5946: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5947: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: l_attribute_value '||l_attribute_value,1,'Y');
5948: END IF;
5949:
5950: RETURN l_attribute_value;
5951:
5958: BEGIN
5959:
5960: l_organization_id := MO_GLOBAL.GET_CURRENT_ORG_ID;
5961:
5962: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5963: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_attribute '||p_attribute,1,'Y');
5964: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: l_organization_id '||l_organization_id,1,'Y');
5965: END IF;
5966:
5959:
5960: l_organization_id := MO_GLOBAL.GET_CURRENT_ORG_ID;
5961:
5962: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5963: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_attribute '||p_attribute,1,'Y');
5964: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: l_organization_id '||l_organization_id,1,'Y');
5965: END IF;
5966:
5967: l_attribute_value := GET_OU_ATTRIBUTE_VALUE(p_attribute, l_organization_id);
5960: l_organization_id := MO_GLOBAL.GET_CURRENT_ORG_ID;
5961:
5962: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5963: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: p_attribute '||p_attribute,1,'Y');
5964: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: l_organization_id '||l_organization_id,1,'Y');
5965: END IF;
5966:
5967: l_attribute_value := GET_OU_ATTRIBUTE_VALUE(p_attribute, l_organization_id);
5968:
5966:
5967: l_attribute_value := GET_OU_ATTRIBUTE_VALUE(p_attribute, l_organization_id);
5968:
5969:
5970: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5971: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: l_attribute_value '||l_attribute_value,1,'Y');
5972: END IF;
5973:
5974: RETURN l_attribute_value;
5967: l_attribute_value := GET_OU_ATTRIBUTE_VALUE(p_attribute, l_organization_id);
5968:
5969:
5970: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
5971: aso_debug_pub.add('ASO_UTILITY_PVT: GET_OU_ATTRIBUTE_VALUE: l_attribute_value '||l_attribute_value,1,'Y');
5972: END IF;
5973:
5974: RETURN l_attribute_value;
5975:
6043: LOOP
6044: FETCH cur_find_rec INTO l_quote_number, l_conc_request_id ;
6045:
6046: IF (cur_find_rec%ROWCOUNT = 0) THEN
6047: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6048: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : No record found for the quote number, inserting the new record.', 1, 'Y');
6049: END IF;
6050: l_to_insert := 1;
6051: END IF ;
6044: FETCH cur_find_rec INTO l_quote_number, l_conc_request_id ;
6045:
6046: IF (cur_find_rec%ROWCOUNT = 0) THEN
6047: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6048: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : No record found for the quote number, inserting the new record.', 1, 'Y');
6049: END IF;
6050: l_to_insert := 1;
6051: END IF ;
6052:
6054:
6055: IF (l_conc_request_id IS NOT null)
6056: THEN
6057: -- Record exists but a conc request id is also present, hence insert the record
6058: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6059: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Found record with quote number passed but the conc request id is not null, hence inserting the new record.', 1, 'Y');
6060: END IF;
6061: l_to_insert := 1;
6062: END IF;
6055: IF (l_conc_request_id IS NOT null)
6056: THEN
6057: -- Record exists but a conc request id is also present, hence insert the record
6058: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6059: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Found record with quote number passed but the conc request id is not null, hence inserting the new record.', 1, 'Y');
6060: END IF;
6061: l_to_insert := 1;
6062: END IF;
6063:
6063:
6064: IF (l_conc_request_id IS null)
6065: THEN
6066: -- Record exists with a null conc request id, hence we need not insert a new record
6067: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6068: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Found record with quote number and the conc request id is null, hence no need to insert the new record.', 1, 'Y');
6069: END IF;
6070: l_found_rec := 1;
6071: END IF;
6064: IF (l_conc_request_id IS null)
6065: THEN
6066: -- Record exists with a null conc request id, hence we need not insert a new record
6067: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6068: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Found record with quote number and the conc request id is null, hence no need to insert the new record.', 1, 'Y');
6069: END IF;
6070: l_found_rec := 1;
6071: END IF;
6072:
6083:
6084:
6085: IF (l_to_insert = 1) THEN
6086:
6087: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6088: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Before Inserting record in ASO_CHANGED_QUOTES', 1, 'Y');
6089: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Quote Number : ' || p_quote_number, 1, 'Y');
6090: END IF;
6091:
6084:
6085: IF (l_to_insert = 1) THEN
6086:
6087: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6088: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Before Inserting record in ASO_CHANGED_QUOTES', 1, 'Y');
6089: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Quote Number : ' || p_quote_number, 1, 'Y');
6090: END IF;
6091:
6092: ASO_CHANGED_QUOTES_PKG.INSERT_ROW(
6085: IF (l_to_insert = 1) THEN
6086:
6087: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6088: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Before Inserting record in ASO_CHANGED_QUOTES', 1, 'Y');
6089: aso_debug_pub.add('ASO_UTILITY_PVT.UPDATE_CHANGED_QUOTES : Quote Number : ' || p_quote_number, 1, 'Y');
6090: END IF;
6091:
6092: ASO_CHANGED_QUOTES_PKG.INSERT_ROW(
6093: P_QUOTE_NUMBER => p_quote_number,
6129: l_org_id NUMBER;
6130: l_def_org_id NUMBER;
6131: l_file VARCHAR2(200);
6132: begin
6133: IF (aso_debug_pub.g_debug_flag = 'Y' ) THEN
6134:
6135: aso_debug_pub.add( '*******************************************',1, 'Y' );
6136: aso_debug_pub.add( '***** Printing the Variable Values *****',1, 'Y' );
6137: aso_debug_pub.add( '*******************************************',1, 'Y' );
6131: l_file VARCHAR2(200);
6132: begin
6133: IF (aso_debug_pub.g_debug_flag = 'Y' ) THEN
6134:
6135: aso_debug_pub.add( '*******************************************',1, 'Y' );
6136: aso_debug_pub.add( '***** Printing the Variable Values *****',1, 'Y' );
6137: aso_debug_pub.add( '*******************************************',1, 'Y' );
6138: aso_debug_pub.add( ' ',1, 'Y' );
6139:
6132: begin
6133: IF (aso_debug_pub.g_debug_flag = 'Y' ) THEN
6134:
6135: aso_debug_pub.add( '*******************************************',1, 'Y' );
6136: aso_debug_pub.add( '***** Printing the Variable Values *****',1, 'Y' );
6137: aso_debug_pub.add( '*******************************************',1, 'Y' );
6138: aso_debug_pub.add( ' ',1, 'Y' );
6139:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6133: IF (aso_debug_pub.g_debug_flag = 'Y' ) THEN
6134:
6135: aso_debug_pub.add( '*******************************************',1, 'Y' );
6136: aso_debug_pub.add( '***** Printing the Variable Values *****',1, 'Y' );
6137: aso_debug_pub.add( '*******************************************',1, 'Y' );
6138: aso_debug_pub.add( ' ',1, 'Y' );
6139:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6134:
6135: aso_debug_pub.add( '*******************************************',1, 'Y' );
6136: aso_debug_pub.add( '***** Printing the Variable Values *****',1, 'Y' );
6137: aso_debug_pub.add( '*******************************************',1, 'Y' );
6138: aso_debug_pub.add( ' ',1, 'Y' );
6139:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6136: aso_debug_pub.add( '***** Printing the Variable Values *****',1, 'Y' );
6137: aso_debug_pub.add( '*******************************************',1, 'Y' );
6138: aso_debug_pub.add( ' ',1, 'Y' );
6139:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6143: aso_debug_pub.add(rpad('USER NAME',50,'------')||'------>'||FND_GLOBAL.USER_NAME , 1, 'Y');
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6137: aso_debug_pub.add( '*******************************************',1, 'Y' );
6138: aso_debug_pub.add( ' ',1, 'Y' );
6139:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6143: aso_debug_pub.add(rpad('USER NAME',50,'------')||'------>'||FND_GLOBAL.USER_NAME , 1, 'Y');
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6145: aso_debug_pub.add(rpad('APPLICATION NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_NAME , 1, 'Y');
6138: aso_debug_pub.add( ' ',1, 'Y' );
6139:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6143: aso_debug_pub.add(rpad('USER NAME',50,'------')||'------>'||FND_GLOBAL.USER_NAME , 1, 'Y');
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6145: aso_debug_pub.add(rpad('APPLICATION NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_NAME , 1, 'Y');
6146: aso_debug_pub.add(rpad('APPLICATION SHORT NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_SHORT_NAME , 1, 'Y');
6139:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6143: aso_debug_pub.add(rpad('USER NAME',50,'------')||'------>'||FND_GLOBAL.USER_NAME , 1, 'Y');
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6145: aso_debug_pub.add(rpad('APPLICATION NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_NAME , 1, 'Y');
6146: aso_debug_pub.add(rpad('APPLICATION SHORT NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_SHORT_NAME , 1, 'Y');
6147:
6140: aso_debug_pub.add(rpad('USER ID',50,'------')||'------>'||FND_GLOBAL.USER_ID , 1, 'Y');
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6143: aso_debug_pub.add(rpad('USER NAME',50,'------')||'------>'||FND_GLOBAL.USER_NAME , 1, 'Y');
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6145: aso_debug_pub.add(rpad('APPLICATION NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_NAME , 1, 'Y');
6146: aso_debug_pub.add(rpad('APPLICATION SHORT NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_SHORT_NAME , 1, 'Y');
6147:
6148: aso_debug_pub.add( ' ',1, 'Y' );
6141: aso_debug_pub.add(rpad('RESPONSIBILITY ID',50,'------')||'------>'||FND_GLOBAL.RESP_ID , 1, 'Y');
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6143: aso_debug_pub.add(rpad('USER NAME',50,'------')||'------>'||FND_GLOBAL.USER_NAME , 1, 'Y');
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6145: aso_debug_pub.add(rpad('APPLICATION NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_NAME , 1, 'Y');
6146: aso_debug_pub.add(rpad('APPLICATION SHORT NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_SHORT_NAME , 1, 'Y');
6147:
6148: aso_debug_pub.add( ' ',1, 'Y' );
6149:
6142: aso_debug_pub.add(rpad('RESPONSIBILITY APPLICATION ID',50,'------')||'------>'||FND_GLOBAL.RESP_APPL_ID , 1, 'Y');
6143: aso_debug_pub.add(rpad('USER NAME',50,'------')||'------>'||FND_GLOBAL.USER_NAME , 1, 'Y');
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6145: aso_debug_pub.add(rpad('APPLICATION NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_NAME , 1, 'Y');
6146: aso_debug_pub.add(rpad('APPLICATION SHORT NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_SHORT_NAME , 1, 'Y');
6147:
6148: aso_debug_pub.add( ' ',1, 'Y' );
6149:
6150:
6144: aso_debug_pub.add(rpad('RESPONSIBILITY NAME',50,'------')||'------>'||FND_GLOBAL.RESP_NAME , 1, 'Y');
6145: aso_debug_pub.add(rpad('APPLICATION NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_NAME , 1, 'Y');
6146: aso_debug_pub.add(rpad('APPLICATION SHORT NAME',50,'------')||'------>'||FND_GLOBAL.APPLICATION_SHORT_NAME , 1, 'Y');
6147:
6148: aso_debug_pub.add( ' ',1, 'Y' );
6149:
6150:
6151: aso_debug_pub.add( '******************************************',1, 'Y' );
6152: aso_debug_pub.add( '***** Printing the profile values *****',1, 'Y' );
6147:
6148: aso_debug_pub.add( ' ',1, 'Y' );
6149:
6150:
6151: aso_debug_pub.add( '******************************************',1, 'Y' );
6152: aso_debug_pub.add( '***** Printing the profile values *****',1, 'Y' );
6153: aso_debug_pub.add( '******************************************',1, 'Y' );
6154: aso_debug_pub.add( ' ',1, 'Y' );
6155:
6148: aso_debug_pub.add( ' ',1, 'Y' );
6149:
6150:
6151: aso_debug_pub.add( '******************************************',1, 'Y' );
6152: aso_debug_pub.add( '***** Printing the profile values *****',1, 'Y' );
6153: aso_debug_pub.add( '******************************************',1, 'Y' );
6154: aso_debug_pub.add( ' ',1, 'Y' );
6155:
6156: fnd_profile.get('XLA_MO_SECURITY_PROFILE_LEVEL',l_security_profile_id);
6149:
6150:
6151: aso_debug_pub.add( '******************************************',1, 'Y' );
6152: aso_debug_pub.add( '***** Printing the profile values *****',1, 'Y' );
6153: aso_debug_pub.add( '******************************************',1, 'Y' );
6154: aso_debug_pub.add( ' ',1, 'Y' );
6155:
6156: fnd_profile.get('XLA_MO_SECURITY_PROFILE_LEVEL',l_security_profile_id);
6157: fnd_profile.get('DEFAULT_ORG_ID',l_def_org_id);
6150:
6151: aso_debug_pub.add( '******************************************',1, 'Y' );
6152: aso_debug_pub.add( '***** Printing the profile values *****',1, 'Y' );
6153: aso_debug_pub.add( '******************************************',1, 'Y' );
6154: aso_debug_pub.add( ' ',1, 'Y' );
6155:
6156: fnd_profile.get('XLA_MO_SECURITY_PROFILE_LEVEL',l_security_profile_id);
6157: fnd_profile.get('DEFAULT_ORG_ID',l_def_org_id);
6158: fnd_profile.get('ORG_ID',l_org_id);
6155:
6156: fnd_profile.get('XLA_MO_SECURITY_PROFILE_LEVEL',l_security_profile_id);
6157: fnd_profile.get('DEFAULT_ORG_ID',l_def_org_id);
6158: fnd_profile.get('ORG_ID',l_org_id);
6159: aso_debug_pub.add(rpad('SECURITY PROFILE ID',50,'------')||'------>'||l_security_profile_id , 1, 'Y');
6160: aso_debug_pub.add(rpad('DEFAULT ORG ID',50,'------')||'------>'||l_def_org_id , 1, 'Y');
6161: aso_debug_pub.add(rpad('ORG ID',50,'------')||'------>'||l_org_id , 1, 'Y');
6162:
6163: aso_debug_pub.add( ' ',1, 'Y' );
6156: fnd_profile.get('XLA_MO_SECURITY_PROFILE_LEVEL',l_security_profile_id);
6157: fnd_profile.get('DEFAULT_ORG_ID',l_def_org_id);
6158: fnd_profile.get('ORG_ID',l_org_id);
6159: aso_debug_pub.add(rpad('SECURITY PROFILE ID',50,'------')||'------>'||l_security_profile_id , 1, 'Y');
6160: aso_debug_pub.add(rpad('DEFAULT ORG ID',50,'------')||'------>'||l_def_org_id , 1, 'Y');
6161: aso_debug_pub.add(rpad('ORG ID',50,'------')||'------>'||l_org_id , 1, 'Y');
6162:
6163: aso_debug_pub.add( ' ',1, 'Y' );
6164:
6157: fnd_profile.get('DEFAULT_ORG_ID',l_def_org_id);
6158: fnd_profile.get('ORG_ID',l_org_id);
6159: aso_debug_pub.add(rpad('SECURITY PROFILE ID',50,'------')||'------>'||l_security_profile_id , 1, 'Y');
6160: aso_debug_pub.add(rpad('DEFAULT ORG ID',50,'------')||'------>'||l_def_org_id , 1, 'Y');
6161: aso_debug_pub.add(rpad('ORG ID',50,'------')||'------>'||l_org_id , 1, 'Y');
6162:
6163: aso_debug_pub.add( ' ',1, 'Y' );
6164:
6165:
6159: aso_debug_pub.add(rpad('SECURITY PROFILE ID',50,'------')||'------>'||l_security_profile_id , 1, 'Y');
6160: aso_debug_pub.add(rpad('DEFAULT ORG ID',50,'------')||'------>'||l_def_org_id , 1, 'Y');
6161: aso_debug_pub.add(rpad('ORG ID',50,'------')||'------>'||l_org_id , 1, 'Y');
6162:
6163: aso_debug_pub.add( ' ',1, 'Y' );
6164:
6165:
6166: aso_debug_pub.add( '********************************************************',1, 'Y' );
6167: aso_debug_pub.add( '***** Printing the MO_GLOB_ORG_ACCESS_TMP details *****',1, 'Y' );
6162:
6163: aso_debug_pub.add( ' ',1, 'Y' );
6164:
6165:
6166: aso_debug_pub.add( '********************************************************',1, 'Y' );
6167: aso_debug_pub.add( '***** Printing the MO_GLOB_ORG_ACCESS_TMP details *****',1, 'Y' );
6168: aso_debug_pub.add( '********************************************************',1, 'Y' );
6169: aso_debug_pub.add( ' ',1, 'Y' );
6170:
6163: aso_debug_pub.add( ' ',1, 'Y' );
6164:
6165:
6166: aso_debug_pub.add( '********************************************************',1, 'Y' );
6167: aso_debug_pub.add( '***** Printing the MO_GLOB_ORG_ACCESS_TMP details *****',1, 'Y' );
6168: aso_debug_pub.add( '********************************************************',1, 'Y' );
6169: aso_debug_pub.add( ' ',1, 'Y' );
6170:
6171: aso_debug_pub.add(rpad('ORGANIZATION_ID',50,'------')||'<----->'||rpad('ORGANIZATION_NAME',50,' ') , 1, 'Y');
6164:
6165:
6166: aso_debug_pub.add( '********************************************************',1, 'Y' );
6167: aso_debug_pub.add( '***** Printing the MO_GLOB_ORG_ACCESS_TMP details *****',1, 'Y' );
6168: aso_debug_pub.add( '********************************************************',1, 'Y' );
6169: aso_debug_pub.add( ' ',1, 'Y' );
6170:
6171: aso_debug_pub.add(rpad('ORGANIZATION_ID',50,'------')||'<----->'||rpad('ORGANIZATION_NAME',50,' ') , 1, 'Y');
6172: for i in CUR_MO_GLOB loop
6165:
6166: aso_debug_pub.add( '********************************************************',1, 'Y' );
6167: aso_debug_pub.add( '***** Printing the MO_GLOB_ORG_ACCESS_TMP details *****',1, 'Y' );
6168: aso_debug_pub.add( '********************************************************',1, 'Y' );
6169: aso_debug_pub.add( ' ',1, 'Y' );
6170:
6171: aso_debug_pub.add(rpad('ORGANIZATION_ID',50,'------')||'<----->'||rpad('ORGANIZATION_NAME',50,' ') , 1, 'Y');
6172: for i in CUR_MO_GLOB loop
6173: aso_debug_pub.add(rpad(i.ORGANIZATION_ID,50,'------')||'------>'||rpad(i.ORGANIZATION_NAME,50,' '), 1, 'Y');
6167: aso_debug_pub.add( '***** Printing the MO_GLOB_ORG_ACCESS_TMP details *****',1, 'Y' );
6168: aso_debug_pub.add( '********************************************************',1, 'Y' );
6169: aso_debug_pub.add( ' ',1, 'Y' );
6170:
6171: aso_debug_pub.add(rpad('ORGANIZATION_ID',50,'------')||'<----->'||rpad('ORGANIZATION_NAME',50,' ') , 1, 'Y');
6172: for i in CUR_MO_GLOB loop
6173: aso_debug_pub.add(rpad(i.ORGANIZATION_ID,50,'------')||'------>'||rpad(i.ORGANIZATION_NAME,50,' '), 1, 'Y');
6174: end loop;
6175:
6169: aso_debug_pub.add( ' ',1, 'Y' );
6170:
6171: aso_debug_pub.add(rpad('ORGANIZATION_ID',50,'------')||'<----->'||rpad('ORGANIZATION_NAME',50,' ') , 1, 'Y');
6172: for i in CUR_MO_GLOB loop
6173: aso_debug_pub.add(rpad(i.ORGANIZATION_ID,50,'------')||'------>'||rpad(i.ORGANIZATION_NAME,50,' '), 1, 'Y');
6174: end loop;
6175:
6176: aso_debug_pub.add( ' ',1, 'Y' );
6177:
6172: for i in CUR_MO_GLOB loop
6173: aso_debug_pub.add(rpad(i.ORGANIZATION_ID,50,'------')||'------>'||rpad(i.ORGANIZATION_NAME,50,' '), 1, 'Y');
6174: end loop;
6175:
6176: aso_debug_pub.add( ' ',1, 'Y' );
6177:
6178:
6179: aso_debug_pub.add( '********************************************************',1, 'Y' );
6180: aso_debug_pub.add( '************** Printing the ORG details **************',1, 'Y' );
6175:
6176: aso_debug_pub.add( ' ',1, 'Y' );
6177:
6178:
6179: aso_debug_pub.add( '********************************************************',1, 'Y' );
6180: aso_debug_pub.add( '************** Printing the ORG details **************',1, 'Y' );
6181: aso_debug_pub.add( '********************************************************',1, 'Y' );
6182: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6176: aso_debug_pub.add( ' ',1, 'Y' );
6177:
6178:
6179: aso_debug_pub.add( '********************************************************',1, 'Y' );
6180: aso_debug_pub.add( '************** Printing the ORG details **************',1, 'Y' );
6181: aso_debug_pub.add( '********************************************************',1, 'Y' );
6182: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6177:
6178:
6179: aso_debug_pub.add( '********************************************************',1, 'Y' );
6180: aso_debug_pub.add( '************** Printing the ORG details **************',1, 'Y' );
6181: aso_debug_pub.add( '********************************************************',1, 'Y' );
6182: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6185: aso_debug_pub.add(rpad('ACCESS MODE',50,'------')||'------>'||MO_GLOBAL.get_access_mode , 1, 'Y');
6178:
6179: aso_debug_pub.add( '********************************************************',1, 'Y' );
6180: aso_debug_pub.add( '************** Printing the ORG details **************',1, 'Y' );
6181: aso_debug_pub.add( '********************************************************',1, 'Y' );
6182: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6185: aso_debug_pub.add(rpad('ACCESS MODE',50,'------')||'------>'||MO_GLOBAL.get_access_mode , 1, 'Y');
6186: aso_debug_pub.add(rpad('OPERATING UNITS COUNT',50,'------')||'------>'||MO_GLOBAL.get_ou_count , 1, 'Y');
6180: aso_debug_pub.add( '************** Printing the ORG details **************',1, 'Y' );
6181: aso_debug_pub.add( '********************************************************',1, 'Y' );
6182: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6185: aso_debug_pub.add(rpad('ACCESS MODE',50,'------')||'------>'||MO_GLOBAL.get_access_mode , 1, 'Y');
6186: aso_debug_pub.add(rpad('OPERATING UNITS COUNT',50,'------')||'------>'||MO_GLOBAL.get_ou_count , 1, 'Y');
6187: aso_debug_pub.add(rpad('DEFAULT ORG_ID',50,'------')||'------>'||MO_UTILS.get_default_org_id , 1, 'Y');
6188: aso_debug_pub.add(rpad('SYS CONTEXT',50,'------')||'------>'||sys_context('multi_org2','current_org_id') , 1, 'Y');
6181: aso_debug_pub.add( '********************************************************',1, 'Y' );
6182: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6185: aso_debug_pub.add(rpad('ACCESS MODE',50,'------')||'------>'||MO_GLOBAL.get_access_mode , 1, 'Y');
6186: aso_debug_pub.add(rpad('OPERATING UNITS COUNT',50,'------')||'------>'||MO_GLOBAL.get_ou_count , 1, 'Y');
6187: aso_debug_pub.add(rpad('DEFAULT ORG_ID',50,'------')||'------>'||MO_UTILS.get_default_org_id , 1, 'Y');
6188: aso_debug_pub.add(rpad('SYS CONTEXT',50,'------')||'------>'||sys_context('multi_org2','current_org_id') , 1, 'Y');
6189:
6182: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6185: aso_debug_pub.add(rpad('ACCESS MODE',50,'------')||'------>'||MO_GLOBAL.get_access_mode , 1, 'Y');
6186: aso_debug_pub.add(rpad('OPERATING UNITS COUNT',50,'------')||'------>'||MO_GLOBAL.get_ou_count , 1, 'Y');
6187: aso_debug_pub.add(rpad('DEFAULT ORG_ID',50,'------')||'------>'||MO_UTILS.get_default_org_id , 1, 'Y');
6188: aso_debug_pub.add(rpad('SYS CONTEXT',50,'------')||'------>'||sys_context('multi_org2','current_org_id') , 1, 'Y');
6189:
6190: aso_debug_pub.add( ' ',1, 'Y' );
6183:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6185: aso_debug_pub.add(rpad('ACCESS MODE',50,'------')||'------>'||MO_GLOBAL.get_access_mode , 1, 'Y');
6186: aso_debug_pub.add(rpad('OPERATING UNITS COUNT',50,'------')||'------>'||MO_GLOBAL.get_ou_count , 1, 'Y');
6187: aso_debug_pub.add(rpad('DEFAULT ORG_ID',50,'------')||'------>'||MO_UTILS.get_default_org_id , 1, 'Y');
6188: aso_debug_pub.add(rpad('SYS CONTEXT',50,'------')||'------>'||sys_context('multi_org2','current_org_id') , 1, 'Y');
6189:
6190: aso_debug_pub.add( ' ',1, 'Y' );
6191:
6184: aso_debug_pub.add(rpad('CURRENT ORG ID',50,'------')||'------>'||MO_GLOBAL.get_current_org_id , 1, 'Y');
6185: aso_debug_pub.add(rpad('ACCESS MODE',50,'------')||'------>'||MO_GLOBAL.get_access_mode , 1, 'Y');
6186: aso_debug_pub.add(rpad('OPERATING UNITS COUNT',50,'------')||'------>'||MO_GLOBAL.get_ou_count , 1, 'Y');
6187: aso_debug_pub.add(rpad('DEFAULT ORG_ID',50,'------')||'------>'||MO_UTILS.get_default_org_id , 1, 'Y');
6188: aso_debug_pub.add(rpad('SYS CONTEXT',50,'------')||'------>'||sys_context('multi_org2','current_org_id') , 1, 'Y');
6189:
6190: aso_debug_pub.add( ' ',1, 'Y' );
6191:
6192: END IF;
6186: aso_debug_pub.add(rpad('OPERATING UNITS COUNT',50,'------')||'------>'||MO_GLOBAL.get_ou_count , 1, 'Y');
6187: aso_debug_pub.add(rpad('DEFAULT ORG_ID',50,'------')||'------>'||MO_UTILS.get_default_org_id , 1, 'Y');
6188: aso_debug_pub.add(rpad('SYS CONTEXT',50,'------')||'------>'||sys_context('multi_org2','current_org_id') , 1, 'Y');
6189:
6190: aso_debug_pub.add( ' ',1, 'Y' );
6191:
6192: END IF;
6193: END print_login_info;
6194:
6196: FUNCTION Tax_Rec_Exists( p_tax_rec IN ASO_QUOTE_PUB.Tax_Detail_Rec_Type ) RETURN BOOLEAN
6197: IS
6198:
6199: BEGIN
6200: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6201: aso_debug_pub.add('Begin tax_Rec_Exists function.', 1, 'Y');
6202: END IF;
6203:
6204: IF ( P_tax_rec.ATTRIBUTE1<> FND_API.G_MISS_CHAR OR
6197: IS
6198:
6199: BEGIN
6200: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6201: aso_debug_pub.add('Begin tax_Rec_Exists function.', 1, 'Y');
6202: END IF;
6203:
6204: IF ( P_tax_rec.ATTRIBUTE1<> FND_API.G_MISS_CHAR OR
6205: P_tax_rec.ATTRIBUTE10<> FND_API.G_MISS_CHAR OR
6238: P_tax_rec.TAX_EXEMPT_NUMBER<> FND_API.G_MISS_CHAR OR
6239: P_tax_rec.TAX_EXEMPT_REASON_CODE<> FND_API.G_MISS_CHAR OR
6240: P_tax_rec.TAX_RATE<> FND_API.G_MISS_NUM ) THEN
6241:
6242: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6243: aso_debug_pub.add('Tax_Rec_Exists function returning TRUE');
6244: END IF;
6245:
6246: return TRUE;
6239: P_tax_rec.TAX_EXEMPT_REASON_CODE<> FND_API.G_MISS_CHAR OR
6240: P_tax_rec.TAX_RATE<> FND_API.G_MISS_NUM ) THEN
6241:
6242: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6243: aso_debug_pub.add('Tax_Rec_Exists function returning TRUE');
6244: END IF;
6245:
6246: return TRUE;
6247:
6246: return TRUE;
6247:
6248: ELSE
6249:
6250: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6251: aso_debug_pub.add('Tax_Rec_Exists function returning FALSE');
6252: END IF;
6253:
6254: return FALSE;
6247:
6248: ELSE
6249:
6250: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6251: aso_debug_pub.add('Tax_Rec_Exists function returning FALSE');
6252: END IF;
6253:
6254: return FALSE;
6255: