1 PACKAGE CST_Inventory_PVT AS
2 /* $Header: CSTVIVTS.pls 120.4.12010000.1 2008/07/24 17:26:01 appldev ship $ */
3
4 -- Start of comments
5 -- API name : Populate_ItemList
6 -- Type : Private
7 -- Pre-reqs : None
8 -- Function : Populates temporary table CST_ITEM_LIST_TEMP with the
9 -- items that match the given specifications
10 -- Parameters : p_api_version IN NUMBER Required
11 -- p_organization_id IN NUMBER Required
12 -- p_cost_type_id IN NUMBER
13 -- This parameter indicates the cost type against which
14 -- the asset status of the item is verified.
15 -- p_item_from IN VARCHAR2
16 -- p_item_to IN VARCHAR2
17 -- p_category_set_id IN NUMBER Required
18 -- p_category_from IN VARCHAR2
19 -- p_category_to IN VARCHAR2
20 -- p_zero_cost_only IN NUMBER
21 -- This parameter restricts the range of items to
22 -- those with zero item costs.
23 -- p_expense_item IN NUMBER
24 -- This parameter indicates whether to include expense
25 -- items.
26 -- p_cost_enabled_only IN NUMBER
27 -- This parameter restricts the items to include cost
28 -- enabled items only. If 1, only cost enabled items
29 -- will be included. Otherwise, all items including
30 -- non-cost enabled items will be included - in which case
31 -- all items in the range, regardless of whether they are
32 -- expense or have zero cost, will be included.
33 -- p_one_time_item IN NUMBER
34 -- If this parameter is 1, indicates that a row with null
35 -- item id should be included for one-time items. When called from
36 -- the Receiving Value Report, the parameter should be 1 so as
37 -- to include one-time (description) items. If any value other
38 -- than 1, one-time items will not be included.
39 -- x_return_status OUT NOCOPY VARCHAR2 Required
40 -- Version : Current version 1.0
41 -- Initial version 1.0
42 -- End of comments
43 PROCEDURE Populate_ItemList(
44 p_api_version IN NUMBER,
45 p_organization_id IN NUMBER,
46 p_cost_type_id IN NUMBER := NULL,
47 p_item_from IN VARCHAR2 := NULL,
48 p_item_to IN VARCHAR2 := NULL,
49 p_category_set_id IN NUMBER,
50 p_category_from IN VARCHAR2 := NULL,
51 p_category_to IN VARCHAR2 := NULL,
52 p_zero_cost_only IN NUMBER := NULL,
53 p_expense_item IN NUMBER := NULL,
54 p_cost_enabled_only IN NUMBER := NULL,
55 p_one_time_item IN NUMBER := NULL,
56 x_return_status OUT NOCOPY VARCHAR2
57 );
58
59 -- Start of comments
60 -- API name : Populate_CostGroupList
61 -- Type : Private
62 -- Pre-reqs : None
63 -- Function : Populates temporary table CST_CG_LIST_TEMP with the cost
64 -- groups that match the given specifications.
65 -- Parameters : p_api_version IN NUMBER Required
66 -- p_organization_id IN NUMBER Required
67 -- p_cost_group_from IN VARCHAR2
68 -- p_cost_group_to IN VARCHAR2
69 -- p_own IN NUMBER
70 -- This identifier specifies if the cost group list
71 -- should include cost groups of all the organizations
72 -- that are in the current organization's shipping
73 -- network.
74 -- x_return_status OUT NOCOPY VARCHAR2 Required
75 -- Version : Current version 1.0
76 -- Initial version 1.0
77 -- End of comments
78 PROCEDURE Populate_CostGroupList(
79 p_api_version IN NUMBER,
80 p_organization_id IN NUMBER,
81 p_cost_group_from IN VARCHAR2 := NULL,
82 p_cost_group_to IN VARCHAR2 := NULL,
83 p_own IN NUMBER := 1,
84 x_return_status OUT NOCOPY VARCHAR2
85 );
86
87 -- Start of comments
88 -- API name : Populate_SubinventoryList
89 -- Type : Private
90 -- Pre-reqs : None
91 -- Function : Populates temporary table CST_SUB_LIST_TEMP with the
92 -- subinventories that match the given specifications.
93 -- Parameters : p_api_version IN NUMBER Required
94 -- p_organization_id IN NUMBER Required
95 -- p_subinventory_from IN VARCHAR2
96 -- p_subinventory_to IN VARCHAR2
97 -- p_expense_sub IN NUMBER
98 -- This parameter indicates whether to include expense
99 -- subinventories.
100 -- x_return_status OUT NOCOPY VARCHAR2 Required
101 -- Version : Current version 1.0
102 -- Initial version 1.0
103 -- End of comments
104 PROCEDURE Populate_SubinventoryList(
105 p_api_version IN NUMBER,
106 p_organization_id IN NUMBER,
107 p_subinventory_from IN VARCHAR2 := NULL,
108 p_subinventory_to IN VARCHAR2 := NULL,
109 p_expense_sub IN NUMBER := NULL,
110 x_return_status OUT NOCOPY VARCHAR2
111 );
112
113 -- Start of comments
114 -- API name : Calculate_OnhandQty
115 -- Type : Private
116 -- Pre-reqs : Calls to Populate_ItemList, Populate_SubinventoryList,
117 -- and Populate_CostGroupList.
118 -- Function : Populates temporary table CST_INV_QTY_TEMP with the
119 -- quantity of items in the cost groups and subinventories
120 -- that match the given specifications.
121 -- Parameters : p_api_version IN NUMBER Required
122 -- p_organization_id IN NUMBER Required
123 -- p_valuation_date IN DATE
124 -- This paramater indicates the date at which the onhand
125 -- quantity needs to be calculated. If no date is
126 -- specified, the procedure will calculate the current
127 -- onhand quantity.
128 -- p_qty_by_revision IN NUMBER
129 -- This parameter indicates whether the item revision
130 -- information needs to be gathered.
131 -- p_zero_qty IN NUMBER
132 -- This parameter is valid only for current valuation
133 -- (p_valuation_date is NULL) to include items with zero
134 -- onhand quantity.
135 -- p_unvalued_txns IN NUMBER
136 -- This parameter indicates whether to include uncosted
137 -- transactions in the calculation for onhand quantity.
138 -- x_return_status OUT NOCOPY VARCHAR2 Required
139 -- Version : Current version 1.0
140 -- Initial version 1.0
141 -- End of comments
142 PROCEDURE Calculate_OnhandQty(
143 p_api_version IN NUMBER,
144 p_organization_id IN NUMBER,
145 p_valuation_date IN DATE := NULL,
146 p_qty_by_revision IN NUMBER := NULL,
147 p_zero_qty IN NUMBER := NULL,
148 p_unvalued_txns IN NUMBER := NULL,
149 x_return_status OUT NOCOPY VARCHAR2
150 );
151
152 -- Start of comments
153 -- API name : Calculate_IntransitQty
154 -- Type : Private
155 -- Pre-reqs : Calls to Populate_ItemList and Populate_CostGroupList.
156 -- Function : Populates temporary table CST_INV_QTY_TEMP with the
157 -- quantity of intransit items in the cost groups that
158 -- match the given specifications.
159 -- Parameters : p_api_version IN NUMBER Required
160 -- p_organization_id IN NUMBER Required
161 -- p_valuation_date IN DATE
162 -- This parameter indicates the date at which the
163 -- intransit quantity needs to be calculated. If no date
164 -- is specified, the procedure will calculate the current
165 -- intransit quantity.
166 -- p_receipt IN NUMBER
167 -- This parameter indicates whether to calculate the
168 -- intransit quantity that is coming to the current
169 -- organization
170 -- p_shipment IN NUMBER
171 -- This parameter indicates whether to calculate the
172 -- intransit quantity that is coming from the current
173 -- organization
174 -- p_detail IN NUMBER
175 -- This parameter indicates whether to calculate the
176 -- intransit quantity at the shipment line level
177 -- granularity. The default is no.
178 -- p_unvalued_txns IN NUMBER
179 -- This parameter indicates whether to include uncosted
180 -- transactions in the calculation for intransit quantity.
181 -- x_return_status OUT NOCOPY VARCHAR2 Required
182 -- Version : Current version 1.0
183 -- Initial version 1.0
184 -- End of comments
185 PROCEDURE Calculate_IntransitQty(
186 p_api_version IN NUMBER,
187 p_organization_id IN NUMBER,
188 p_valuation_date IN DATE := NULL,
189 p_receipt IN NUMBER := NULL,
190 p_shipment IN NUMBER := NULL,
191 p_detail IN NUMBER := NULL,
192 p_own IN NUMBER := NULL,
193 p_unvalued_txns IN NUMBER := NULL,
194 x_return_status OUT NOCOPY VARCHAR2
195 );
196
197 -- Start of comments
198 -- API name : Calculate_ReceivingQty
199 -- Type : Private
200 -- Pre-reqs : Calls to Populate_ItemList and Populate_CostGroupList.
201 -- Function : Populates temporary table CST_INV_QTY_TEMP with the
202 -- quantity of items in receiving dock in the cost groups
203 -- that match the given specifications.
204 -- Parameters : p_api_version IN NUMBER Required
205 -- p_organization_id IN NUMBER Required
206 -- p_valuation_date IN DATE
207 -- This parameter indicates the date at which the
208 -- receiving quantity needs to be calculated. If no date
209 -- is specified, the procedure will calculate the current
210 -- receiving quantity.
211 -- p_qty_by_revision IN NUMBER
212 -- This parameter indicates whether the item revision
213 -- information needs to be gathered.
214 -- p_include_period_end IN NUMBER
215 -- This parameter indicates whether receiving quantity
216 -- for period-end accrual PO shipments needs to be gathered.
217 -- If not, only online accrual PO shipments will be included.
218 -- x_return_status OUT NOCOPY VARCHAR2 Required
219 -- Version : Current version 1.0
220 -- Initial version 1.0
221 -- End of comments
222 PROCEDURE Calculate_ReceivingQty(
223 p_api_version IN NUMBER,
224 p_organization_id IN NUMBER,
225 p_valuation_date IN DATE := NULL,
226 p_qty_by_revision IN NUMBER := NULL,
227 p_include_period_end IN NUMBER := NULL,
228 x_return_status OUT NOCOPY VARCHAR2
229 );
230
231 -- Start of comments
232 -- API name : Get_ParentReceiveTxn
233 -- Type : Private
234 -- Pre-reqs : None
235 -- Function : Given the transaction_id passed in, returns the
236 -- parent Receive or Match transaction id in RT.
237 -- Parameters : p_rcv_transaction_id IN NUMBER
238 -- This is the transaction_id in RCV_TRANSACTIONS
239 -- for which this function will find the parent
240 -- Receive or Match transaction in RCV_TRANSACTIONS.
241 -- Version : Current version 1.0
242 -- Initial version 1.0
243 -- End of comments
244 FUNCTION Get_ParentReceiveTxn (
245 p_rcv_transaction_id IN NUMBER
246 )
247 RETURN NUMBER;
248
249 -- Start of comments
250 -- API name : Calculate_InventoryCost
251 -- Type : Private
252 -- Pre-reqs : Calls to Calculate_OnhandQty, Calculate_IntransitQty or
253 -- Calculate_ReceivingQty
254 -- Function : Populates temporary table CST_INV_COST_TEMP with the
255 -- cost of items CST_INV_QTY_TEMP.
256 -- Parameters : p_api_version IN NUMBER Required
257 -- p_valuation_date IN DATE
258 -- p_organization_id IN NUMBER
259 -- x_return_status OUT NOCOPY VARCHAR2 Required
260 -- Version : Current version 1.0
261 -- Initial version 1.0
262 -- End of comments
263 PROCEDURE Calculate_InventoryCost(
264 p_api_version IN NUMBER,
265 p_valuation_date IN DATE := NULL,
266 p_organization_id IN NUMBER,
267 x_return_status OUT NOCOPY VARCHAR2
268 );
269
270 END CST_Inventory_PVT;