DBA Data[Home] [Help]

PACKAGE: APPS.INV_RESERVATION_GLOBAL

Source


1 PACKAGE inv_reservation_global AUTHID CURRENT_USER AS
2 /* $Header: INVRSVGS.pls 120.1 2005/10/20 18:38:02 vipartha noship $ */
3 --
4 -- The following constants are valid demand source type ids and
5 -- supply source type ids.
6 -- They are the same as TRANSACTION_SOURCE_TYPE_ID
7 -- in table MTL_TXN_SOURCE_TYPES.
8 g_source_type_po             CONSTANT NUMBER := 1 ;
9 g_source_type_oe             CONSTANT NUMBER := 2 ;
10 g_source_type_account        CONSTANT NUMBER := 3 ;
11 g_source_type_trans_order    CONSTANT NUMBER := 4 ;
12 g_source_type_wip            CONSTANT NUMBER := 5 ;
13 g_source_type_account_alias  CONSTANT NUMBER := 6 ;
14 g_source_type_internal_req   CONSTANT NUMBER := 7 ;
15 g_source_type_internal_ord   CONSTANT NUMBER := 8 ;
16 g_source_type_cycle_count    CONSTANT NUMBER := 9 ;
17 g_source_type_physical_inv   CONSTANT NUMBER := 10;
18 g_source_type_standard_cost  CONSTANT NUMBER := 11;
19 g_source_type_rma            CONSTANT NUMBER := 12;
20 g_source_type_inv            CONSTANT NUMBER := 13;
21 g_source_type_req            CONSTANT NUMBER := 17;
22 /**** {{ R12 Enhanced reservations code changes }}****/
23 g_source_type_asn	     CONSTANT NUMBER := 25;
24 g_source_type_intransit     CONSTANT NUMBER := 26;
25 g_source_type_rcv            CONSTANT NUMBER := 27;
26 /*** End R12 ***/
27 
28 /*** {{ R12 Enhanced reservations code changes }}****/
29 g_wip_source_type_discrete CONSTANT NUMBER := 1;
30 g_wip_source_type_repetitive CONSTANT NUMBER := 2;
31 g_wip_source_type_flow CONSTANT NUMBER := 4;
32 g_wip_source_type_osfm CONSTANT NUMBER := 5;
33 g_wip_source_type_eam CONSTANT NUMBER := 6;
34 g_wip_source_type_fpo CONSTANT NUMBER := 9;
35 g_wip_source_type_batch CONSTANT NUMBER := 10;
36 g_wip_source_type_cmro CONSTANT NUMBER := 15;
37 g_wip_source_type_depot CONSTANT NUMBER := 16;
38 
39 /*** End R12 ***/
40 --
41 -- Constants for revision control code
42 -- same as MTL_ENG_QUANTITY QuickCode in MFG_LOOKUPS
43 -- see TRM for table MTL_SYSTEM_ITEMS (column REVISION_QTY_CONTROL_CODE)
44 g_revision_control_no  CONSTANT NUMBER := 1;
45 g_revision_control_yes CONSTANT NUMBER := 2;
46 --
47 -- Constants for locator control code
48 -- same as MTL_LOCATION_CONTROL QuickCode in MFG_LOOKUPS
49 -- see TRM for table MTL_SYSTEM_ITEMS (column LOCATION_CONTROL_CODE)
50 g_locator_control_no            CONSTANT NUMBER := 1;
51 g_locator_control_prespecified  CONSTANT NUMBER := 2;
52 g_locator_control_dynamic       CONSTANT NUMBER := 3;
53 g_locator_control_by_sub        CONSTANT NUMBER := 4;
54 g_locator_control_by_item       CONSTANT NUMBER := 5;
55 --
56 -- Constants for lot control code
57 -- same as MTL_LOT_CONTROL QuickCode in MFG_LOOKUPS
58 -- see TRM for table MTL_SYSTEM_ITEMS (column LOT_CONTROL_CODE)
59 g_lot_control_no                CONSTANT NUMBER := 1;
60 g_lot_control_yes               CONSTANT NUMBER := 2;
61 --
62 -- Constants for serial number control code
63 -- same as MTL_SERIAL_NUMBER QuickCode in MFG_LOOKUPS
64 -- see TRM for table MTL_SYSTEM_ITEMS (column SERIAL_NUMBER_CONTROL_CODE)
65 g_serial_control_no             CONSTANT NUMBER := 1;
66 g_serial_control_predefined     CONSTANT NUMBER := 2;
67 g_serial_control_dynamic_inv    CONSTANT NUMBER := 5;
68 g_serial_control_dynamic_so     CONSTANT NUMBER := 6;
69 --
70 -- The following constants can be used as value for
71 -- the parameter p_sort_by_req_date in the procedure
72 -- query_reservation in the public and private api
73 g_query_no_sort       CONSTANT NUMBER := 1; -- default
74 g_query_req_date_asc  CONSTANT NUMBER := 2; -- by requirement date ascending
75 g_query_req_date_desc CONSTANT NUMBER := 3; -- by requirement date descending
76 --Bug 2828080 Following two new constants are added for shipping for
77 --query_reservation_for_om_hdr_line
78 g_query_req_date_inv_asc CONSTANT NUMBER:=4; --by requirement date ascending and
79                                                 -- followed by inv controls
80 g_query_req_date_inv_desc CONSTANT NUMBER:=5; --by requirement date descending
81                                               -- and followed by inv controls
82 /*** {{ R12 Enhanced reservations code changes }}****/
83 g_query_demand_ship_date_asc CONSTANT NUMBER:=6; --by requirement date followed by inv controls
84 g_query_demand_ship_date_desc CONSTANT NUMBER:=7; --by requirement date followed by inv controls
85 g_query_supply_rcpt_date_asc CONSTANT NUMBER:=8; --by requirement date followed by inv controls
86 g_query_supply_rcpt_date_desc CONSTANT NUMBER:=9; --by requirement date followed by inv controls
87 /*** End R12 ***/
88 
89 -- The following constants can be used as value for
90 -- the parameter p_cancel_order_mode in the procedure
91 -- query_reservation in the public and private api
92 g_cancel_order_no     CONSTANT NUMBER := 1; -- default
93 g_cancel_order_yes    CONSTANT NUMBER := 2; -- Sales Order to be cancelled
94 --
95 -- Error code
96 -- Used by various procedure to communicate what error occurred
97 g_err_no_error          CONSTANT NUMBER := 0;
98 g_err_unexpected        CONSTANT NUMBER := 1;
99 g_err_fail_to_lock_rec  CONSTANT NUMBER := 2;
100 g_err_rec_already_exist CONSTANT NUMBER := 3;
101 --
102 --
103 --
104 -- We create 5 tables as cache info for org, item, demand, supply, and sub.
105 -- When we get a request to validate information, we first
106 -- check our cached records. If we find info there good, otherwise we get
107 -- the info from Db and populate the cache, ready for future use.
108 --
109 -- Definition of record types in cache
110 -- The attributes in the record types are named the same as the corresponding
111 -- columns in the underlying db tables.
112 --
113 -- record type definition for an item record in cache
114 
115 -- Modified to call common API
116 /*TYPE item_record IS RECORD
117   (
118      inventory_item_id             NUMBER
119    , organization_id               NUMBER
120    , lot_control_code              NUMBER
121    , serial_number_control_code    NUMBER
122    , reservable_type               NUMBER
123    , restrict_subinventories_code  NUMBER
124    , restrict_locators_code        NUMBER
125    , revision_qty_control_code     NUMBER
126    , location_control_code         NUMBER
127    , primary_uom_code              VARCHAR2(3)
128    );
129 --
130 -- Record type definition for an org record in cache
131 TYPE organization_record IS RECORD
132   (
133      organization_id            NUMBER
134    , negative_inv_receipt_code  NUMBER
135    , project_reference_enabled  NUMBER
136    , stock_locator_control_code NUMBER
137    );
138 --
139 -- Record type definition for a subinventory record in cache
140 TYPE sub_record IS RECORD
141   (
142      subinventory_code    VARCHAR2(10)
143    , organization_id      NUMBER
144    , locator_type         NUMBER
145    , quantity_tracked     NUMBER
146    , asset_inventory      NUMBER
147    , reservable_type      NUMBER
148    );
149 --
150 */
151 SUBTYPE item_record IS MTL_SYSTEM_ITEMS%ROWTYPE;
152 SUBTYPE organization_record IS MTL_PARAMETERS%ROWTYPE;
153 SUBTYPE locator_record IS MTL_ITEM_LOCATIONS%ROWTYPE;
154 SUBTYPE sub_record IS MTL_SECONDARY_INVENTORIES%ROWTYPE;
155 SUBTYPE serial_record IS MTL_SERIAL_NUMBERS%ROWTYPE;
156 SUBTYPE lot_record IS MTL_LOT_NUMBERS%ROWTYPE;
157 
158 -- End addition for common API
159 -- Record type definition for a demand record in cache
160 TYPE demand_record IS RECORD
161   (
162      demand_source_type_id        NUMBER
163    , demand_source_header_id      NUMBER
164    , demand_source_line_id        NUMBER
165    , demand_source_name           VARCHAR2(30)
166    , is_valid                     NUMBER     -- currently not used
167    );
168 
169 -- Record type definition for a supply record in cache
170 TYPE supply_record IS RECORD
171   (
172      supply_source_type_id           NUMBER
173    , supply_source_header_id         NUMBER
174    , supply_source_line_id           NUMBER
175    , supply_source_name              VARCHAR2(30)
176    , is_valid                        NUMBER  -- currently not used
177    );
178 
179 /**** {{ R12 Enhanced reservations code changes }}****/
180 -- Record type definition for a supply record in cache
181 TYPE wip_record IS RECORD
182   (
183    wip_entity_id           NUMBER
184    , wip_entity_type         NUMBER
185    , wip_entity_job          VARCHAR2(15)
186    );
187 --
188 TYPE wip_record_cache IS TABLE OF wip_record
189   INDEX BY BINARY_INTEGER;
190 
191 g_wip_record_cache wip_record_cache;
192 /*** End R12 ***/
193 
194 
195 -- Definition of table types for the caches
196 TYPE item_record_cache IS TABLE OF item_record
197   INDEX BY BINARY_INTEGER;
198 --
199 TYPE organization_record_cache IS TABLE OF organization_record
200   INDEX BY BINARY_INTEGER;
201 --
202 TYPE sub_record_cache IS TABLE OF sub_record
203   INDEX BY BINARY_INTEGER;
204 --
205 TYPE demand_record_cache IS TABLE OF demand_record
206   INDEX BY BINARY_INTEGER;
207 --
208 TYPE supply_record_cache IS TABLE OF supply_record
209   INDEX BY BINARY_INTEGER;
210 --
211 -- Global variable for the caches
212 g_item_record_cache         item_record_cache;
213 g_organization_record_cache organization_record_cache;
214 g_sub_record_cache          sub_record_cache ;
215 g_demand_record_cache       demand_record_cache ;
216 g_supply_record_cache       supply_record_cache ;
217 --
218 -- Definition of serial number table type
219 /**** {{ R12 Enhanced reservations code changes }}****/
220 TYPE serial_number_rec_type IS RECORD
221   (
222    inventory_item_id NUMBER
223    ,serial_number VARCHAR2(30)
224    );
225 
226 TYPE serial_number_tbl_type IS TABLE OF serial_number_rec_type
227   INDEX BY BINARY_INTEGER;
228 
229 
230 TYPE rsv_serial_number_record IS RECORD
231   (
232    reservation_id          NUMBER
233    ,serial_number        VARCHAR2 (30)
234    );
235 
236 TYPE rsv_serial_number_table IS TABLE OF rsv_serial_number_record
237   INDEX BY BINARY_INTEGER;
238 
239 /*** End R12 ***/
240 
241 --
242 -- Topic
243 --   What is use for mtl_reservation_rec_type ? And
244 --   what the hell are those fnd_api.g_miss_xxx ?
245 --
246 -- The server side reservation apis use records of mtl_reservation_rec_type as
247 -- input and/or output parameters. The attributes are initialized to
248 -- fnd_api.g_miss_xxx corresponding to their datatypes. For detail discussion
249 -- about fnd_api.g_miss_xxx, please refers to the PLSQL Business Object API
250 -- Coding Standard, available from
251 -- http://www-apps.us.oracle.com/atg/standards/codestan.html
252 -- (link API Standards Draft).
253 --
254 -- Here is a short explaination for the purpose of g_miss_xxx. We have APIs
255 -- such as create, update, transfer, delete reservations. When user calls
256 -- create_reservation, he/she needs to pass all information needed to the api.
257 -- These information are grouped into a record type which is
258 -- mtl_reservation_rec_type (similar to struct in C programming language).
259 -- So he/she can define a variable of mtl_reservation_rec_type, assign values
260 -- to all attributes, and call the create_reservation api with the variable as
261 -- an input parameter. Some information might not be available or applicable to
262 -- the particular reservation the user wants to create, e.g. there is no
263 -- revision control for the item, so he/she passes null as the values for such
264 -- attributes.
265 -- In the case of update, the user needs to pass 2 variables of the record
266 -- type, one for identifying the existing reservation, one for new values of
267 -- updates. The user might want to change some attributes but not all.
268 -- For example, a module in Order Entry might to change the value of
269 -- demand_source_name from "For Chrismas" to "For Thanksgiving" while
270 -- keeps the values of all other attributes of the reservation unchanged.
271 -- The problem is what should be passed as the value of those attributes,
272 -- such as supply_source_name. If null is passed, should the api change the
273 -- value of supply_source_name to null, or keep it unchanged. How would the api
274 -- distinguishes this from the case when a module does want to change the
275 -- supply_source_name to null. The source of the confusion comes from the fact
276 -- that null can not be used to represent both "don't care/don't changed"
277 -- and "null". So constants like g_miss_xxx are introduced to represent
278 -- "don't care/don't changed". Null is considered a value for these attributes.
279 -- Users should use g_miss_xxx when they means "don't care/don't changed"
280 -- and use null when they means "value is null".
281 --
282 -- By default, all attributes are initialized to g_miss_xxx
283 --
284 --
285 -- Description of attributes in the record type
286 --  reservation_id                reservation id
287 --  requirement_date              requirement date of the reservation
291 --  demand_source_name            demand source name
288 --  organization_id               organization id of the item
289 --  inventory_item_id             the inventory item id of the item
290 --  demand_source_type_id         demand source type id (see constants above)
292 --  demand_source_header_id       demand source header id
293 --  demand_source_line_id         demand source line id
294 --  primary_uom_code              primary uom code of the item
295 --  primary_uom_id                primary uom id of the item
296 --                                (currently not used)
297 --  reservation_uom_code          reservation uom code of the item
298 --  reservation_uom_id            reservation uom id of the item
299 --                                (currently not used)
300 --  reservation_quantity          quantity in reservation uom code
301 --  primary_reservation_quantity  quantity in primary uom code
302 --  autodetail_group_id           autodetail group id
303 --                                (used by autodetail program)
304 --  external_source_code          external source code
305 --                                (for compatibility to early version)
306 --  external_source_line_id       external source line id
307 --                                (for compatibility to early version)
308 --  supply_source_type_id         supply source type id (see contants above)
309 --  supply_source_header_id       supply source header id
310 --  supply_source_line_id         supply source line id
311 --  supply_source_name            supply source name
312 --  supply_source_line_detail     supply source line detail
313 --  revision                      revision of the item (null if no revision
314 --                                control or the reservation is at the
315 --                                item level)
316 --  subinventory_code             subinventory code for the sub
317 --                                (null if the reservation is at the item,
318 --                                revision or lot level)
319 --  subinventory_id               not currently used
320 --  locator_id                    locator id for the locator
321 --                                (null if no locator control or
322 --                                the reservation is at item, revision
323 --                                , lot, or subinventory level)
324 --  lot_number                    lot number for the item
325 --                                (null if no lot control or the reservation
326 --                                is at the item , or revision level)
327 --  lot_number_id                 not currently used
328 --  pick_slip_number              pick slip number (for picking)
329 --  lpn_id                        license plate number (not currently used)
330 --  ship_ready_flag               whether the reserved item
331 --                               is ship ready (used by shipping)
332 --  crossdock_flag               indicates whether it is a crossdocked
333 --                               reservation
334 -- crossdock_criteria_id         this will hold the crossdock rule that
335 --                                created the reservation
336 -- demand_source_line_detail     demand source line detail (delivery detail
337 --                               id for sales order reservations
338 -- serial_reservation_quantity   holds the number of serials reserved
339 --                               against that reservation record
340 -- supply_receipt_date           this is the expected date when the supply
341 --                                 will be fulfilled
342 -- demand_ship_date              this is the date when the demand will be
343 --                               fulfilled
344 -- project_id                    holds the project id of the demand
345 --                               document
346 -- task_id                       holds the task_id of the demand document
347 -- orig_supply_source_****      holds the supply that originally created
348 --                              that reservation record
349 -- orig_demand_source_****      holds the demand that originally created
350 --                              that reservation record
351 -- The above two information is to preserve the history of the supply and
352 -- demand that originally created the reservation. This is used for
353 -- transferring the reservation back to the original document
354 
355 
356 
357 --
358 -- Note
359 --   The current implementation of the reservation system requres that
360 --   reservations be made at a hierarchial fashion. The levels of the hierarchy
361 --   are, for top to bottom, item, revision, lot, subinventory, locator,
362 --   and in the future, serial number. Some levels like revision, lot,
363 --   locator, and serial number are optional if the corresponding contorls
364 --   are not enforced. You can not make a reservation at a lower level
365 --   without specifying the info at all higher levels. For example, to reserve
366 --   an item at subinventory "Stores", you need to specify the which revision
367 --   if the item is under revision control, and lot, if the item is under
368 --   lot control.
369 --   INVCONV
370 --   Add secondary_ columns for DUAL UOM
371 TYPE mtl_reservation_rec_type is RECORD
372   (
373       reservation_id                 NUMBER        := fnd_api.g_miss_num
374     , requirement_date               DATE          := fnd_api.g_miss_date
375     , organization_id                NUMBER        := fnd_api.g_miss_num
376     , inventory_item_id              NUMBER        := fnd_api.g_miss_num
377     , demand_source_type_id          NUMBER        := fnd_api.g_miss_num
378     , demand_source_name             VARCHAR2(30)  := fnd_api.g_miss_char
379     , demand_source_header_id        NUMBER        := fnd_api.g_miss_num
380     , demand_source_line_id          NUMBER        := fnd_api.g_miss_num
381     , demand_source_delivery         NUMBER        := fnd_api.g_miss_num
382     , primary_uom_code               VARCHAR2(3)   := fnd_api.g_miss_char
383     , primary_uom_id                 NUMBER        := fnd_api.g_miss_num
387     , reservation_uom_id             NUMBER        := fnd_api.g_miss_num
384     , secondary_uom_code             VARCHAR2(3)   := fnd_api.g_miss_char
385     , secondary_uom_id               NUMBER        := fnd_api.g_miss_num
386     , reservation_uom_code           VARCHAR2(3)   := fnd_api.g_miss_char
388     , reservation_quantity           NUMBER        := fnd_api.g_miss_num
389     , primary_reservation_quantity   NUMBER        := fnd_api.g_miss_num
390     , secondary_reservation_quantity NUMBER        := fnd_api.g_miss_num
391     , detailed_quantity              NUMBER        := fnd_api.g_miss_num
392     , secondary_detailed_quantity    NUMBER        := fnd_api.g_miss_num
393     , autodetail_group_id            NUMBER        := fnd_api.g_miss_num
394     , external_source_code           VARCHAR2(30)  := fnd_api.g_miss_char
395     , external_source_line_id        NUMBER        := fnd_api.g_miss_num
396     , supply_source_type_id          NUMBER        := fnd_api.g_miss_num
397     , supply_source_header_id        NUMBER        := fnd_api.g_miss_num
398     , supply_source_line_id          NUMBER        := fnd_api.g_miss_num
399     , supply_source_name             VARCHAR2(30)  := fnd_api.g_miss_char
400     , supply_source_line_detail      NUMBER        := fnd_api.g_miss_num
401     , revision                       VARCHAR2(3)   := fnd_api.g_miss_char
402     , subinventory_code              VARCHAR2(10)  := fnd_api.g_miss_char
403     , subinventory_id                NUMBER        := fnd_api.g_miss_num
404     , locator_id                     NUMBER        := fnd_api.g_miss_num
405     , lot_number                     VARCHAR2(80)  := fnd_api.g_miss_char -- INVCONV changed to 80 chars.
406     , lot_number_id                  NUMBER        := fnd_api.g_miss_num
407     , pick_slip_number               NUMBER        := fnd_api.g_miss_num
408     , lpn_id                         NUMBER        := fnd_api.g_miss_num
409     , attribute_category 	     VARCHAR2(30)  := fnd_api.g_miss_char
410     , attribute1         	     VARCHAR2(150) := fnd_api.g_miss_char
411     , attribute2         	     VARCHAR2(150) := fnd_api.g_miss_char
412     , attribute3         	     VARCHAR2(150) := fnd_api.g_miss_char
413     , attribute4         	     VARCHAR2(150) := fnd_api.g_miss_char
414     , attribute5         	     VARCHAR2(150) := fnd_api.g_miss_char
415     , attribute6         	     VARCHAR2(150) := fnd_api.g_miss_char
416     , attribute7         	     VARCHAR2(150) := fnd_api.g_miss_char
417     , attribute8         	     VARCHAR2(150) := fnd_api.g_miss_char
418     , attribute9         	     VARCHAR2(150) := fnd_api.g_miss_char
419     , attribute10        	     VARCHAR2(150) := fnd_api.g_miss_char
420     , attribute11        	     VARCHAR2(150) := fnd_api.g_miss_char
421     , attribute12        	     VARCHAR2(150) := fnd_api.g_miss_char
422     , attribute13        	     VARCHAR2(150) := fnd_api.g_miss_char
423     , attribute14        	     VARCHAR2(150) := fnd_api.g_miss_char
424     , attribute15	             VARCHAR2(150) := fnd_api.g_miss_char
425     , ship_ready_flag                NUMBER        := fnd_api.g_miss_num
426   , staged_flag                    VARCHAR2(1)   := fnd_api.g_miss_char
427 
428   /**** {{ R12 Enhanced reservations code changes }}****/
429   , crossdock_flag 		VARCHAR2(1) := fnd_api.g_miss_char
430   , crossdock_criteria_id	NUMBER        := fnd_api.g_miss_num
431   , demand_source_line_detail	NUMBER        := fnd_api.g_miss_num
432   , serial_reservation_quantity	NUMBER        := fnd_api.g_miss_num
433   , supply_receipt_date		DATE          := fnd_api.g_miss_date
434   , demand_ship_date		DATE          := fnd_api.g_miss_date
435   , project_id		NUMBER := fnd_api.g_miss_num
436   , task_id 		NUMBER := fnd_api.g_miss_num
437   , orig_supply_source_type_id NUMBER := fnd_api.g_miss_num
438   , orig_supply_source_header_id NUMBER := fnd_api.g_miss_num
439   , orig_supply_source_line_id NUMBER := fnd_api.g_miss_num
440   , orig_supply_source_line_detail NUMBER := fnd_api.g_miss_num
441   , orig_demand_source_type_id NUMBER := fnd_api.g_miss_num
442   , orig_demand_source_header_id NUMBER := fnd_api.g_miss_num
443   , orig_demand_source_line_id NUMBER := fnd_api.g_miss_num
444   , orig_demand_source_line_detail NUMBER := fnd_api.g_miss_num
445   , serial_number               VARCHAR2(30)  := fnd_api.g_miss_char
446   -- Original supply and demand information will just be passed back as part
447   --  of the reservation record. No processing or query will be based on
448   --  these parameters. Before every reservation API, these parameters will
449   --  be set to g_miss_num. Only the output will contain these values from
450   --  the queried record
451   /*** End R12 ***/
452 
453   );
454 
455 
456 -- Table type definition for an array of mtl_reservation_rec_type records.
457 TYPE mtl_reservation_tbl_type is TABLE OF mtl_reservation_rec_type
458   INDEX BY BINARY_INTEGER;
459 
460 /**** {{ R12 Enhanced reservations code changes }} ****/
461 TYPE mtl_maintain_rsv_rec_type is RECORD
462   (
463    action NUMBER
464    ,organization_id NUMBER
465    ,inventory_item_id NUMBER
466    ,demand_source_type_id NUMBER
467    ,demand_source_header_id NUMBER
468    ,demand_source_line_id NUMBER
469    ,demand_source_line_detail NUMBER
470    ,supply_source_type_id NUMBER
471    ,supply_source_header_id NUMBER
472    ,supply_source_line_id NUMBER
473    ,supply_source_line_detail NUMBER
474    ,project_id NUMBER := NULL
475    ,task_id NUMBER := NULL
476    ,from_primary_uom_code VARCHAR2(3)
477    ,from_transaction_uom_code VARCHAR2(3)
478    ,from_primary_txn_quantity NUMBER
479    ,from_transaction_quantity NUMBER
480    ,to_primary_uom_code VARCHAR2(3)
481    ,to_transaction_uom_code VARCHAR2(3)
482    ,to_primary_txn_quantity NUMBER
483    ,to_transaction_quantity NUMBER
484    ,expected_quantity NUMBER
485    ,expected_quantity_uom VARCHAR2(3)
486    );
487 
488 TYPE mtl_maintain_rsv_tbl_type is TABLE OF mtl_maintain_rsv_rec_type
489   INDEX BY BINARY_INTEGER;
493 --Table to return Failed reservations when do_check performed at commit
490 /*** End R12 ***/
491 
492 
494 --original procedure is in INV_RESERVATION_PVT
495 TYPE mtl_failed_rsv_rec_type IS RECORD
496   (
497     demand_source_line_id           NUMBER  := fnd_api.g_miss_num
498    ,demand_source_header_id         NUMBER  :=fnd_api.g_miss_num
499    ,demand_source_name              VARCHAR2(1000) := fnd_api.g_miss_char
500    ,reservation_id                  NUMBER   := fnd_api.g_miss_num
501    ,Inventory_item_id                NUMBER := fnd_api.g_miss_num
502    ,Organization_id                  NUMBER := fnd_api.g_miss_num
503    ,Primary_reservation_quantity     NUMBER := fnd_api.g_miss_num
504    );
505 TYPE mtl_failed_rsv_tbl_type is TABLE OF mtl_failed_rsv_rec_type  INDEX BY BINARY_INTEGER;
506 
507 --
508 END inv_reservation_global;