1 package CTO_RESERVE_CONFIG AUTHID CURRENT_USER as
2 /* $Header: CTORCFGS.pls 120.2 2011/11/14 12:23:09 abhissri ship $ */
3 /*============================================================================+
4 | Copyright (c) 1993 Oracle Corporation Belmont, California, USA |
5 | All rights reserved. |
6 | Oracle Manufacturing |
7 +=============================================================================+
8 | |
9 | FILE NAME : CTORCFGS.pls |
10 | DESCRIPTION : |
11 | This file creates packaged functions that are required |
12 | to make a reservation against Inventory from the |
13 | Create Reservation workflow activity and the |
14 | Match and Reserve menu item. |
15 | |
16 | reserve_config - Called from CTOWKFLB.pls from |
17 | reserve_config_wf to reserve configuration items |
18 | from inventory and from reserve_work_order_wf to |
19 | reserve a work order to a sales order. |
20 | |
21 | HISTORY : |
22 | May 13, 99 Angela Makalintal Initial version |
23 | |
24 | Oct 25 '02 Kundan Sarkar Bugfix 2644849 ( 2620282 in branch ) |
25 | Add new column f_bom_revision in rec_reserve record |
26 =============================================================================*/
27
28 /*****************************************************************************
29 Function: reserve_config
30 Parameters: model_line_id - line id of the top model in oe_order_lines
31 match_config_id - config id of the matching configuration
32 from bom_ato_configurations
33 error_message - error message if match function fails
34 message_name - name of error message if match function fails
35
36 Description: This function looks for a configuration in
37 bom_ato_configurations that matches the ordered
38 configuration in oe_order_lines.
39
40 *****************************************************************************/
41 TYPE rec_reserve IS RECORD (
42 f_header_id number,
43 f_line_id oe_order_lines.line_id%TYPE,
44 f_mfg_org_id oe_order_lines.ship_from_org_id%TYPE,
45 f_item_id oe_order_lines.inventory_item_id%TYPE,
46 f_order_qty_uom oe_order_lines.order_quantity_uom%TYPE,
47 f_quantity number,
48 f_supply_source number,
49 f_supply_header_id number,
50 f_ship_date oe_order_lines.schedule_ship_date%TYPE,
51 f_source_document_type_id oe_order_headers.source_document_type_id%TYPE default NULL,
52 -- bugfix 1799874: added f_source_document_type_id
53 f_bom_revision mtl_item_revisions.revision%TYPE,
54 -- 2620282 : Add new column to store bom revision
55 --Bugfix 12374440
56 f_subinventory_code oe_order_lines.subinventory%TYPE default NULL
57 );
58
59
60
61
62 procedure reserve_config(
63 p_rec_reserve in rec_reserve,
64 x_rsrv_qty out nocopy number,
65 x_rsrv_id out nocopy number,
66 x_return_status out nocopy VARCHAR2,
67 x_msg_txt out nocopy VARCHAR2, /* 70 bytes to hold returned msg */
68 x_msg_name out nocopy VARCHAR2 /* 30 bytes to hold returned name */
69 );
70
71
72 end CTO_RESERVE_CONFIG;