1 PACKAGE INV_UOM_API_PUB AUTHID CURRENT_USER AS
2 /* $Header: INVUOMPS.pls 120.0.12020000.3 2013/02/12 16:12:16 agembali noship $ */
3 /*#
4 * The UOM procedures allow users to create and update the UOM class,unit of measures,
5 * Standard,intra class , inter calss and lot specific conversion in inventory.
6 * @rep:scope public
7 * @rep:product INV
8 * @rep:lifecycle active
9 * @rep:displayname UOM Public API
10 * @rep:category BUSINESS_ENTITY INV_SETUP
11 */
12
13 -----------------------------------------------
14 -- Procedure
15 -- UOM_Class
16 --
17 -- Description
18 -- Creates UOM class data.
19 --
20 -- Input Paramters
21 -- P_UOM_CLASS uom_class data.
22 -- P_DESCRIPTION class description.
23 -- p_base_unit_of_measure base unit of measure.
24 -- p_base_uom_code base uom code.
25 -- P_UOM_DESCRIPTION unit of measure description
26 -- p_disable_date In active date of class.
27 -- p_attribute 1-15 DFF of Unit of measure classes.
28 -- P_ATTRIBUTE_CATEGORY Context of UOM Class
29 -- P_UOM_ATTRIBUTE_CATEGORY Context of Unit of Measure
30 -- P_UOM_ATTRIBUTE 1 - 15 DFF of Define Unit of Measures
31 -- p_action_type Action type of UOM class that whether uom class need to insert or update
32 -- i.e 'I' or 'U'
33 -- Output Parameters
34 -- x_return_status = fnd_api.g_ret_sts_success, if succeeded
35 -- = fnd_api.g_ret_sts_exc_error, if an expected error occurred
36 -- = fnd_api.g_ret_sts_unexp_error, if an unexpected error occurred
37 --
38 -- x_msg_count = Message count
39 -- x_msg_data = Message text
40 --
41 --------------------------------------------
42
43 /*#
44 * Use this procedure to create a new UOM class.
45 * For given base unit of measure , base uom code and uom class , this procedure creates the new uom class with that base unit of measure
46 * if the base unit of measure is not already created.
47 * If the uom class is already defined then it returns the error message.
48 * @param x_return_status Return status indicating success or failure
49 * @paraminfo {@rep:required}
50 * @param x_msg_count Returns the number of messages in message list
51 * @paraminfo {@rep:required}
52 * @param x_msg_data Returns the message text
53 * @paraminfo {@rep:required}
54 * @param p_uom_class Identifier of newly creating uom class name.
55 * @paraminfo {@rep:required}
56 * @param p_description Identifier for the uom class description.
57 * @paraminfo {@rep:Not Mandatory}
58 * @param p_base_unit_of_measure Identifier for the base unit of measure for the uom class.
59 * @paraminfo {@rep:required}
60 * @param p_base_uom_code Identifier for the base unit of measure code of length 3 for the uom class.
61 * @paraminfo {@rep:required}
62 * @param p_uom_description Identifier for the base unit of measure description.
63 * @paraminfo {@rep:Not Mandatory}
64 * @param p_disable_date Identifier for the inactive date of the uom class.
65 * @paraminfo {@rep:Not Mandatory}
66 * @param p_attribute1 Holds the Descriptive FlexField attribute for the uom class
67 * @paraminfo {@rep:Not Mandatory}
68 * @param p_attribute2 Holds the Descriptive FlexField attribute for the uom class
69 * @paraminfo {@rep:Not Mandatory}
70 * @param p_attribute3 Holds the Descriptive FlexField attribute for the uom class
71 * @paraminfo {@rep:Not Mandatory}
72 * @param p_attribute4 Holds the Descriptive FlexField attribute for the uom class
73 * @paraminfo {@rep:Not Mandatory}
74 * @param p_attribute5 Holds the Descriptive FlexField attribute for the uom class
75 * @paraminfo {@rep:Not Mandatory}
76 * @param p_attribute6 Holds the Descriptive FlexField attribute for the uom class
77 * @paraminfo {@rep:Not Mandatory}
78 * @param p_attribute7 Holds the Descriptive FlexField attribute for the uom class
79 * @paraminfo {@rep:Not Mandatory}
80 * @param p_attribute8 Holds the Descriptive FlexField attribute for the uom class
81 * @paraminfo {@rep:Not Mandatory}
82 * @param p_attribute9 Holds the Descriptive FlexField attribute for the uom class
83 * @paraminfo {@rep:Not Mandatory}
84 * @param p_attribute10 Holds the Descriptive FlexField attribute for the uom class
85 * @paraminfo {@rep:Not Mandatory}
86 * @param p_attribute11 Holds the Descriptive FlexField attribute for the uom class
87 * @paraminfo {@rep:Not Mandatory}
88 * @param p_attribute12 Holds the Descriptive FlexField attribute for the uom class
89 * @paraminfo {@rep:Not Mandatory}
90 * @param p_attribute13 Holds the Descriptive FlexField attribute for the uom class
91 * @paraminfo {@rep:Not Mandatory}
92 * @param p_attribute14 Holds the Descriptive FlexField attribute for the uom class
93 * @paraminfo {@rep:Not Mandatory}
94 * @param p_attribute15 Holds the Descriptive FlexField attribute for the uom class
95 * @paraminfo {@rep:Not Mandatory}
96 * @param p_attribute_category Holds the Context of the Descriptive FlexField for the uom class
97 * @paraminfo {@rep:Not Mandatory}
98 * @param p_uom_attribute1 Holds the Descriptive FlexField attribute for the unit of measure
99 * @paraminfo {@rep:Not Mandatory}
100 * @param p_uom_attribute2 Holds the Descriptive FlexField attribute for the unit of measure
101 * @paraminfo {@rep:Not Mandatory}
102 * @param p_uom_attribute3 Holds the Descriptive FlexField attribute for the unit of measure
103 * @paraminfo {@rep:Not Mandatory}
104 * @param p_uom_attribute4 Holds the Descriptive FlexField attribute for the unit of measure
105 * @paraminfo {@rep:Not Mandatory}
106 * @param p_uom_attribute5 Holds the Descriptive FlexField attribute for the unit of measure
107 * @paraminfo {@rep:Not Mandatory}
108 * @param p_uom_attribute6 Holds the Descriptive FlexField attribute for the unit of measure
109 * @paraminfo {@rep:Not Mandatory}
110 * @param p_uom_attribute7 Holds the Descriptive FlexField attribute for the unit of measure
111 * @paraminfo {@rep:Not Mandatory}
112 * @param p_uom_attribute8 Holds the Descriptive FlexField attribute for the unit of measure
113 * @paraminfo {@rep:Not Mandatory}
114 * @param p_uom_attribute9 Holds the Descriptive FlexField attribute for the unit of measure
115 * @paraminfo {@rep:Not Mandatory}
116 * @param p_uom_attribute10 Holds the Descriptive FlexField attribute for the unit of measure
117 * @paraminfo {@rep:Not Mandatory}
118 * @param p_uom_attribute11 Holds the Descriptive FlexField attribute for the unit of measure
119 * @paraminfo {@rep:Not Mandatory}
120 * @param p_uom_attribute12 Holds the Descriptive FlexField attribute for the unit of measure
121 * @paraminfo {@rep:Not Mandatory}
122 * @param p_uom_attribute13 Holds the Descriptive FlexField attribute for the unit of measure
123 * @paraminfo {@rep:Not Mandatory}
124 * @param p_uom_attribute14 Holds the Descriptive FlexField attribute for the unit of measure
125 * @paraminfo {@rep:Not Mandatory}
126 * @param p_uom_attribute15 Holds the Descriptive FlexField attribute for the unit of measure
127 * @paraminfo {@rep:Not Mandatory}
128 * @param p_uom_attribute_category Holds the Context of the Descriptive FlexField for the unit of measure
129 * @paraminfo {@rep:Not Mandatory}
130 * @param p_action_type Identifier for creation or updation flag of UOM Class.
131 * @paraminfo {@rep:required}
132 * @rep:scope public
133 * @rep:lifecycle active
134 * @rep:displayname UOM Class
135 */
136 PROCEDURE uom_class(
137 p_uom_class IN VARCHAR2,
138 p_description IN VARCHAR2 DEFAULT NULL,
139 p_base_unit_of_measure IN VARCHAR2,
140 p_base_uom_code IN VARCHAR2,
141 p_uom_description IN VARCHAR2 DEFAULT NULL,
142 p_disable_date IN DATE DEFAULT NULL,
143 p_attribute_category IN VARCHAR2 DEFAULT NULL,
144 p_attribute1 IN VARCHAR2 DEFAULT NULL,
145 p_attribute2 IN VARCHAR2 DEFAULT NULL,
146 p_attribute3 IN VARCHAR2 DEFAULT NULL,
147 p_attribute4 IN VARCHAR2 DEFAULT NULL,
148 p_attribute5 IN VARCHAR2 DEFAULT NULL,
149 p_attribute6 IN VARCHAR2 DEFAULT NULL,
150 p_attribute7 IN VARCHAR2 DEFAULT NULL,
151 p_attribute8 IN VARCHAR2 DEFAULT NULL,
152 p_attribute9 IN VARCHAR2 DEFAULT NULL,
153 p_attribute10 IN VARCHAR2 DEFAULT NULL,
154 p_attribute11 IN VARCHAR2 DEFAULT NULL,
155 p_attribute12 IN VARCHAR2 DEFAULT NULL,
156 p_attribute13 IN VARCHAR2 DEFAULT NULL,
157 p_attribute14 IN VARCHAR2 DEFAULT NULL,
158 p_attribute15 IN VARCHAR2 DEFAULT NULL,
159 p_uom_attribute_category IN VARCHAR2 DEFAULT NULL,
160 p_uom_attribute1 IN VARCHAR2 DEFAULT NULL,
161 p_uom_attribute2 IN VARCHAR2 DEFAULT NULL,
162 p_uom_attribute3 IN VARCHAR2 DEFAULT NULL,
163 p_uom_attribute4 IN VARCHAR2 DEFAULT NULL,
164 p_uom_attribute5 IN VARCHAR2 DEFAULT NULL,
165 p_uom_attribute6 IN VARCHAR2 DEFAULT NULL,
166 p_uom_attribute7 IN VARCHAR2 DEFAULT NULL,
167 p_uom_attribute8 IN VARCHAR2 DEFAULT NULL,
168 p_uom_attribute9 IN VARCHAR2 DEFAULT NULL,
169 p_uom_attribute10 IN VARCHAR2 DEFAULT NULL,
170 p_uom_attribute11 IN VARCHAR2 DEFAULT NULL,
171 p_uom_attribute12 IN VARCHAR2 DEFAULT NULL,
172 p_uom_attribute13 IN VARCHAR2 DEFAULT NULL,
173 p_uom_attribute14 IN VARCHAR2 DEFAULT NULL,
174 p_uom_attribute15 IN VARCHAR2 DEFAULT NULL,
175 p_action_type IN VARCHAR2 DEFAULT NULL,
176 x_msg_count OUT nocopy NUMBER,
177 x_msg_data OUT nocopy VARCHAR2,
178 x_return_status OUT nocopy VARCHAR2 );
179 --------------------------------------------
180 -- Procedure
181 -- Unit_Of_Measure
182 --
183 -- Description
184 -- Creates Unit of measure data.
185 --
186 -- Input Paramters
187 -- P_UOM_CLASS uom_class data.
188 -- P_DESCRIPTION uom class description.
189 -- p_unit_of_measure unit of measure.
190 -- p_uom_code uom code.
191 -- p_disable_date InActive date of unit of measure.
192 -- P_ATTRIBUTE_CATEGORY Context of Unit of Measure
193 -- p_attribute 1-15 DFF of Define Unit of measure.
194 -- p_action_type Action type whether insert 'I' or update 'U'
195 -- Output Parameters
196 -- x_return_status = fnd_api.g_ret_sts_success, if succeeded
197 -- = fnd_api.g_ret_sts_exc_error, if an expected error occurred
198 -- = fnd_api.g_ret_sts_unexp_error, if an unexpected error occurred
199 --
200 -- x_msg_count = Message count
201 -- x_msg_data = Message text
202 --
203 -----------------------------------------------
204
205 /*#
206 * Use this procedure to create a new unit of measure.
207 * For given unit of measure , uom code and uom class , this procedure creates the new unit of measure
208 * and if the uom class is not defined then it returns the error message.
209 * This procedure is used to create non-base unit of measures only.
210 * @param x_return_status Return status indicating success or failure
211 * @paraminfo {@rep:required}
212 * @param x_msg_count Returns the number of messages in message list
213 * @paraminfo {@rep:required}
214 * @param x_msg_data Returns the message text
215 * @paraminfo {@rep:required}
216 * @param p_uom_class Identifier of existing uom class name.
217 * @paraminfo {@rep:required}
218 * @param p_description Identifier for the unit of measure description.
219 * @paraminfo {@rep:Not Mandatory}
220 * @param p_unit_of_measure Identifier for the non-base unit of measure for the uom class.
221 * @paraminfo {@rep:required}
222 * @param p_uom_code Identifier for the base unit of measure code of length 3 for the uom class.
223 * @paraminfo {@rep:required}
224 * @param p_disable_date Identifier for the inactive date of the unit of measure
225 * @paraminfo {@rep:Not Mandatory}
226 * @param p_attribute1 Holds the Descriptive FlexField attribute for the unit of measure
227 * @paraminfo {@rep:Not Mandatory}
228 * @param p_attribute2 Holds the Descriptive FlexField attribute for the unit of measure
229 * @paraminfo {@rep:Not Mandatory}
230 * @param p_attribute3 Holds the Descriptive FlexField attribute for the unit of measure
231 * @paraminfo {@rep:Not Mandatory}
232 * @param p_attribute4 Holds the Descriptive FlexField attribute for the unit of measure
233 * @paraminfo {@rep:Not Mandatory}
234 * @param p_attribute5 Holds the Descriptive FlexField attribute for the unit of measure
235 * @paraminfo {@rep:Not Mandatory}
236 * @param p_attribute6 Holds the Descriptive FlexField attribute for the unit of measure
237 * @paraminfo {@rep:Not Mandatory}
238 * @param p_attribute7 Holds the Descriptive FlexField attribute for the unit of measure
239 * @paraminfo {@rep:Not Mandatory}
240 * @param p_attribute8 Holds the Descriptive FlexField attribute for the unit of measure
241 * @paraminfo {@rep:Not Mandatory}
242 * @param p_attribute9 Holds the Descriptive FlexField attribute for the unit of measure
243 * @paraminfo {@rep:Not Mandatory}
244 * @param p_attribute10 Holds the Descriptive FlexField attribute for the unit of measure
245 * @paraminfo {@rep:Not Mandatory}
246 * @param p_attribute11 Holds the Descriptive FlexField attribute for the unit of measure
247 * @paraminfo {@rep:Not Mandatory}
248 * @param p_attribute12 Holds the Descriptive FlexField attribute for the unit of measure
249 * @paraminfo {@rep:Not Mandatory}
250 * @param p_attribute13 Holds the Descriptive FlexField attribute for the unit of measure
251 * @paraminfo {@rep:Not Mandatory}
252 * @param p_attribute14 Holds the Descriptive FlexField attribute for the unit of measure
253 * @paraminfo {@rep:Not Mandatory}
254 * @param p_attribute15 Holds the Descriptive FlexField attribute for the unit of measure
255 * @paraminfo {@rep:Not Mandatory}
256 * @param p_attribute_category Holds the Context of the Descriptive FlexField for the unit of measure
257 * @paraminfo {@rep:Not Mandatory}
258 * @param p_action_type Identifier for creation or updation flag of Unit Of Measuere
259 * @paraminfo {@rep:required}
260 * @rep:scope public
261 * @rep:lifecycle active
262 * @rep:displayname Unit Of Measure
263 */
264 PROCEDURE unit_of_measure (
265 p_uom_class IN VARCHAR2,
266 p_description IN VARCHAR2,
267 p_unit_of_measure IN VARCHAR2,
268 p_uom_code IN VARCHAR2,
269 p_disable_date IN DATE DEFAULT NULL,
270 p_attribute_category IN VARCHAR2 DEFAULT NULL,
271 p_attribute1 IN VARCHAR2 DEFAULT NULL,
272 p_attribute2 IN VARCHAR2 DEFAULT NULL,
273 p_attribute3 IN VARCHAR2 DEFAULT NULL,
274 p_attribute4 IN VARCHAR2 DEFAULT NULL,
275 p_attribute5 IN VARCHAR2 DEFAULT NULL,
276 p_attribute6 IN VARCHAR2 DEFAULT NULL,
277 p_attribute7 IN VARCHAR2 DEFAULT NULL,
278 p_attribute8 IN VARCHAR2 DEFAULT NULL,
279 p_attribute9 IN VARCHAR2 DEFAULT NULL,
280 p_attribute10 IN VARCHAR2 DEFAULT NULL,
281 p_attribute11 IN VARCHAR2 DEFAULT NULL,
282 p_attribute12 IN VARCHAR2 DEFAULT NULL,
283 p_attribute13 IN VARCHAR2 DEFAULT NULL,
284 p_attribute14 IN VARCHAR2 DEFAULT NULL,
285 p_attribute15 IN VARCHAR2 DEFAULT NULL,
286 p_action_type IN VARCHAR2 DEFAULT NULL,
287 x_msg_count OUT nocopy NUMBER,
288 x_msg_data OUT nocopy VARCHAR2,
289 x_return_status OUT nocopy VARCHAR2 );
290 -------------------------------------------------------
291 -- Procedure
292 -- UOM_Conversion
293 --
294 -- Description
295 -- Creates UOM conversion data.
296 --
297 -- Input Paramters
298 -- p_lot_number Lot number.
299 -- p_from_uom_code From uom code
300 -- p_to_uom_code TO uom code.
301 -- p_item_id Inventory item id.
302 -- p_organization_id Organization id.
303 -- p_uom_rate Conversion rate.
304 -- p_reason_id Reason.
305 -- p_onhand_update Number Update onhand
306 -- (1 - No, 2 - Yes which is based on update_type)
307 -- p_update_type number Type of update to onhand
308 -- 1 - recalculate Batch Primary qty.
309 -- 2 - recalculate Batch Secondary qty.
310 -- 3 - recalculate Onhand Primary qty.
311 -- 4 - recalculate Onhand Secondary qty.
312 --
313 -- p_disable_date In active date.
314 -- p_action_type Action type whether insert 'I' or update 'U'
315 -- Output Parameters
316 -- x_return_status = fnd_api.g_ret_sts_success, if succeeded
317 -- = fnd_api.g_ret_sts_exc_error, if an expected error occurred
318 -- = fnd_api.g_ret_sts_unexp_error, if an unexpected error occurred
319 --
320 -- x_msg_count = Message count
321 -- x_msg_data = Message text
322 --
323 -----------------------------------------------------------
324
325 /*#
326 * Use this procedure to create or update the conversion standard intra class , inter class as well as lot specific uom conversion.
327 * If we pass the lot number then it considers that uom conversion is for lot specific conversion otherwise standard intra or
328 * inter class uom conversion.
329 * We can use the same procedure to create or update the conversion by passing action type value.
330 * @param x_return_status Return status indicating success or failure
331 * @paraminfo {@rep:required}
332 * @param x_msg_count Returns the number of messages in message list
333 * @paraminfo {@rep:required}
334 * @param x_msg_data Returns the message text
335 * @paraminfo {@rep:required}
336 * @param P_LOT_NUMBER Identifier of existing lot number.
337 * @paraminfo {@rep:Not Mandatory}
338 * @param P_FROM_UOM_CODE Identifier for the from unit of measure for defining the conversion.
339 * @paraminfo {@rep:required}
340 * @param P_TO_UOM_CODE Identifier for the to unit of measure for defining the conversion.
341 * @paraminfo {@rep:required}
342 * @param P_ITEM_ID Identifier for the item to which going to create or update the conversion
343 * @paraminfo {@rep:required}
344 * @param P_ORG_ID Identifier for the organization to which the item belongs to apply the conversion
345 * @paraminfo {@rep:Not Mandatory}
346 * @param P_UOM_RATE Identifier for the conversion rate to define or update the conversion.
347 * @paraminfo {@rep:required}
348 * @param P_DISABLE_DATE Identifier for inactivating the date of the conversion.
349 * @paraminfo {@rep:Not Mandatory}
350 * @param P_REASON_ID Identifier for Reason of creating or updating conversion.
351 * @paraminfo {@rep:Not Mandatory}
352 * @param P_ONHAND_UPDATE Identifier for indicating whether onhand update allowed or not.
353 * @paraminfo {@rep:required}
354 * @param P_UPDATE_TYPE Identifier for indicating whether onhand update is done for the batch or for discrete
355 * @paraminfo {@rep:required}
356 * @param p_action_type Identifier for the action to take on the conversion that insert or update the conversion.
357 * @paraminfo {@rep:required}
358 * @rep:scope public
359 * @rep:lifecycle active
360 * @rep:displayname UOM Conversion
361 */
362 PROCEDURE UOM_CONVERSION (
363 p_lot_number IN VARCHAR2 DEFAULT NULL,
364 p_from_uom_code IN VARCHAR2,
365 p_to_uom_code IN VARCHAR2,
366 P_ITEM_ID IN NUMBER,
367 p_org_id IN NUMBER DEFAULT NULL,
368 p_uom_rate IN NUMBER,
369 P_DISABLE_DATE IN DATE DEFAULT NULL,
370 p_reason_id IN NUMBER DEFAULT NULL,
371 p_onhand_update IN NUMBER,
372 p_update_type IN NUMBER,
373 p_action_type IN VARCHAR2,
374 x_msg_count OUT nocopy NUMBER,
375 x_msg_data OUT nocopy VARCHAR2,
376 x_return_status OUT nocopy VARCHAR2 );
377 END INV_UOM_API_PUB;