DBA Data[Home] [Help]

APPS.WMS_STRATEGY_PVT dependencies on WMS_RULE_PVT

Line 18: g_pp_rule_api_version constant number := 1.0; -- WMS_Rule_PVT

14: -- as part of bug fix 6867434]
15:
16: g_pkg_name constant varchar2(30) := 'WMS_Strategy_PVT';
17: -- API versions called within WMS_Strategy_PVT.Apply API
18: g_pp_rule_api_version constant number := 1.0; -- WMS_Rule_PVT
19: g_qty_tree_api_version constant number := 1.0; -- INV_Quantity_Tree_PVT
20:
21: --Procedures for logging messages
22: PROCEDURE log_event(

Line 1800: -- WMS_RULE_PVT.g_min_qty_to_allocate is minimum quantity remaining to be allocated to satisfy sales order line

1796: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
1797: l_max_poss_sec_qty := GREATEST(0, l_max_sec_qty - NVL(l_other_sec_alloc,0));
1798: END IF;
1799:
1800: -- WMS_RULE_PVT.g_min_qty_to_allocate is minimum quantity remaining to be allocated to satisfy sales order line
1801: -- quantity. Loop in Rules will try to allocate till this or current MO quantity whichever is less and will
1802: -- exit if this quantity is allocated
1803: WMS_RULE_PVT.g_min_qty_to_allocate := GREATEST(0,l_avail_req_qty - NVL(l_other_alloc,0) - NVL(l_cur_mo_alloc, 0));
1804: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN

Line 1803: WMS_RULE_PVT.g_min_qty_to_allocate := GREATEST(0,l_avail_req_qty - NVL(l_other_alloc,0) - NVL(l_cur_mo_alloc, 0));

1799:
1800: -- WMS_RULE_PVT.g_min_qty_to_allocate is minimum quantity remaining to be allocated to satisfy sales order line
1801: -- quantity. Loop in Rules will try to allocate till this or current MO quantity whichever is less and will
1802: -- exit if this quantity is allocated
1803: WMS_RULE_PVT.g_min_qty_to_allocate := GREATEST(0,l_avail_req_qty - NVL(l_other_alloc,0) - NVL(l_cur_mo_alloc, 0));
1804: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
1805: WMS_RULE_PVT.g_min_sec_qty_to_alloc := GREATEST(0,l_avail_req_sec_qty
1806: - NVL(l_other_sec_alloc,0)
1807: - NVL(l_cur_mo_alloc, 0)

Line 1805: WMS_RULE_PVT.g_min_sec_qty_to_alloc := GREATEST(0,l_avail_req_sec_qty

1801: -- quantity. Loop in Rules will try to allocate till this or current MO quantity whichever is less and will
1802: -- exit if this quantity is allocated
1803: WMS_RULE_PVT.g_min_qty_to_allocate := GREATEST(0,l_avail_req_qty - NVL(l_other_alloc,0) - NVL(l_cur_mo_alloc, 0));
1804: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
1805: WMS_RULE_PVT.g_min_sec_qty_to_alloc := GREATEST(0,l_avail_req_sec_qty
1806: - NVL(l_other_sec_alloc,0)
1807: - NVL(l_cur_mo_alloc, 0)
1808: );
1809: END IF;

Line 1827: log_statement(l_api_name, 'g_min_qty_to_allocate ', WMS_RULE_PVT.g_min_qty_to_allocate);

1823: log_statement(l_api_name, 'l_cur_mo_alloc ', l_cur_mo_alloc);
1824: log_statement(l_api_name, 'l_cur_mo_sec_alloc ', l_cur_mo_sec_alloc);
1825: log_statement(l_api_name, 'l_max_possible_qty ', l_max_possible_qty);
1826: log_statement(l_api_name, 'l_max_poss_sec_qty ', l_max_poss_sec_qty);
1827: log_statement(l_api_name, 'g_min_qty_to_allocate ', WMS_RULE_PVT.g_min_qty_to_allocate);
1828: log_statement(l_api_name, 'g_min_sec_qty_to_alloc ', WMS_RULE_PVT.g_min_sec_qty_to_alloc);
1829: log_statement(l_api_name, 'l_max_tolerance ', l_max_tolerance);
1830: log_statement(l_api_name, 'l_max_sec_tolerance ', l_max_sec_tolerance);
1831: END IF;

Line 1828: log_statement(l_api_name, 'g_min_sec_qty_to_alloc ', WMS_RULE_PVT.g_min_sec_qty_to_alloc);

1824: log_statement(l_api_name, 'l_cur_mo_sec_alloc ', l_cur_mo_sec_alloc);
1825: log_statement(l_api_name, 'l_max_possible_qty ', l_max_possible_qty);
1826: log_statement(l_api_name, 'l_max_poss_sec_qty ', l_max_poss_sec_qty);
1827: log_statement(l_api_name, 'g_min_qty_to_allocate ', WMS_RULE_PVT.g_min_qty_to_allocate);
1828: log_statement(l_api_name, 'g_min_sec_qty_to_alloc ', WMS_RULE_PVT.g_min_sec_qty_to_alloc);
1829: log_statement(l_api_name, 'l_max_tolerance ', l_max_tolerance);
1830: log_statement(l_api_name, 'l_max_sec_tolerance ', l_max_sec_tolerance);
1831: END IF;
1832:

Line 1899: -- Notes : calls API's of Wms_re_common_pvt, WMS_Rule_PVT

1895: -- Changed ...
1896: -- Previous version
1897: --
1898: -- Initial version 1.0
1899: -- Notes : calls API's of Wms_re_common_pvt, WMS_Rule_PVT
1900: -- and INV_Quantity_Tree_PVT
1901: -- This API must be called internally by
1902: -- WMS_Engine_PVT.Create_Suggestions only !
1903: -- End of comments

Line 2197: WMS_Rule_PVT.QuickPick (

2193:
2194: If (l_debug = 1) then
2195: log_event(l_api_name, 'APPLY', 'WMS_RULES_PVT.Calling QuickPick() ');
2196: End if;
2197: WMS_Rule_PVT.QuickPick (
2198: p_api_version => g_pp_rule_api_version
2199: , p_init_msg_list => fnd_api.g_false
2200: , p_commit => fnd_api.g_false
2201: , p_validation_level => fnd_api.g_valid_level_full

Line 2270: WMS_RULE_PVT.g_max_tolerance := 0;

2266: g_allocated_quantity := 0;
2267: l_over_allocation_mode := g_over_allocation_mode;
2268: l_tolerance_value := g_tolerance_value;
2269:
2270: WMS_RULE_PVT.g_max_tolerance := 0;
2271: WMS_RULE_PVT.g_over_allocation := 'N';
2272:
2273: IF l_lot_divisible_flag = 'N' and l_lot_control_code <> 1 and p_type_code = 2 and WMS_Engine_PVT.g_move_order_type = 3 THEN
2274: --{ lot ctl and indivisible

Line 2271: WMS_RULE_PVT.g_over_allocation := 'N';

2267: l_over_allocation_mode := g_over_allocation_mode;
2268: l_tolerance_value := g_tolerance_value;
2269:
2270: WMS_RULE_PVT.g_max_tolerance := 0;
2271: WMS_RULE_PVT.g_over_allocation := 'N';
2272:
2273: IF l_lot_divisible_flag = 'N' and l_lot_control_code <> 1 and p_type_code = 2 and WMS_Engine_PVT.g_move_order_type = 3 THEN
2274: --{ lot ctl and indivisible
2275: WMS_RULE_PVT.g_min_tolerance := 0;

Line 2275: WMS_RULE_PVT.g_min_tolerance := 0;

2271: WMS_RULE_PVT.g_over_allocation := 'N';
2272:
2273: IF l_lot_divisible_flag = 'N' and l_lot_control_code <> 1 and p_type_code = 2 and WMS_Engine_PVT.g_move_order_type = 3 THEN
2274: --{ lot ctl and indivisible
2275: WMS_RULE_PVT.g_min_tolerance := 0;
2276:
2277: -- Start Bug 10222873
2278: -- Use get_max_tolerance instead of INV_Pick_Release_PVT.get_tolerance
2279: get_max_tolerance(

Line 2307: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;

2303: log_statement(l_api_name, 'get_max_tolerance', 'Error in get_max_tolerance Call');
2304: END IF;
2305: END IF;
2306:
2307: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2308:
2309: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2310: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;
2311: END IF;

Line 2310: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;

2306:
2307: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2308:
2309: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2310: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;
2311: END IF;
2312: --} End Bug 10222873
2313:
2314: ELSIF p_type_code = 2

Line 2319: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'

2315: AND (WMS_Engine_PVT.g_move_order_type IN (2,3) OR --Added Replenishment Move Order Type for bug# 9656966
2316: (WMS_Engine_PVT.g_move_order_type IN (5,8) AND WMS_Engine_PVT.g_wip_entity_type IN (9,10))) -- BUG14517947
2317: AND l_wms_enabled_flag = 'Y' THEN
2318: --{
2319: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'
2320: -- will show that get_max_tolerance was not called,which will decide EXIT condition in the loop in Rules API
2321: IF l_over_allocation_mode = 3 -- constant tolerance
2322: THEN
2323: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;

Line 2323: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;

2319: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'
2320: -- will show that get_max_tolerance was not called,which will decide EXIT condition in the loop in Rules API
2321: IF l_over_allocation_mode = 3 -- constant tolerance
2322: THEN
2323: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;
2324: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2325: WMS_RULE_PVT.g_max_sec_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_sec_qty)/100;
2326: END IF;
2327: WMS_RULE_PVT.g_over_allocation := 'N';

Line 2325: WMS_RULE_PVT.g_max_sec_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_sec_qty)/100;

2321: IF l_over_allocation_mode = 3 -- constant tolerance
2322: THEN
2323: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;
2324: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2325: WMS_RULE_PVT.g_max_sec_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_sec_qty)/100;
2326: END IF;
2327: WMS_RULE_PVT.g_over_allocation := 'N';
2328: ELSIF (l_over_allocation_mode = 2 AND WMS_Engine_PVT.g_move_order_type = 3) THEN --get_max_tolerance should not be called for OPM or replenishment move orders
2329: get_max_tolerance(

Line 2327: WMS_RULE_PVT.g_over_allocation := 'N';

2323: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;
2324: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2325: WMS_RULE_PVT.g_max_sec_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_sec_qty)/100;
2326: END IF;
2327: WMS_RULE_PVT.g_over_allocation := 'N';
2328: ELSIF (l_over_allocation_mode = 2 AND WMS_Engine_PVT.g_move_order_type = 3) THEN --get_max_tolerance should not be called for OPM or replenishment move orders
2329: get_max_tolerance(
2330: p_transaction_temp_id => p_transaction_temp_id,
2331: p_organization_id => l_organization_id,

Line 2350: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;

2346: log_statement(l_api_name, 'get_max_tolerance', 'Error in get_max_tolerance Call');
2347: END IF;
2348: END IF;
2349:
2350: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2351: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2352: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;
2353: END IF;
2354: WMS_RULE_PVT.g_over_allocation := 'Y';

Line 2352: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;

2348: END IF;
2349:
2350: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2351: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2352: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;
2353: END IF;
2354: WMS_RULE_PVT.g_over_allocation := 'Y';
2355:
2356: ELSIF ((p_strategy_id IS NULL or l_over_allocation_mode = 1) AND WMS_Engine_PVT.g_move_order_type = 3) THEN -- overallocation mode=None

Line 2354: WMS_RULE_PVT.g_over_allocation := 'Y';

2350: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2351: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2352: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;
2353: END IF;
2354: WMS_RULE_PVT.g_over_allocation := 'Y';
2355:
2356: ELSIF ((p_strategy_id IS NULL or l_over_allocation_mode = 1) AND WMS_Engine_PVT.g_move_order_type = 3) THEN -- overallocation mode=None
2357: -- Querying all MO other than current MO line that have the same l_trx_source_line_id to see if any one
2358: -- then have been Over Allocated earlier. If so, then even though the current Strategy does not allow

Line 2365: INTO WMS_RULE_PVT.g_over_allocation

2361: --{
2362: BEGIN
2363: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2364: SELECT 'Y'
2365: INTO WMS_RULE_PVT.g_over_allocation
2366: FROM mtl_txn_request_lines mtrl
2367: WHERE mtrl.txn_source_line_id = l_trx_source_line_id
2368: AND mtrl.transaction_source_type_id IN (2,8)
2369: AND mtrl.LINE_ID <> p_transaction_temp_id

Line 2384: INTO WMS_RULE_PVT.g_over_allocation

2380: AND mmtt.organization_id = l_organization_id
2381: AND mmtt.transaction_action_id = 28);
2382: ELSE
2383: SELECT 'Y'
2384: INTO WMS_RULE_PVT.g_over_allocation
2385: FROM mtl_txn_request_lines mtrl
2386: WHERE mtrl.txn_source_line_id = l_trx_source_line_id
2387: AND mtrl.transaction_source_type_id IN (2,8)
2388: AND mtrl.LINE_ID <> p_transaction_temp_id

Line 2404: WMS_RULE_PVT.g_over_allocation := 'N';

2400: AND mmtt.transaction_action_id = 28);
2401: END IF;
2402: EXCEPTION
2403: WHEN NO_DATA_FOUND THEN
2404: WMS_RULE_PVT.g_over_allocation := 'N';
2405: END;
2406:
2407: IF WMS_RULE_PVT.g_over_allocation = 'Y' THEN
2408: get_max_tolerance(

Line 2407: IF WMS_RULE_PVT.g_over_allocation = 'Y' THEN

2403: WHEN NO_DATA_FOUND THEN
2404: WMS_RULE_PVT.g_over_allocation := 'N';
2405: END;
2406:
2407: IF WMS_RULE_PVT.g_over_allocation = 'Y' THEN
2408: get_max_tolerance(
2409: p_transaction_temp_id => p_transaction_temp_id,
2410: p_organization_id => l_organization_id,
2411: p_inventory_item_id => l_inventory_item_id,

Line 2431: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;

2427: END IF;
2428:
2429: IF NVL(wms_engine_pvt.g_fulfillment_base,'P') = 'S' THEN
2430: IF l_max_sec_tolerance < 0 THEN
2431: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;
2432: END IF;
2433: ELSE
2434: IF l_max_tolerance < 0 THEN
2435: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;

Line 2435: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;

2431: WMS_RULE_PVT.g_max_sec_tolerance := l_max_sec_tolerance;
2432: END IF;
2433: ELSE
2434: IF l_max_tolerance < 0 THEN
2435: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2436: END IF;
2437: END IF;
2438: END IF;
2439:

Line 2443: WMS_RULE_PVT.g_over_allocation := 'N';

2439:
2440: END IF; --} l_over_allocation_mode
2441: --} l_wms_enabled_flag
2442: ELSE
2443: WMS_RULE_PVT.g_over_allocation := 'N';
2444: END IF;
2445:
2446: IF l_debug = 1 THEN
2447: log_statement(l_api_name, 'g_max_tolerance ', WMS_RULE_PVT.g_max_tolerance);

Line 2447: log_statement(l_api_name, 'g_max_tolerance ', WMS_RULE_PVT.g_max_tolerance);

2443: WMS_RULE_PVT.g_over_allocation := 'N';
2444: END IF;
2445:
2446: IF l_debug = 1 THEN
2447: log_statement(l_api_name, 'g_max_tolerance ', WMS_RULE_PVT.g_max_tolerance);
2448: log_statement(l_api_name, 'WMS_RULE_PVT.g_over_allocation ', WMS_RULE_PVT.g_over_allocation);
2449: END IF;
2450: --- [ End get_tolerance() ]
2451: ---

Line 2448: log_statement(l_api_name, 'WMS_RULE_PVT.g_over_allocation ', WMS_RULE_PVT.g_over_allocation);

2444: END IF;
2445:
2446: IF l_debug = 1 THEN
2447: log_statement(l_api_name, 'g_max_tolerance ', WMS_RULE_PVT.g_max_tolerance);
2448: log_statement(l_api_name, 'WMS_RULE_PVT.g_over_allocation ', WMS_RULE_PVT.g_over_allocation);
2449: END IF;
2450: --- [ End get_tolerance() ]
2451: ---
2452: WHILE Wms_re_common_pvt.GetCountInputLines > 0 OR p_strategy_id IS NULL LOOP

Line 2542: WMS_rule_PVT.applydefloc

2538: log_event(l_api_name, 'APPLY()', 'applydefloc for non WMS flow ');
2539: END IF;
2540:
2541: END IF;
2542: WMS_rule_PVT.applydefloc
2543: (
2544: p_api_version => g_pp_rule_api_version,
2545: p_init_msg_list => fnd_api.g_false,
2546: p_commit => p_commit,

Line 2569: WMS_Rule_PVT.get_available_inventory(

2565:
2566: -- LG convergence add
2567: ElsIF p_simulation_mode = 10 THEN --mode is manual alloc
2568: log_event(l_api_name, 'APPLY()', 'get_availabe_inv ');
2569: WMS_Rule_PVT.get_available_inventory(
2570: p_api_version => g_pp_rule_api_version
2571: , p_init_msg_list => fnd_api.g_false
2572: , p_commit => fnd_api.g_false
2573: , p_validation_level => fnd_api.g_valid_level_full

Line 2643: WMS_Rule_PVT.Apply (

2639: If (l_debug = 1) then
2640: log_event(l_api_name, 'APPLY()', 'rule apply for pick or putaway rule');
2641: End If;
2642:
2643: WMS_Rule_PVT.Apply (
2644: p_api_version => g_pp_rule_api_version
2645: , p_init_msg_list => fnd_api.g_false
2646: , p_commit => fnd_api.g_false
2647: , p_validation_level => fnd_api.g_valid_level_full

Line 2684: WMS_Rule_PVT.Apply (

2680: Else
2681: --Bug3237702 ends
2682:
2683: log_event(l_api_name, 'APPLY()', 'rule apply ');
2684: WMS_Rule_PVT.Apply (
2685: p_api_version => g_pp_rule_api_version
2686: , p_init_msg_list => fnd_api.g_false
2687: , p_commit => fnd_api.g_false
2688: , p_validation_level => fnd_api.g_valid_level_full