DBA Data[Home] [Help]

PACKAGE: APPS.INV_TRX_UTIL_PUB

Source


1 PACKAGE inv_trx_util_pub AUTHID CURRENT_USER AS
2   /* $Header: INVTRXUS.pls 120.8 2011/11/22 09:41:40 gke 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   , p_opm_org_in_xfer             IN            VARCHAR2 DEFAULT NULL           --      Bug 8939057
118     )
119     RETURN NUMBER;
120 
121   --
122   --     Name: INSERT_LOT_TRX
123   --
124   --     Input parameters:
125   --       p_trx_tmp_id         Transaction Temp Id
126   --       p_user_id            User ID
127   --       p_lot_number         Lot Number
128   --       p_trx_qty            Quantity
129   --       p_pri_qty            Primary Quantity
130   --       p_exp_date           Expiry Date
131   --       p_secondary_qty      Secondary Quantity
132   --       p_secondary_uom      Secondary Quantity UOM
133   --
134   --      Output parameters:
135   --       x_ser_trx_id        Serial Transaction Temp Id, to be used if
136   --                            inserting SerialNumber records associated
137   --                            with Lot Number.
138   --       x_proc_msg          Message from the Process-Manager
139   --       return_status       0 on Success, 1 on Error
140   --
141   --      Functions: This function inserts a Lot Transaction record into
142   --          MTL_TRANSACTION_LOT_NUMBERS. The argument p_trx_tmp_id is
143   --          used to couple this record with a transaction-line in
144   --          MTL_MATERIAL_TRANSACTIONS_TEMP
145   --
146   FUNCTION insert_lot_trx(
147     p_trx_tmp_id             IN            NUMBER
148   , p_user_id                IN            NUMBER
149   , p_lot_number             IN            VARCHAR2
150   , p_trx_qty                IN            NUMBER
151   , p_pri_qty                IN            NUMBER
152   , p_exp_date               IN            DATE := NULL
153   , p_description            IN            VARCHAR2 := NULL
154   , p_vendor_name            IN            VARCHAR2 := NULL
155   , p_supplier_lot_number    IN            VARCHAR2 := NULL
156   , p_origination_date       IN            DATE := NULL
157   , p_date_code              IN            VARCHAR2 := NULL
158   , p_grade_code             IN            VARCHAR2 := NULL
159   , p_change_date            IN            DATE := NULL
160   , p_maturity_date          IN            DATE := NULL
161   , p_status_id              IN            NUMBER := NULL
162   , p_retest_date            IN            DATE := NULL
163   , p_age                    IN            NUMBER := NULL
164   , p_item_size              IN            NUMBER := NULL
165   , p_color                  IN            VARCHAR2 := NULL
166   , p_volume                 IN            NUMBER := NULL
167   , p_volume_uom             IN            VARCHAR2 := NULL
168   , p_place_of_origin        IN            VARCHAR2 := NULL
169   , p_best_by_date           IN            DATE := NULL
170   , p_length                 IN            NUMBER := NULL
171   , p_length_uom             IN            VARCHAR2 := NULL
172   , p_recycled_content       IN            NUMBER := NULL
173   , p_thickness              IN            NUMBER := NULL
174   , p_thickness_uom          IN            VARCHAR2 := NULL
175   , p_width                  IN            NUMBER := NULL
176   , p_width_uom              IN            VARCHAR2 := NULL
177   , p_curl_wrinkle_fold      IN            VARCHAR2 := NULL
178   , p_lot_attribute_category IN            VARCHAR2 := NULL
179   , p_c_attribute1           IN            VARCHAR2 := NULL
180   , p_c_attribute2           IN            VARCHAR2 := NULL
181   , p_c_attribute3           IN            VARCHAR2 := NULL
182   , p_c_attribute4           IN            VARCHAR2 := NULL
183   , p_c_attribute5           IN            VARCHAR2 := NULL
184   , p_c_attribute6           IN            VARCHAR2 := NULL
185   , p_c_attribute7           IN            VARCHAR2 := NULL
186   , p_c_attribute8           IN            VARCHAR2 := NULL
187   , p_c_attribute9           IN            VARCHAR2 := NULL
188   , p_c_attribute10          IN            VARCHAR2 := NULL
189   , p_c_attribute11          IN            VARCHAR2 := NULL
190   , p_c_attribute12          IN            VARCHAR2 := NULL
191   , p_c_attribute13          IN            VARCHAR2 := NULL
192   , p_c_attribute14          IN            VARCHAR2 := NULL
193   , p_c_attribute15          IN            VARCHAR2 := NULL
194   , p_c_attribute16          IN            VARCHAR2 := NULL
195   , p_c_attribute17          IN            VARCHAR2 := NULL
196   , p_c_attribute18          IN            VARCHAR2 := NULL
197   , p_c_attribute19          IN            VARCHAR2 := NULL
198   , p_c_attribute20          IN            VARCHAR2 := NULL
199   , p_d_attribute1           IN            DATE := NULL
200   , p_d_attribute2           IN            DATE := NULL
201   , p_d_attribute3           IN            DATE := NULL
202   , p_d_attribute4           IN            DATE := NULL
203   , p_d_attribute5           IN            DATE := NULL
204   , p_d_attribute6           IN            DATE := NULL
205   , p_d_attribute7           IN            DATE := NULL
206   , p_d_attribute8           IN            DATE := NULL
207   , p_d_attribute9           IN            DATE := NULL
208   , p_d_attribute10          IN            DATE := NULL
209   , p_n_attribute1           IN            NUMBER := NULL
210   , p_n_attribute2           IN            NUMBER := NULL
211   , p_n_attribute3           IN            NUMBER := NULL
212   , p_n_attribute4           IN            NUMBER := NULL
213   , p_n_attribute5           IN            NUMBER := NULL
214   , p_n_attribute6           IN            NUMBER := NULL
215   , p_n_attribute7           IN            NUMBER := NULL
216   , p_n_attribute8           IN            NUMBER := NULL
217   , p_n_attribute9           IN            NUMBER := NULL
218   , p_n_attribute10          IN            NUMBER := NULL
219   , x_ser_trx_id             OUT NOCOPY    NUMBER
220   , x_proc_msg               OUT NOCOPY    VARCHAR2
221   , p_territory_code         IN            VARCHAR2 := NULL
222   , p_vendor_id              IN            VARCHAR2 := NULL
223   , p_secondary_qty          IN            NUMBER := NULL
224   , p_secondary_uom          IN            VARCHAR2 := NULL
225 
226   --Bug No 3952081
227   --Add arguments to intake new OPM attributes of the lot
228   , p_parent_lot_number      IN            MTL_LOT_NUMBERS.PARENT_LOT_NUMBER%TYPE := NULL
229   , p_origination_type       IN            MTL_LOT_NUMBERS.ORIGINATION_TYPE%TYPE := NULL
230   , p_expriration_action_date IN           MTL_LOT_NUMBERS.EXPIRATION_ACTION_DATE%TYPE := NULL
231   , p_expriration_action_code IN           MTL_LOT_NUMBERS.EXPIRATION_ACTION_CODE%TYPE := NULL
232   , p_hold_date              IN            MTL_LOT_NUMBERS.HOLD_DATE%TYPE := NULL
233   )
234     RETURN NUMBER;
235 
236   --
237   --     Name: INSERT_SER_TRX
238   --
239   --     Input parameters:
240   --       p_trx_tmp_id         Transaction Temp ID
241   --       p_user_id            User ID
242   --       p_fm_ser_num         'From' Serial Number
243   --       p_to_ser_num         'To'   Serial Number
244   --
245   --      Output parameters:
246   --       x_proc_msg          Message from the Process-Manager
247   --       return_status       0 on Success, 1 on Error
248   --
249   --      Functions: This API inserts a Serial Transaction record into
250   --       MTL_SERIAL_NUMBERS_TEMP. The argument p_trx_tmp_id is
251   --       used to couple this record with a transaction-line in
252   --       MTL_MATERIAL_TRANSACTIONS_TEMP
253   --
254   FUNCTION insert_ser_trx(
255     p_trx_tmp_id                IN            NUMBER
256   , p_user_id                   IN            NUMBER
257   , p_fm_ser_num                IN            VARCHAR2
258   , p_to_ser_num                IN            VARCHAR2
259   , p_ven_ser_num               IN            VARCHAR2 := NULL
260   , p_vet_lot_num               IN            VARCHAR2 := NULL
261   , p_parent_ser_num            IN            VARCHAR2 := NULL
262   , p_end_item_unit_num         IN            VARCHAR2 := NULL
263   , p_serial_attribute_category IN            VARCHAR2 := NULL
264   , p_orgination_date           IN            DATE := NULL
265   , p_c_attribute1              IN            VARCHAR2 := NULL
266   , p_c_attribute2              IN            VARCHAR2 := NULL
267   , p_c_attribute3              IN            VARCHAR2 := NULL
268   , p_c_attribute4              IN            VARCHAR2 := NULL
269   , p_c_attribute5              IN            VARCHAR2 := NULL
270   , p_c_attribute6              IN            VARCHAR2 := NULL
271   , p_c_attribute7              IN            VARCHAR2 := NULL
272   , p_c_attribute8              IN            VARCHAR2 := NULL
273   , p_c_attribute9              IN            VARCHAR2 := NULL
274   , p_c_attribute10             IN            VARCHAR2 := NULL
275   , p_c_attribute11             IN            VARCHAR2 := NULL
276   , p_c_attribute12             IN            VARCHAR2 := NULL
277   , p_c_attribute13             IN            VARCHAR2 := NULL
278   , p_c_attribute14             IN            VARCHAR2 := NULL
279   , p_c_attribute15             IN            VARCHAR2 := NULL
280   , p_c_attribute16             IN            VARCHAR2 := NULL
281   , p_c_attribute17             IN            VARCHAR2 := NULL
282   , p_c_attribute18             IN            VARCHAR2 := NULL
283   , p_c_attribute19             IN            VARCHAR2 := NULL
284   , p_c_attribute20             IN            VARCHAR2 := NULL
285   , p_d_attribute1              IN            DATE := NULL
286   , p_d_attribute2              IN            DATE := NULL
287   , p_d_attribute3              IN            DATE := NULL
288   , p_d_attribute4              IN            DATE := NULL
289   , p_d_attribute5              IN            DATE := NULL
290   , p_d_attribute6              IN            DATE := NULL
291   , p_d_attribute7              IN            DATE := NULL
295   , p_n_attribute1              IN            NUMBER := NULL
292   , p_d_attribute8              IN            DATE := NULL
293   , p_d_attribute9              IN            DATE := NULL
294   , p_d_attribute10             IN            DATE := NULL
296   , p_n_attribute2              IN            NUMBER := NULL
297   , p_n_attribute3              IN            NUMBER := NULL
298   , p_n_attribute4              IN            NUMBER := NULL
299   , p_n_attribute5              IN            NUMBER := NULL
300   , p_n_attribute6              IN            NUMBER := NULL
301   , p_n_attribute7              IN            NUMBER := NULL
302   , p_n_attribute8              IN            NUMBER := NULL
303   , p_n_attribute9              IN            NUMBER := NULL
304   , p_n_attribute10             IN            NUMBER := NULL
305   , p_status_id                 IN            NUMBER := NULL
306   , p_territory_code            IN            VARCHAR2 := NULL
307   , p_time_since_new            IN            NUMBER := NULL
308   , p_cycles_since_new          IN            NUMBER := NULL
309   , p_time_since_overhaul       IN            NUMBER := NULL
310   , p_cycles_since_overhaul     IN            NUMBER := NULL
311   , p_time_since_repair         IN            NUMBER := NULL
312   , p_cycles_since_repair       IN            NUMBER := NULL
313   , p_time_since_visit          IN            NUMBER := NULL
314   , p_cycles_since_visit        IN            NUMBER := NULL
315   , p_time_since_mark           IN            NUMBER := NULL
316   , p_cycles_since_mark         IN            NUMBER := NULL
317   , p_number_of_repairs         IN            NUMBER := NULL
318   , p_validation_level          IN            NUMBER := NULL
319   , p_wms_installed             IN            VARCHAR2 := NULL
320   , p_quantity                  IN            NUMBER := NULL
321   , x_proc_msg                  OUT NOCOPY    VARCHAR2
322   , p_attribute_category        IN            VARCHAR2 := NULL
323   , p_attribute1                IN            VARCHAR2 := NULL
324   , p_attribute2                IN            VARCHAR2 := NULL
325   , p_attribute3                IN            VARCHAR2 := NULL
326   , p_attribute4                IN            VARCHAR2 := NULL
327   , p_attribute5                IN            VARCHAR2 := NULL
328   , p_attribute6                IN            VARCHAR2 := NULL
329   , p_attribute7                IN            VARCHAR2 := NULL
330   , p_attribute8                IN            VARCHAR2 := NULL
331   , p_attribute9                IN            VARCHAR2 := NULL
332   , p_attribute10               IN            VARCHAR2 := NULL
333   , p_attribute11               IN            VARCHAR2 := NULL
334   , p_attribute12               IN            VARCHAR2 := NULL
335   , p_attribute13               IN            VARCHAR2 := NULL
336   , p_attribute14               IN            VARCHAR2 := NULL
337   , p_attribute15               IN            VARCHAR2 := NULL
338   , p_dffupdatedflag		IN 	      VARCHAR2 := NULL
339   )
340     RETURN NUMBER;
341 
342 /**
343   * The API is responsible for Creating a New MMTT by copying column values
344   * from an Existing MMTT.
345   * <p>
346   * Column Values from the old MMTT will be copied to the new MMTT. But
347   * preference will be given to the parameters corresponding to the Column
348   * Values if they have a Not NULL value.
349   * <p>
350   * Values for the Parameter: <br>
351   *   1. NULL value - The column value from the existing MMTT will be used
352   *      for that column. <br>
353   *   2. G_MISS_XXX - The respective column will be set to NULL. <br>
354   *   3. Valid Value - The passed parameter value will be used. <br>
355   * <p>
356   * Mandatory Parameter: <br>
357   *   1. Transaction Temp ID has to be passed for the API to go through
358   *      successfully.
359   * <p>
360   * Optional Parameters: <br>
361   *   It will be better (performance wise) to pass these parameters even
362   *   though you dont want to override it. <br>
363   *   1. Organization ID - Account Period will be checked. Org ID is required
364   *      for that check. <br>
365   *   2. Primary Qty and Transaction Qty - If only either of them is passed, it
366   *      means that the Qty column is overriden. The other Qty has to be
367   *      derived. It will be better to pass both or atleast Inventory Item ID and
368   *      Transaction UOM. <br>
369   * <p>
370   * @param  x_return_status           Return Status
371   * @param  x_msg_count               Number of Messages in the stack.
372   * @param  x_msg_data                Message if Count is 1
373   * @param  x_new_txn_temp_id         Transaction Temp ID of the new MMTT.
374   * @param  p_transaction_temp_id     Transaction Temp ID of the existing MMTT
375   * @param  p_inventory_item_id       Inventory Item ID (Cannot have G_MISS_NUM)
376   * @param  p_revision                Revision
377   * @param  p_organization_id         Organization ID (Cannot have G_MISS_NUM)
378   * @param  p_subinventory_code       Subinventory Code
379   * @param  p_locator_id              Locator ID
380   * @param  p_cost_group_id           Cost Group ID
381   * @param  p_to_organization_id      Transfer Organization ID
382   * @param  p_to_subinventory_code    Transfer Subinventory Code
383   * @param  p_to_locator_id           Transfer Locator ID
384   * @param  p_to_cost_group_id        Transfer Cost Group ID
385   * @param  p_txn_qty                 Transaction Qty (Cannot have G_MISS_NUM)
386   * @param  p_primary_qty             Primary Qty (Cannot have G_MISS_NUM)
387   * @param  p_sec_txn_qty             Secondary Qty (Cannot have G_MISS_NUM)
391   * @param  p_content_lpn_id          Content LPN ID
388   * @param  p_transaction_uom         Transaction UOM (Cannot have G_MISS_CHAR)
389   * @param  p_lpn_id                  LPN ID
390   * @param  p_transfer_lpn_id         Transfer LPN ID
392   * @param  p_txn_type_id             Transaction Type ID (Cannot have G_MISS_NUM)
393   * @param  p_txn_action_id           Transaction Action ID (Cannot have G_MISS_NUM)
394   * @param  p_txn_source_type_id      Transaction Source Type ID (Cannot have G_MISS_NUM)
395   * @param  p_transaction_date        Transaction Date (Cannot have G_MISS_DATE)
396   * @param  p_transaction_source_id   Transaction Source ID
397   * @param  p_trx_source_line_id      Transaction Source Line ID
398   * @param  p_move_order_line_id      Move Order Line ID
399   * @param  p_reservation_id          Reservation ID
400   * @param  p_parent_line_id          Parent Line ID
401   * @param  p_pick_slip_number        Pick Slip Number
402   * @param  p_wms_task_type           WMS Task Type
403   * @param  p_user_id                 User ID (Cannot have G_MISS_NUM)
404   */
405   PROCEDURE copy_insert_line_trx(
406     x_return_status            OUT NOCOPY VARCHAR2
407   , x_msg_data                 OUT NOCOPY VARCHAR2
408   , x_msg_count                OUT NOCOPY NUMBER
409   , x_new_txn_temp_id          OUT NOCOPY NUMBER
410   , p_transaction_temp_id      IN         NUMBER
411   , p_transaction_header_id    IN         NUMBER   DEFAULT NULL
412   , p_inventory_item_id        IN         NUMBER   DEFAULT NULL
413   , p_revision                 IN         VARCHAR2 DEFAULT NULL
414   , p_organization_id          IN         NUMBER   DEFAULT NULL
415   , p_subinventory_code        IN         VARCHAR2 DEFAULT NULL
416   , p_locator_id               IN         NUMBER   DEFAULT NULL
417   , p_cost_group_id            IN         NUMBER   DEFAULT NULL
418   , p_to_organization_id       IN         NUMBER   DEFAULT NULL
419   , p_to_subinventory_code     IN         VARCHAR2 DEFAULT NULL
420   , p_to_locator_id            IN         NUMBER   DEFAULT NULL
421   , p_to_cost_group_id         IN         NUMBER   DEFAULT NULL
422   , p_txn_qty                  IN         NUMBER   DEFAULT NULL
423   , p_primary_qty              IN         NUMBER   DEFAULT NULL
424   , p_sec_txn_qty              IN         NUMBER   DEFAULT NULL --INVCONV KKILLAMS
425   , p_transaction_uom          IN         VARCHAR2 DEFAULT NULL
426   , p_lpn_id                   IN         NUMBER   DEFAULT NULL
427   , p_transfer_lpn_id          IN         NUMBER   DEFAULT NULL
428   , p_content_lpn_id           IN         NUMBER   DEFAULT NULL
429   , p_txn_type_id              IN         NUMBER   DEFAULT NULL
430   , p_txn_action_id            IN         NUMBER   DEFAULT NULL
431   , p_txn_source_type_id       IN         NUMBER   DEFAULT NULL
432   , p_transaction_date         IN         DATE     DEFAULT NULL
433   , p_transaction_source_id    IN         NUMBER   DEFAULT NULL
434   , p_trx_source_line_id       IN         NUMBER   DEFAULT NULL
435   , p_move_order_line_id       IN         NUMBER   DEFAULT NULL
436   , p_reservation_id           IN         NUMBER   DEFAULT NULL
437   , p_parent_line_id           IN         NUMBER   DEFAULT NULL
438   , p_pick_slip_number         IN         NUMBER   DEFAULT NULL
439   , p_wms_task_type            IN         NUMBER   DEFAULT NULL
440   , p_user_id                  IN         NUMBER   DEFAULT NULL
441   , p_move_order_header_id     IN         NUMBER   DEFAULT NULL
442   , p_serial_allocated_flag    IN         VARCHAR2 DEFAULT NULL
443   , p_operation_plan_id        IN         NUMBER   DEFAULT NULL--lezhang
444   , p_transaction_status       IN         NUMBER   DEFAULT NULL
445   );
446 
447   /*
448    *  Procedure: DELETE_TRANSACTION
449    *    1. Deletes a MMTT record given the Transaction Temp ID
450    *    2. If it is a Lot Controlled Item, cascades the Delete till MTLT
451    *    3. If it is a Serial Controlled Item , cascades the Delete till MSNT. Unmarks the Serial.
452    */
453   PROCEDURE delete_transaction(
454     x_return_status       OUT NOCOPY VARCHAR2
455   , x_msg_data            OUT NOCOPY VARCHAR2
456   , x_msg_count           OUT NOCOPY NUMBER
457   , p_transaction_temp_id            NUMBER
458   , p_update_parent                  BOOLEAN   DEFAULT TRUE
459   );
460 
461   /*
462    *  Procedure: UPDATE_PARENT_MMTT
463    *    This procedure updates or deletes the parent task when one of the child tasks
464    *    is deleted. Generally this procedure is called before deleting a Child Record.
465    *    1. Parent MMTT Qty is updated if there will be more than one MMTT even after
466    *       the deletion of the child record.
467    *    2. Parent MMTT is deleted along with the Task when there will be only one MMTT
468    *       after the deletion of the child record. Child Tasks will not be dispatched
469    *       or Queued.
470    */
471   PROCEDURE update_parent_mmtt(
472     x_return_status       OUT NOCOPY VARCHAR2
473   , p_parent_line_id      IN         NUMBER
474   , p_child_line_id       IN         NUMBER
475   , p_lot_control_code    IN         NUMBER
476   , p_serial_control_code IN         NUMBER
477   );
478 
479   --
480   -- Name : DELETE_LOT_SER_TRX
481   --
482   --   Input Parameters:
483   --              p_trx_tmp_id    : Transction temp id
484   --              p_org_id        : Organization id
485   --              p_item_id       : Inventory Item Id
486   --              p_lotctrl       : Lot control code
490   --
487   --              p_serctrl       : Serial number control code
488   --   Output Parameters:
489   --              x_return_status : Return Status
491 
492   PROCEDURE delete_lot_ser_trx(
493     p_trx_tmp_id    IN            NUMBER
494   , p_org_id        IN            NUMBER
495   , p_item_id       IN            NUMBER
496   , p_lotctrl       IN            NUMBER
497   , p_serctrl       IN            NUMBER
498   , x_return_status OUT NOCOPY    VARCHAR2
499   );
500 
501 
502   /*  Bug 13020024
503    *  Procedure: call_rcv_manager
504    *    Input Parameters:
505    *          p_trx_header_id : Transaction Header Id
506    *    Output Parameters:
507    *          x_return_status : Return value of calling RCV TM
508    *          x_outcome       : Outcome of calling RCV TM
509    *          x_msg           : Error message
510    *    This procedure is to call RCVTM for IOT in online mode.
511    *    1. Fetches MMTs with p_trx_header_id, and update the related RTIs with a new group_id.
512    *    2. Make a call to RCVTM with this group_id
513    */
514 
515   PROCEDURE call_rcv_manager
516             ( x_return_value       OUT  NOCOPY   NUMBER,
517               x_outcome            OUT  NOCOPY   VARCHAR2,
518               x_msg                OUT  NOCOPY   VARCHAR2,
519               p_trx_header_id      IN   NUMBER
520 	           );
521 
522   --
523   --
524   --  Name : TRACE
525   --
526   --     Input parameters:
527   --       p_mesg           Message to Trace
528   --       p_mod            Module . A short string representing the module
529   --       p_level          Trace level of message. A number from 1 - 9.
530   --                            1 - Most serious error messages
531   --                            9 - Least serious info. message
532   --
533   --      Output parameters:
534   --
535   --  Function : Inventory Tracing
536   --   Inventory tracing is dependant on the following INV profiles
537   --       INV_DEBUG_TRACE
538   --       INV_DEBUG_FILE
539   --       INV_DEBUG_LEVEL
540   --
541   --
542   PROCEDURE TRACE(p_mesg VARCHAR2, p_mod VARCHAR2 := NULL, p_level NUMBER := 9);
543 END inv_trx_util_pub;