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 1666: -- WMS_RULE_PVT.g_min_qty_to_allocate is minimum quantity remaining to be allocated to satisfy sales order line

1662: -- l_max_possible_qty is maximum quantity(including tolerance) that can be allocated
1663: -- l_other_alloc should never exceed l_max_quantity, however to be safe putting GREATEST
1664: l_max_possible_qty := GREATEST(0, l_max_quantity - NVL(l_other_alloc,0));
1665:
1666: -- WMS_RULE_PVT.g_min_qty_to_allocate is minimum quantity remaining to be allocated to satisfy sales order line
1667: -- quantity. Loop in Rules will try to allocate till this or current MO quantity whichever is less and will
1668: -- exit if this quantity is allocated
1669: 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));
1670:

Line 1669: 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));

1665:
1666: -- WMS_RULE_PVT.g_min_qty_to_allocate is minimum quantity remaining to be allocated to satisfy sales order line
1667: -- quantity. Loop in Rules will try to allocate till this or current MO quantity whichever is less and will
1668: -- exit if this quantity is allocated
1669: 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));
1670:
1671: -- l_max_tolerance is tolerance value for the current MO, however it will be set to zero if it is non-negative
1672: -- and Rule allocation mode does not allows it
1673: l_max_tolerance := l_max_possible_qty - l_mo_quantity;

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

1676: log_statement(l_api_name, 'l_mo_quantity ', l_mo_quantity);
1677: log_statement(l_api_name, 'l_other_alloc ', l_other_alloc);
1678: log_statement(l_api_name, 'l_cur_mo_alloc ', l_cur_mo_alloc);
1679: log_statement(l_api_name, 'l_max_possible_qty ', l_max_possible_qty);
1680: log_statement(l_api_name, 'g_min_qty_to_allocate ', WMS_RULE_PVT.g_min_qty_to_allocate);
1681: log_statement(l_api_name, 'l_max_tolerance ', l_max_tolerance);
1682: END IF;
1683:
1684: x_return_status := l_return_status;

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

1740: -- Changed ...
1741: -- Previous version
1742: --
1743: -- Initial version 1.0
1744: -- Notes : calls API's of Wms_re_common_pvt, WMS_Rule_PVT
1745: -- and INV_Quantity_Tree_PVT
1746: -- This API must be called internally by
1747: -- WMS_Engine_PVT.Create_Suggestions only !
1748: -- End of comments

Line 2040: WMS_Rule_PVT.QuickPick (

2036:
2037: If (l_debug = 1) then
2038: log_event(l_api_name, 'APPLY', 'WMS_RULES_PVT.Calling QuickPick() ');
2039: End if;
2040: WMS_Rule_PVT.QuickPick (
2041: p_api_version => g_pp_rule_api_version
2042: , p_init_msg_list => fnd_api.g_false
2043: , p_commit => fnd_api.g_false
2044: , p_validation_level => fnd_api.g_valid_level_full

Line 2112: WMS_RULE_PVT.g_max_tolerance := 0;

2108: g_allocated_quantity := 0;
2109: l_over_allocation_mode := g_over_allocation_mode;
2110: l_tolerance_value := g_tolerance_value;
2111:
2112: WMS_RULE_PVT.g_max_tolerance := 0;
2113: WMS_RULE_PVT.g_over_allocation := 'N';
2114:
2115: IF l_lot_divisible_flag = 'N' and l_lot_control_code <> 1 and p_type_code = 2 THEN -- lot ctl and indivisible
2116: WMS_RULE_PVT.g_min_tolerance := 0;

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

2109: l_over_allocation_mode := g_over_allocation_mode;
2110: l_tolerance_value := g_tolerance_value;
2111:
2112: WMS_RULE_PVT.g_max_tolerance := 0;
2113: WMS_RULE_PVT.g_over_allocation := 'N';
2114:
2115: IF l_lot_divisible_flag = 'N' and l_lot_control_code <> 1 and p_type_code = 2 THEN -- lot ctl and indivisible
2116: WMS_RULE_PVT.g_min_tolerance := 0;
2117:

Line 2116: WMS_RULE_PVT.g_min_tolerance := 0;

2112: WMS_RULE_PVT.g_max_tolerance := 0;
2113: WMS_RULE_PVT.g_over_allocation := 'N';
2114:
2115: IF l_lot_divisible_flag = 'N' and l_lot_control_code <> 1 and p_type_code = 2 THEN -- lot ctl and indivisible
2116: WMS_RULE_PVT.g_min_tolerance := 0;
2117:
2118: INV_Pick_Release_PVT.get_tolerance(p_mo_line_id => p_transaction_temp_id,
2119: x_return_status => x_return_status,
2120: x_msg_count => x_msg_count,

Line 2133: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;

2129: IF l_debug = 1 THEN
2130: log_statement(l_api_name, 'INV_Pick_Release_PVT.get_tolerance', 'Error in get_tolerance Call');
2131: END IF;
2132: END IF;
2133: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2134: WMS_RULE_PVT.g_min_tolerance := l_min_tolerance;
2135: ELSIF p_type_code = 2 AND WMS_Engine_PVT.g_move_order_type = 3 and l_wms_enabled_flag = 'Y' THEN
2136: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'
2137: -- will show that get_max-tolerance was not called,which will decide EXIT condition in the loop in Rules API

Line 2134: WMS_RULE_PVT.g_min_tolerance := l_min_tolerance;

2130: log_statement(l_api_name, 'INV_Pick_Release_PVT.get_tolerance', 'Error in get_tolerance Call');
2131: END IF;
2132: END IF;
2133: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2134: WMS_RULE_PVT.g_min_tolerance := l_min_tolerance;
2135: ELSIF p_type_code = 2 AND WMS_Engine_PVT.g_move_order_type = 3 and l_wms_enabled_flag = 'Y' THEN
2136: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'
2137: -- will show that get_max-tolerance was not called,which will decide EXIT condition in the loop in Rules API
2138: IF l_over_allocation_mode = 3 THEN

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

2132: END IF;
2133: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2134: WMS_RULE_PVT.g_min_tolerance := l_min_tolerance;
2135: ELSIF p_type_code = 2 AND WMS_Engine_PVT.g_move_order_type = 3 and l_wms_enabled_flag = 'Y' THEN
2136: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'
2137: -- will show that get_max-tolerance was not called,which will decide EXIT condition in the loop in Rules API
2138: IF l_over_allocation_mode = 3 THEN
2139: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;
2140: WMS_RULE_PVT.g_over_allocation := 'N';

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

2135: ELSIF p_type_code = 2 AND WMS_Engine_PVT.g_move_order_type = 3 and l_wms_enabled_flag = 'Y' THEN
2136: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'
2137: -- will show that get_max-tolerance was not called,which will decide EXIT condition in the loop in Rules API
2138: IF l_over_allocation_mode = 3 THEN
2139: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;
2140: WMS_RULE_PVT.g_over_allocation := 'N';
2141:
2142: ELSIF l_over_allocation_mode = 2 THEN
2143: get_max_tolerance(

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

2136: -- Though with constant tolerance over allocation will occur, but WMS_RULE_PVT.g_over_allocation = 'N'
2137: -- will show that get_max-tolerance was not called,which will decide EXIT condition in the loop in Rules API
2138: IF l_over_allocation_mode = 3 THEN
2139: WMS_RULE_PVT.g_max_tolerance := (l_tolerance_value * WMS_Engine_PVT.g_mo_quantity)/100;
2140: WMS_RULE_PVT.g_over_allocation := 'N';
2141:
2142: ELSIF l_over_allocation_mode = 2 THEN
2143: get_max_tolerance(
2144: p_transaction_temp_id => p_transaction_temp_id,

Line 2162: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;

2158: IF l_debug = 1 THEN
2159: log_statement(l_api_name, 'get_max_tolerance', 'Error in get_max_tolerance Call');
2160: END IF;
2161: END IF;
2162: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2163: WMS_RULE_PVT.g_over_allocation := 'Y';
2164:
2165: ELSIF p_strategy_id IS NULL or l_over_allocation_mode = 1 THEN
2166: -- Querying all MO other than current MO line that have the same l_trx_source_line_id to see if any one

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

2159: log_statement(l_api_name, 'get_max_tolerance', 'Error in get_max_tolerance Call');
2160: END IF;
2161: END IF;
2162: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2163: WMS_RULE_PVT.g_over_allocation := 'Y';
2164:
2165: ELSIF p_strategy_id IS NULL or l_over_allocation_mode = 1 THEN
2166: -- Querying all MO other than current MO line that have the same l_trx_source_line_id to see if any one
2167: -- then have been Over Allocated earlier. If so, then even though the current Strategy does not allow

Line 2172: INTO WMS_RULE_PVT.g_over_allocation

2168: -- for Over Allocation, we need to consider the previous over allocated quantity and make sure we honor
2169: -- the tolerance limits
2170: BEGIN
2171: SELECT 'Y'
2172: INTO WMS_RULE_PVT.g_over_allocation
2173: FROM mtl_txn_request_lines mtrl
2174: WHERE mtrl.txn_source_line_id = l_trx_source_line_id
2175: AND mtrl.LINE_ID <> p_transaction_temp_id
2176: AND mtrl.quantity_detailed IS NOT NULL

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

2184: AND mmtt.organization_id = l_organization_id
2185: AND mmtt.transaction_action_id = 28);
2186: EXCEPTION
2187: WHEN NO_DATA_FOUND THEN
2188: WMS_RULE_PVT.g_over_allocation := 'N';
2189: END;
2190:
2191: IF WMS_RULE_PVT.g_over_allocation = 'Y' THEN
2192: get_max_tolerance(

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

2187: WHEN NO_DATA_FOUND THEN
2188: WMS_RULE_PVT.g_over_allocation := 'N';
2189: END;
2190:
2191: IF WMS_RULE_PVT.g_over_allocation = 'Y' THEN
2192: get_max_tolerance(
2193: p_transaction_temp_id => p_transaction_temp_id,
2194: p_organization_id => l_organization_id,
2195: p_inventory_item_id => l_inventory_item_id,

Line 2212: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;

2208: log_statement(l_api_name, 'get_max_tolerance', 'Error in get_max_tolerance Call');
2209: END IF;
2210: END IF;
2211: IF l_max_tolerance < 0 THEN
2212: WMS_RULE_PVT.g_max_tolerance := l_max_tolerance;
2213: END IF;
2214: END IF;
2215: END IF;
2216: ELSE

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

2213: END IF;
2214: END IF;
2215: END IF;
2216: ELSE
2217: WMS_RULE_PVT.g_over_allocation := 'N';
2218: END IF;
2219:
2220: IF l_debug = 1 THEN
2221: log_statement(l_api_name, 'g_max_tolerance ', WMS_RULE_PVT.g_max_tolerance);

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

2217: WMS_RULE_PVT.g_over_allocation := 'N';
2218: END IF;
2219:
2220: IF l_debug = 1 THEN
2221: log_statement(l_api_name, 'g_max_tolerance ', WMS_RULE_PVT.g_max_tolerance);
2222: log_statement(l_api_name, 'WMS_RULE_PVT.g_over_allocation ', WMS_RULE_PVT.g_over_allocation);
2223: END IF;
2224: --- [ End get_tolerance() ]
2225: ---

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

2218: END IF;
2219:
2220: IF l_debug = 1 THEN
2221: log_statement(l_api_name, 'g_max_tolerance ', WMS_RULE_PVT.g_max_tolerance);
2222: log_statement(l_api_name, 'WMS_RULE_PVT.g_over_allocation ', WMS_RULE_PVT.g_over_allocation);
2223: END IF;
2224: --- [ End get_tolerance() ]
2225: ---
2226: while Wms_re_common_pvt.GetCountInputLines > 0 OR p_strategy_id IS NULL LOOP

Line 2315: WMS_rule_PVT.applydefloc

2311: log_event(l_api_name, 'APPLY()', 'applydefloc for non WMS flow ');
2312: END IF;
2313:
2314: END IF;
2315: WMS_rule_PVT.applydefloc
2316: (
2317: p_api_version => g_pp_rule_api_version,
2318: p_init_msg_list => fnd_api.g_false,
2319: p_commit => p_commit,

Line 2342: WMS_Rule_PVT.get_available_inventory(

2338:
2339: -- LG convergence add
2340: ElsIF p_simulation_mode = 10 THEN --mode is manual alloc
2341: log_event(l_api_name, 'APPLY()', 'get_availabe_inv ');
2342: WMS_Rule_PVT.get_available_inventory(
2343: p_api_version => g_pp_rule_api_version
2344: , p_init_msg_list => fnd_api.g_false
2345: , p_commit => fnd_api.g_false
2346: , p_validation_level => fnd_api.g_valid_level_full

Line 2416: WMS_Rule_PVT.Apply (

2412: If (l_debug = 1) then
2413: log_event(l_api_name, 'APPLY()', 'rule apply for pick or putaway rule');
2414: End If;
2415:
2416: WMS_Rule_PVT.Apply (
2417: p_api_version => g_pp_rule_api_version
2418: , p_init_msg_list => fnd_api.g_false
2419: , p_commit => fnd_api.g_false
2420: , p_validation_level => fnd_api.g_valid_level_full

Line 2456: WMS_Rule_PVT.Apply (

2452: Else
2453: --Bug3237702 ends
2454:
2455: log_event(l_api_name, 'APPLY()', 'rule apply ');
2456: WMS_Rule_PVT.Apply (
2457: p_api_version => g_pp_rule_api_version
2458: , p_init_msg_list => fnd_api.g_false
2459: , p_commit => fnd_api.g_false
2460: , p_validation_level => fnd_api.g_valid_level_full