DBA Data[Home] [Help]

APPS.AS_OPP_COPY_PVT dependencies on AS_SALES_CREDITS

Line 97: -- exist in AS_SALES_CREDITS

93:
94: -- If create sales team for sales credit flag is set to 'N', return
95: -- all records from AS_ACCESSES_ALL for that lead_id but if the flag
96: -- is set to 'Y', return the records from AS_ACCESSES_ALL that also
97: -- exist in AS_SALES_CREDITS
98: -- Note that the result set is ordered by owner_flag because according
99: -- to the logic, the owner should be updated before any other sales
100: -- team member is inserted as otherwise, the insert might fail if the
101: -- record being inserted has same unique keys as the owner created by

Line 116: FROM AS_SALES_CREDITS C

112: AND (j.end_date_active IS NULL
113: OR j.end_date_active > sysdate))
114: AND (c_cre_st_for_sc_flag = 'N' OR EXISTS
115: (SELECT 1
116: FROM AS_SALES_CREDITS C
117: WHERE C.lead_id = A.lead_id
118: AND C.salesforce_id = A.salesforce_id
119: AND C.salesgroup_id = A.sales_group_id))
120: ORDER BY nvl(owner_flag, 'N') desc;

Line 155: FROM AS_SALES_CREDITS

151: WHERE lead_id = c_lead_id;
152:
153: CURSOR c_sales_credits(c_lead_id NUMBER, c_lead_line_id NUMBER) IS
154: SELECT *
155: FROM AS_SALES_CREDITS
156: WHERE lead_id = c_lead_id
157: AND lead_line_id = c_lead_line_id;
158:
159: CURSOR c_competitor_products (c_lead_line_id NUMBER) IS

Line 711: AS_SALES_CREDITS_PKG.Insert_Row(

707: -- Copy Sales Credits
708: IF (p_copy_sales_credits = 'Y') THEN
709: FOR scr IN c_sales_credits(p_lead_id, lr.lead_line_id) LOOP
710: l_sales_credit_id := null;
711: AS_SALES_CREDITS_PKG.Insert_Row(
712: px_SALES_CREDIT_ID => l_SALES_CREDIT_ID,
713: p_LAST_UPDATE_DATE => SYSDATE,
714: p_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
715: p_CREATION_DATE => SYSDATE,

Line 765: 'Private API: as_sales_credits_pkg.insert_row fail');

761:
762: IF l_sales_credit_id is null THEN
763: IF l_debug THEN
764: AS_UTILITY_PVT.Debug_Message(l_module, FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW,
765: 'Private API: as_sales_credits_pkg.insert_row fail');
766: END IF;
767:
768: RAISE FND_API.G_EXC_ERROR;
769: ELSE

Line 772: 'Private API: as_sales_credits_pkg.insert_row '|| l_sales_credit_id);

768: RAISE FND_API.G_EXC_ERROR;
769: ELSE
770: IF l_debug THEN
771: AS_UTILITY_PVT.Debug_Message(l_module, FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW,
772: 'Private API: as_sales_credits_pkg.insert_row '|| l_sales_credit_id);
773: END IF;
774:
775: END IF;
776:

Line 846: FROM AS_SALES_CREDITS

842: raise FND_API.G_EXC_ERROR;
843: END IF;
844:
845: SELECT sum(OPP_FORECAST_AMOUNT) INTO l_TOT_REVENUE_OPP_FORECAST_AMT
846: FROM AS_SALES_CREDITS
847: WHERE lead_id = l_Header_rec.lead_id AND
848: credit_type_id = l_forecast_credit_type_id;
849:
850: END IF; -- p_copy_sales_credits