DBA Data[Home] [Help]

APPS.PV_ASSIGN_UTIL_PVT dependencies on PV_ASSIGNMENT_PUB

Line 778: IF p_workflow_rec.routing_status = PV_ASSIGNMENT_PUB.g_r_status_failed_auto THEN

774: fnd_message.Set_token('TEXT', 'Row created in pv_lead_workflows ');
775: fnd_msg_pub.Add;
776: END IF;
777:
778: IF p_workflow_rec.routing_status = PV_ASSIGNMENT_PUB.g_r_status_failed_auto THEN
779:
780: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
781: fnd_message.SET_NAME('PV', 'PV_DEBUG_MESSAGE');
782: fnd_message.Set_token('TEXT', 'Logging in routing history'||p_workflow_rec.routing_type);

Line 791: IF l_user_category = PV_ASSIGNMENT_PUB.g_resource_employee THEN

787: OPEN lc_get_user_type (l_user_id);
788: FETCH lc_get_user_type INTO l_user_category;
789: CLOSE lc_get_user_type;
790:
791: IF l_user_category = PV_ASSIGNMENT_PUB.g_resource_employee THEN
792: l_oppty_routing_log_rec.vendor_user_id := l_user_id;
793: l_oppty_routing_log_rec.pt_contact_user_id := TO_NUMBER(NULL);
794: ELSIF l_user_category = PV_ASSIGNMENT_PUB.g_resource_party THEN
795: l_oppty_routing_log_rec.vendor_user_id := NULL;

Line 794: ELSIF l_user_category = PV_ASSIGNMENT_PUB.g_resource_party THEN

790:
791: IF l_user_category = PV_ASSIGNMENT_PUB.g_resource_employee THEN
792: l_oppty_routing_log_rec.vendor_user_id := l_user_id;
793: l_oppty_routing_log_rec.pt_contact_user_id := TO_NUMBER(NULL);
794: ELSIF l_user_category = PV_ASSIGNMENT_PUB.g_resource_party THEN
795: l_oppty_routing_log_rec.vendor_user_id := NULL;
796: l_oppty_routing_log_rec.pt_contact_user_id := l_user_id;
797: END IF;
798: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN

Line 980: l_pt_default_rs_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();

976:
977: l_rs_details_tbl_cnt pls_integer := 0;
978:
979: l_pt_user_rs_id_tbl JTF_NUMBER_TABLE := JTF_NUMBER_TABLE();
980: l_pt_default_rs_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();
981:
982: l_pt_user_rs_id number;
983: l_partner_id number;
984: l_pt_to_vad_id number;

Line 991: l_cm_origin_tbl pv_assignment_pub.g_varchar_table_type := pv_assignment_pub.g_varchar_table_type();

987: l_cm_origin varchar2(20);
988: l_usertype varchar2(20);
989: l_person_type varchar2(20);
990: l_cm_rs_id_tbl JTF_NUMBER_TABLE := JTF_NUMBER_TABLE();
991: l_cm_origin_tbl pv_assignment_pub.g_varchar_table_type := pv_assignment_pub.g_varchar_table_type();
992:
993: l_rs_id number;
994: l_person_id number;
995: l_fnd_user_id number;

Line 1041: extn.category = pv_assignment_pub.g_resource_employee and

1037: pt_acc.partner_id = pc_partner_id and
1038: pt_acc.partner_id = pt_prof.partner_id and
1039: pt_prof.status = 'A' and
1040: pt_acc.resource_id = extn.resource_id and
1041: extn.category = pv_assignment_pub.g_resource_employee and
1042: extn.source_id = per.person_id and
1043: (trunc(sysdate) between per.effective_start_date and per.effective_end_date) and
1044: extn.resource_id = rel.role_resource_id and
1045: rel.role_resource_type = 'RS_INDIVIDUAL' and

Line 1079: c.category = pv_assignment_pub.g_resource_party and

1075: b.relationship_type = 'EMPLOYMENT' and
1076: (b.end_date is null or b.end_date > sysdate) and
1077: b.status = 'A' and
1078: b.party_id = c.source_id and
1079: c.category = pv_assignment_pub.g_resource_party and
1080: sysdate between c.start_date_active and nvl(c.end_date_active,sysdate) and
1081: c.resource_id = d.salesforce_id and
1082: d.lead_id = pc_opportunity_id and
1083: c.user_id = usr.user_id and

Line 1106: and pj.category = pv_assignment_pub.g_resource_party

1102: and pr2.relationship_type = 'EMPLOYMENT'
1103: and (pr2.end_date is null or pr2.end_date > sysdate)
1104: and pr2.status = 'A'
1105: and pr2.party_id = pj.source_id
1106: and pj.category = pv_assignment_pub.g_resource_party
1107: and sysdate between pj.start_date_active and nvl(pj.end_date_active,sysdate)
1108: and pj.user_id = usr.user_id
1109: and (usr.end_date > sysdate OR usr.end_date IS NULL)
1110: and exists(select 1 from jtf_auth_principal_maps jtfpm,

Line 1173: extn.category = pv_assignment_pub.g_resource_party and

1169: PT_ACC.vad_partner_id = pc_vad_id and
1170: PT_ACC.vad_partner_id = PT_PROF.partner_id and
1171: PT_PROF.status = 'A' and
1172: PT_ACC.resource_id = extn.resource_id and
1173: extn.category = pv_assignment_pub.g_resource_party and
1174: extn.source_id = emp.party_id and
1175: emp.subject_table_name = 'HZ_PARTIES' and
1176: emp.object_table_name = 'HZ_PARTIES' and
1177: emp.directional_flag = 'F' and

Line 1384: elsif l_usertype = pv_assignment_pub.g_resource_employee then

1380: if l_cm_origin_tbl(i) = 'DEFAULT' then
1381:
1382: l_decision_maker_flag := 'Y';
1383:
1384: elsif l_usertype = pv_assignment_pub.g_resource_employee then
1385:
1386: -- ER 3028478
1387: -- this is to handle the case where an indirectly managed partner is managed by multiple
1388: -- VADs (possible in 11.5.10). In this case if an oppty is routed to a IMP, we will not

Line 1401: x_rs_details_tbl(l_rs_details_tbl_cnt).notification_type := pv_assignment_pub.g_notify_type_matched_to;

1397:
1398: x_rs_details_tbl.extend;
1399: l_rs_details_tbl_cnt := l_rs_details_tbl_cnt + 1;
1400:
1401: x_rs_details_tbl(l_rs_details_tbl_cnt).notification_type := pv_assignment_pub.g_notify_type_matched_to;
1402: x_rs_details_tbl(l_rs_details_tbl_cnt).user_id := l_fnd_user_id;
1403: x_rs_details_tbl(l_rs_details_tbl_cnt).person_id := l_person_id;
1404: x_rs_details_tbl(l_rs_details_tbl_cnt).person_type := l_usertype;
1405: x_rs_details_tbl(l_rs_details_tbl_cnt).decision_maker_flag := l_decision_maker_flag;

Line 1540: x_rs_details_tbl(l_rs_details_tbl_cnt).notification_type := pv_assignment_pub.g_notify_type_offered_to;

1536:
1537: x_rs_details_tbl.extend;
1538: l_rs_details_tbl_cnt := l_rs_details_tbl_cnt + 1;
1539:
1540: x_rs_details_tbl(l_rs_details_tbl_cnt).notification_type := pv_assignment_pub.g_notify_type_offered_to;
1541: x_rs_details_tbl(l_rs_details_tbl_cnt).user_id := l_fnd_user_id;
1542: x_rs_details_tbl(l_rs_details_tbl_cnt).person_id := l_person_id;
1543: x_rs_details_tbl(l_rs_details_tbl_cnt).person_type := l_usertype;
1544: x_rs_details_tbl(l_rs_details_tbl_cnt).decision_maker_flag := 'Y';

Line 1668: l_access_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();

1664:
1665: l_api_name CONSTANT VARCHAR2(30) := 'UpdateAccess';
1666: l_api_version_number CONSTANT NUMBER := 1.0;
1667:
1668: l_access_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();
1669: l_prm_keep_flag_tbl pv_assignment_pub.g_varchar_table_type := pv_assignment_pub.g_varchar_table_type();
1670: l_salesforce_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();
1671:
1672: l_person_category varchar2(30);

Line 1669: l_prm_keep_flag_tbl pv_assignment_pub.g_varchar_table_type := pv_assignment_pub.g_varchar_table_type();

1665: l_api_name CONSTANT VARCHAR2(30) := 'UpdateAccess';
1666: l_api_version_number CONSTANT NUMBER := 1.0;
1667:
1668: l_access_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();
1669: l_prm_keep_flag_tbl pv_assignment_pub.g_varchar_table_type := pv_assignment_pub.g_varchar_table_type();
1670: l_salesforce_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();
1671:
1672: l_person_category varchar2(30);
1673: l_access_Id number;

Line 1670: l_salesforce_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();

1666: l_api_version_number CONSTANT NUMBER := 1.0;
1667:
1668: l_access_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();
1669: l_prm_keep_flag_tbl pv_assignment_pub.g_varchar_table_type := pv_assignment_pub.g_varchar_table_type();
1670: l_salesforce_id_tbl pv_assignment_pub.g_number_table_type := pv_assignment_pub.g_number_table_type();
1671:
1672: l_person_category varchar2(30);
1673: l_access_Id number;
1674: l_prm_keep_flag varchar2(1);

Line 1695: lc_cursor pv_assignment_pub.g_ref_cursor_type;

1691: l_pt_resource_id NUMBER;
1692: l_open_flag VARCHAR2(10);
1693:
1694: l_sales_team_rec AS_ACCESS_PUB.Sales_Team_Rec_Type;
1695: lc_cursor pv_assignment_pub.g_ref_cursor_type;
1696:
1697: cursor lc_get_access_details (pc_salesforce_id number, pc_lead_id number) is
1698: select access_id , prm_keep_flag, salesforce_id
1699: from as_accesses_all

Line 1901: if p_access_action = pv_assignment_pub.G_ADD_ACCESS and not l_access_exists_flag then

1897: fnd_msg_pub.Add;
1898:
1899: end if;
1900:
1901: if p_access_action = pv_assignment_pub.G_ADD_ACCESS and not l_access_exists_flag then
1902:
1903: if p_access_type in (pv_assignment_pub.G_CM_ACCESS, pv_assignment_pub.G_PT_ACCESS) then
1904:
1905: open lc_cursor for l_get_person_info_sql using p_resource_id;

Line 1903: if p_access_type in (pv_assignment_pub.G_CM_ACCESS, pv_assignment_pub.G_PT_ACCESS) then

1899: end if;
1900:
1901: if p_access_action = pv_assignment_pub.G_ADD_ACCESS and not l_access_exists_flag then
1902:
1903: if p_access_type in (pv_assignment_pub.G_CM_ACCESS, pv_assignment_pub.G_PT_ACCESS) then
1904:
1905: open lc_cursor for l_get_person_info_sql using p_resource_id;
1906: fetch lc_cursor into l_person_category, l_username, l_person_id ;
1907:

Line 1908: if l_person_category = pv_assignment_pub.g_resource_employee then

1904:
1905: open lc_cursor for l_get_person_info_sql using p_resource_id;
1906: fetch lc_cursor into l_person_category, l_username, l_person_id ;
1907:
1908: if l_person_category = pv_assignment_pub.g_resource_employee then
1909: l_emp_person_id := l_person_id;
1910:
1911: elsif l_person_category = pv_assignment_pub.g_resource_party then
1912: l_pt_party_id := l_person_id;

Line 1911: elsif l_person_category = pv_assignment_pub.g_resource_party then

1907:
1908: if l_person_category = pv_assignment_pub.g_resource_employee then
1909: l_emp_person_id := l_person_id;
1910:
1911: elsif l_person_category = pv_assignment_pub.g_resource_party then
1912: l_pt_party_id := l_person_id;
1913:
1914: else
1915: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 1929: elsif p_access_type = pv_assignment_pub.G_PT_ORG_ACCESS then

1925: fnd_message.Set_token('TEXT', 'Person is a ' || l_person_category);
1926: fnd_msg_pub.Add;
1927: end if;
1928:
1929: elsif p_access_type = pv_assignment_pub.G_PT_ORG_ACCESS then
1930:
1931: open lc_cursor for l_get_pt_org_info_sql using p_resource_id;
1932: fetch lc_cursor into l_pt_org_party_id;
1933:

Line 1962: if l_sales_group_id is NULL and p_access_type <> pv_assignment_pub.G_PT_ORG_ACCESS then

1958: when others then
1959: l_sales_group_id := null;
1960: end;
1961:
1962: if l_sales_group_id is NULL and p_access_type <> pv_assignment_pub.G_PT_ORG_ACCESS then
1963:
1964: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
1965: fnd_message.SET_NAME ('PV', 'PV_NO_DEFAULT_SALESGROUP');
1966: fnd_message.SET_TOKEN ('P_USER' , l_username);

Line 1975: select decode(p_access_type, pv_assignment_pub.G_CM_ACCESS, 'CM',

1971: end if;
1972:
1973: end if;
1974:
1975: select decode(p_access_type, pv_assignment_pub.G_CM_ACCESS, 'CM',
1976: pv_assignment_pub.G_PT_ACCESS, 'PT',
1977: pv_assignment_pub.G_PT_ORG_ACCESS, 'PT_ORG',
1978: 'UNKNOWN') into l_temp from dual;
1979:

Line 1976: pv_assignment_pub.G_PT_ACCESS, 'PT',

1972:
1973: end if;
1974:
1975: select decode(p_access_type, pv_assignment_pub.G_CM_ACCESS, 'CM',
1976: pv_assignment_pub.G_PT_ACCESS, 'PT',
1977: pv_assignment_pub.G_PT_ORG_ACCESS, 'PT_ORG',
1978: 'UNKNOWN') into l_temp from dual;
1979:
1980: l_pt_full_access_opp := fnd_profile.value('PV_ALLOW_PT_FULL_OPP_ACCESS');

Line 1977: pv_assignment_pub.G_PT_ORG_ACCESS, 'PT_ORG',

1973: end if;
1974:
1975: select decode(p_access_type, pv_assignment_pub.G_CM_ACCESS, 'CM',
1976: pv_assignment_pub.G_PT_ACCESS, 'PT',
1977: pv_assignment_pub.G_PT_ORG_ACCESS, 'PT_ORG',
1978: 'UNKNOWN') into l_temp from dual;
1979:
1980: l_pt_full_access_opp := fnd_profile.value('PV_ALLOW_PT_FULL_OPP_ACCESS');
1981:

Line 1986: if p_access_action = pv_assignment_pub.G_REMOVE_ACCESS and l_access_exists_flag then

1982:
1983: -- ------------------------------------------------------------------------------------------------
1984: -- Remove resource from sales team
1985: -- ------------------------------------------------------------------------------------------------
1986: if p_access_action = pv_assignment_pub.G_REMOVE_ACCESS and l_access_exists_flag then
1987: Debug('Remove resource from sales team...');
1988:
1989: open lc_get_am_and_owner (pc_lead_id => p_lead_id);
1990: fetch lc_get_am_and_owner into l_am_rs_id, l_ld_owner_rs_id;

Line 2127: elsif p_access_action = pv_assignment_pub.G_ADD_ACCESS and l_access_exists_flag then

2123: -- ------------------------------------------------------------------------------------------------ --
2124:
2125:
2126:
2127: elsif p_access_action = pv_assignment_pub.G_ADD_ACCESS and l_access_exists_flag then
2128:
2129: open get_opp_open_flag_csr(p_lead_id);
2130: fetch get_opp_open_flag_csr into l_open_flag;
2131: close get_opp_open_flag_csr;

Line 2153: IF p_access_type in (pv_assignment_pub.G_CM_ACCESS) THEN

2149: fnd_msg_pub.Add;
2150: end if;
2151:
2152:
2153: IF p_access_type in (pv_assignment_pub.G_CM_ACCESS) THEN
2154:
2155: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2156: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2157: fnd_message.Set_token('TEXT', 'action type is G_CM_ACCESS and setting the Team_leader_flag, prm_keep_flag to Y for resource id: ' || p_resource_id );

Line 2165: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2161: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'Y', open_flag = l_open_flag
2162: where access_id = l_access_id_tbl(i);
2163:
2164:
2165: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2166:
2167: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2168: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2169: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS or G_PT_ORG_ACCESS for resource id: ' || p_resource_id );

Line 2180: IF p_access_type = pv_assignment_pub.G_PT_ORG_ACCESS THEN

2176: fnd_msg_pub.Add;
2177: end if;
2178:
2179:
2180: IF p_access_type = pv_assignment_pub.G_PT_ORG_ACCESS THEN
2181:
2182: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2183: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2184: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and executing lc_get_partner_id_org cursor');

Line 2194: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN

2190: close lc_get_partner_id_org;
2191:
2192:
2193:
2194: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN
2195:
2196: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2197: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2198: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and executing lc_get_partner_id_org_contact cursor');

Line 2251: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2247: fnd_msg_pub.Add;
2248: end if;
2249:
2250:
2251: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2252:
2253: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2254: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2255: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and updating team_leader_flag to Y');

Line 2262: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN

2258:
2259: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'Y', open_flag = l_open_flag
2260: where access_id = l_access_id_tbl(i);
2261:
2262: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2263: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2264: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2265: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and updating team_leader_flag to Y for all partner contact levels');
2266: fnd_msg_pub.Add;

Line 2303: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2299: fnd_message.Set_token('TEXT', ' l_enable_full_access_value is N');
2300: fnd_msg_pub.Add;
2301: end if;
2302:
2303: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2304:
2305: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2306: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2307: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and updating team_leader_flag to N');

Line 2314: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN

2310:
2311: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'N', open_flag = l_open_flag
2312: where access_id = l_access_id_tbl(i);
2313:
2314: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2315:
2316: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2317: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2318: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and updating team_leader_flag to N for all partner contact levels');

Line 2369: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2365: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is Y and Setting prm_keep_flag to Y for resource id: ' || p_resource_id || ' if not lead owner');
2366: fnd_msg_pub.Add;
2367: end if;
2368:
2369: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2370:
2371: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2372: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2373: fnd_message.Set_token('TEXT', 'l_pt_full_access_opp is N and making team_leader_flag to Y of PT ORG: ' || p_resource_id || ' if not lead owner');

Line 2380: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN

2376:
2377: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', open_flag = l_open_flag, team_leader_flag = 'Y'
2378: where access_id = l_access_id_tbl(i);
2379:
2380: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN
2381:
2382: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2383: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2384: fnd_message.Set_token('TEXT', 'action type is G_PT_ACCESS , l_pt_full_access_opp is Y and not touching the team leader flag of Partner resource ID ' || l_pt_resource_id);

Line 2401: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2397:
2398:
2399:
2400: ELSE
2401: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2402:
2403:
2404: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2405: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');

Line 2414: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN

2410: update as_accesses_all set prm_keep_flag = 'Y', freeze_flag = 'Y', team_leader_flag = 'N', open_flag = l_open_flag
2411: where access_id = l_access_id_tbl(i);
2412:
2413:
2414: ELSIF p_access_type = pv_assignment_pub.G_PT_ACCESS THEN
2415:
2416: open lc_get_pt_access (p_lead_id);
2417: loop
2418: fetch lc_get_pt_access into l_pt_resource_id;

Line 2440: END IF; -- end of IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2436:
2437:
2438: end loop;
2439: close lc_get_pt_access;
2440: END IF; -- end of IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2441:
2442: END IF; -- end of IF l_pt_full_access_opp = 'Y' THEN
2443:
2444: END IF; -- end of IF(l_enable_full_access_value = 'Y') then else loop

Line 2446: END IF; -- end of ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2442: END IF; -- end of IF l_pt_full_access_opp = 'Y' THEN
2443:
2444: END IF; -- end of IF(l_enable_full_access_value = 'Y') then else loop
2445:
2446: END IF; -- end of ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2447:
2448:
2449: end loop;
2450:

Line 2452: elsif p_access_action = pv_assignment_pub.G_ADD_ACCESS and not l_access_exists_flag then

2448:
2449: end loop;
2450:
2451:
2452: elsif p_access_action = pv_assignment_pub.G_ADD_ACCESS and not l_access_exists_flag then
2453:
2454: select as_accesses_s.nextval into l_sales_team_rec.Access_Id from dual;
2455:
2456: open get_opp_open_flag_csr(p_lead_id);

Line 2473: IF p_access_type in (pv_assignment_pub.G_CM_ACCESS) THEN

2469: end if;
2470:
2471:
2472:
2473: IF p_access_type in (pv_assignment_pub.G_CM_ACCESS) THEN
2474:
2475: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2476: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2477: fnd_message.Set_token('TEXT', 'action type is G_CM_ACCESS and setting the Team_leader_flag to Y for resource id: ' || p_resource_id );

Line 2483: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2479: end if;
2480:
2481: l_sales_team_rec.Team_Leader_Flag := 'Y';
2482:
2483: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2484:
2485: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2486: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2487: fnd_message.Set_token('TEXT', 'action type is ' || p_access_type || ' for resource id: ' || p_resource_id );

Line 2497: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2493: fnd_message.Set_token('TEXT', 'Find the partner id of the resource with resource_id ' || p_resource_id );
2494: fnd_msg_pub.Add;
2495: end if;
2496:
2497: IF p_access_type in (pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2498:
2499: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2500: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2501: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ORG_ACCESS and executing lc_get_partner_id_org cursor');

Line 2509: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN

2505: open lc_get_partner_id_org(p_resource_id);
2506: fetch lc_get_partner_id_org into l_current_partnerid_of_rel;
2507: close lc_get_partner_id_org;
2508:
2509: ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS) THEN
2510: IF fnd_msg_pub.Check_Msg_Level (fnd_msg_pub.G_MSG_LVL_DEBUG_LOW) THEN
2511: fnd_message.Set_Name('PV', 'PV_DEBUG_MESSAGE');
2512: fnd_message.Set_token('TEXT', 'p_access_type is G_PT_ACCESS and executing lc_get_partner_id_org_contact cursor');
2513: fnd_msg_pub.Add;

Line 2609: END IF; -- end of ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN

2605: END IF; -- end of IF l_pt_full_access_opp = 'Y' THEN
2606:
2607: END IF; -- end of IF(l_enable_full_access_value = 'Y') then else loop
2608:
2609: END IF; -- end of ELSIF p_access_type in (pv_assignment_pub.G_PT_ACCESS,pv_assignment_pub.G_PT_ORG_ACCESS) THEN
2610:
2611:
2612:
2613:

Line 2823: elsif x_routing_status not in (pv_assignment_pub.g_r_status_active,

2819:
2820: if x_itemkey is NULL then
2821: x_wf_status := 'NEW';
2822:
2823: elsif x_routing_status not in (pv_assignment_pub.g_r_status_active,
2824: pv_assignment_pub.g_r_status_matched,
2825: pv_assignment_pub.g_r_status_offered,
2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,

Line 2824: pv_assignment_pub.g_r_status_matched,

2820: if x_itemkey is NULL then
2821: x_wf_status := 'NEW';
2822:
2823: elsif x_routing_status not in (pv_assignment_pub.g_r_status_active,
2824: pv_assignment_pub.g_r_status_matched,
2825: pv_assignment_pub.g_r_status_offered,
2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,
2828: pv_assignment_pub.g_r_status_abandoned,

Line 2825: pv_assignment_pub.g_r_status_offered,

2821: x_wf_status := 'NEW';
2822:
2823: elsif x_routing_status not in (pv_assignment_pub.g_r_status_active,
2824: pv_assignment_pub.g_r_status_matched,
2825: pv_assignment_pub.g_r_status_offered,
2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,
2828: pv_assignment_pub.g_r_status_abandoned,
2829: pv_assignment_pub.g_r_status_failed_auto,

Line 2826: pv_assignment_pub.g_r_status_recycled,

2822:
2823: elsif x_routing_status not in (pv_assignment_pub.g_r_status_active,
2824: pv_assignment_pub.g_r_status_matched,
2825: pv_assignment_pub.g_r_status_offered,
2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,
2828: pv_assignment_pub.g_r_status_abandoned,
2829: pv_assignment_pub.g_r_status_failed_auto,
2830: pv_assignment_pub.g_r_status_withdrawn) then

Line 2827: pv_assignment_pub.g_r_status_unassigned,

2823: elsif x_routing_status not in (pv_assignment_pub.g_r_status_active,
2824: pv_assignment_pub.g_r_status_matched,
2825: pv_assignment_pub.g_r_status_offered,
2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,
2828: pv_assignment_pub.g_r_status_abandoned,
2829: pv_assignment_pub.g_r_status_failed_auto,
2830: pv_assignment_pub.g_r_status_withdrawn) then
2831:

Line 2828: pv_assignment_pub.g_r_status_abandoned,

2824: pv_assignment_pub.g_r_status_matched,
2825: pv_assignment_pub.g_r_status_offered,
2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,
2828: pv_assignment_pub.g_r_status_abandoned,
2829: pv_assignment_pub.g_r_status_failed_auto,
2830: pv_assignment_pub.g_r_status_withdrawn) then
2831:
2832: fnd_message.Set_Name('PV', 'PV_UNKNOWN_ROUTING_STAGE');

Line 2829: pv_assignment_pub.g_r_status_failed_auto,

2825: pv_assignment_pub.g_r_status_offered,
2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,
2828: pv_assignment_pub.g_r_status_abandoned,
2829: pv_assignment_pub.g_r_status_failed_auto,
2830: pv_assignment_pub.g_r_status_withdrawn) then
2831:
2832: fnd_message.Set_Name('PV', 'PV_UNKNOWN_ROUTING_STAGE');
2833: fnd_message.SET_TOKEN('P_ROUTING', x_routing_status);

Line 2830: pv_assignment_pub.g_r_status_withdrawn) then

2826: pv_assignment_pub.g_r_status_recycled,
2827: pv_assignment_pub.g_r_status_unassigned,
2828: pv_assignment_pub.g_r_status_abandoned,
2829: pv_assignment_pub.g_r_status_failed_auto,
2830: pv_assignment_pub.g_r_status_withdrawn) then
2831:
2832: fnd_message.Set_Name('PV', 'PV_UNKNOWN_ROUTING_STAGE');
2833: fnd_message.SET_TOKEN('P_ROUTING', x_routing_status);
2834: fnd_msg_pub.ADD;

Line 2838: elsif x_wf_status not in (pv_assignment_pub.g_wf_status_open, pv_assignment_pub.g_wf_status_closed) then

2834: fnd_msg_pub.ADD;
2835:
2836: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2837:
2838: elsif x_wf_status not in (pv_assignment_pub.g_wf_status_open, pv_assignment_pub.g_wf_status_closed) then
2839:
2840: fnd_message.Set_Name('PV', 'PV_INVALID_WF_STATUS');
2841: fnd_message.SET_TOKEN('P_WF_STATUS', x_wf_status);
2842: fnd_message.Set_Token('P_LEAD_ID', p_lead_id);