1 PACKAGE inv_reservation_avail_pvt AUTHID CURRENT_USER AS
2 /* $Header: INVVRVAS.pls 120.2.12020000.2 2013/02/01 06:00:22 brana ship $*/
3
4 -- Procedure
5 -- available_supply_to_reserve
6 -- Description
7 -- This procedure returns the available quantity to reserve for a particular
8 -- supply line, for which a reservation is either intended to be created or
9 -- modified. The API will call the get_available_supply_demand API to get
10 -- the current availability at the document level, query all the existing
11 -- reservations for this supply line and return the difference which would
12 -- be the available supply to reserve. At the same time, the available
13 -- quantity at the document level will also be returned through this API.
14 -- Input Parameters
15 -- p_api_version_number
16 -- API version number
17 -- p_init_msg_list
18 -- Whether initialize the error message list or not
19 -- Should be fnd_api.g_false or fnd_api.g_true
20 -- p_organization_id
21 -- organization id for the document to be validated.
22 -- p_item_id
23 -- inventory item id of the document to be validated.
24 -- p_revision
25 -- revision of the item
26 -- p_lot_number
27 -- lot number of the item
28 -- p_subinventory_code
29 -- subinventory code
30 -- p_locator_id
31 -- locator id of the subinventory if the subinventory is locator controlled
32 -- p_supply_source_type_id
33 -- the supply type for which the availability is to be checked
34 -- p_supply_source_header_id
35 -- the header information of the supply document for which the availability
36 -- is to be checked
37 -- p_supply_source_line_id
38 -- the line information of the supply document for which the availability
39 -- is to be checked
40 -- p_supply_source_line_detail
41 -- the line detial information of the supply document for which the
42 -- availability is to be checked
43 -- p_lpn_id
44 -- the lpn for the supply document for which the availability is going
45 -- to be computed
46 -- p_project_id
47 -- the project id for the demand document
48 -- p_task_id
49 -- the task id for the demand document
50 -- Output Parameters
51 -- x_return_status
52 -- return status indicating success, error, unexpected error
53 -- x_msg_count
54 -- number of messages in message list
55 -- x_msg_data
56 -- if the number of messages in message list is 1, contains
57 -- message text
58 -- x_qty_available_to_reserve
59 -- returns the total available quantity based on the input criteria
60 -- x_qty_available
61 -- returns the final available quantity on the document line for which
62 -- the reservation is being made
63
64 Procedure available_supply_to_reserve
65 (
66 p_api_version_number IN NUMBER DEFAULT 1.0
67 , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
68 , x_return_status OUT NOCOPY VARCHAR2
69 , x_msg_count OUT NOCOPY NUMBER
70 , x_msg_data OUT NOCOPY VARCHAR2
71 , p_organization_id IN NUMBER DEFAULT NULL
72 , p_item_id IN NUMBER DEFAULT NULL
73 , p_revision IN VARCHAR2 DEFAULT NULL
74 , p_lot_number IN VARCHAR2 DEFAULT NULL
75 , p_subinventory_code IN VARCHAR2 DEFAULT NULL
76 , p_locator_id IN NUMBER DEFAULT NULL
77 , p_lpn_id IN NUMBER DEFAULT fnd_api.g_miss_num
78 , p_fm_supply_source_type_id IN NUMBER DEFAULT 0
79 , p_supply_source_type_id IN NUMBER
80 , p_supply_source_header_id IN NUMBER
81 , p_supply_source_line_id IN NUMBER
82 , p_supply_source_line_detail IN NUMBER DEFAULT fnd_api.g_miss_num
83 , p_project_id IN NUMBER DEFAULT NULL
84 , p_task_id IN NUMBER DEFAULT NULL
85 , x_qty_available_to_reserve OUT NOCOPY NUMBER
86 , x_qty_available OUT NOCOPY NUMBER
87 );
88
89 -- Procedure
90 -- available_demand_to_reserve
91 -- Description
92 -- This procedure returns the available quantity to reserve for a particular
93 -- demand line, for which a reservation is either intended to be created or
94 -- modified. The API will call the get_available_supply_demand API to get
95 -- the current availability at the document level, query all the existing
96 -- reservations for this supply line and return the difference which would
97 -- be the available supply to reserve. At the same time, the available
98 -- quantity at the document level will also be returned through this API.
99 -- Input Parameters
100 -- p_api_version_number
101 -- API version number
102 -- p_init_msg_list
103 -- Whether initialize the error message list or not
104 -- Should be fnd_api.g_false or fnd_api.g_true
105 -- p_demand_source_type_id
106 -- the demand type for which the availability is to be checked
107 -- p_demand_source_header_id
108 -- the header information of the demand document for which the
109 -- availability is to be checked
110 -- p_demand_source_line_id
111 -- the line information of the demand document for which the
112 -- availability is to be checked
113 -- p_demand_source_line_detail
114 -- the line detail information of the demand document for which
115 -- the availability is to be checked
116 -- p_project_id
117 -- the project id for the demand document
118 -- p_task_id
119 -- the task id for the demand document
120 -- Output Parameters
121 -- x_return_status
122 -- return status indicating success, error, unexpected error
123 -- x_msg_count
124 -- number of messages in message list
125 -- x_msg_data
126 -- if the number of messages in message list is 1, contains
127 -- message text
128 -- x_qty_available_to_reserve
129 -- returns the total available quantity based on the input criteria
130 -- x_qty_available
131 -- returns the final available quantity on the document line for which
132 -- the reservation is being made
133
134 Procedure available_demand_to_reserve
135 (
136 p_api_version_number IN NUMBER DEFAULT 1.0
137 , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
138 , x_return_status OUT NOCOPY VARCHAR2
139 , x_msg_count OUT NOCOPY NUMBER
140 , x_msg_data OUT NOCOPY VARCHAR2
141 , p_organization_id IN NUMBER DEFAULT NULL
142 , p_item_id IN NUMBER DEFAULT NULL
143 , p_primary_uom_code IN VARCHAR2 DEFAULT NULL
144 , p_demand_source_type_id IN NUMBER
145 , p_demand_source_header_id IN NUMBER
146 , p_demand_source_line_id IN NUMBER
147 , p_demand_source_line_detail IN NUMBER DEFAULT fnd_api.g_miss_num
148 , p_project_id IN NUMBER DEFAULT NULL
149 , p_task_id IN NUMBER DEFAULT NULL
150 , x_qty_available_to_reserve OUT NOCOPY NUMBER
151 , x_qty_available OUT NOCOPY NUMBER
152 );
153
154 --MUOM Fulfillment Project overloaded the Procedure
155 Procedure available_demand_to_reserve
156 (
157 p_api_version_number IN NUMBER DEFAULT 1.0
158 , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
159 , x_return_status OUT NOCOPY VARCHAR2
160 , x_msg_count OUT NOCOPY NUMBER
161 , x_msg_data OUT NOCOPY VARCHAR2
162 , p_organization_id IN NUMBER DEFAULT NULL
163 , p_item_id IN NUMBER DEFAULT NULL
164 , p_primary_uom_code IN VARCHAR2 DEFAULT NULL
165 , p_demand_source_type_id IN NUMBER
166 , p_demand_source_header_id IN NUMBER
167 , p_demand_source_line_id IN NUMBER
168 , p_demand_source_line_detail IN NUMBER DEFAULT fnd_api.g_miss_num
169 , p_project_id IN NUMBER DEFAULT NULL
170 , p_task_id IN NUMBER DEFAULT NULL
171 , x_qty_available_to_reserve OUT NOCOPY NUMBER
172 , x_qty_available OUT NOCOPY NUMBER
173 , x_qty_available_to_reserve2 OUT NOCOPY NUMBER
174 , x_qty_available2 OUT NOCOPY NUMBER
175 );
176 END inv_reservation_avail_pvt;