DBA Data[Home] [Help]

APPS.CSP_EXCESS_PARTS_PVT dependencies on CSP_EXCESS_PARTS_PVT

Line 1: PACKAGE BODY CSP_EXCESS_PARTS_PVT AS

1: PACKAGE BODY CSP_EXCESS_PARTS_PVT AS
2: /* $Header: cspvpexb.pls 120.24 2011/10/05 08:37:49 htank noship $ */
3: G_PKG_NAME CONSTANT VARCHAR2(30):='CSP_EXCESS_PARTS_PVT';
4: G_FILE_NAME CONSTANT VARCHAR2(30):='cspvpexb.pls';
5:

Line 3: G_PKG_NAME CONSTANT VARCHAR2(30):='CSP_EXCESS_PARTS_PVT';

1: PACKAGE BODY CSP_EXCESS_PARTS_PVT AS
2: /* $Header: cspvpexb.pls 120.24 2011/10/05 08:37:49 htank noship $ */
3: G_PKG_NAME CONSTANT VARCHAR2(30):='CSP_EXCESS_PARTS_PVT';
4: G_FILE_NAME CONSTANT VARCHAR2(30):='cspvpexb.pls';
5:
6: g_node_level_id Varchar2(2000):= 1;
7:

Line 564: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',

560: v_excess_part.EXCESS_STATUS := 'P';
561:
562: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
563: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
564: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',
565: 'Calling populate_excess_list 1');
566: end if;
567:
568: populate_excess_list(v_excess_part);

Line 589: l_onhand := csp_excess_parts_pvt.onhand(

585: l_demand := 0;
586: l_excess := 0;
587:
588: --for cos in c_org_subinventories(coi.inventory_item_id) loop
589: l_onhand := csp_excess_parts_pvt.onhand(
590: p_organization_id => p_organization_id,
591: p_inventory_item_id => coi.inventory_item_id,
592: --p_subinventory_code => cos.subinventory_code,
593: p_subinventory_code => NULL,

Line 601: l_demand := csp_excess_parts_pvt.demand(

597:
598: l_total_onhand := l_total_onhand + l_onhand;
599: --end loop;
600:
601: l_demand := csp_excess_parts_pvt.demand(
602: p_organization_id => p_organization_id,
603: p_inventory_item_id => coi.inventory_item_id,
604: p_subinventory_code => null,
605: p_include_nonnet => p_include_nonnet,

Line 684: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',

680: v_excess_part.EXCESS_STATUS := 'P';
681:
682: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
683: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
684: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',
685: 'Calling populate_excess_list 2');
686: end if;
687:
688: populate_excess_list(v_excess_part);

Line 705: l_onhand := csp_excess_parts_pvt.onhand(

701: -- SUBINVENTORY Level
702: if l_level = 2 then
703: for curs in c_subinventories loop
704: for csin in c_sub_items(curs.secondary_inventory_name) loop
705: l_onhand := csp_excess_parts_pvt.onhand(
706: p_organization_id => p_organization_id,
707: p_inventory_item_id => csin.inventory_item_id,
708: p_subinventory_code => curs.secondary_inventory_name,
709: p_revision_qty_control_code => csin.revision_qty_control_code,

Line 713: l_demand := csp_excess_parts_pvt.demand(

709: p_revision_qty_control_code => csin.revision_qty_control_code,
710: p_include_nonnet => p_include_nonnet,
711: p_planning_level => l_level);
712:
713: l_demand := csp_excess_parts_pvt.demand(
714: p_organization_id => p_organization_id,
715: p_inventory_item_id => csin.inventory_item_id,
716: p_subinventory_code => curs.secondary_inventory_name,
717: p_include_nonnet => p_include_nonnet,

Line 797: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',

793: v_excess_part.EXCESS_STATUS := 'P';
794:
795: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
796: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
797: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',
798: 'Calling populate_excess_list 3');
799: end if;
800:
801: populate_excess_list(v_excess_part);

Line 820: csp_excess_parts_pvt.apply_business_rules(

816: p_organization_id => p_organization_id,
817: p_subinventory_code => p_subinventory_code);
818:
819: if l_excess_rule_id is not null then
820: csp_excess_parts_pvt.apply_business_rules(
821: p_organization_id => p_organization_id,
822: p_subinventory_code => p_subinventory_code,
823: p_excess_rule_id => l_excess_rule_id);
824: else

Line 1211: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',

1207: v_excess_part.EXCESS_STATUS := 'O';
1208:
1209: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1210: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1211: 'csp.plsql.CSP_EXCESS_PARTS_PVT.excess_parts',
1212: 'Calling populate_excess_list 4');
1213: end if;
1214:
1215: populate_excess_list(v_excess_part);

Line 2026: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2022: BEGIN
2023:
2024: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2025: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2026: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2027: 'Begin...');
2028: end if;
2029:
2030: IF p_excess_part.ORGANIZATION_ID IS NOT NULL THEN

Line 2036: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2032: -- set default return information
2033:
2034: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2035: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2036: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2037: 'Fetching return information from c_get_return_info');
2038: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2039: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2040: 'p_excess_part.ORGANIZATION_ID = '

Line 2039: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2035: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2036: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2037: 'Fetching return information from c_get_return_info');
2038: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2039: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2040: 'p_excess_part.ORGANIZATION_ID = '
2041: || p_excess_part.ORGANIZATION_ID);
2042: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2043: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

Line 2043: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2039: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2040: 'p_excess_part.ORGANIZATION_ID = '
2041: || p_excess_part.ORGANIZATION_ID);
2042: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2043: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2044: 'p_excess_part.SUBINVENTORY_CODE = '
2045: || p_excess_part.SUBINVENTORY_CODE);
2046: end if;
2047:

Line 2055: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2051: CLOSE c_get_return_info;
2052:
2053: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2054: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2055: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2056: 'Return information from c_get_return_info');
2057: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2058: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2059: 'v_ret_org_id = ' || v_ret_org_id);

Line 2058: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2054: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2055: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2056: 'Return information from c_get_return_info');
2057: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2058: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2059: 'v_ret_org_id = ' || v_ret_org_id);
2060: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2061: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2062: 'v_ret_sub_inv = ' || v_ret_sub_inv);

Line 2061: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2057: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2058: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2059: 'v_ret_org_id = ' || v_ret_org_id);
2060: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2061: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2062: 'v_ret_sub_inv = ' || v_ret_sub_inv);
2063: end if;
2064:
2065: -- call custom code to override return information if any

Line 2077: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2073: -- if we found any return routing rule for the given inputs
2074:
2075: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2076: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2077: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2078: 'Calling find_best_routing_rule....');
2079: end if;
2080:
2081: if v_excess_part.CONDITION_CODE = 'G' then

Line 2104: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2100: );
2101:
2102: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2103: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2104: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2105: 'returned from find_best_routing_rule with x_return_status = ' || x_return_status
2106: || ' and v_return_rule_id = ' || v_return_rule_id);
2107: end if;
2108:

Line 2116: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2112: close get_rule_destination;
2113:
2114: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2115: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2116: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2117: 'Destination for rule is: v_rule_dest_org_id=' || v_rule_dest_org_id
2118: || ', v_rule_dest_subinv=' || v_rule_dest_subinv);
2119: end if;
2120:

Line 2129: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2125: end if;
2126:
2127: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2128: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2129: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2130: 'Calling custom code...CSP_EXCESS_PARTS_CUST.excess_parts');
2131: end if;
2132:
2133: v_excess_records := CSP_EXCESS_PARTS_CUST.excess_parts(v_excess_part);

Line 2137: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2133: v_excess_records := CSP_EXCESS_PARTS_CUST.excess_parts(v_excess_part);
2134:
2135: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2136: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2137: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2138: 'Got v_excess_records with count = ' || v_excess_records.count);
2139: end if;
2140:
2141: FOR i IN 1..v_excess_records.count LOOP

Line 2146: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2142: v_excess_part := v_excess_records(i);
2143:
2144: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2145: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2146: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2147: 'p_is_insert_record = ' || p_is_insert_record);
2148: end if;
2149:
2150: if nvl(p_is_insert_record, 'N') = 'Y' then

Line 2154: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',

2150: if nvl(p_is_insert_record, 'N') = 'Y' then
2151:
2152: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2153: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2154: 'csp.plsql.CSP_EXCESS_PARTS_PVT.populate_excess_list',
2155: 'Calling csp_excess_lists_pkg.Insert_Row for i = ' || i);
2156: end if;
2157:
2158: csp_excess_lists_pkg.Insert_Row(

Line 2484: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2480: x_return_status := 'S';
2481:
2482: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2483: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2484: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2485: 'Begin...');
2486: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2487: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2488: 'p_source_type=' || p_source_type

Line 2487: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2483: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2484: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2485: 'Begin...');
2486: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2487: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2488: 'p_source_type=' || p_source_type
2489: || ', p_source_org_id=' || p_source_org_id
2490: || ', p_source_subinv=' || p_source_subinv
2491: || ', p_source_terr_id=' || p_source_terr_id

Line 2515: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2511: -- rules for this territory source
2512:
2513: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2514: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2515: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2516: 'v_match_rule_id=' || v_match_rule_id
2517: || ', v_match_rule_weight=' || v_match_rule_weight);
2518: end if; -- End of FND Logger If block
2519:

Line 2527: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2523: close c_Source_Org_Type;
2524:
2525: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2526: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2527: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2528: 'l_Source_Org_Type=' || l_Source_Org_Type);
2529: end if; -- End of FND Logger If block
2530:
2531: if l_Source_Org_Type = 'TECHNICIAN' then

Line 2559: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2555: close c_get_ware_hz_loc;
2556:
2557: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2558: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2559: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2560: 'l_hz_location_id=' || l_hz_location_id);
2561: end if; -- End of FND Logger If block
2562:
2563: -- no hz_location_id found? then check for hr_location

Line 2581: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2577: end if; -- end if if l_Source_Org_Type = 'TECHNICIAN'
2578:
2579: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2580: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2581: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2582: 'l_city=' || l_city
2583: || ', l_postal_code=' || l_postal_code
2584: || ', l_state=' || l_state
2585: || ', l_province=' || l_province

Line 2605: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2601: l_sr_rec.COUNTRY := l_country;
2602:
2603: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2604: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2605: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2606: 'Calling JTY_TERR_SPARES_PVT.process_match_terr_spares ...');
2607: end if; -- End of FND Logger If block
2608:
2609: JTY_TERR_SPARES_PVT.process_match_terr_spares (

Line 2624: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2620: );
2621:
2622: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2623: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2624: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2625: 'Status returned from JTY_TERR_SPARES_PVT.process_match_terr_spares = '
2626: || x_return_status);
2627: end if; -- End of FND Logger If block
2628:

Line 2636: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2632: for c_terr in c_terr_result loop
2633:
2634: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2635: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2636: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2637: 'c_terr.terr_id =' || c_terr.terr_id);
2638: end if; -- End of FND Logger If block
2639:
2640: l_source_terr_id := c_terr.terr_id;

Line 2659: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2655: end loop; -- for c_terr in c_terr_result loop
2656:
2657: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2658: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2659: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2660: 'FOR loop ended with v_match_rule_id = ' || v_match_rule_id);
2661: end if; -- End of FND Logger If block
2662:
2663: exception

Line 2696: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',

2692: end if; -- End of if p_source_type = 'I'
2693:
2694: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2695: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2696: 'csp.plsql.CSP_EXCESS_PARTS_PVT.find_best_routing_rule',
2697: 'v_match_rule_id=' || v_match_rule_id
2698: || ', v_match_rule_weight=' || v_match_rule_weight);
2699: end if; -- End of FND Logger If block
2700: