1 PACKAGE wms_strategy_pvt AS
2 /* $Header: WMSVPPSS.pls 120.1.12010000.1 2008/07/28 18:38:09 appldev ship $ */
3 --
4 -- File : WMSVPPSS.pls
5 -- Content : WMS_Strategy_PVT package specification
6 -- Description : WMS private API's
7 -- Notes :
8 -- Modified : 02/08/99 mzeckzer created
9 -- Modified : 05/17/02 Grao
10 -- Modified : 05/12/05 Grao - added p_rule_id / 'K'
11 --
12 g_allocated_quantity NUMBER;
13 g_over_allocation_mode NUMBER;
14 g_tolerance_value NUMBER;
15
16 -- API name : Search
17 -- Type : Private
18 -- Function : Searches for a WMS strategy according to
19 -- provided transaction/reservation input and set up strategy
20 -- assignments to business objects.
21 -- Calls stub procedure to search for strategy assignments in a
22 -- customer-defined manner before actually following his own
23 -- algorithm to determine the valid strategy.
24 -- Pre-reqs : transaction record in WMS_STRATEGY_MAT_TXN_TMP_V uniquely
25 -- identified by parameters p_transaction_temp_id (which
26 -- is the move order line id) and
27 -- p_type_code ( base table MTL_TXN_REQUEST_LINES)
28 -- Input Parameters :
29 -- p_api_version Standard Input Parameter
30 -- p_init_msg_list Standard Input Parameter
31 -- p_validation_level Standard Input Parameter
32 -- x_return_status Standard Output Parameter
33 -- x_msg_count Standard Output Parameter
34 -- x_msg_data Standard Output Parameter
35 -- p_transaction_temp_id equals the move order line id
36 -- for the request
37 -- p_type_code 1 - put away; 2 - pick
38 --
39 -- Output Parameter :
40 -- x_strategy_id found strategy id
41 --
42 -- Version :
43 -- Current version 1.0
44 -- Notes : calls stub procedure WMS_Custom_PUB.SearchForStrategy
45 -- and API's of WMS_Common_PVT
46 --
47 procedure Search
48 ( p_api_version IN NUMBER
49 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
50 ,p_validation_level IN NUMBER DEFAULT fnd_api.g_valid_level_full
51 ,x_return_status OUT NOCOPY VARCHAR2
52 ,x_msg_count OUT NOCOPY NUMBER
53 ,x_msg_data OUT NOCOPY VARCHAR2
54 ,p_transaction_temp_id IN NUMBER DEFAULT NULL
55 ,p_type_code IN NUMBER DEFAULT NULL
56 ,x_strategy_id OUT NOCOPY NUMBER
57 ,p_organization_id IN NUMBER DEFAULT NULL
58 );
59 --
60 -- API name : Apply
61 -- Type : Private
62 -- Function : Applies a WMS strategy to the given transaction
63 -- or reservation input parameters and creates recommendations
64 -- Pre-reqs : transaction record in WMS_STRATEGY_MAT_TXN_TMP_V uniquely
65 -- identified by parameters p_transaction_temp_id and
66 -- p_type_code ( base table MTL_TXN_REQUEST_LINES)
67 -- at least one transaction detail record in
68 -- WMS_TRX_DETAILS_TMP_V identified by line type code = 1
69 -- and parameters p_transaction_temp_id and p_type_code
70 -- ( base tables MTL_TXN_REQUEST_LINES and
71 -- WMS_TRANSACTIONS_TEMP )
72 -- strategy record in WMS_STRATEGIES_B uniquely identified by
73 -- parameter p_strategy_id
74 -- at least one strategy member record in
75 -- WMS_STRATEGY_MEMBERS identified by parameter
76 -- p_strategy_id
77 -- Parameters :
78 -- p_api_version
79 -- p_init_msg_list
80 -- p_commit
81 -- p_validation_level
82 --
83 -- x_return_status
84 -- x_msg_count
85 -- x_msg_data
86 -- p_transaction_temp_id
87 -- p_type_code
88 -- p_strategy_id
89 -- ,p_quick_pick_flag in varchar2 default 'N' The other value is 'Y'
90 -- 'Y' is passed in patchset 'J' onwards for Inventory Moves
91 -- when the lpn_request_context is 1
92 -- Version : Current version 1.0
93 -- Version : Current version 1.0
94 --
95 -- Changed ...
96 -- Previous version
97 --
98 -- Initial version 1.0
99 -- Notes : calls API's of WMS_Common_PVT, WMS_Rule_PVT
100 -- and INV_Quantity_Tree_PVT
101 -- This API must be called internally by
102 -- WMS_Engine_PVT.Create_Suggestions only !
103 -- End of comments
104
105 procedure Apply (
106 p_api_version in number
107 ,p_init_msg_list in varchar2 DEFAULT fnd_api.g_false
108 ,p_commit in varchar2 DEFAULT fnd_api.g_false
109 ,p_validation_level in number DEFAULT fnd_api.g_valid_level_full
110 ,x_return_status out NOCOPY varchar2
111 ,x_msg_count out NOCOPY number
112 ,x_msg_data out NOCOPY varchar2
113 ,p_transaction_temp_id in number DEFAULT NULL
114 ,p_type_code in number DEFAULT NULL
115 ,p_strategy_id in number DEFAULT NULL
116 ,p_rule_id in number DEFAULT NULL -- [ Added new column p_rule_id ]
117 ,p_detail_serial in BOOLEAN DEFAULT FALSE
118 ,p_from_serial IN VARCHAR2 DEFAULT NULL
119 ,p_to_serial IN VARCHAR2 DEFAULT NULL
120 ,p_detail_any_serial IN NUMBER DEFAULT NULL
121 ,p_unit_volume IN NUMBER DEFAULT NULL
122 ,p_volume_uom_code IN VARCHAR2 DEFAULT NULL
123 ,p_unit_weight IN NUMBER DEFAULT NULL
124 ,p_weight_uom_code IN VARCHAR2 DEFAULT NULL
125 ,p_base_uom_code IN VARCHAR2 DEFAULT NULL
126 ,p_lpn_id IN NUMBER DEFAULT NULL
127 ,p_unit_number IN VARCHAR2 DEFAULT NULL
128 ,p_allow_non_partial_rules IN BOOLEAN DEFAULT TRUE
129 ,p_simulation_mode IN NUMBER DEFAULT 0
130 ,p_simulation_id IN NUMBER DEFAULT NULL
131 ,p_project_id IN NUMBER DEFAULT NULL
132 ,p_task_id IN NUMBER DEFAULT NULL
133 ,p_quick_pick_flag IN VARCHAR2 DEFAULT 'N'
134 );
135
136 -- Name : InitStrategyRules
137 -- Function : Initializes internal table of strategy members ( = rules ).
138 -- Pre-reqs : none
139 -- Parameters :
140 -- x_return_status out varchar2(1)
141 -- x_msg_count out number
142 -- x_msg_data out varchar2(2000)
143 -- p_strategy_id in number required
144 -- Notes : private procedure for internal use only
145 -- End of comments
146
147 procedure InitStrategyRules (
148 x_return_status out NOCOPY varchar2
149 ,x_msg_count out NOCOPY number
150 ,x_msg_data out NOCOPY varchar2
151 ,p_strategy_id in number);
152
153 g_debug NUMBER;
154
155 end wms_strategy_pvt;