DBA Data[Home] [Help]

PACKAGE: APPS.INV_TRX_UTIL_PUB

Source


1 PACKAGE inv_trx_util_pub AS
2   /* $Header: INVTRXUS.pls 120.4.12000000.2 2007/10/23 07:55:35 athammin ship $ */
3 
4 
5   --    Name: INSERT_LINE_TRX
6   --
7   --    Input parameters:
8   --       p_trx_hdr_id                   Transaction Header Id
9   --       p_item_id                      Inventory Item Id
10   --       p_revision                     Item Revision
11   --       p_org_id                       Organization ID
12   --       p_trx_action_id                Transaction Action
13   --       p_subinv_code                  Subinventory Code
14   --       p_tosubinv_code                Transfer Subinventory Code
15   --       p_locator_id                   Locator ID
16   --       p_tolocator_id                 Transfer Locator ID
17   --       p_xfr_org_id                   Transfer Organization ID
18   --       p_trx_type_id                  Transaction Type ID
19   --       p_trx_src_type_id              Transaction Source Type ID
20   --       p_trx_qty                      Quantity
21   --       p_uom                          Unit Of Measurement
22   --       p_date                         Transaction Date
23   --       p_reason_id                    Reason ID
24   --       p_user_id                      User ID
25   --       p_frt_code                     Freight Code
26   --       p_ship_num                     Shipment Number
27   --       p_dist_id                      Distribution Account Id
28   --       p_way_bill                     Waybill Airbill
29   --       p_exp_arr                      Expected Arrival Date
30   --       p_cost_group                   Cost Group Id
31   --       p_from_lpn_id                  From LPN ID
32   --       p_cnt_lpn_id                   Content LPN ID
33   --       p_xfr_lpn_id                   Transfer LPN ID
34   --       p_cost_of_transfer             Cost of Transfer              : 2326247
35   --       p_cost_of_transportation       Cost of Transportation        : 2326247
36   --       p_transfer_percentage          Transfer Percentage           : 2326247
37   --       p_transportation_cost_account  Transportation Cost Account   : 2326247
38   --       p_planning_org_id              Planning Organization ID      : Consignment and VMI Changes
39   --       p_planning_tp_type             Planning TP Type              : Consignment and VMI Changes
40   --       p_owning_org_id                Owning Organization ID        : Consignment and VMI Changes
41   --       p_owning_tp_type               Owning TP Type                : Consignment and VMI Changes
42   --       p_trx_src_line_id              Trx Source Line ID
43   --       p_secondary_trx_qty            Secondary Transaction Quantity
44   --       p_secondary_uom                Secondary Transaction Qty UOM
45   --       p_move_order_line_id           Move Order Line ID            : Patchset J
46   --       p_posting_flag                 Posting Flag                  : Patchset J
47   --       p_ship_to_location_id          Ship To Location ID           : eIB Build; Bug# 4348541
48   --	   p_relieve_reservations_flag	  Relieve Reservations Flag	: Bug 6310875
49   --
50   --      Output parameters:
51   --       x_trx_tmp_id                   Transaction Temp ID
52   --       x_proc_msg                     Message from the Process-Manager
53   --       return_status                  0 on Success, 1 on Error
54   --
55   --     Functions:  This API calculates the account_period_id based on the
56   --      transaction date and inserts a new row into MTL_MATERIAL_TRANSACTIONS_TEMP
57   --      The function returns the transaction_temp_id which is unique for this
58   --      record, and could be used for coupling Lot and Serial Transaction
59   --      records associated with this transaction.
60   --
61   FUNCTION insert_line_trx(
62     p_trx_hdr_id                  IN            NUMBER
63   , p_item_id                     IN            NUMBER
64   , p_revision                    IN            VARCHAR2 := NULL
65   , p_org_id                      IN            NUMBER
66   , p_trx_action_id               IN            NUMBER
67   , p_subinv_code                 IN            VARCHAR2
68   , p_tosubinv_code               IN            VARCHAR2 := NULL
69   , p_locator_id                  IN            NUMBER := NULL
70   , p_tolocator_id                IN            NUMBER := NULL
71   , p_xfr_org_id                  IN            NUMBER := NULL
72   , p_trx_type_id                 IN            NUMBER
73   , p_trx_src_type_id             IN            NUMBER
74   , p_trx_qty                     IN            NUMBER
75   , p_pri_qty                     IN            NUMBER
76   , p_uom                         IN            VARCHAR2
77   , p_date                        IN            DATE := SYSDATE
78   , p_reason_id                   IN            NUMBER := NULL
79   , p_user_id                     IN            NUMBER
80   , p_frt_code                    IN            VARCHAR2 := NULL
81   , p_ship_num                    IN            VARCHAR2 := NULL
82   , p_dist_id                     IN            NUMBER := NULL
83   , p_way_bill                    IN            VARCHAR2 := NULL
84   , p_exp_arr                     IN            DATE := NULL
85   , p_cost_group                  IN            NUMBER := NULL
86   , p_from_lpn_id                 IN            NUMBER := NULL
87   , p_cnt_lpn_id                  IN            NUMBER := NULL
88   , p_xfr_lpn_id                  IN            NUMBER := NULL
89   , p_trx_src_id                  IN            NUMBER := NULL
90   , x_trx_tmp_id                  OUT NOCOPY    NUMBER
91   , x_proc_msg                    OUT NOCOPY    VARCHAR2
92   , p_xfr_cost_group              IN            NUMBER := NULL
93   , p_completion_trx_id           IN            NUMBER := NULL
94   , p_flow_schedule               IN            VARCHAR2 := NULL
95   , p_trx_cost                    IN            NUMBER := NULL
96   , p_project_id                  IN            NUMBER := NULL
97   , p_task_id                     IN            NUMBER := NULL
98   , p_cost_of_transfer            IN            NUMBER := NULL
99   , p_cost_of_transportation      IN            NUMBER := NULL
100   , p_transfer_percentage         IN            NUMBER := NULL
101   , p_transportation_cost_account IN            NUMBER := NULL
102   , p_planning_org_id             IN            NUMBER := NULL
103   , p_planning_tp_type            IN            NUMBER := NULL
104   , p_owning_org_id               IN            NUMBER := NULL
105   , p_owning_tp_type              IN            NUMBER := NULL
106   , p_trx_src_line_id             IN            NUMBER := NULL
107   , p_secondary_trx_qty           IN            NUMBER := NULL
108   , p_secondary_uom               IN            VARCHAR2 := NULL
109   , p_move_order_line_id          IN            NUMBER := NULL
110   , p_posting_flag                IN            VARCHAR2 := NULL
111   , p_move_order_header_id        IN            NUMBER := NULL
112   , p_serial_allocated_flag       IN            VARCHAR2 := NULL
113   , p_transaction_status          IN            NUMBER := NULL
114   , p_process_flag                IN            VARCHAR2 := NULL
115   , p_ship_to_location_id         IN            NUMBER DEFAULT NULL
116   , p_relieve_reservations_flag   IN		VARCHAR2 DEFAULT NULL		--	Bug 6310875
117     )
118     RETURN NUMBER;
119 
120   --
121   --     Name: INSERT_LOT_TRX
122   --
123   --     Input parameters:
124   --       p_trx_tmp_id         Transaction Temp Id
125   --       p_user_id            User ID
126   --       p_lot_number         Lot Number
127   --       p_trx_qty            Quantity
128   --       p_pri_qty            Primary Quantity
129   --       p_exp_date           Expiry Date
130   --       p_secondary_qty      Secondary Quantity
131   --       p_secondary_uom      Secondary Quantity UOM
132   --
133   --      Output parameters:
134   --       x_ser_trx_id        Serial Transaction Temp Id, to be used if
135   --                            inserting SerialNumber records associated
136   --                            with Lot Number.
137   --       x_proc_msg          Message from the Process-Manager
138   --       return_status       0 on Success, 1 on Error
139   --
140   --      Functions: This function inserts a Lot Transaction record into
141   --          MTL_TRANSACTION_LOT_NUMBERS. The argument p_trx_tmp_id is
142   --          used to couple this record with a transaction-line in
143   --          MTL_MATERIAL_TRANSACTIONS_TEMP
144   --
145   FUNCTION insert_lot_trx(
146     p_trx_tmp_id             IN            NUMBER
147   , p_user_id                IN            NUMBER
148   , p_lot_number             IN            VARCHAR2
149   , p_trx_qty                IN            NUMBER
150   , p_pri_qty                IN            NUMBER
151   , p_exp_date               IN            DATE := NULL
152   , p_description            IN            VARCHAR2 := NULL
153   , p_vendor_name            IN            VARCHAR2 := NULL
154   , p_supplier_lot_number    IN            VARCHAR2 := NULL
155   , p_origination_date       IN            DATE := NULL
156   , p_date_code              IN            VARCHAR2 := NULL
157   , p_grade_code             IN            VARCHAR2 := NULL
158   , p_change_date            IN            DATE := NULL
159   , p_maturity_date          IN            DATE := NULL
160   , p_status_id              IN            NUMBER := NULL
161   , p_retest_date            IN            DATE := NULL
162   , p_age                    IN            NUMBER := NULL
163   , p_item_size              IN            NUMBER := NULL
164   , p_color                  IN            VARCHAR2 := NULL
165   , p_volume                 IN            NUMBER := NULL
166   , p_volume_uom             IN            VARCHAR2 := NULL
167   , p_place_of_origin        IN            VARCHAR2 := NULL
168   , p_best_by_date           IN            DATE := NULL
169   , p_length                 IN            NUMBER := NULL
170   , p_length_uom             IN            VARCHAR2 := NULL
171   , p_recycled_content       IN            NUMBER := NULL
172   , p_thickness              IN            NUMBER := NULL
173   , p_thickness_uom          IN            VARCHAR2 := NULL
174   , p_width                  IN            NUMBER := NULL
175   , p_width_uom              IN            VARCHAR2 := NULL
176   , p_curl_wrinkle_fold      IN            VARCHAR2 := NULL
177   , p_lot_attribute_category IN            VARCHAR2 := NULL
178   , p_c_attribute1           IN            VARCHAR2 := NULL
179   , p_c_attribute2           IN            VARCHAR2 := NULL
180   , p_c_attribute3           IN            VARCHAR2 := NULL
181   , p_c_attribute4           IN            VARCHAR2 := NULL
182   , p_c_attribute5           IN            VARCHAR2 := NULL
183   , p_c_attribute6           IN            VARCHAR2 := NULL
184   , p_c_attribute7           IN            VARCHAR2 := NULL
185   , p_c_attribute8           IN            VARCHAR2 := NULL
186   , p_c_attribute9           IN            VARCHAR2 := NULL
187   , p_c_attribute10          IN            VARCHAR2 := NULL
188   , p_c_attribute11          IN            VARCHAR2 := NULL
189   , p_c_attribute12          IN            VARCHAR2 := NULL
190   , p_c_attribute13          IN            VARCHAR2 := NULL
191   , p_c_attribute14          IN            VARCHAR2 := NULL
192   , p_c_attribute15          IN            VARCHAR2 := NULL
193   , p_c_attribute16          IN            VARCHAR2 := NULL
194   , p_c_attribute17          IN            VARCHAR2 := NULL
195   , p_c_attribute18          IN            VARCHAR2 := NULL
196   , p_c_attribute19          IN            VARCHAR2 := NULL
197   , p_c_attribute20          IN            VARCHAR2 := NULL
198   , p_d_attribute1           IN            DATE := NULL
199   , p_d_attribute2           IN            DATE := NULL
200   , p_d_attribute3           IN            DATE := NULL
201   , p_d_attribute4           IN            DATE := NULL
202   , p_d_attribute5           IN            DATE := NULL
203   , p_d_attribute6           IN            DATE := NULL
204   , p_d_attribute7           IN            DATE := NULL
205   , p_d_attribute8           IN            DATE := NULL
206   , p_d_attribute9           IN            DATE := NULL
207   , p_d_attribute10          IN            DATE := NULL
208   , p_n_attribute1           IN            NUMBER := NULL
209   , p_n_attribute2           IN            NUMBER := NULL
210   , p_n_attribute3           IN            NUMBER := NULL
211   , p_n_attribute4           IN            NUMBER := NULL
212   , p_n_attribute5           IN            NUMBER := NULL
213   , p_n_attribute6           IN            NUMBER := NULL
214   , p_n_attribute7           IN            NUMBER := NULL
215   , p_n_attribute8           IN            NUMBER := NULL
216   , p_n_attribute9           IN            NUMBER := NULL
217   , p_n_attribute10          IN            NUMBER := NULL
218   , x_ser_trx_id             OUT NOCOPY    NUMBER
219   , x_proc_msg               OUT NOCOPY    VARCHAR2
220   , p_territory_code         IN            VARCHAR2 := NULL
221   , p_vendor_id              IN            VARCHAR2 := NULL
222   , p_secondary_qty          IN            NUMBER := NULL
223   , p_secondary_uom          IN            VARCHAR2 := NULL
224 
225   --Bug No 3952081
226   --Add arguments to intake new OPM attributes of the lot
227   , p_parent_lot_number      IN            MTL_LOT_NUMBERS.PARENT_LOT_NUMBER%TYPE := NULL
228   , p_origination_type       IN            MTL_LOT_NUMBERS.ORIGINATION_TYPE%TYPE := NULL
229   , p_expriration_action_date IN           MTL_LOT_NUMBERS.EXPIRATION_ACTION_DATE%TYPE := NULL
230   , p_expriration_action_code IN           MTL_LOT_NUMBERS.EXPIRATION_ACTION_CODE%TYPE := NULL
231   , p_hold_date              IN            MTL_LOT_NUMBERS.HOLD_DATE%TYPE := NULL
232   )
233     RETURN NUMBER;
234 
235   --
236   --     Name: INSERT_SER_TRX
237   --
238   --     Input parameters:
239   --       p_trx_tmp_id         Transaction Temp ID
240   --       p_user_id            User ID
241   --       p_fm_ser_num         'From' Serial Number
242   --       p_to_ser_num         'To'   Serial Number
243   --
244   --      Output parameters:
245   --       x_proc_msg          Message from the Process-Manager
246   --       return_status       0 on Success, 1 on Error
247   --
248   --      Functions: This API inserts a Serial Transaction record into
249   --       MTL_SERIAL_NUMBERS_TEMP. The argument p_trx_tmp_id is
250   --       used to couple this record with a transaction-line in
251   --       MTL_MATERIAL_TRANSACTIONS_TEMP
252   --
253   FUNCTION insert_ser_trx(
254     p_trx_tmp_id                IN            NUMBER
255   , p_user_id                   IN            NUMBER
256   , p_fm_ser_num                IN            VARCHAR2
257   , p_to_ser_num                IN            VARCHAR2
258   , p_ven_ser_num               IN            VARCHAR2 := NULL
259   , p_vet_lot_num               IN            VARCHAR2 := NULL
263   , p_orgination_date           IN            DATE := NULL
260   , p_parent_ser_num            IN            VARCHAR2 := NULL
261   , p_end_item_unit_num         IN            VARCHAR2 := NULL
262   , p_serial_attribute_category IN            VARCHAR2 := NULL
264   , p_c_attribute1              IN            VARCHAR2 := NULL
265   , p_c_attribute2              IN            VARCHAR2 := NULL
266   , p_c_attribute3              IN            VARCHAR2 := NULL
267   , p_c_attribute4              IN            VARCHAR2 := NULL
268   , p_c_attribute5              IN            VARCHAR2 := NULL
269   , p_c_attribute6              IN            VARCHAR2 := NULL
270   , p_c_attribute7              IN            VARCHAR2 := NULL
271   , p_c_attribute8              IN            VARCHAR2 := NULL
272   , p_c_attribute9              IN            VARCHAR2 := NULL
273   , p_c_attribute10             IN            VARCHAR2 := NULL
274   , p_c_attribute11             IN            VARCHAR2 := NULL
275   , p_c_attribute12             IN            VARCHAR2 := NULL
276   , p_c_attribute13             IN            VARCHAR2 := NULL
277   , p_c_attribute14             IN            VARCHAR2 := NULL
278   , p_c_attribute15             IN            VARCHAR2 := NULL
279   , p_c_attribute16             IN            VARCHAR2 := NULL
280   , p_c_attribute17             IN            VARCHAR2 := NULL
281   , p_c_attribute18             IN            VARCHAR2 := NULL
282   , p_c_attribute19             IN            VARCHAR2 := NULL
283   , p_c_attribute20             IN            VARCHAR2 := NULL
284   , p_d_attribute1              IN            DATE := NULL
285   , p_d_attribute2              IN            DATE := NULL
286   , p_d_attribute3              IN            DATE := NULL
287   , p_d_attribute4              IN            DATE := NULL
288   , p_d_attribute5              IN            DATE := NULL
289   , p_d_attribute6              IN            DATE := NULL
290   , p_d_attribute7              IN            DATE := NULL
291   , p_d_attribute8              IN            DATE := NULL
292   , p_d_attribute9              IN            DATE := NULL
293   , p_d_attribute10             IN            DATE := NULL
294   , p_n_attribute1              IN            NUMBER := NULL
295   , p_n_attribute2              IN            NUMBER := NULL
296   , p_n_attribute3              IN            NUMBER := NULL
297   , p_n_attribute4              IN            NUMBER := NULL
298   , p_n_attribute5              IN            NUMBER := NULL
299   , p_n_attribute6              IN            NUMBER := NULL
300   , p_n_attribute7              IN            NUMBER := NULL
301   , p_n_attribute8              IN            NUMBER := NULL
302   , p_n_attribute9              IN            NUMBER := NULL
303   , p_n_attribute10             IN            NUMBER := NULL
304   , p_status_id                 IN            NUMBER := NULL
305   , p_territory_code            IN            VARCHAR2 := NULL
306   , p_time_since_new            IN            NUMBER := NULL
307   , p_cycles_since_new          IN            NUMBER := NULL
308   , p_time_since_overhaul       IN            NUMBER := NULL
309   , p_cycles_since_overhaul     IN            NUMBER := NULL
310   , p_time_since_repair         IN            NUMBER := NULL
311   , p_cycles_since_repair       IN            NUMBER := NULL
312   , p_time_since_visit          IN            NUMBER := NULL
313   , p_cycles_since_visit        IN            NUMBER := NULL
314   , p_time_since_mark           IN            NUMBER := NULL
315   , p_cycles_since_mark         IN            NUMBER := NULL
316   , p_number_of_repairs         IN            NUMBER := NULL
317   , p_validation_level          IN            NUMBER := NULL
318   , p_wms_installed             IN            VARCHAR2 := NULL
319   , p_quantity                  IN            NUMBER := NULL
320   , x_proc_msg                  OUT NOCOPY    VARCHAR2
321   , p_attribute_category        IN            VARCHAR2 := NULL
322   , p_attribute1                IN            VARCHAR2 := NULL
323   , p_attribute2                IN            VARCHAR2 := NULL
324   , p_attribute3                IN            VARCHAR2 := NULL
325   , p_attribute4                IN            VARCHAR2 := NULL
326   , p_attribute5                IN            VARCHAR2 := NULL
327   , p_attribute6                IN            VARCHAR2 := NULL
328   , p_attribute7                IN            VARCHAR2 := NULL
329   , p_attribute8                IN            VARCHAR2 := NULL
330   , p_attribute9                IN            VARCHAR2 := NULL
331   , p_attribute10               IN            VARCHAR2 := NULL
332   , p_attribute11               IN            VARCHAR2 := NULL
333   , p_attribute12               IN            VARCHAR2 := NULL
334   , p_attribute13               IN            VARCHAR2 := NULL
335   , p_attribute14               IN            VARCHAR2 := NULL
336   , p_attribute15               IN            VARCHAR2 := NULL
337   , p_dffupdatedflag		IN 	      VARCHAR2 := NULL
338   )
339     RETURN NUMBER;
340 
341 /**
342   * The API is responsible for Creating a New MMTT by copying column values
343   * from an Existing MMTT.
344   * <p>
345   * Column Values from the old MMTT will be copied to the new MMTT. But
346   * preference will be given to the parameters corresponding to the Column
347   * Values if they have a Not NULL value.
348   * <p>
349   * Values for the Parameter: <br>
350   *   1. NULL value - The column value from the existing MMTT will be used
351   *      for that column. <br>
352   *   2. G_MISS_XXX - The respective column will be set to NULL. <br>
353   *   3. Valid Value - The passed parameter value will be used. <br>
354   * <p>
358   * <p>
355   * Mandatory Parameter: <br>
356   *   1. Transaction Temp ID has to be passed for the API to go through
357   *      successfully.
359   * Optional Parameters: <br>
360   *   It will be better (performance wise) to pass these parameters even
361   *   though you dont want to override it. <br>
362   *   1. Organization ID - Account Period will be checked. Org ID is required
363   *      for that check. <br>
364   *   2. Primary Qty and Transaction Qty - If only either of them is passed, it
365   *      means that the Qty column is overriden. The other Qty has to be
366   *      derived. It will be better to pass both or atleast Inventory Item ID and
367   *      Transaction UOM. <br>
368   * <p>
369   * @param  x_return_status           Return Status
370   * @param  x_msg_count               Number of Messages in the stack.
371   * @param  x_msg_data                Message if Count is 1
372   * @param  x_new_txn_temp_id         Transaction Temp ID of the new MMTT.
373   * @param  p_transaction_temp_id     Transaction Temp ID of the existing MMTT
374   * @param  p_inventory_item_id       Inventory Item ID (Cannot have G_MISS_NUM)
375   * @param  p_revision                Revision
376   * @param  p_organization_id         Organization ID (Cannot have G_MISS_NUM)
377   * @param  p_subinventory_code       Subinventory Code
378   * @param  p_locator_id              Locator ID
379   * @param  p_cost_group_id           Cost Group ID
380   * @param  p_to_organization_id      Transfer Organization ID
381   * @param  p_to_subinventory_code    Transfer Subinventory Code
382   * @param  p_to_locator_id           Transfer Locator ID
383   * @param  p_to_cost_group_id        Transfer Cost Group ID
384   * @param  p_txn_qty                 Transaction Qty (Cannot have G_MISS_NUM)
385   * @param  p_primary_qty             Primary Qty (Cannot have G_MISS_NUM)
386   * @param  p_sec_txn_qty             Secondary Qty (Cannot have G_MISS_NUM)
387   * @param  p_transaction_uom         Transaction UOM (Cannot have G_MISS_CHAR)
388   * @param  p_lpn_id                  LPN ID
389   * @param  p_transfer_lpn_id         Transfer LPN ID
390   * @param  p_content_lpn_id          Content LPN ID
391   * @param  p_txn_type_id             Transaction Type ID (Cannot have G_MISS_NUM)
392   * @param  p_txn_action_id           Transaction Action ID (Cannot have G_MISS_NUM)
393   * @param  p_txn_source_type_id      Transaction Source Type ID (Cannot have G_MISS_NUM)
394   * @param  p_transaction_date        Transaction Date (Cannot have G_MISS_DATE)
395   * @param  p_transaction_source_id   Transaction Source ID
396   * @param  p_trx_source_line_id      Transaction Source Line ID
397   * @param  p_move_order_line_id      Move Order Line ID
398   * @param  p_reservation_id          Reservation ID
399   * @param  p_parent_line_id          Parent Line ID
400   * @param  p_pick_slip_number        Pick Slip Number
401   * @param  p_wms_task_type           WMS Task Type
402   * @param  p_user_id                 User ID (Cannot have G_MISS_NUM)
403   */
404   PROCEDURE copy_insert_line_trx(
405     x_return_status            OUT NOCOPY VARCHAR2
406   , x_msg_data                 OUT NOCOPY VARCHAR2
407   , x_msg_count                OUT NOCOPY NUMBER
408   , x_new_txn_temp_id          OUT NOCOPY NUMBER
409   , p_transaction_temp_id      IN         NUMBER
410   , p_transaction_header_id    IN         NUMBER   DEFAULT NULL
411   , p_inventory_item_id        IN         NUMBER   DEFAULT NULL
412   , p_revision                 IN         VARCHAR2 DEFAULT NULL
413   , p_organization_id          IN         NUMBER   DEFAULT NULL
414   , p_subinventory_code        IN         VARCHAR2 DEFAULT NULL
415   , p_locator_id               IN         NUMBER   DEFAULT NULL
416   , p_cost_group_id            IN         NUMBER   DEFAULT NULL
417   , p_to_organization_id       IN         NUMBER   DEFAULT NULL
418   , p_to_subinventory_code     IN         VARCHAR2 DEFAULT NULL
419   , p_to_locator_id            IN         NUMBER   DEFAULT NULL
420   , p_to_cost_group_id         IN         NUMBER   DEFAULT NULL
421   , p_txn_qty                  IN         NUMBER   DEFAULT NULL
422   , p_primary_qty              IN         NUMBER   DEFAULT NULL
423   , p_sec_txn_qty              IN         NUMBER   DEFAULT NULL --INVCONV KKILLAMS
424   , p_transaction_uom          IN         VARCHAR2 DEFAULT NULL
425   , p_lpn_id                   IN         NUMBER   DEFAULT NULL
426   , p_transfer_lpn_id          IN         NUMBER   DEFAULT NULL
427   , p_content_lpn_id           IN         NUMBER   DEFAULT NULL
428   , p_txn_type_id              IN         NUMBER   DEFAULT NULL
429   , p_txn_action_id            IN         NUMBER   DEFAULT NULL
430   , p_txn_source_type_id       IN         NUMBER   DEFAULT NULL
431   , p_transaction_date         IN         DATE     DEFAULT NULL
432   , p_transaction_source_id    IN         NUMBER   DEFAULT NULL
433   , p_trx_source_line_id       IN         NUMBER   DEFAULT NULL
434   , p_move_order_line_id       IN         NUMBER   DEFAULT NULL
435   , p_reservation_id           IN         NUMBER   DEFAULT NULL
436   , p_parent_line_id           IN         NUMBER   DEFAULT NULL
437   , p_pick_slip_number         IN         NUMBER   DEFAULT NULL
438   , p_wms_task_type            IN         NUMBER   DEFAULT NULL
439   , p_user_id                  IN         NUMBER   DEFAULT NULL
440   , p_move_order_header_id     IN         NUMBER   DEFAULT NULL
441   , p_serial_allocated_flag    IN         VARCHAR2 DEFAULT NULL
442   , p_operation_plan_id        IN         NUMBER   DEFAULT NULL--lezhang
443   , p_transaction_status       IN         NUMBER   DEFAULT NULL
444   );
445 
446   /*
447    *  Procedure: DELETE_TRANSACTION
448    *    1. Deletes a MMTT record given the Transaction Temp ID
449    *    2. If it is a Lot Controlled Item, cascades the Delete till MTLT
450    *    3. If it is a Serial Controlled Item , cascades the Delete till MSNT. Unmarks the Serial.
451    */
452   PROCEDURE delete_transaction(
453     x_return_status       OUT NOCOPY VARCHAR2
454   , x_msg_data            OUT NOCOPY VARCHAR2
455   , x_msg_count           OUT NOCOPY NUMBER
456   , p_transaction_temp_id            NUMBER
457   , p_update_parent                  BOOLEAN   DEFAULT TRUE
458   );
459 
460   /*
461    *  Procedure: UPDATE_PARENT_MMTT
462    *    This procedure updates or deletes the parent task when one of the child tasks
463    *    is deleted. Generally this procedure is called before deleting a Child Record.
464    *    1. Parent MMTT Qty is updated if there will be more than one MMTT even after
465    *       the deletion of the child record.
466    *    2. Parent MMTT is deleted along with the Task when there will be only one MMTT
467    *       after the deletion of the child record. Child Tasks will not be dispatched
468    *       or Queued.
469    */
470   PROCEDURE update_parent_mmtt(
471     x_return_status       OUT NOCOPY VARCHAR2
472   , p_parent_line_id      IN         NUMBER
473   , p_child_line_id       IN         NUMBER
474   , p_lot_control_code    IN         NUMBER
475   , p_serial_control_code IN         NUMBER
476   );
477 
478   --
479   -- Name : DELETE_LOT_SER_TRX
480   --
481   --   Input Parameters:
482   --              p_trx_tmp_id    : Transction temp id
483   --              p_org_id        : Organization id
484   --              p_item_id       : Inventory Item Id
485   --              p_lotctrl       : Lot control code
486   --              p_serctrl       : Serial number control code
487   --   Output Parameters:
488   --              x_return_status : Return Status
489   --
490 
491   PROCEDURE delete_lot_ser_trx(
492     p_trx_tmp_id    IN            NUMBER
493   , p_org_id        IN            NUMBER
494   , p_item_id       IN            NUMBER
495   , p_lotctrl       IN            NUMBER
496   , p_serctrl       IN            NUMBER
497   , x_return_status OUT NOCOPY    VARCHAR2
498   );
499 
500   --
501   --
502   --  Name : TRACE
503   --
504   --     Input parameters:
505   --       p_mesg           Message to Trace
506   --       p_mod            Module . A short string representing the module
507   --       p_level          Trace level of message. A number from 1 - 9.
508   --                            1 - Most serious error messages
509   --                            9 - Least serious info. message
510   --
511   --      Output parameters:
512   --
513   --  Function : Inventory Tracing
514   --   Inventory tracing is dependant on the following INV profiles
515   --       INV_DEBUG_TRACE
516   --       INV_DEBUG_FILE
517   --       INV_DEBUG_LEVEL
518   --
519   --
520   PROCEDURE TRACE(p_mesg VARCHAR2, p_mod VARCHAR2 := NULL, p_level NUMBER := 9);
521 END inv_trx_util_pub;