DBA Data[Home] [Help]

APPS.GMI_RESERVATION_PVT dependencies on GMI_RESERVATION_UTIL

Line 144: l_ic_tran_rec_tbl_empty GMI_Reservation_Util.l_ic_tran_rec_tbl;

140: /* ============================================================================= */
141: /* Variables */
142: l_api_name CONSTANT VARCHAR2 (30) := 'Query_Reservation';
143:
144: l_ic_tran_rec_tbl_empty GMI_Reservation_Util.l_ic_tran_rec_tbl;
145: rec_index BINARY_INTEGER :=1;
146: i BINARY_INTEGER :=1;
147:
148: l_quantity_to_convert NUMBER;

Line 153: l_ic_item_mst_rec GMI_Reservation_Util.ic_item_mst_rec;

149: l_converted_quantity NUMBER;
150: l_OPM_order_um VARCHAR2(4);
151: l_Apps_order_um VARCHAR2(3);
152: l_Apps_primary_um VARCHAR2(3);
153: l_ic_item_mst_rec GMI_Reservation_Util.ic_item_mst_rec;
154:
155: -- OPM 2115306
156: l_epsilon NUMBER;
157: n NUMBER;

Line 167: GMI_reservation_Util.PrintLn('(opm_dbg) entering proc GMI_Reservation_PVT.query_reservation (PVT q)');

163:
164:
165: BEGIN
166:
167: GMI_reservation_Util.PrintLn('(opm_dbg) entering proc GMI_Reservation_PVT.query_reservation (PVT q)');
168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');
169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */

Line 168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');

164:
165: BEGIN
166:
167: GMI_reservation_Util.PrintLn('(opm_dbg) entering proc GMI_Reservation_PVT.query_reservation (PVT q)');
168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');
169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');

Line 169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');

165: BEGIN
166:
167: GMI_reservation_Util.PrintLn('(opm_dbg) entering proc GMI_Reservation_PVT.query_reservation (PVT q)');
168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');
169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');

Line 170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');

166:
167: GMI_reservation_Util.PrintLn('(opm_dbg) entering proc GMI_Reservation_PVT.query_reservation (PVT q)');
168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');
169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');

Line 171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */

167: GMI_reservation_Util.PrintLn('(opm_dbg) entering proc GMI_Reservation_PVT.query_reservation (PVT q)');
168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');
169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');
175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */

Line 172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');

168: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_id='||p_query_input.reservation_id||'.');
169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');
175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */
176: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_uom_code='||p_query_input.reservation_uom_code||'.'); */

Line 173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');

169: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : organization_id='||p_query_input.organization_id||'.');
170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');
175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */
176: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_uom_code='||p_query_input.reservation_uom_code||'.'); */
177: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_quantity='||p_query_input.reservation_quantity||'.'); */

Line 174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');

170: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_type_id='||p_query_input.demand_source_type_id||'.');
171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');
175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */
176: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_uom_code='||p_query_input.reservation_uom_code||'.'); */
177: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_quantity='||p_query_input.reservation_quantity||'.'); */
178:

Line 175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */

171: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_name='||p_query_input.demand_source_name||'.'); */
172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');
175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */
176: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_uom_code='||p_query_input.reservation_uom_code||'.'); */
177: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_quantity='||p_query_input.reservation_quantity||'.'); */
178:
179: /* Initialize API return status to success */

Line 176: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_uom_code='||p_query_input.reservation_uom_code||'.'); */

172: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_header_id='||p_query_input.demand_source_header_id||'.');
173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');
175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */
176: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_uom_code='||p_query_input.reservation_uom_code||'.'); */
177: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_quantity='||p_query_input.reservation_quantity||'.'); */
178:
179: /* Initialize API return status to success */
180: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 177: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_quantity='||p_query_input.reservation_quantity||'.'); */

173: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : demand_source_line_id='||p_query_input.demand_source_line_id||'.');
174: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : inventory_item_id='||p_query_input.inventory_item_id||'.');
175: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : primary_uom_code='||p_query_input.primary_uom_code||'.'); */
176: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_uom_code='||p_query_input.reservation_uom_code||'.'); */
177: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q : reservation_quantity='||p_query_input.reservation_quantity||'.'); */
178:
179: /* Initialize API return status to success */
180: x_return_status := FND_API.G_RET_STS_SUCCESS;
181:

Line 185: GMI_Reservation_Util.ic_tran_rec_tbl := l_ic_tran_rec_tbl_empty;

181:
182: /* ============================================================================================= */
183: /* Reinit the transaction cache. */
184: /* ============================================================================================= */
185: GMI_Reservation_Util.ic_tran_rec_tbl := l_ic_tran_rec_tbl_empty;
186: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q begin COUNT reservation='||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT||'.');
187:
188: /* ============================================================================================= */
189: /* Choose which cursor from trans_id or line_id */

Line 186: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q begin COUNT reservation='||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT||'.');

182: /* ============================================================================================= */
183: /* Reinit the transaction cache. */
184: /* ============================================================================================= */
185: GMI_Reservation_Util.ic_tran_rec_tbl := l_ic_tran_rec_tbl_empty;
186: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q begin COUNT reservation='||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT||'.');
187:
188: /* ============================================================================================= */
189: /* Choose which cursor from trans_id or line_id */
190: /* Line_id is the most common use of the API. */

Line 237: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);

233: AND completed_ind = 0
234: AND line_id = p_query_input.demand_source_line_id
235: ORDER BY lot_id DESC;
236:
237: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);
238: /* ============================================================================================= */
239: /* Retrieve the reservation */
240: /* ============================================================================================= */
241: rec_index := 1;

Line 243: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q in loop='||rec_index);

239: /* Retrieve the reservation */
240: /* ============================================================================================= */
241: rec_index := 1;
242: LOOP
243: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q in loop='||rec_index);
244: FETCH c_Get_Reservation
245: INTO GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id
246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id
247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id

Line 245: INTO GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id

241: rec_index := 1;
242: LOOP
243: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q in loop='||rec_index);
244: FETCH c_Get_Reservation
245: INTO GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id
246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id
247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id
248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code

Line 246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id

242: LOOP
243: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q in loop='||rec_index);
244: FETCH c_Get_Reservation
245: INTO GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id
246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id
247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id
248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code

Line 247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id

243: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q in loop='||rec_index);
244: FETCH c_Get_Reservation
245: INTO GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id
246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id
247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id
248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id

Line 248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code

244: FETCH c_Get_Reservation
245: INTO GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id
246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id
247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id
248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location

Line 249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code

245: INTO GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id
246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id
247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id
248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id

Line 250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code

246: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).item_id
247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id
248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type

Line 251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id

247: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id
248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line

Line 252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location

248: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).co_code
249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type

Line 253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id

249: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).orgn_code
250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code

Line 254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type

250: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).whse_code
251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date

Line 255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line

251: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_id
252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty

Line 256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type

252: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).location
253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2

Line 257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code

253: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id
254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade

Line 258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date

254: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_type
255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no

Line 259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty

255: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_line
256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no

Line 260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2

256: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_type
257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status

Line 261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade

257: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).reason_code
258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat

Line 262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no

258: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_date
259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um

Line 263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no

259: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty
260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2

Line 264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status

260: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2
261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind

Line 265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat

261: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).qc_grade
262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id

Line 266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um

262: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_no
263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code

Line 267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2

263: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).sublot_no
264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id

Line 268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind

264: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).lot_status
265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id
272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index

Line 269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id

265: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_stat
266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id
272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index
273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv

Line 270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code

266: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id
272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index
273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv
274: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_detail_id

Line 271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id

267: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um2
268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id
272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index
273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv
274: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_detail_id
275: ;

Line 272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index

268: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).staged_ind
269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id
272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index
273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv
274: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_detail_id
275: ;
276: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);

Line 273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv

269: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).event_id
270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id
272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index
273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv
274: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_detail_id
275: ;
276: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);
277: EXIT WHEN c_Get_Reservation%NOTFOUND;

Line 274: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_detail_id

270: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).text_code
271: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id
272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index
273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv
274: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_detail_id
275: ;
276: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);
277: EXIT WHEN c_Get_Reservation%NOTFOUND;
278:

Line 276: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);

272: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).create_lot_index
273: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv
274: , GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_detail_id
275: ;
276: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);
277: EXIT WHEN c_Get_Reservation%NOTFOUND;
278:
279: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q just after fetch, trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id);
280: GMI_reservation_Util.PrintLn('qty1='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty);

Line 279: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q just after fetch, trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id);

275: ;
276: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);
277: EXIT WHEN c_Get_Reservation%NOTFOUND;
278:
279: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q just after fetch, trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id);
280: GMI_reservation_Util.PrintLn('qty1='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty);
281: GMI_reservation_Util.PrintLn('qty2='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2);
282:
283: l_quantity_to_convert := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;

Line 280: GMI_reservation_Util.PrintLn('qty1='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty);

276: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q before loop ROWCOUNT='||c_Get_Reservation%ROWCOUNT);
277: EXIT WHEN c_Get_Reservation%NOTFOUND;
278:
279: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q just after fetch, trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id);
280: GMI_reservation_Util.PrintLn('qty1='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty);
281: GMI_reservation_Util.PrintLn('qty2='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2);
282:
283: l_quantity_to_convert := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;
284: l_converted_quantity := 0;

Line 281: GMI_reservation_Util.PrintLn('qty2='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2);

277: EXIT WHEN c_Get_Reservation%NOTFOUND;
278:
279: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q just after fetch, trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id);
280: GMI_reservation_Util.PrintLn('qty1='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty);
281: GMI_reservation_Util.PrintLn('qty2='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2);
282:
283: l_quantity_to_convert := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;
284: l_converted_quantity := 0;
285: /* always Get the Apps Primary UM for the Item : */

Line 283: l_quantity_to_convert := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;

279: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q just after fetch, trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id);
280: GMI_reservation_Util.PrintLn('qty1='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty);
281: GMI_reservation_Util.PrintLn('qty2='||GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty2);
282:
283: l_quantity_to_convert := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;
284: l_converted_quantity := 0;
285: /* always Get the Apps Primary UM for the Item : */
286: /* only need to do this once */
287: IF rec_index = 1 THEN

Line 288: GMI_Reservation_Util.Get_AppsUOM_from_OPMUOM(

284: l_converted_quantity := 0;
285: /* always Get the Apps Primary UM for the Item : */
286: /* only need to do this once */
287: IF rec_index = 1 THEN
288: GMI_Reservation_Util.Get_AppsUOM_from_OPMUOM(
289: p_OPM_UOM => GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
290: , x_Apps_UOM => l_Apps_primary_um
291: , x_return_status => x_return_status
292: , x_msg_count => x_msg_count

Line 289: p_OPM_UOM => GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um

285: /* always Get the Apps Primary UM for the Item : */
286: /* only need to do this once */
287: IF rec_index = 1 THEN
288: GMI_Reservation_Util.Get_AppsUOM_from_OPMUOM(
289: p_OPM_UOM => GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_um
290: , x_Apps_UOM => l_Apps_primary_um
291: , x_return_status => x_return_status
292: , x_msg_count => x_msg_count
293: , x_msg_data => x_msg_data);

Line 298: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_AppsUOM_from_OPMUOM');

294:
295: IF ( x_return_status <> FND_API.G_RET_STS_SUCCESS )
296: THEN
297: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
298: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_AppsUOM_from_OPMUOM');
299: FND_MESSAGE.Set_Token('WHERE', 'Query_Reservation');
300: FND_MSG_PUB.Add;
301: raise FND_API.G_EXC_ERROR;
302: END IF;

Line 306: GMI_Reservation_Util.Validation_for_Query

302: END IF;
303: /* ============================================================================================= */
304: /* Validation for the query (private level) */
305: /* ============================================================================================= */
306: GMI_Reservation_Util.Validation_for_Query
307: ( p_query_input => p_query_input
308: , x_opm_um => l_OPM_order_um
309: , x_apps_um => l_Apps_order_um
310: , x_ic_item_mst_rec => l_ic_item_mst_rec

Line 319: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Validation_for_Query');

315:
316: IF ( x_return_status <> FND_API.G_RET_STS_SUCCESS )
317: THEN
318: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
319: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Validation_for_Query');
320: FND_MESSAGE.Set_Token('WHERE', 'Query_Reservation');
321: /* x_error_code := x_return_status ; */ /* Bug 2168710 */
322: x_return_status := FND_API.G_RET_STS_ERROR;
323: FND_MSG_PUB.Add;

Line 331: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q OPM_order_um='||l_OPM_order_um||', item_um='||l_ic_item_mst_rec.item_um||'.');

327:
328: /* ============================================================================================= */
329: /* Convert reserved quantity (in ic_tran_pnd, so OPM) into the reservation_UOM of the SO. */
330: /* =============================================================================================*/
331: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q OPM_order_um='||l_OPM_order_um||', item_um='||l_ic_item_mst_rec.item_um||'.');
332: IF (l_OPM_order_um <> l_ic_item_mst_rec.item_um)
333: THEN
334: GMICUOM.icuomcv(pitem_id => l_ic_item_mst_rec.item_id
335: , plot_id => 0

Line 353: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q converted qty AFTER rounding = '|| l_converted_quantity);

349: n := 9;
350: END;
351:
352: l_converted_quantity := round(l_converted_quantity, n); -- OPM 2115306
353: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q converted qty AFTER rounding = '|| l_converted_quantity);
354: ELSE
355: l_converted_quantity := l_quantity_to_convert;
356: END IF;
357:

Line 363: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id := FND_GLOBAL.USER_ID;

359: /* ============================================================================================= */
360: /* Populate the mtl_reservation rec type */
361: /* and the ic_tran_rec table */
362: /* ============================================================================================= */
363: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id := FND_GLOBAL.USER_ID;
364: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv := l_ic_item_mst_rec.noninv_ind;
365:
366: x_mtl_reservation_tbl(rec_index).reservation_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id;
367: x_mtl_reservation_tbl(rec_index).organization_id := p_query_input.organization_id;

Line 364: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv := l_ic_item_mst_rec.noninv_ind;

360: /* Populate the mtl_reservation rec type */
361: /* and the ic_tran_rec table */
362: /* ============================================================================================= */
363: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id := FND_GLOBAL.USER_ID;
364: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv := l_ic_item_mst_rec.noninv_ind;
365:
366: x_mtl_reservation_tbl(rec_index).reservation_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id;
367: x_mtl_reservation_tbl(rec_index).organization_id := p_query_input.organization_id;
368: x_mtl_reservation_tbl(rec_index).inventory_item_id := l_ic_item_mst_rec.inventory_item_id;

Line 366: x_mtl_reservation_tbl(rec_index).reservation_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id;

362: /* ============================================================================================= */
363: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).user_id := FND_GLOBAL.USER_ID;
364: GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).non_inv := l_ic_item_mst_rec.noninv_ind;
365:
366: x_mtl_reservation_tbl(rec_index).reservation_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id;
367: x_mtl_reservation_tbl(rec_index).organization_id := p_query_input.organization_id;
368: x_mtl_reservation_tbl(rec_index).inventory_item_id := l_ic_item_mst_rec.inventory_item_id;
369: x_mtl_reservation_tbl(rec_index).demand_source_header_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id;
370: x_mtl_reservation_tbl(rec_index).demand_source_line_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id;

Line 369: x_mtl_reservation_tbl(rec_index).demand_source_header_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id;

365:
366: x_mtl_reservation_tbl(rec_index).reservation_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id;
367: x_mtl_reservation_tbl(rec_index).organization_id := p_query_input.organization_id;
368: x_mtl_reservation_tbl(rec_index).inventory_item_id := l_ic_item_mst_rec.inventory_item_id;
369: x_mtl_reservation_tbl(rec_index).demand_source_header_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id;
370: x_mtl_reservation_tbl(rec_index).demand_source_line_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id;
371: /* hwahdani 1388867 */
372: x_mtl_reservation_tbl(rec_index).demand_source_type_id := INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_OE;
373: x_mtl_reservation_tbl(rec_index).requirement_date := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_date;

Line 370: x_mtl_reservation_tbl(rec_index).demand_source_line_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id;

366: x_mtl_reservation_tbl(rec_index).reservation_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_id;
367: x_mtl_reservation_tbl(rec_index).organization_id := p_query_input.organization_id;
368: x_mtl_reservation_tbl(rec_index).inventory_item_id := l_ic_item_mst_rec.inventory_item_id;
369: x_mtl_reservation_tbl(rec_index).demand_source_header_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id;
370: x_mtl_reservation_tbl(rec_index).demand_source_line_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id;
371: /* hwahdani 1388867 */
372: x_mtl_reservation_tbl(rec_index).demand_source_type_id := INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_OE;
373: x_mtl_reservation_tbl(rec_index).requirement_date := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_date;
374: /* end of 1388867 */

Line 373: x_mtl_reservation_tbl(rec_index).requirement_date := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_date;

369: x_mtl_reservation_tbl(rec_index).demand_source_header_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).doc_id;
370: x_mtl_reservation_tbl(rec_index).demand_source_line_id := GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).line_id;
371: /* hwahdani 1388867 */
372: x_mtl_reservation_tbl(rec_index).demand_source_type_id := INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_OE;
373: x_mtl_reservation_tbl(rec_index).requirement_date := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_date;
374: /* end of 1388867 */
375:
376: /* Quantities in mtl_reservation_tbl are >0, those in ic_tran_rec_tbl are <=0. */
377: x_mtl_reservation_tbl(rec_index).primary_reservation_quantity := (-1) * GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;

Line 377: x_mtl_reservation_tbl(rec_index).primary_reservation_quantity := (-1) * GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;

373: x_mtl_reservation_tbl(rec_index).requirement_date := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_date;
374: /* end of 1388867 */
375:
376: /* Quantities in mtl_reservation_tbl are >0, those in ic_tran_rec_tbl are <=0. */
377: x_mtl_reservation_tbl(rec_index).primary_reservation_quantity := (-1) * GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;
378: x_mtl_reservation_tbl(rec_index).primary_uom_code := l_Apps_primary_um;
379: x_mtl_reservation_tbl(rec_index).reservation_quantity := (-1) * l_converted_quantity;
380: x_mtl_reservation_tbl(rec_index).reservation_uom_code := l_Apps_order_um;
381: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q reservation_quantity='||x_mtl_reservation_tbl(rec_index).reservation_quantity||'.');

Line 381: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q reservation_quantity='||x_mtl_reservation_tbl(rec_index).reservation_quantity||'.');

377: x_mtl_reservation_tbl(rec_index).primary_reservation_quantity := (-1) * GMI_Reservation_Util.ic_tran_rec_tbl(rec_index).trans_qty;
378: x_mtl_reservation_tbl(rec_index).primary_uom_code := l_Apps_primary_um;
379: x_mtl_reservation_tbl(rec_index).reservation_quantity := (-1) * l_converted_quantity;
380: x_mtl_reservation_tbl(rec_index).reservation_uom_code := l_Apps_order_um;
381: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q reservation_quantity='||x_mtl_reservation_tbl(rec_index).reservation_quantity||'.');
382:
383: x_mtl_reservation_tbl(rec_index).attribute1 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).qc_grade ;
384: x_mtl_reservation_tbl(rec_index).attribute2 := (-1) * GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_qty2 ;
385: x_mtl_reservation_tbl(rec_index).attribute3 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_um2 ;

Line 383: x_mtl_reservation_tbl(rec_index).attribute1 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).qc_grade ;

379: x_mtl_reservation_tbl(rec_index).reservation_quantity := (-1) * l_converted_quantity;
380: x_mtl_reservation_tbl(rec_index).reservation_uom_code := l_Apps_order_um;
381: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q reservation_quantity='||x_mtl_reservation_tbl(rec_index).reservation_quantity||'.');
382:
383: x_mtl_reservation_tbl(rec_index).attribute1 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).qc_grade ;
384: x_mtl_reservation_tbl(rec_index).attribute2 := (-1) * GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_qty2 ;
385: x_mtl_reservation_tbl(rec_index).attribute3 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_um2 ;
386: x_mtl_reservation_tbl(rec_index).attribute4 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).line_detail_id ;
387: x_mtl_reservation_tbl(rec_index).detailed_quantity := 0;

Line 384: x_mtl_reservation_tbl(rec_index).attribute2 := (-1) * GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_qty2 ;

380: x_mtl_reservation_tbl(rec_index).reservation_uom_code := l_Apps_order_um;
381: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q reservation_quantity='||x_mtl_reservation_tbl(rec_index).reservation_quantity||'.');
382:
383: x_mtl_reservation_tbl(rec_index).attribute1 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).qc_grade ;
384: x_mtl_reservation_tbl(rec_index).attribute2 := (-1) * GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_qty2 ;
385: x_mtl_reservation_tbl(rec_index).attribute3 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_um2 ;
386: x_mtl_reservation_tbl(rec_index).attribute4 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).line_detail_id ;
387: x_mtl_reservation_tbl(rec_index).detailed_quantity := 0;
388: rec_index := rec_index + 1;

Line 385: x_mtl_reservation_tbl(rec_index).attribute3 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_um2 ;

381: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q reservation_quantity='||x_mtl_reservation_tbl(rec_index).reservation_quantity||'.');
382:
383: x_mtl_reservation_tbl(rec_index).attribute1 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).qc_grade ;
384: x_mtl_reservation_tbl(rec_index).attribute2 := (-1) * GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_qty2 ;
385: x_mtl_reservation_tbl(rec_index).attribute3 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_um2 ;
386: x_mtl_reservation_tbl(rec_index).attribute4 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).line_detail_id ;
387: x_mtl_reservation_tbl(rec_index).detailed_quantity := 0;
388: rec_index := rec_index + 1;
389: END LOOP;

Line 386: x_mtl_reservation_tbl(rec_index).attribute4 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).line_detail_id ;

382:
383: x_mtl_reservation_tbl(rec_index).attribute1 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).qc_grade ;
384: x_mtl_reservation_tbl(rec_index).attribute2 := (-1) * GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_qty2 ;
385: x_mtl_reservation_tbl(rec_index).attribute3 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).trans_um2 ;
386: x_mtl_reservation_tbl(rec_index).attribute4 := GMI_RESERVATION_UTIL.ic_tran_rec_tbl(rec_index).line_detail_id ;
387: x_mtl_reservation_tbl(rec_index).detailed_quantity := 0;
388: rec_index := rec_index + 1;
389: END LOOP;
390: CLOSE c_Get_Reservation;

Line 392: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q COUNT reservation='||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT||'.');

388: rec_index := rec_index + 1;
389: END LOOP;
390: CLOSE c_Get_Reservation;
391:
392: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q COUNT reservation='||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT||'.');
393: x_mtl_reservation_tbl_count := GMI_Reservation_Util.ic_tran_rec_tbl.COUNT;
394:
395:
396:

Line 393: x_mtl_reservation_tbl_count := GMI_Reservation_Util.ic_tran_rec_tbl.COUNT;

389: END LOOP;
390: CLOSE c_Get_Reservation;
391:
392: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT q COUNT reservation='||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT||'.');
393: x_mtl_reservation_tbl_count := GMI_Reservation_Util.ic_tran_rec_tbl.COUNT;
394:
395:
396:
397: EXCEPTION

Line 413: GMI_reservation_Util.PrintLn('(opm_dbg) in GMI_Reservation_PVT.Query_reservation SQLCODE:error='||SQLCODE||'.');

409: IF ( SQLCODE <> 0
410: AND SQLCODE <> 100)
411: THEN
412: x_error_code := SQLCODE;
413: GMI_reservation_Util.PrintLn('(opm_dbg) in GMI_Reservation_PVT.Query_reservation SQLCODE:error='||SQLCODE||'.');
414: FND_MESSAGE.Set_Name('GMI','GMI_SQL_ERROR');
415: FND_MESSAGE.Set_Token('WHERE', 'Query_Reservation');
416: FND_MESSAGE.Set_Token('SQL_CODE', SQLCODE);
417: FND_MESSAGE.Set_Token('SQL_ERRM', SQLERRM);

Line 492: l_ic_item_mst_rec GMI_Reservation_Util.ic_item_mst_rec;

488: l_mtl_rsv_tbl_count NUMBER;
489: x_error_code NUMBER;
490: l_lock_status BOOLEAN;
491: l_allocation_rec GMI_AUTO_ALLOCATE_PUB.gmi_allocation_rec;
492: l_ic_item_mst_rec GMI_Reservation_Util.ic_item_mst_rec;
493: l_cust_no op_cust_mst.cust_no%TYPE;
494: l_orgn_code sy_orgn_mst.orgn_code%TYPE;
495: l_trans_id NUMBER;
496: X_ALLOCATED_QTY1 NUMBER;

Line 520: GMI_reservation_Util.PrintLn('(opm_dbg) Entering proc GMI_Reservation_PVT.Create_reservation ');

516: AND completed_ind = 0
517: AND lot_id <> 0
518: AND delete_mark = 0;
519: BEGIN
520: GMI_reservation_Util.PrintLn('(opm_dbg) Entering proc GMI_Reservation_PVT.Create_reservation ');
521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');
522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');

Line 521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');

517: AND lot_id <> 0
518: AND delete_mark = 0;
519: BEGIN
520: GMI_reservation_Util.PrintLn('(opm_dbg) Entering proc GMI_Reservation_PVT.Create_reservation ');
521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');
522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');

Line 522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');

518: AND delete_mark = 0;
519: BEGIN
520: GMI_reservation_Util.PrintLn('(opm_dbg) Entering proc GMI_Reservation_PVT.Create_reservation ');
521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');
522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');

Line 523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');

519: BEGIN
520: GMI_reservation_Util.PrintLn('(opm_dbg) Entering proc GMI_Reservation_PVT.Create_reservation ');
521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');
522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */

Line 524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');

520: GMI_reservation_Util.PrintLn('(opm_dbg) Entering proc GMI_Reservation_PVT.Create_reservation ');
521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');
522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');

Line 525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');

521: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : user_id='||FND_GLOBAL.USER_ID||'.');
522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');

Line 526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');

522: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_id='||p_rsv_rec.reservation_id||'.');
523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');

Line 527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */

523: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : organization_id='||p_rsv_rec.organization_id||'.');
524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');

Line 528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');

524: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');

Line 529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');

525: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : requirement_date='||p_rsv_rec.requirement_date||'.');
526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');

Line 530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');

526: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');

Line 531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');

527: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');

Line 532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');

528: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');

Line 533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');

529: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');

Line 534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');

530: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_id='||p_rsv_rec.primary_uom_id||'.');
531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');

Line 535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');

531: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');
539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');

Line 536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');

532: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_uom_code='||p_rsv_rec.reservation_uom_code||'.');
533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');
539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');
540: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute2='||p_rsv_rec.attribute2||'.');

Line 537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');

533: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : reservation_quantity='||p_rsv_rec.reservation_quantity||'.');
534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');
539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');
540: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute2='||p_rsv_rec.attribute2||'.');
541: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute3='||p_rsv_rec.attribute3||'.');

Line 538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');

534: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : prim_reservation_quantity='||p_rsv_rec.primary_reservation_quantity||'.');
535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');
539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');
540: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute2='||p_rsv_rec.attribute2||'.');
541: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute3='||p_rsv_rec.attribute3||'.');
542:

Line 539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');

535: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : detailed_quantity='||p_rsv_rec.detailed_quantity||'.');
536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');
539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');
540: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute2='||p_rsv_rec.attribute2||'.');
541: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute3='||p_rsv_rec.attribute3||'.');
542:
543: /* ============================================================================================= */

Line 540: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute2='||p_rsv_rec.attribute2||'.');

536: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : external_source_code='||p_rsv_rec.external_source_code||'.');
537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');
539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');
540: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute2='||p_rsv_rec.attribute2||'.');
541: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute3='||p_rsv_rec.attribute3||'.');
542:
543: /* ============================================================================================= */
544: /* Initialize API return status to success */

Line 541: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute3='||p_rsv_rec.attribute3||'.');

537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_code='||p_rsv_rec.subinventory_code||'.');
538: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : subinventory_id='||p_rsv_rec.subinventory_id||'.');
539: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute1='||p_rsv_rec.attribute1||'.');
540: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute2='||p_rsv_rec.attribute2||'.');
541: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : attribute3='||p_rsv_rec.attribute3||'.');
542:
543: /* ============================================================================================= */
544: /* Initialize API return status to success */
545: /* =============================================================================================*/

Line 556: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : details exits, no auto allocations ');

552: /*Open check_detailed_allocations;
553: Fetch check_detailed_allocations into x_allocated_qty1;
554: Close check_detailed_allocations;
555: IF nvl(x_allocated_qty1,0) <> 0 THEN
556: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : details exits, no auto allocations ');
557: ELSE*/
558: /* =============================================================================================*/
559: /* If allocations exist then the reservation_quantity == 0, and I don't create anything */
560: /* Need to check that assumption! */

Line 562: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Begin of treatment');

558: /* =============================================================================================*/
559: /* If allocations exist then the reservation_quantity == 0, and I don't create anything */
560: /* Need to check that assumption! */
561: /* ============================================================================================= */
562: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Begin of treatment');
563:
564: IF (p_rsv_rec.reservation_quantity = 0)
565: THEN
566: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Nothing to reserve.');

Line 566: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Nothing to reserve.');

562: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Begin of treatment');
563:
564: IF (p_rsv_rec.reservation_quantity = 0)
565: THEN
566: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Nothing to reserve.');
567: FND_MESSAGE.Set_Name('GMI','GMI_NOTHING_TO_RESERVE');
568: FND_MSG_PUB.Add;
569: RAISE FND_API.G_EXC_ERROR;
570: END IF;

Line 576: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c: GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0, calling Query_Reservation.');

572: /* =============================================================================================*/
573: /* Following a pb in August2000, as the query_reservation seems to not be called systematically,*/
574: /* I need to call Query_Reservation by myself.*/
575: /* ============================================================================================= */
576: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c: GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0, calling Query_Reservation.');
577: GMI_reservation_pub.Query_Reservation
578: ( p_api_version_number => 1.0
579: , p_init_msg_lst => FND_API.G_FALSE
580: , x_return_status => x_return_status

Line 596: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c: Error Returned by Query_Reservation.');

592:
593: /* There may have been a problem getting the rows */
594: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
595: THEN
596: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c: Error Returned by Query_Reservation.');
597: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
598: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_reservation_pub.Query_Reservation');
599: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
600: FND_MSG_PUB.ADD;

Line 609: GMI_Reservation_Util.Validation_before_Allocate(

605:
606: /* =============================================================================================*/
607: /* Validation then fill the l_allocation_rec in.*/
608: /* =============================================================================================*/
609: GMI_Reservation_Util.Validation_before_Allocate(
610: p_mtl_rsv_rec => p_rsv_rec
611: , x_allocation_rec => l_allocation_rec
612: , x_ic_item_mst_rec => l_ic_item_mst_rec
613: , x_orgn_code => l_orgn_code

Line 620: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Validation_Before_Allocate.');

616: , x_msg_data => x_msg_data);
617:
618: IF ( x_return_status <> FND_API.G_RET_STS_SUCCESS )
619: THEN
620: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Validation_Before_Allocate.');
621: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
622: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Validation_before_Allocate');
623: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
624: FND_MSG_PUB.Add;

Line 622: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Validation_before_Allocate');

618: IF ( x_return_status <> FND_API.G_RET_STS_SUCCESS )
619: THEN
620: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Validation_Before_Allocate.');
621: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
622: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Validation_before_Allocate');
623: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
624: FND_MSG_PUB.Add;
625: RAISE FND_API.G_EXC_ERROR;
626: END IF;

Line 630: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_loct='||GMI_Reservation_Util.G_DEFAULT_LOCT||'.');

626: END IF;
627:
628:
629:
630: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_loct='||GMI_Reservation_Util.G_DEFAULT_LOCT||'.');
631: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_lot_index='||l_default_lot_index||'.');
632: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : alloc_class='||l_ic_item_mst_rec.alloc_class||'.');
633:
634: /* =============================================================================================*/

Line 631: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_lot_index='||l_default_lot_index||'.');

627:
628:
629:
630: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_loct='||GMI_Reservation_Util.G_DEFAULT_LOCT||'.');
631: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_lot_index='||l_default_lot_index||'.');
632: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : alloc_class='||l_ic_item_mst_rec.alloc_class||'.');
633:
634: /* =============================================================================================*/
635: /* No allocation exist and rules are AUTO_ALLOC. Then call OPM_auto_allocation and the transaction engine.*/

Line 632: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : alloc_class='||l_ic_item_mst_rec.alloc_class||'.');

628:
629:
630: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_loct='||GMI_Reservation_Util.G_DEFAULT_LOCT||'.');
631: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : default_lot_index='||l_default_lot_index||'.');
632: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : alloc_class='||l_ic_item_mst_rec.alloc_class||'.');
633:
634: /* =============================================================================================*/
635: /* No allocation exist and rules are AUTO_ALLOC. Then call OPM_auto_allocation and the transaction engine.*/
636: /* =============================================================================================*/

Line 653: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.doc_id='||l_allocation_rec.doc_id||'.');

649: /* l_allocation_rec.trans_date := requirement_date done*/
650: /* l_allocation_rec.user_id := FND_GLOBAL.USER_ID (c_user) done*/
651: /* l_allocation_rec.user_name := FND_GLOBAL.USER_ID (c_user) done*/
652: /* =============================================================================================*/
653: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.doc_id='||l_allocation_rec.doc_id||'.');
654: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.line_id='||l_allocation_rec.line_id||'.');
655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');
656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');

Line 654: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.line_id='||l_allocation_rec.line_id||'.');

650: /* l_allocation_rec.user_id := FND_GLOBAL.USER_ID (c_user) done*/
651: /* l_allocation_rec.user_name := FND_GLOBAL.USER_ID (c_user) done*/
652: /* =============================================================================================*/
653: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.doc_id='||l_allocation_rec.doc_id||'.');
654: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.line_id='||l_allocation_rec.line_id||'.');
655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');
656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');

Line 655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');

651: /* l_allocation_rec.user_name := FND_GLOBAL.USER_ID (c_user) done*/
652: /* =============================================================================================*/
653: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.doc_id='||l_allocation_rec.doc_id||'.');
654: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.line_id='||l_allocation_rec.line_id||'.');
655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');
656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');

Line 656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');

652: /* =============================================================================================*/
653: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.doc_id='||l_allocation_rec.doc_id||'.');
654: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.line_id='||l_allocation_rec.line_id||'.');
655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');
656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');

Line 657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');

653: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.doc_id='||l_allocation_rec.doc_id||'.');
654: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.line_id='||l_allocation_rec.line_id||'.');
655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');
656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');

Line 658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');

654: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.line_id='||l_allocation_rec.line_id||'.');
655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');
656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');

Line 659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');

655: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.item_no='||l_allocation_rec.item_no||'.');
656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');

Line 660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');

656: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.whse_code='||l_allocation_rec.whse_code||'.');
657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');

Line 661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');

657: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.co_code='||l_allocation_rec.co_code||'.');
658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');
665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');

Line 662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');

658: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.cust_no='||l_allocation_rec.cust_no||'.');
659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');
665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');
666: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_name='||l_allocation_rec.user_name||'.');

Line 663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');

659: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');
665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');
666: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_name='||l_allocation_rec.user_name||'.');
667: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c Calls Auto Allocation Engine');

Line 664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');

660: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');
665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');
666: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_name='||l_allocation_rec.user_name||'.');
667: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c Calls Auto Allocation Engine');
668:

Line 665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');

661: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');
665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');
666: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_name='||l_allocation_rec.user_name||'.');
667: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c Calls Auto Allocation Engine');
668:
669: /* =============================================================================================*/

Line 666: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_name='||l_allocation_rec.user_name||'.');

662: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');
665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');
666: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_name='||l_allocation_rec.user_name||'.');
667: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c Calls Auto Allocation Engine');
668:
669: /* =============================================================================================*/
670: /* Check the existence of the default lot for the transaction/item*/

Line 667: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c Calls Auto Allocation Engine');

663: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
664: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.trans_date='||l_allocation_rec.trans_date||'.');
665: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_id='||l_allocation_rec.user_id||'.');
666: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.user_name='||l_allocation_rec.user_name||'.');
667: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c Calls Auto Allocation Engine');
668:
669: /* =============================================================================================*/
670: /* Check the existence of the default lot for the transaction/item*/
671: /* =============================================================================================*/

Line 673: IF (GMI_Reservation_Util.G_DEFAULT_LOCT IS NULL)

669: /* =============================================================================================*/
670: /* Check the existence of the default lot for the transaction/item*/
671: /* =============================================================================================*/
672: /* Test the default_Loct constant.*/
673: IF (GMI_Reservation_Util.G_DEFAULT_LOCT IS NULL)
674: THEN
675: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Cannot get default lot.');
676: FND_MESSAGE.Set_Name('GMI','SY_API_UNABLE_TO_GET_CONSTANT');
677: FND_MESSAGE.Set_Token('CONSTANT_NAME','IC$DEFAULT_LOCT');

Line 675: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Cannot get default lot.');

671: /* =============================================================================================*/
672: /* Test the default_Loct constant.*/
673: IF (GMI_Reservation_Util.G_DEFAULT_LOCT IS NULL)
674: THEN
675: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Cannot get default lot.');
676: FND_MESSAGE.Set_Name('GMI','SY_API_UNABLE_TO_GET_CONSTANT');
677: FND_MESSAGE.Set_Token('CONSTANT_NAME','IC$DEFAULT_LOCT');
678: FND_MSG_PUB.Add;
679: RAISE FND_API.G_EXC_ERROR;

Line 684: GMI_Reservation_Util.Get_Default_Lot(

680: END IF;
681:
682:
683: /* Retrieve the default lot in the transaction*/
684: GMI_Reservation_Util.Get_Default_Lot(
685: x_ic_tran_pnd_index => l_default_lot_index
686: , x_return_status => x_return_status
687: , x_msg_count => x_msg_count
688: , x_msg_data => x_msg_data);

Line 692: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Get_Default_Lot.');

688: , x_msg_data => x_msg_data);
689:
690: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
691: THEN
692: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Get_Default_Lot.');
693: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
694: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');
695: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
696: FND_MSG_PUB.Add;

Line 694: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');

690: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
691: THEN
692: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Get_Default_Lot.');
693: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
694: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');
695: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
696: FND_MSG_PUB.Add;
697: RAISE FND_API.G_EXC_ERROR;
698: END IF;

Line 711: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Lock_Inventory.');

707: , o_lock_status => l_lock_status
708: );
709:
710: IF (l_lock_status = FALSE) THEN
711: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Lock_Inventory.');
712: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
713: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Locks.Lock_Inventory');
714: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
715: FND_MSG_PUB.Add;

Line 716: GMI_reservation_Util.PrintLn('return 1 in lock inventory');

712: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
713: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Locks.Lock_Inventory');
714: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
715: FND_MSG_PUB.Add;
716: GMI_reservation_Util.PrintLn('return 1 in lock inventory');
717: RETURN;
718: -- RAISE FND_API.G_EXC_ERROR; Bug2516545
719: END IF;
720:

Line 724: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Going to create the Default Lot');

720:
721: End Bug 2521215 */
722:
723: IF (l_default_lot_index = 0) THEN
724: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Going to create the Default Lot');
725: /* =============================================================================================*/
726: /* No default lot exist AND MANUAL Allocation. Then create the default lot*/
727: /* =============================================================================================*/
728: l_trans_id := NULL;

Line 730: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c before Create_Default_Lot orgn_code='||l_orgn_code||', trans_id(if not null then UPDATE default_lot)='||l_trans_id);

726: /* No default lot exist AND MANUAL Allocation. Then create the default lot*/
727: /* =============================================================================================*/
728: l_trans_id := NULL;
729: /* bug 1687531, moved here from out side of if */
730: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c before Create_Default_Lot orgn_code='||l_orgn_code||', trans_id(if not null then UPDATE default_lot)='||l_trans_id);
731: GMI_Reservation_Util.Create_Default_Lot(
732: p_allocation_rec => l_allocation_rec
733: , p_ic_item_mst_rec => l_ic_item_mst_rec
734: , p_orgn_code => l_orgn_code

Line 731: GMI_Reservation_Util.Create_Default_Lot(

727: /* =============================================================================================*/
728: l_trans_id := NULL;
729: /* bug 1687531, moved here from out side of if */
730: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c before Create_Default_Lot orgn_code='||l_orgn_code||', trans_id(if not null then UPDATE default_lot)='||l_trans_id);
731: GMI_Reservation_Util.Create_Default_Lot(
732: p_allocation_rec => l_allocation_rec
733: , p_ic_item_mst_rec => l_ic_item_mst_rec
734: , p_orgn_code => l_orgn_code
735: , p_trans_id => l_trans_id

Line 742: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Create_Default_Lot.');

738: , x_msg_data => x_msg_data);
739:
740: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
741: THEN
742: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Create_Default_Lot.');
743: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
744: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Create_Default_Lot');
745: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
746: FND_MSG_PUB.Add;

Line 744: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Create_Default_Lot');

740: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
741: THEN
742: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Create_Default_Lot.');
743: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
744: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Create_Default_Lot');
745: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
746: FND_MSG_PUB.Add;
747: RAISE FND_API.G_EXC_ERROR;
748: END IF;

Line 751: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c DefaultLot already exist NO Error (Going to update the default lot transaction).');

747: RAISE FND_API.G_EXC_ERROR;
748: END IF;
749:
750: ELSE
751: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c DefaultLot already exist NO Error (Going to update the default lot transaction).');
752: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
753: /* bug 2240221*/
754: IF p_rsv_rec.requirement_date <> FND_API.G_MISS_DATE THEN
755: l_default_tran_rec.trans_date := p_rsv_rec.requirement_date ;

Line 752: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);

748: END IF;
749:
750: ELSE
751: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c DefaultLot already exist NO Error (Going to update the default lot transaction).');
752: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
753: /* bug 2240221*/
754: IF p_rsv_rec.requirement_date <> FND_API.G_MISS_DATE THEN
755: l_default_tran_rec.trans_date := p_rsv_rec.requirement_date ;
756: END IF;

Line 759: GMI_reservation_Util.PrintLn('(opm_dbg) p_rsv_rec.inventory_item_id='||p_rsv_rec.inventory_item_id);

755: l_default_tran_rec.trans_date := p_rsv_rec.requirement_date ;
756: END IF;
757:
758:
759: GMI_reservation_Util.PrintLn('(opm_dbg) p_rsv_rec.inventory_item_id='||p_rsv_rec.inventory_item_id);
760: GMI_reservation_Util.PrintLn('(opm_dbg) opm_item_id='||l_default_tran_rec.item_id);
761: GMI_reservation_Util.PrintLn('(opm_dbg) l_ic_item_mst_rec.item_id='||l_ic_item_mst_rec.item_id);
762:
763: /* Start bug 2711467 */

Line 760: GMI_reservation_Util.PrintLn('(opm_dbg) opm_item_id='||l_default_tran_rec.item_id);

756: END IF;
757:
758:
759: GMI_reservation_Util.PrintLn('(opm_dbg) p_rsv_rec.inventory_item_id='||p_rsv_rec.inventory_item_id);
760: GMI_reservation_Util.PrintLn('(opm_dbg) opm_item_id='||l_default_tran_rec.item_id);
761: GMI_reservation_Util.PrintLn('(opm_dbg) l_ic_item_mst_rec.item_id='||l_ic_item_mst_rec.item_id);
762:
763: /* Start bug 2711467 */
764: IF (l_default_tran_rec.item_id <> l_ic_item_mst_rec.item_id) THEN

Line 761: GMI_reservation_Util.PrintLn('(opm_dbg) l_ic_item_mst_rec.item_id='||l_ic_item_mst_rec.item_id);

757:
758:
759: GMI_reservation_Util.PrintLn('(opm_dbg) p_rsv_rec.inventory_item_id='||p_rsv_rec.inventory_item_id);
760: GMI_reservation_Util.PrintLn('(opm_dbg) opm_item_id='||l_default_tran_rec.item_id);
761: GMI_reservation_Util.PrintLn('(opm_dbg) l_ic_item_mst_rec.item_id='||l_ic_item_mst_rec.item_id);
762:
763: /* Start bug 2711467 */
764: IF (l_default_tran_rec.item_id <> l_ic_item_mst_rec.item_id) THEN
765: l_default_tran_rec.item_id := l_ic_item_mst_rec.item_id;

Line 772: GMI_RESERVATION_UTIL.balance_default_lot

768: END IF;
769:
770: /* End bug 2711467*/
771:
772: GMI_RESERVATION_UTIL.balance_default_lot
773: ( p_ic_default_rec => l_default_tran_rec
774: , p_opm_item_id => l_default_tran_rec.item_id
775: , x_return_status => x_return_status
776: , x_msg_count => x_msg_count

Line 781: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Update_Transaction() updating the default record.');

777: , x_msg_data => x_msg_data
778: );
779: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
780: THEN
781: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Update_Transaction() updating the default record.');
782: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
783: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION');
784: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
785: FND_MSG_PUB.Add;

Line 791: l_trans_id := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index).trans_id;

787: END IF;
788: /* =============================================================================================*/
789: /* Set the trans_id of the default transaction (passed as a parameter)*/
790: /* =============================================================================================*/
791: l_trans_id := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index).trans_id;
792: END IF;
793:
794:
795: /* =============================================================================================*/

Line 805: GMI_reservation_Util.PrintLn('OPM Whse LOCATION CTL is : ' || l_whse_ctl);

801: OPEN get_whse_ctl;
802: FETCH get_whse_ctl INTO l_whse_ctl;
803: CLOSE get_whse_ctl;
804: -- B1766055 END
805: GMI_reservation_Util.PrintLn('OPM Whse LOCATION CTL is : ' || l_whse_ctl);
806: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : alloc_class='||l_ic_item_mst_rec.alloc_class||', lot_ctl='||l_ic_item_mst_rec.lot_ctl||', loct_ctl='||l_ic_item_mst_rec.loct_ctl);
807: -- added by fabdi 10/01/2001
808: -- fix for bug # 1574957
809: IF (l_ic_item_mst_rec.lot_ctl > 0) OR

Line 806: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : alloc_class='||l_ic_item_mst_rec.alloc_class||', lot_ctl='||l_ic_item_mst_rec.lot_ctl||', loct_ctl='||l_ic_item_mst_rec.loct_ctl);

802: FETCH get_whse_ctl INTO l_whse_ctl;
803: CLOSE get_whse_ctl;
804: -- B1766055 END
805: GMI_reservation_Util.PrintLn('OPM Whse LOCATION CTL is : ' || l_whse_ctl);
806: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : alloc_class='||l_ic_item_mst_rec.alloc_class||', lot_ctl='||l_ic_item_mst_rec.lot_ctl||', loct_ctl='||l_ic_item_mst_rec.loct_ctl);
807: -- added by fabdi 10/01/2001
808: -- fix for bug # 1574957
809: IF (l_ic_item_mst_rec.lot_ctl > 0) OR
810: (l_ic_item_mst_rec.loct_ctl > 0 AND l_whse_ctl > 0)

Line 821: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Customer is not synchronized. SO_line_id='||l_allocation_rec.line_id);

817: /* 7-Nov-2000 odaboval : Bug 1479751 : Added the test and a message.*/
818: /* comment this out, no need after bug 2245351*/
819: /*IF (l_allocation_rec.cust_no = ' ' OR l_allocation_rec.cust_no IS NULL)
820: THEN
821: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Customer is not synchronized. SO_line_id='||l_allocation_rec.line_id);
822: FND_MESSAGE.Set_Name('GML','GML_CUST_NOT_OPM_SYNCHRONIZED');
823: FND_MESSAGE.Set_Token('SO_LINE_ID', l_allocation_rec.line_id);
824: FND_MSG_PUB.Add;
825: RAISE FND_API.G_EXC_ERROR;

Line 829: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Lock Rows then Call allocation engine');

825: RAISE FND_API.G_EXC_ERROR;
826: END IF;*/
827: /* End of Bug 1479751*/
828:
829: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Lock Rows then Call allocation engine');
830: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
831: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
832: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
833: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');

Line 830: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');

826: END IF;*/
827: /* End of Bug 1479751*/
828:
829: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Lock Rows then Call allocation engine');
830: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
831: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
832: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
833: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
834: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');

Line 831: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');

827: /* End of Bug 1479751*/
828:
829: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Lock Rows then Call allocation engine');
830: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
831: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
832: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
833: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
834: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
835: /* =============================================================================================*/

Line 832: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');

828:
829: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Lock Rows then Call allocation engine');
830: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
831: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
832: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
833: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
834: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
835: /* =============================================================================================*/
836: /* Lock rows in ic_loct_inv.*/

Line 833: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');

829: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Lock Rows then Call allocation engine');
830: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
831: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
832: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
833: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
834: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
835: /* =============================================================================================*/
836: /* Lock rows in ic_loct_inv.*/
837: /* =============================================================================================*/

Line 834: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');

830: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.grade='||l_allocation_rec.prefqc_grade||'.');
831: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty1='||l_allocation_rec.order_qty1||'.');
832: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_qty2='||l_allocation_rec.order_qty2||'.');
833: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um1='||l_allocation_rec.order_um1||'.');
834: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c alloc_rec.order_um2='||l_allocation_rec.order_um2||'.');
835: /* =============================================================================================*/
836: /* Lock rows in ic_loct_inv.*/
837: /* =============================================================================================*/
838: /* Bug 2521215 Do not Lock Inventory when Allocating

Line 846: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Lock_Inventory.');

842: , o_lock_status => l_lock_status
843: );
844:
845: IF (l_lock_status = FALSE) THEN
846: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Lock_Inventory.');
847: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
848: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Locks.Lock_Inventory');
849: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
850: FND_MSG_PUB.Add;

Line 852: GMI_reservation_Util.PrintLn('return 2 in lock inventory');

848: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Locks.Lock_Inventory');
849: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
850: FND_MSG_PUB.Add;
851: -- RAISE FND_API.G_EXC_ERROR; Bug2516545
852: GMI_reservation_Util.PrintLn('return 2 in lock inventory');
853: RETURN;
854: END IF;
855: End Bug 2521215 */
856:

Line 872: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Allocate_Inventory.');

868: , X_MSG_DATA => X_MSG_DATA
869: );
870:
871: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
872: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c ERROR:Returned by Allocate_Inventory.');
873: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
874: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Auto_Allocate_PUB.Allocate_Inventory');
875: FND_MESSAGE.Set_Token('WHERE', 'Create_Reservation');
876: FND_MSG_PUB.Add;

Line 880: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Manual Allocation or HighLevelReservation: Only Default Lot.');

876: FND_MSG_PUB.Add;
877: RAISE FND_API.G_EXC_ERROR;
878: END IF;
879: ELSE
880: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Manual Allocation or HighLevelReservation: Only Default Lot.');
881: END IF;
882: ELSE
883: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Item Not Lot or Location controlled : Only Default Lot.');
884: END IF;

Line 883: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Item Not Lot or Location controlled : Only Default Lot.');

879: ELSE
880: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Manual Allocation or HighLevelReservation: Only Default Lot.');
881: END IF;
882: ELSE
883: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT c : Item Not Lot or Location controlled : Only Default Lot.');
884: END IF;
885: --END IF;
886:
887: /* =============================================================================================*/

Line 893: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c No Error, quantity_reserved='||x_quantity_reserved||'.');

889: /* =============================================================================================*/
890: x_quantity_reserved := p_rsv_rec.reservation_quantity;
891: x_reservation_id := p_rsv_rec.demand_source_line_id;
892:
893: GMI_reservation_Util.PrintLn('(opm_dbg) in end of PVT c No Error, quantity_reserved='||x_quantity_reserved||'.');
894:
895: EXCEPTION
896:
897: /* =============================================================================================*/

Line 901: GMI_Reservation_Util.PrintLn('in end of PVT c ERROR.');

897: /* =============================================================================================*/
898: /* Error*/
899: /* =============================================================================================*/
900: WHEN FND_API.G_EXC_ERROR THEN
901: GMI_Reservation_Util.PrintLn('in end of PVT c ERROR.');
902: x_return_status := FND_API.G_RET_STS_ERROR;
903:
904: /* Get message count and data*/
905: FND_MSG_PUB.count_and_get

Line 911: GMI_Reservation_Util.PrintLn('in end of PVT c ERROR:Other.');

907: , p_data => x_msg_data
908: );
909:
910: WHEN OTHERS THEN
911: GMI_Reservation_Util.PrintLn('in end of PVT c ERROR:Other.');
912: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
913:
914: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME
915: , l_api_name

Line 1009: GMI_reservation_Util.PrintLn('(opm_dbg) Entering PVT u.');

1005: x_error_code NUMBER;
1006:
1007:
1008: BEGIN
1009: GMI_reservation_Util.PrintLn('(opm_dbg) Entering PVT u.');
1010: x_return_status := FND_API.G_RET_STS_SUCCESS;
1011:
1012: /* GMI_Reservation_Util.Validation_before_Update(
1013: p_mtl_rsv_rec => p_to_rsv_rec

Line 1012: /* GMI_Reservation_Util.Validation_before_Update(

1008: BEGIN
1009: GMI_reservation_Util.PrintLn('(opm_dbg) Entering PVT u.');
1010: x_return_status := FND_API.G_RET_STS_SUCCESS;
1011:
1012: /* GMI_Reservation_Util.Validation_before_Update(
1013: p_mtl_rsv_rec => p_to_rsv_rec
1014: ,x_ic_tran_rec => l_ic_tran_rec_out
1015: ,x_orgn_code => x_orgn_code
1016: ,x_return_status => x_return_status

Line 1020: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u : Error Returned by Validation_before_Update');

1016: ,x_return_status => x_return_status
1017: ,x_msg_count => x_msg_count
1018: ,x_msg_data => x_msg_data);
1019: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
1020: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u : Error Returned by Validation_before_Update');
1021: FND_MESSAGE.SET_NAME('GMI','ERROR_IN_VALIDATION_BEFORE_UPDATE');
1022: FND_MSG_PUB.ADD;
1023: RAISE FND_API.G_EXC_ERROR;
1024: END IF;

Line 1026: GMI_reservation_Util.PrintLn('ATTRIBUTE2 => ' || p_to_rsv_rec.attribute2);

1022: FND_MSG_PUB.ADD;
1023: RAISE FND_API.G_EXC_ERROR;
1024: END IF;
1025: */
1026: GMI_reservation_Util.PrintLn('ATTRIBUTE2 => ' || p_to_rsv_rec.attribute2);
1027: GMI_reservation_Util.PrintLn('ATTRIBUTE3 => ' || p_to_rsv_rec.attribute3);
1028:
1029: /* The query_reservation may not have been called prior to getting here so call it now */
1030: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Reinit GMI_Reservation_Util.ic_tran_rec_tbl, calling Query_Reservation.');

Line 1027: GMI_reservation_Util.PrintLn('ATTRIBUTE3 => ' || p_to_rsv_rec.attribute3);

1023: RAISE FND_API.G_EXC_ERROR;
1024: END IF;
1025: */
1026: GMI_reservation_Util.PrintLn('ATTRIBUTE2 => ' || p_to_rsv_rec.attribute2);
1027: GMI_reservation_Util.PrintLn('ATTRIBUTE3 => ' || p_to_rsv_rec.attribute3);
1028:
1029: /* The query_reservation may not have been called prior to getting here so call it now */
1030: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Reinit GMI_Reservation_Util.ic_tran_rec_tbl, calling Query_Reservation.');
1031: GMI_reservation_pub.Query_Reservation

Line 1030: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Reinit GMI_Reservation_Util.ic_tran_rec_tbl, calling Query_Reservation.');

1026: GMI_reservation_Util.PrintLn('ATTRIBUTE2 => ' || p_to_rsv_rec.attribute2);
1027: GMI_reservation_Util.PrintLn('ATTRIBUTE3 => ' || p_to_rsv_rec.attribute3);
1028:
1029: /* The query_reservation may not have been called prior to getting here so call it now */
1030: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Reinit GMI_Reservation_Util.ic_tran_rec_tbl, calling Query_Reservation.');
1031: GMI_reservation_pub.Query_Reservation
1032: ( p_api_version_number => 1.0
1033: ,p_init_msg_lst => fnd_api.g_false
1034: ,x_return_status => x_return_status

Line 1048: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0) THEN

1044: ,p_sort_by_req_date => inv_reservation_global.g_query_no_sort
1045: );
1046:
1047: /* There may not be any rows*/
1048: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0) THEN
1049: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error No Rows Found in mtl_reservation');
1050: FND_MESSAGE.SET_NAME('GMI','GMI_QTY_RSV_NOT_FOUND');
1051: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1052: FND_MESSAGE.Set_Token('SO_LINE_ID', p_original_rsv_rec.demand_source_line_id);

Line 1049: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error No Rows Found in mtl_reservation');

1045: );
1046:
1047: /* There may not be any rows*/
1048: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0) THEN
1049: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error No Rows Found in mtl_reservation');
1050: FND_MESSAGE.SET_NAME('GMI','GMI_QTY_RSV_NOT_FOUND');
1051: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1052: FND_MESSAGE.Set_Token('SO_LINE_ID', p_original_rsv_rec.demand_source_line_id);
1053: FND_MSG_PUB.ADD;

Line 1060: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Query_Reservation.');

1056:
1057: /* There may have been a problem getting the rows*/
1058: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1059: THEN
1060: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Query_Reservation.');
1061: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1062: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_reservation_pub.Query_Reservation');
1063: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1064: FND_MSG_PUB.ADD;

Line 1071: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u:: we have rows now calling Get_Default_Lot.');

1067:
1068: /* At this point the table should have rows*/
1069:
1070: /* Retrieve the default lot transaction we'll need it later */
1071: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u:: we have rows now calling Get_Default_Lot.');
1072: GMI_Reservation_Util.Get_Default_Lot(
1073: x_ic_tran_pnd_index => l_default_lot_index
1074: , x_return_status => x_return_status
1075: , x_msg_count => x_msg_count

Line 1072: GMI_Reservation_Util.Get_Default_Lot(

1068: /* At this point the table should have rows*/
1069:
1070: /* Retrieve the default lot transaction we'll need it later */
1071: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u:: we have rows now calling Get_Default_Lot.');
1072: GMI_Reservation_Util.Get_Default_Lot(
1073: x_ic_tran_pnd_index => l_default_lot_index
1074: , x_return_status => x_return_status
1075: , x_msg_count => x_msg_count
1076: , x_msg_data => x_msg_data);

Line 1079: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_Default_Lot.');

1075: , x_msg_count => x_msg_count
1076: , x_msg_data => x_msg_data);
1077:
1078: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
1079: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_Default_Lot.');
1080: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1081: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');
1082: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1083: FND_MSG_PUB.ADD;

Line 1081: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');

1077:
1078: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
1079: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_Default_Lot.');
1080: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1081: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');
1082: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1083: FND_MSG_PUB.ADD;
1084: RAISE FND_API.G_EXC_ERROR;
1085: END IF;

Line 1088: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);

1084: RAISE FND_API.G_EXC_ERROR;
1085: END IF;
1086:
1087: /* Populate local default row to hold values for comparision*/
1088: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
1089:
1090: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u:: saved default transaction to local rec.');
1091:
1092: /* ---------------------------------------------------------------------------------------*/

Line 1090: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u:: saved default transaction to local rec.');

1086:
1087: /* Populate local default row to hold values for comparision*/
1088: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
1089:
1090: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u:: saved default transaction to local rec.');
1091:
1092: /* ---------------------------------------------------------------------------------------*/
1093: /* Populate local original rec to hold values for comparision*/
1094: /* if this is not the default rec copy the original rec to l_original_tran_rec*/

Line 1097: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: l_default_tran_rec.trans_id is ' || l_default_tran_rec.trans_id);

1093: /* Populate local original rec to hold values for comparision*/
1094: /* if this is not the default rec copy the original rec to l_original_tran_rec*/
1095: /* else this is the default rec copy the default rec to l_original_tran_rec*/
1096: /* ---------------------------------------------------------------------------------------*/
1097: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: l_default_tran_rec.trans_id is ' || l_default_tran_rec.trans_id);
1098: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: p_original_rsv_rec.reservation_id is ' || p_original_rsv_rec.reservation_id);
1099: IF (l_default_tran_rec.trans_id <> p_original_rsv_rec.reservation_id)
1100: THEN
1101: GMI_Reservation_Util.Get_Allocation(

Line 1098: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: p_original_rsv_rec.reservation_id is ' || p_original_rsv_rec.reservation_id);

1094: /* if this is not the default rec copy the original rec to l_original_tran_rec*/
1095: /* else this is the default rec copy the default rec to l_original_tran_rec*/
1096: /* ---------------------------------------------------------------------------------------*/
1097: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: l_default_tran_rec.trans_id is ' || l_default_tran_rec.trans_id);
1098: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: p_original_rsv_rec.reservation_id is ' || p_original_rsv_rec.reservation_id);
1099: IF (l_default_tran_rec.trans_id <> p_original_rsv_rec.reservation_id)
1100: THEN
1101: GMI_Reservation_Util.Get_Allocation(
1102: p_trans_id => p_original_rsv_rec.reservation_id

Line 1101: GMI_Reservation_Util.Get_Allocation(

1097: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: l_default_tran_rec.trans_id is ' || l_default_tran_rec.trans_id);
1098: GMI_reservation_Util.PrintLn('opm_dbg) in PVT u: p_original_rsv_rec.reservation_id is ' || p_original_rsv_rec.reservation_id);
1099: IF (l_default_tran_rec.trans_id <> p_original_rsv_rec.reservation_id)
1100: THEN
1101: GMI_Reservation_Util.Get_Allocation(
1102: p_trans_id => p_original_rsv_rec.reservation_id
1103: ,x_ic_tran_pnd_index => l_original_tran_index
1104: ,x_return_status => x_return_status
1105: ,x_msg_count => x_msg_count

Line 1110: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_Allocation.');

1106: ,x_msg_data => x_msg_data);
1107:
1108: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1109: THEN
1110: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_Allocation.');
1111: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1112: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Allocation');
1113: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1114: FND_MSG_PUB.ADD;

Line 1112: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Allocation');

1108: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1109: THEN
1110: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_Allocation.');
1111: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1112: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Allocation');
1113: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1114: FND_MSG_PUB.ADD;
1115: RAISE FND_API.G_EXC_ERROR;
1116: END IF;

Line 1118: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Not updating the default, save orig trans to local rec.');

1114: FND_MSG_PUB.ADD;
1115: RAISE FND_API.G_EXC_ERROR;
1116: END IF;
1117:
1118: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Not updating the default, save orig trans to local rec.');
1119: l_original_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_original_tran_index);
1120: ELSE
1121: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Updating the default, save default trans to local rec.');
1122: l_original_tran_rec := l_default_tran_rec;

Line 1119: l_original_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_original_tran_index);

1115: RAISE FND_API.G_EXC_ERROR;
1116: END IF;
1117:
1118: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Not updating the default, save orig trans to local rec.');
1119: l_original_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_original_tran_index);
1120: ELSE
1121: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Updating the default, save default trans to local rec.');
1122: l_original_tran_rec := l_default_tran_rec;
1123: END IF;

Line 1121: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Updating the default, save default trans to local rec.');

1117:
1118: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Not updating the default, save orig trans to local rec.');
1119: l_original_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_original_tran_index);
1120: ELSE
1121: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Updating the default, save default trans to local rec.');
1122: l_original_tran_rec := l_default_tran_rec;
1123: END IF;
1124:
1125: /* -----------------------------------------------------------------------------------*/

Line 1133: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: primary_res_qty is null and rsv qty is'||l_to_rsv_qty);

1129: /* map to rsv um to opm um*/
1130: IF p_to_rsv_rec.primary_reservation_quantity = FND_API.G_MISS_NUM
1131: or nvl(p_to_rsv_rec.primary_reservation_quantity,0) = 0 THEN
1132: l_to_rsv_qty := p_to_rsv_rec.reservation_quantity;
1133: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: primary_res_qty is null and rsv qty is'||l_to_rsv_qty);
1134: l_to_rsv_um := p_to_rsv_rec.reservation_uom_code;
1135: --Begin Bug#3411704
1136: IF l_to_rsv_qty = FND_API.G_MISS_NUM THEN
1137: l_to_rsv_qty := p_original_rsv_rec.primary_reservation_quantity;

Line 1146: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: rsv uom is'||l_to_rsv_um);

1142: -- PK Bug 3606481. l_to_rsv_um should not be compared to FND_API.G_MISS_NUM. Removed part of OR clause.
1143: IF (l_to_rsv_um is NULL OR l_to_rsv_um = FND_API.G_MISS_CHAR) THEN
1144: l_to_rsv_um := p_original_rsv_rec.reservation_uom_code;
1145: END IF;
1146: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: rsv uom is'||l_to_rsv_um);
1147: GMI_Reservation_Util.Get_OPMUOM_from_AppsUOM(p_apps_uom => l_to_rsv_um
1148: ,x_opm_uom => l_opm_uom
1149: ,x_return_status => x_return_status
1150: ,x_msg_count => x_msg_count

Line 1147: GMI_Reservation_Util.Get_OPMUOM_from_AppsUOM(p_apps_uom => l_to_rsv_um

1143: IF (l_to_rsv_um is NULL OR l_to_rsv_um = FND_API.G_MISS_CHAR) THEN
1144: l_to_rsv_um := p_original_rsv_rec.reservation_uom_code;
1145: END IF;
1146: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: rsv uom is'||l_to_rsv_um);
1147: GMI_Reservation_Util.Get_OPMUOM_from_AppsUOM(p_apps_uom => l_to_rsv_um
1148: ,x_opm_uom => l_opm_uom
1149: ,x_return_status => x_return_status
1150: ,x_msg_count => x_msg_count
1151: ,x_msg_data => x_msg_data);

Line 1156: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: primary_res_qty is not null '||l_to_rsv_qty);

1152:
1153: ELSE
1154: l_to_rsv_qty := p_to_rsv_rec.primary_reservation_quantity;
1155: l_opm_uom := l_original_tran_rec.trans_um;
1156: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: primary_res_qty is not null '||l_to_rsv_qty);
1157: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: uom '||l_opm_uom);
1158: END IF;
1159: IF (x_return_status = FND_API.G_RET_STS_ERROR)
1160: THEN

Line 1157: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: uom '||l_opm_uom);

1153: ELSE
1154: l_to_rsv_qty := p_to_rsv_rec.primary_reservation_quantity;
1155: l_opm_uom := l_original_tran_rec.trans_um;
1156: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: primary_res_qty is not null '||l_to_rsv_qty);
1157: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: uom '||l_opm_uom);
1158: END IF;
1159: IF (x_return_status = FND_API.G_RET_STS_ERROR)
1160: THEN
1161: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_OPMUOMfromAppsUOM ');

Line 1161: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_OPMUOMfromAppsUOM ');

1157: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: uom '||l_opm_uom);
1158: END IF;
1159: IF (x_return_status = FND_API.G_RET_STS_ERROR)
1160: THEN
1161: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_OPMUOMfromAppsUOM ');
1162: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1163: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_OPMUOM_from_AppsUOM');
1164: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1165: FND_MSG_PUB.add;

Line 1163: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_OPMUOM_from_AppsUOM');

1159: IF (x_return_status = FND_API.G_RET_STS_ERROR)
1160: THEN
1161: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Get_OPMUOMfromAppsUOM ');
1162: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1163: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_OPMUOM_from_AppsUOM');
1164: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1165: FND_MSG_PUB.add;
1166: RAISE FND_API.G_EXC_ERROR;
1167: END IF;

Line 1180: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: new qty'||l_new_rsv_to_item_um_qty);

1176: ,pnew_uom => l_original_tran_rec.trans_um
1177: ,onew_qty => l_new_rsv_to_item_um_qty);
1178: ELSE
1179: l_new_rsv_to_item_um_qty := l_to_rsv_qty;
1180: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: new qty'||l_new_rsv_to_item_um_qty);
1181: END IF;
1182:
1183: /* Okay Lets Check For Secondary Quantities. We should Store*/
1184: /* The Secondary Qty in p_to_rsv_rec. Attribute2 the UOM is*/

Line 1188: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: attribute2'||p_to_rsv_rec.attribute2);

1184: /* The Secondary Qty in p_to_rsv_rec. Attribute2 the UOM is*/
1185: /* Always the same as the transaction in IC_TRAN_PND*/
1186: /* Therefore there will be no conversions so Store the Value.*/
1187:
1188: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: attribute2'||p_to_rsv_rec.attribute2);
1189: IF p_to_rsv_rec.attribute2 = FND_API.G_MISS_CHAR or p_to_rsv_rec.attribute2 is null
1190: THEN
1191: l_new_rsv_to_item_um_qty2 := NULL;
1192: ELSE

Line 1195: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: qty2'||l_new_rsv_to_item_um_qty2);

1191: l_new_rsv_to_item_um_qty2 := NULL;
1192: ELSE
1193: l_new_rsv_to_item_um_qty2 := to_number(p_to_rsv_rec.attribute2);
1194: END IF;
1195: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: qty2'||l_new_rsv_to_item_um_qty2);
1196:
1197: /* Compare reservation qtys if new qty is greater than old qty then add difference to the default*/
1198: /* l_orig_conv_to_new_rsv_qty is the same whether the uom changed or not, it is the new reservation quantity*/
1199: /* next we need to convert it to the ic_tran_pnd uom which is the item primary uom*/

Line 1203: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: l_new_rsv_to_item_um_qty is ' || l_new_rsv_to_item_um_qty);

1199: /* next we need to convert it to the ic_tran_pnd uom which is the item primary uom*/
1200: /* ---------------------------------------------------------------------------------*/
1201: /* If the new qty is greater than the old qty add the change to the default row qty*/
1202: /* ---------------------------------------------------------------------------------*/
1203: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: l_new_rsv_to_item_um_qty is ' || l_new_rsv_to_item_um_qty);
1204: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: l_original_tran_rec.trans_qty is ' || l_original_tran_rec.trans_qty);
1205: /* ======================================================= */
1206: /* if the trans_id is the default_lot's trans_id*/
1207: /* then*/

Line 1204: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: l_original_tran_rec.trans_qty is ' || l_original_tran_rec.trans_qty);

1200: /* ---------------------------------------------------------------------------------*/
1201: /* If the new qty is greater than the old qty add the change to the default row qty*/
1202: /* ---------------------------------------------------------------------------------*/
1203: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: l_new_rsv_to_item_um_qty is ' || l_new_rsv_to_item_um_qty);
1204: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: l_original_tran_rec.trans_qty is ' || l_original_tran_rec.trans_qty);
1205: /* ======================================================= */
1206: /* if the trans_id is the default_lot's trans_id*/
1207: /* then*/
1208: /* Update the default_lot with Delta*/

Line 1233: GMI_reservation_Util.PrintLn('(opm_dbg)in PVT u: Update PRIM default Lot to:' || l_default_tran_rec.trans_qty );

1229:
1230: l_default_tran_rec.trans_qty := -1 * ABS(l_new_rsv_to_item_um_qty);
1231: l_default_tran_rec.trans_qty2 := -1 * ABS(l_new_rsv_to_item_um_qty2);
1232: /* l_default_tran_rec.non_inv := 0;*/
1233: GMI_reservation_Util.PrintLn('(opm_dbg)in PVT u: Update PRIM default Lot to:' || l_default_tran_rec.trans_qty );
1234: GMI_reservation_Util.PrintLn('(opm_dbg)in PVT u: Update SECO default Lot to:' || l_default_tran_rec.trans_qty2 );
1235: GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION(
1236: p_api_version => 1.0
1237: ,p_init_msg_list => fnd_api.g_false

Line 1234: GMI_reservation_Util.PrintLn('(opm_dbg)in PVT u: Update SECO default Lot to:' || l_default_tran_rec.trans_qty2 );

1230: l_default_tran_rec.trans_qty := -1 * ABS(l_new_rsv_to_item_um_qty);
1231: l_default_tran_rec.trans_qty2 := -1 * ABS(l_new_rsv_to_item_um_qty2);
1232: /* l_default_tran_rec.non_inv := 0;*/
1233: GMI_reservation_Util.PrintLn('(opm_dbg)in PVT u: Update PRIM default Lot to:' || l_default_tran_rec.trans_qty );
1234: GMI_reservation_Util.PrintLn('(opm_dbg)in PVT u: Update SECO default Lot to:' || l_default_tran_rec.trans_qty2 );
1235: GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION(
1236: p_api_version => 1.0
1237: ,p_init_msg_list => fnd_api.g_false
1238: ,p_commit => l_commit

Line 1247: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error returned by GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION.');

1243: ,x_msg_count => x_msg_count
1244: ,x_msg_data => x_msg_data);
1245:
1246: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1247: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error returned by GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION.');
1248: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1249: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION');
1250: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1251: FND_MSG_PUB.Add;

Line 1266: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: New qty is More than old ');

1262: l_default_tran_rec.trans_qty := -1 * (ABS(l_default_tran_rec.trans_qty) + ABS(l_new_rsv_to_item_um_qty));
1263:
1264: l_default_tran_rec.trans_qty2 := -1 * (ABS(l_default_tran_rec.trans_qty2) + ABS(l_new_rsv_to_item_um_qty2));
1265:
1266: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: New qty is More than old ');
1267: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Update default row trans_qty to '|| l_default_tran_rec.trans_qty);
1268: GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION(
1269: p_api_version => 1.0
1270: ,p_init_msg_list => fnd_api.g_false

Line 1267: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Update default row trans_qty to '|| l_default_tran_rec.trans_qty);

1263:
1264: l_default_tran_rec.trans_qty2 := -1 * (ABS(l_default_tran_rec.trans_qty2) + ABS(l_new_rsv_to_item_um_qty2));
1265:
1266: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: New qty is More than old ');
1267: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Update default row trans_qty to '|| l_default_tran_rec.trans_qty);
1268: GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION(
1269: p_api_version => 1.0
1270: ,p_init_msg_list => fnd_api.g_false
1271: ,p_commit => l_commit

Line 1280: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error returned by GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION.');

1276: ,x_msg_count => x_msg_count
1277: ,x_msg_data => x_msg_data);
1278:
1279: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1280: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error returned by GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION.');
1281: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1282: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION');
1283: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1284: FND_MSG_PUB.Add;

Line 1291: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: The new rsv qty is smaller than the default qty.' );

1287: ELSE
1288: /* --------------------------------------------------------------------*/
1289: /* Otherwise call opm delete reservation to remove old allocation*/
1290: /* -------------------------------------------------------------------- */
1291: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: The new rsv qty is smaller than the default qty.' );
1292: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: We must delete the old reservation.' );
1293:
1294: /* Find the matching ic_tran_rec_tbl record for the rsv_rec passed in*/
1295: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: deleting allocation.');

Line 1292: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: We must delete the old reservation.' );

1288: /* --------------------------------------------------------------------*/
1289: /* Otherwise call opm delete reservation to remove old allocation*/
1290: /* -------------------------------------------------------------------- */
1291: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: The new rsv qty is smaller than the default qty.' );
1292: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: We must delete the old reservation.' );
1293:
1294: /* Find the matching ic_tran_rec_tbl record for the rsv_rec passed in*/
1295: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: deleting allocation.');
1296: /* This command will disappear when Query is changed to set it correctly*/

Line 1295: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: deleting allocation.');

1291: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: The new rsv qty is smaller than the default qty.' );
1292: GMI_reservation_Util.PrintLn('(opm_dbg) in UpdateReserv: We must delete the old reservation.' );
1293:
1294: /* Find the matching ic_tran_rec_tbl record for the rsv_rec passed in*/
1295: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: deleting allocation.');
1296: /* This command will disappear when Query is changed to set it correctly*/
1297: /* l_original_tran_rec.non_inv := 0;*/
1298: /* Delete the record since it is not the default record*/
1299: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Deleting transaction record res_id='||p_original_rsv_rec.reservation_id);

Line 1299: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Deleting transaction record res_id='||p_original_rsv_rec.reservation_id);

1295: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: deleting allocation.');
1296: /* This command will disappear when Query is changed to set it correctly*/
1297: /* l_original_tran_rec.non_inv := 0;*/
1298: /* Delete the record since it is not the default record*/
1299: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Deleting transaction record res_id='||p_original_rsv_rec.reservation_id);
1300: GMI_reservation_Util.PrintLn('(opm_dbg) trans_id='|| l_original_tran_rec.trans_id );
1301:
1302: GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION(
1303: p_api_version => 1.0

Line 1300: GMI_reservation_Util.PrintLn('(opm_dbg) trans_id='|| l_original_tran_rec.trans_id );

1296: /* This command will disappear when Query is changed to set it correctly*/
1297: /* l_original_tran_rec.non_inv := 0;*/
1298: /* Delete the record since it is not the default record*/
1299: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Deleting transaction record res_id='||p_original_rsv_rec.reservation_id);
1300: GMI_reservation_Util.PrintLn('(opm_dbg) trans_id='|| l_original_tran_rec.trans_id );
1301:
1302: GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION(
1303: p_api_version => 1.0
1304: ,p_init_msg_list => fnd_api.g_false

Line 1314: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: ERROR Returned by Delete_Transaction().');

1310: ,x_msg_count => x_msg_count
1311: ,x_msg_data => x_msg_data);
1312:
1313: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1314: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: ERROR Returned by Delete_Transaction().');
1315: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1316: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION');
1317: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1318: FND_MSG_PUB.Add;

Line 1322: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: After DELETE_PENDING_TRANSACTION.');

1318: FND_MSG_PUB.Add;
1319: RAISE FND_API.G_EXC_ERROR;
1320: END IF;
1321:
1322: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: After DELETE_PENDING_TRANSACTION.');
1323:
1324: /* Transfer the deleted qties to the default_lot + new requested Values.*/
1325: l_default_tran_rec.trans_qty := -1 * (ABS(l_default_tran_rec.trans_qty) + ABS(l_new_rsv_to_item_um_qty));
1326:

Line 1343: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: ERROR Returned by Update_Pending_Transaction updating the default record.');

1339: ,x_msg_count => x_msg_count
1340: ,x_msg_data => x_msg_data);
1341:
1342: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
1343: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: ERROR Returned by Update_Pending_Transaction updating the default record.');
1344: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1345: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION');
1346: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1347: FND_MSG_PUB.Add;

Line 1356: GMI_reservation_Util.PrintLn('(opm_dbg) in before leaving PVT u: calling Query_Reservation.');

1352:
1353: /* -------------------------------------*/
1354: /* Re Query before leaving*/
1355: /* -------------------------------------*/
1356: GMI_reservation_Util.PrintLn('(opm_dbg) in before leaving PVT u: calling Query_Reservation.');
1357: GMI_reservation_pub.Query_Reservation
1358: ( p_api_version_number => 1.0
1359: ,p_init_msg_lst => fnd_api.g_false
1360: ,x_return_status => x_return_status

Line 1375: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0)

1371: ,p_sort_by_req_date => inv_reservation_global.g_query_no_sort
1372: );
1373:
1374: /* There may not be any rows*/
1375: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0)
1376: THEN
1377: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Called Query_Reservation Received NoError No Rows Found in mtl_reservation');
1378: /* FND_MESSAGE.Set_Name('GMI','GMI_QRY_RSV_NOT_FOUND');*/
1379: /* FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');*/

Line 1377: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Called Query_Reservation Received NoError No Rows Found in mtl_reservation');

1373:
1374: /* There may not be any rows*/
1375: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT = 0)
1376: THEN
1377: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Called Query_Reservation Received NoError No Rows Found in mtl_reservation');
1378: /* FND_MESSAGE.Set_Name('GMI','GMI_QRY_RSV_NOT_FOUND');*/
1379: /* FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');*/
1380: /* FND_MESSAGE.Set_Token('SO_LINE_ID', p_to_rsv_rec.demand_source_line_id);*/
1381: /* FND_MSG_PUB.ADD;*/

Line 1388: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Query_Reservation.');

1384:
1385: /* There may have been a problem getting the rows*/
1386: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1387: THEN
1388: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Query_Reservation.');
1389: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1390: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Query_Reservation');
1391: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1392: FND_MSG_PUB.ADD;

Line 1390: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Query_Reservation');

1386: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1387: THEN
1388: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u: Error Returned by Query_Reservation.');
1389: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1390: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Query_Reservation');
1391: FND_MESSAGE.Set_Token('WHERE', 'Update_Reservation');
1392: FND_MSG_PUB.ADD;
1393: RAISE FND_API.G_EXC_ERROR;
1394: END IF;

Line 1397: GMI_reservation_Util.PrintLn('(opm_dbg) leaving PVT u NO Error');

1393: RAISE FND_API.G_EXC_ERROR;
1394: END IF;
1395:
1396:
1397: GMI_reservation_Util.PrintLn('(opm_dbg) leaving PVT u NO Error');
1398:
1399: EXCEPTION
1400: WHEN FND_API.G_EXC_ERROR THEN
1401: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1409: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u EXCEPTION: Expected');

1405: ( p_count => x_msg_count
1406: , p_data => x_msg_data
1407: );
1408:
1409: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u EXCEPTION: Expected');
1410:
1411: WHEN OTHERS THEN
1412: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1413:

Line 1424: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u EXCEPTION: Others');

1420: ( p_count => x_msg_count
1421: , p_data => x_msg_data
1422: );
1423:
1424: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT u EXCEPTION: Others');
1425:
1426: END Update_Reservation;
1427:
1428:

Line 1504: GMI_reservation_Util.PrintLn('(opm_dbg) in proc OPM_Reservation_PVT.OPM_Delete_reservation ');

1500: l_whse_code VARCHAR2(5);
1501: -- End Bug3248046
1502:
1503: BEGIN
1504: GMI_reservation_Util.PrintLn('(opm_dbg) in proc OPM_Reservation_PVT.OPM_Delete_reservation ');
1505: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: reservation_id='||p_rsv_rec.reservation_id||'.');
1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');
1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');

Line 1505: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: reservation_id='||p_rsv_rec.reservation_id||'.');

1501: -- End Bug3248046
1502:
1503: BEGIN
1504: GMI_reservation_Util.PrintLn('(opm_dbg) in proc OPM_Reservation_PVT.OPM_Delete_reservation ');
1505: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: reservation_id='||p_rsv_rec.reservation_id||'.');
1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');
1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */

Line 1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');

1502:
1503: BEGIN
1504: GMI_reservation_Util.PrintLn('(opm_dbg) in proc OPM_Reservation_PVT.OPM_Delete_reservation ');
1505: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: reservation_id='||p_rsv_rec.reservation_id||'.');
1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');
1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');

Line 1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');

1503: BEGIN
1504: GMI_reservation_Util.PrintLn('(opm_dbg) in proc OPM_Reservation_PVT.OPM_Delete_reservation ');
1505: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: reservation_id='||p_rsv_rec.reservation_id||'.');
1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');
1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
1511: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');

Line 1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');

1504: GMI_reservation_Util.PrintLn('(opm_dbg) in proc OPM_Reservation_PVT.OPM_Delete_reservation ');
1505: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: reservation_id='||p_rsv_rec.reservation_id||'.');
1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');
1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
1511: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
1512: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: primary_uom_code='||p_rsv_rec.primary_uom_code||'.');

Line 1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */

1505: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: reservation_id='||p_rsv_rec.reservation_id||'.');
1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');
1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
1511: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
1512: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
1513:

Line 1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');

1506: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: organization_id='||p_rsv_rec.organization_id||'.');
1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
1511: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
1512: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
1513:
1514: /* Initialize API return status to success*/

Line 1511: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');

1507: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: inventory_item_id='||p_rsv_rec.inventory_item_id||'.');
1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
1511: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
1512: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
1513:
1514: /* Initialize API return status to success*/
1515: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1512: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: primary_uom_code='||p_rsv_rec.primary_uom_code||'.');

1508: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_type_id='||p_rsv_rec.demand_source_type_id||'.');
1509: /* GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_name='||p_rsv_rec.demand_source_name||'.'); */
1510: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_header_id='||p_rsv_rec.demand_source_header_id||'.');
1511: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: demand_source_line_id='||p_rsv_rec.demand_source_line_id||'.');
1512: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: primary_uom_code='||p_rsv_rec.primary_uom_code||'.');
1513:
1514: /* Initialize API return status to success*/
1515: x_return_status := FND_API.G_RET_STS_SUCCESS;
1516:

Line 1535: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT <= 0)

1531: , p_sort_by_req_date => inv_reservation_global.g_query_no_sort
1532: );
1533:
1534: /* If we were able to find records then*/
1535: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT <= 0)
1536: THEN
1537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: No records found to delete.');
1538: FND_MESSAGE.Set_name('GMI','GMI_ERROR');
1539: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Query_Reservation');

Line 1537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: No records found to delete.');

1533:
1534: /* If we were able to find records then*/
1535: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT <= 0)
1536: THEN
1537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: No records found to delete.');
1538: FND_MESSAGE.Set_name('GMI','GMI_ERROR');
1539: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Query_Reservation');
1540: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1541: FND_MSG_PUB.Add;

Line 1539: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Query_Reservation');

1535: IF (GMI_Reservation_Util.ic_tran_rec_tbl.COUNT <= 0)
1536: THEN
1537: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: No records found to delete.');
1538: FND_MESSAGE.Set_name('GMI','GMI_ERROR');
1539: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Query_Reservation');
1540: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1541: FND_MSG_PUB.Add;
1542: RAISE FND_API.G_EXC_ERROR;
1543: END IF;

Line 1545: GMI_Reservation_Util.Get_Default_Lot(

1541: FND_MSG_PUB.Add;
1542: RAISE FND_API.G_EXC_ERROR;
1543: END IF;
1544:
1545: GMI_Reservation_Util.Get_Default_Lot(
1546: x_ic_tran_pnd_index => l_default_lot_index
1547: , x_return_status => x_return_status
1548: , x_msg_count => x_msg_count
1549: , x_msg_data => x_msg_data);

Line 1553: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: No records found to delete.');

1549: , x_msg_data => x_msg_data);
1550:
1551: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1552: THEN
1553: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: No records found to delete.');
1554: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1555: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');
1556: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1557: FND_MSG_PUB.Add;

Line 1555: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');

1551: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1552: THEN
1553: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: No records found to delete.');
1554: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1555: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Default_Lot');
1556: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1557: FND_MSG_PUB.Add;
1558: RAISE FND_API.G_EXC_ERROR;
1559: END IF;

Line 1562: IF (p_rsv_rec.reservation_id <> GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index).trans_id)

1558: RAISE FND_API.G_EXC_ERROR;
1559: END IF;
1560:
1561: /* Find the matching ic_tran_rec_tbl record for the rsv_rec passed in*/
1562: IF (p_rsv_rec.reservation_id <> GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index).trans_id)
1563: THEN
1564: /* If the record is not the default record then just delete the record*/
1565:
1566: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: deleting allocation.');

Line 1566: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: deleting allocation.');

1562: IF (p_rsv_rec.reservation_id <> GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index).trans_id)
1563: THEN
1564: /* If the record is not the default record then just delete the record*/
1565:
1566: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: deleting allocation.');
1567:
1568: /* Get the Allocation*/
1569: GMI_Reservation_Util.Get_Allocation(
1570: p_trans_id => p_rsv_rec.reservation_id

Line 1569: GMI_Reservation_Util.Get_Allocation(

1565:
1566: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: deleting allocation.');
1567:
1568: /* Get the Allocation*/
1569: GMI_Reservation_Util.Get_Allocation(
1570: p_trans_id => p_rsv_rec.reservation_id
1571: , x_ic_tran_pnd_index => l_allocated_lot_index
1572: , x_return_status => x_return_status
1573: , x_msg_count => x_msg_count

Line 1577: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Get_Allocation().');

1573: , x_msg_count => x_msg_count
1574: , x_msg_data => x_msg_data);
1575:
1576: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1577: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Get_Allocation().');
1578: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1579: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Allocation');
1580: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1581: FND_MSG_PUB.Add;

Line 1579: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Allocation');

1575:
1576: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1577: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Get_Allocation().');
1578: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1579: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_Reservation_Util.Get_Allocation');
1580: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1581: FND_MSG_PUB.Add;
1582: RAISE FND_API.G_EXC_ERROR;
1583: END IF;

Line 1589: l_tran_to_delete_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_allocated_lot_index);

1585: /* added the following condition for OM changes when org id is changed
1586: the array does not contain newly created default lot*/
1587: IF l_allocated_lot_index <> 0 THEN
1588: /* Save a copy of the record to be deleted*/
1589: l_tran_to_delete_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_allocated_lot_index);
1590:
1591: /* This command will desappear whem Query is going to set it correctly*/
1592: /* l_tran_to_delete_rec.non_inv := 0;*/
1593: /* Delete the record since it is not the default record*/

Line 1594: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: Deleting transaction record res_id='||p_rsv_rec.reservation_id||', trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(l_allocated_lot_index).trans_id );

1590:
1591: /* This command will desappear whem Query is going to set it correctly*/
1592: /* l_tran_to_delete_rec.non_inv := 0;*/
1593: /* Delete the record since it is not the default record*/
1594: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: Deleting transaction record res_id='||p_rsv_rec.reservation_id||', trans_id='||GMI_Reservation_Util.ic_tran_rec_tbl(l_allocated_lot_index).trans_id );
1595:
1596: GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION(
1597: p_api_version => 1.0
1598: ,p_init_msg_list => fnd_api.g_false

Line 1607: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d After DELETE_PENDING_TRANSACTION.');

1603: ,x_return_status => x_return_status
1604: ,x_msg_count => x_msg_count
1605: ,x_msg_data => x_msg_data);
1606:
1607: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d After DELETE_PENDING_TRANSACTION.');
1608:
1609: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1610: THEN
1611: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Delete_Transaction().');

Line 1611: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Delete_Transaction().');

1607: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d After DELETE_PENDING_TRANSACTION.');
1608:
1609: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1610: THEN
1611: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Delete_Transaction().');
1612: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1613: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.DELETE_PENDING_TRANSACTION');
1614: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1615: FND_MSG_PUB.Add;

Line 1620: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);

1616: RAISE FND_API.G_EXC_ERROR;
1617: END IF;
1618:
1619: END IF;
1620: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
1621: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: Qties to update: qty=='||l_default_tran_rec.trans_qty||', qty2='||l_default_tran_rec.trans_qty2);
1622:
1623: GMI_RESERVATION_UTIL.balance_default_lot
1624: ( p_ic_default_rec => l_default_tran_rec

Line 1621: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: Qties to update: qty=='||l_default_tran_rec.trans_qty||', qty2='||l_default_tran_rec.trans_qty2);

1617: END IF;
1618:
1619: END IF;
1620: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
1621: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: Qties to update: qty=='||l_default_tran_rec.trans_qty||', qty2='||l_default_tran_rec.trans_qty2);
1622:
1623: GMI_RESERVATION_UTIL.balance_default_lot
1624: ( p_ic_default_rec => l_default_tran_rec
1625: , p_opm_item_id => l_default_tran_rec.item_id

Line 1623: GMI_RESERVATION_UTIL.balance_default_lot

1619: END IF;
1620: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
1621: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d: Qties to update: qty=='||l_default_tran_rec.trans_qty||', qty2='||l_default_tran_rec.trans_qty2);
1622:
1623: GMI_RESERVATION_UTIL.balance_default_lot
1624: ( p_ic_default_rec => l_default_tran_rec
1625: , p_opm_item_id => l_default_tran_rec.item_id
1626: , x_return_status => x_return_status
1627: , x_msg_count => x_msg_count

Line 1632: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Update_Transaction() updating the default record.');

1628: , x_msg_data => x_msg_data
1629: );
1630: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1631: THEN
1632: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Update_Transaction() updating the default record.');
1633: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1634: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION');
1635: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1636: FND_MSG_PUB.Add;

Line 1646: GMI_reservation_Util.PrintLn('(opm_dbg) ELSE PORTION - Handling default transaction');

1642: -- Bug3035697 ( as part of this bug, we eliminated update pending transaction
1643: -- and called balance_default_lot instead)
1644: -- We now conditionally call balance_default_lot
1645:
1646: GMI_reservation_Util.PrintLn('(opm_dbg) ELSE PORTION - Handling default transaction');
1647: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
1648:
1649: OPEN get_line_rec(l_default_tran_rec.line_id);
1650: FETCH get_line_rec INTO l_organization_id;

Line 1647: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);

1643: -- and called balance_default_lot instead)
1644: -- We now conditionally call balance_default_lot
1645:
1646: GMI_reservation_Util.PrintLn('(opm_dbg) ELSE PORTION - Handling default transaction');
1647: l_default_tran_rec := GMI_Reservation_Util.ic_tran_rec_tbl(l_default_lot_index);
1648:
1649: OPEN get_line_rec(l_default_tran_rec.line_id);
1650: FETCH get_line_rec INTO l_organization_id;
1651: CLOSE get_line_rec;

Line 1658: GMI_reservation_Util.PrintLn('Calling Balancing when there is whse change');

1654: FETCH get_whse_code INTO l_whse_code;
1655: CLOSE get_whse_code;
1656:
1657: IF (l_whse_code <> l_default_tran_rec.whse_code) THEN
1658: GMI_reservation_Util.PrintLn('Calling Balancing when there is whse change');
1659: GMI_RESERVATION_UTIL.balance_default_lot
1660: ( p_ic_default_rec => l_default_tran_rec
1661: , p_opm_item_id => l_default_tran_rec.item_id
1662: , x_return_status => x_return_status

Line 1659: GMI_RESERVATION_UTIL.balance_default_lot

1655: CLOSE get_whse_code;
1656:
1657: IF (l_whse_code <> l_default_tran_rec.whse_code) THEN
1658: GMI_reservation_Util.PrintLn('Calling Balancing when there is whse change');
1659: GMI_RESERVATION_UTIL.balance_default_lot
1660: ( p_ic_default_rec => l_default_tran_rec
1661: , p_opm_item_id => l_default_tran_rec.item_id
1662: , x_return_status => x_return_status
1663: , x_msg_count => x_msg_count

Line 1669: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Balancing the default record.');

1665: );
1666:
1667: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1668: THEN
1669: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Balancing the default record.');
1670: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1671: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_RESERVATION_UTIL.balance_default_lot');
1672: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1673: FND_MSG_PUB.Add;

Line 1671: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_RESERVATION_UTIL.balance_default_lot');

1667: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1668: THEN
1669: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Balancing the default record.');
1670: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1671: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_RESERVATION_UTIL.balance_default_lot');
1672: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1673: FND_MSG_PUB.Add;
1674: RAISE FND_API.G_EXC_ERROR;
1675: END IF;

Line 1681: GMI_reservation_Util.PrintLn('updating to zero for the default transction ');

1677: ELSE
1678: /* If the record is the default record then don't delete it just set the quantity to zero*/
1679: l_default_tran_rec.trans_qty := 0 ;
1680: l_default_tran_rec.trans_qty2 := 0 ;
1681: GMI_reservation_Util.PrintLn('updating to zero for the default transction ');
1682: GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION(
1683: p_api_version => 1.0
1684: ,p_init_msg_list => fnd_api.g_false
1685: ,p_commit => l_commit

Line 1694: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Update_Transaction() updating the default record.');

1690: ,x_msg_count => x_msg_count
1691: ,x_msg_data => x_msg_data);
1692: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)
1693: THEN
1694: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d ERROR: Returned by Update_Transaction() updating the default record.');
1695: FND_MESSAGE.Set_Name('GMI','GMI_ERROR');
1696: FND_MESSAGE.Set_Token('BY_PROC', 'GMI_TRANS_ENGINE_PUB.UPDATE_PENDING_TRANSACTION');
1697: FND_MESSAGE.Set_Token('WHERE', 'Delete_Reservation');
1698: FND_MSG_PUB.Add;

Line 1704: GMI_reservation_Util.PrintLn('(opm_dbg)in balancing the default lot, cancel res');

1700: END IF;
1701: END IF;
1702: -- End Bug3248046
1703: /* cancel all the reservations for GME */
1704: GMI_reservation_Util.PrintLn('(opm_dbg)in balancing the default lot, cancel res');
1705: GML_BATCH_OM_RES_PVT.cancel_res_for_so_line
1706: (
1707: P_so_line_id => l_default_tran_rec.line_id
1708: , X_return_status => x_return_status

Line 1715: GMI_reservation_Util.PrintLn('(opm_dbg) leaving PVT d NO Error');

1711: ) ;
1712:
1713: END IF;
1714:
1715: GMI_reservation_Util.PrintLn('(opm_dbg) leaving PVT d NO Error');
1716:
1717: /* When there is an exception*/
1718: EXCEPTION
1719: WHEN FND_API.G_EXC_ERROR THEN

Line 1727: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d EXCEPTION: Expected');

1723: FND_MSG_PUB.count_and_get
1724: ( p_count => x_msg_count
1725: , p_data => x_msg_data
1726: );
1727: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d EXCEPTION: Expected');
1728:
1729: WHEN OTHERS THEN
1730: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1731:

Line 1742: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d EXCEPTION: Others');

1738: ( p_count => x_msg_count
1739: , p_data => x_msg_data
1740: );
1741:
1742: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT d EXCEPTION: Others');
1743:
1744:
1745: END Delete_Reservation;
1746:

Line 1967: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)

1963: ABS(SUM(nvl(trans_qty2,0)))
1964: FROM ic_tran_pnd
1965: WHERE item_id = p_item_id
1966: AND whse_code = l_whse_code
1967: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)
1968: AND completed_ind = 0
1969: AND delete_mark = 0
1970: AND trans_qty < 0; -- pending incoming is sorta available, but not real yet
1971: -- Only at the time this qty is received, it becomes truely available

Line 2021: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)

2017: SELECT NVL(ABS(SUM(nvl(trans_qty,0))),0), NVL(ABS(SUM(nvl(trans_qty2,0))),0)
2018: FROM ic_tran_pnd itp
2019: WHERE item_id = p_item_id
2020: AND whse_code = l_whse_code
2021: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)
2022: AND completed_ind = 0
2023: AND delete_mark = 0
2024: AND trans_qty < 0
2025: AND EXISTS(SELECT 1

Line 2033: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);

2029: AND released_status = 'S');
2030:
2031: BEGIN
2032:
2033: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2034: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2035: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2036: gmi_reservation_util.println('value of p_requested_quantity is '||p_requested_quantity);
2037: gmi_reservation_util.println('value of p_requested_quantity2 is '||p_requested_quantity2);

Line 2034: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);

2030:
2031: BEGIN
2032:
2033: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2034: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2035: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2036: gmi_reservation_util.println('value of p_requested_quantity is '||p_requested_quantity);
2037: gmi_reservation_util.println('value of p_requested_quantity2 is '||p_requested_quantity2);
2038:

Line 2035: gmi_reservation_util.println('Value of item_id is '||p_item_id);

2031: BEGIN
2032:
2033: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2034: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2035: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2036: gmi_reservation_util.println('value of p_requested_quantity is '||p_requested_quantity);
2037: gmi_reservation_util.println('value of p_requested_quantity2 is '||p_requested_quantity2);
2038:
2039:

Line 2036: gmi_reservation_util.println('value of p_requested_quantity is '||p_requested_quantity);

2032:
2033: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2034: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2035: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2036: gmi_reservation_util.println('value of p_requested_quantity is '||p_requested_quantity);
2037: gmi_reservation_util.println('value of p_requested_quantity2 is '||p_requested_quantity2);
2038:
2039:
2040: -- Get whse code

Line 2037: gmi_reservation_util.println('value of p_requested_quantity2 is '||p_requested_quantity2);

2033: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2034: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2035: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2036: gmi_reservation_util.println('value of p_requested_quantity is '||p_requested_quantity);
2037: gmi_reservation_util.println('value of p_requested_quantity2 is '||p_requested_quantity2);
2038:
2039:
2040: -- Get whse code
2041: OPEN get_whse_code (p_organization_id);

Line 2045: GMI_RESERVATION_UTIL.PRINTLN('Error retrieving whse code');

2041: OPEN get_whse_code (p_organization_id);
2042: FETCH get_whse_code INTO l_whse_code,l_whse_loct_ctl;
2043: IF ( get_whse_code%NOTFOUND ) THEN
2044: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2045: GMI_RESERVATION_UTIL.PRINTLN('Error retrieving whse code');
2046: RAISE NO_DATA_FOUND;
2047: CLOSE get_whse_code;
2048: RETURN;
2049: END IF;

Line 2053: gmi_reservation_util.PRINTLN('Value of Whse Code is '||l_whse_code);

2049: END IF;
2050:
2051: CLOSE get_whse_code;
2052:
2053: gmi_reservation_util.PRINTLN('Value of Whse Code is '||l_whse_code);
2054: -- Get value of profile
2055: -- l_is_grade_ctl := FND_PROFILE.VALUE('IC$AVAILABLE_BY_GRADE');
2056:
2057:

Line 2065: GMI_Reservation_Util.PrintLn('Working with no control item');

2061: CLOSE get_item_ctl;
2062:
2063: IF (l_lot_ctl = 0 AND (l_item_loct_ctl * l_whse_loct_ctl)= 0) THEN
2064: l_is_noctl := TRUE;
2065: GMI_Reservation_Util.PrintLn('Working with no control item');
2066: END IF;
2067:
2068: -- End Bug 2499153
2069:

Line 2078: gmi_reservation_util.println('check profile GML_CHK_INV_PICK_REL is '||l_chk_inv);

2074: l_chk_inv := FND_PROFILE.VALUE('GML_CHK_INV_PICK_REL');
2075:
2076:
2077:
2078: gmi_reservation_util.println('check profile GML_CHK_INV_PICK_REL is '||l_chk_inv);
2079: IF (l_chk_inv = 'N' OR l_noninv_ind = 1 ) THEN
2080: x_result_qty1 := p_requested_quantity;
2081: x_result_qty2 := p_requested_quantity2;
2082: RETURN;

Line 2093: gmi_reservation_util.println('Line has Shipset '||l_shipset_id);

2089: CLOSE get_shipset_id;
2090:
2091: IF (l_shipset_id <> 0) THEN
2092:
2093: gmi_reservation_util.println('Line has Shipset '||l_shipset_id);
2094:
2095: -- Now check if shipping Parameter for the warehouse have Enforce shipset flag set.
2096: OPEN Shipping_parameters(p_organization_id);
2097: FETCH Shipping_parameters INTO l_enforce_shipset;

Line 2100: gmi_reservation_util.println('Enforce shipset in Shipping parameters for the warehouse is set as '||l_enforce_shipset);

2096: OPEN Shipping_parameters(p_organization_id);
2097: FETCH Shipping_parameters INTO l_enforce_shipset;
2098: CLOSE Shipping_parameters;
2099:
2100: gmi_reservation_util.println('Enforce shipset in Shipping parameters for the warehouse is set as '||l_enforce_shipset);
2101:
2102: IF ( l_enforce_shipset = 'Y') THEN
2103:
2104: gmi_reservation_util.println('Line Has Shipset and shipset is enforced for the warehouse');

Line 2104: gmi_reservation_util.println('Line Has Shipset and shipset is enforced for the warehouse');

2100: gmi_reservation_util.println('Enforce shipset in Shipping parameters for the warehouse is set as '||l_enforce_shipset);
2101:
2102: IF ( l_enforce_shipset = 'Y') THEN
2103:
2104: gmi_reservation_util.println('Line Has Shipset and shipset is enforced for the warehouse');
2105: gmi_reservation_util.println('Calling Calc_Reservation_For_shipset');
2106:
2107: Calc_Reservation_For_shipset(
2108: p_shipset_id => l_shipset_id

Line 2105: gmi_reservation_util.println('Calling Calc_Reservation_For_shipset');

2101:
2102: IF ( l_enforce_shipset = 'Y') THEN
2103:
2104: gmi_reservation_util.println('Line Has Shipset and shipset is enforced for the warehouse');
2105: gmi_reservation_util.println('Calling Calc_Reservation_For_shipset');
2106:
2107: Calc_Reservation_For_shipset(
2108: p_shipset_id => l_shipset_id
2109: ,p_organization_id => p_organization_id

Line 2140: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);

2136: IF (g_demand_table(i).item_id= p_item_id AND
2137: g_demand_table(i).whse_code = l_whse_code) THEN
2138: l_index := i;
2139: l_demand_exists := TRUE;
2140: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
2141: gmi_reservation_util.println('In opm calculate_reservation Found the Reservation Details');
2142: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available found is '||g_demand_table(i).qty_available);
2143: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed found is '||g_demand_table(i).qty_committed);
2144: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available found is '||g_demand_table(i).qty2_available);

Line 2141: gmi_reservation_util.println('In opm calculate_reservation Found the Reservation Details');

2137: g_demand_table(i).whse_code = l_whse_code) THEN
2138: l_index := i;
2139: l_demand_exists := TRUE;
2140: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
2141: gmi_reservation_util.println('In opm calculate_reservation Found the Reservation Details');
2142: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available found is '||g_demand_table(i).qty_available);
2143: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed found is '||g_demand_table(i).qty_committed);
2144: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available found is '||g_demand_table(i).qty2_available);
2145: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed found is '||g_demand_table(i).qty2_committed);

Line 2142: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available found is '||g_demand_table(i).qty_available);

2138: l_index := i;
2139: l_demand_exists := TRUE;
2140: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
2141: gmi_reservation_util.println('In opm calculate_reservation Found the Reservation Details');
2142: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available found is '||g_demand_table(i).qty_available);
2143: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed found is '||g_demand_table(i).qty_committed);
2144: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available found is '||g_demand_table(i).qty2_available);
2145: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed found is '||g_demand_table(i).qty2_committed);
2146: EXIT;

Line 2143: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed found is '||g_demand_table(i).qty_committed);

2139: l_demand_exists := TRUE;
2140: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
2141: gmi_reservation_util.println('In opm calculate_reservation Found the Reservation Details');
2142: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available found is '||g_demand_table(i).qty_available);
2143: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed found is '||g_demand_table(i).qty_committed);
2144: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available found is '||g_demand_table(i).qty2_available);
2145: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed found is '||g_demand_table(i).qty2_committed);
2146: EXIT;
2147: END IF;

Line 2144: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available found is '||g_demand_table(i).qty2_available);

2140: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
2141: gmi_reservation_util.println('In opm calculate_reservation Found the Reservation Details');
2142: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available found is '||g_demand_table(i).qty_available);
2143: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed found is '||g_demand_table(i).qty_committed);
2144: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available found is '||g_demand_table(i).qty2_available);
2145: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed found is '||g_demand_table(i).qty2_committed);
2146: EXIT;
2147: END IF;
2148: END LOOP;

Line 2145: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed found is '||g_demand_table(i).qty2_committed);

2141: gmi_reservation_util.println('In opm calculate_reservation Found the Reservation Details');
2142: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available found is '||g_demand_table(i).qty_available);
2143: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed found is '||g_demand_table(i).qty_committed);
2144: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available found is '||g_demand_table(i).qty2_available);
2145: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed found is '||g_demand_table(i).qty2_committed);
2146: EXIT;
2147: END IF;
2148: END LOOP;
2149:

Line 2151: gmi_reservation_util.Println('Fetching Reservation Details');

2147: END IF;
2148: END LOOP;
2149:
2150: IF (not l_demand_exists) THEN
2151: gmi_reservation_util.Println('Fetching Reservation Details');
2152:
2153: IF (l_is_noctl = TRUE) THEN
2154: gmi_reservation_util.Println('inventory_item_id is '||l_inventory_item_id);
2155: OPEN reserved_quantity_nonctl(p_organization_id,l_inventory_item_id);

Line 2154: gmi_reservation_util.Println('inventory_item_id is '||l_inventory_item_id);

2150: IF (not l_demand_exists) THEN
2151: gmi_reservation_util.Println('Fetching Reservation Details');
2152:
2153: IF (l_is_noctl = TRUE) THEN
2154: gmi_reservation_util.Println('inventory_item_id is '||l_inventory_item_id);
2155: OPEN reserved_quantity_nonctl(p_organization_id,l_inventory_item_id);
2156: FETCH reserved_quantity_nonctl INTO l_qty_reserved_real,l_qty2_reserved_real;
2157: CLOSE reserved_quantity_nonctl;
2158: ELSE

Line 2166: gmi_reservation_util.println('value of l_qty_reserved_real '|| l_qty_reserved_real);

2162: END IF;
2163: l_qty_reserved_real := nvl(l_qty_reserved_real, 0);
2164: l_qty2_reserved_real := nvl(l_qty2_reserved_real, 0);
2165:
2166: gmi_reservation_util.println('value of l_qty_reserved_real '|| l_qty_reserved_real);
2167: gmi_reservation_util.println('value of l_qty2_reserved_real '|| l_qty2_reserved_real);
2168:
2169: -- Let's increment the counter
2170:

Line 2167: gmi_reservation_util.println('value of l_qty2_reserved_real '|| l_qty2_reserved_real);

2163: l_qty_reserved_real := nvl(l_qty_reserved_real, 0);
2164: l_qty2_reserved_real := nvl(l_qty2_reserved_real, 0);
2165:
2166: gmi_reservation_util.println('value of l_qty_reserved_real '|| l_qty_reserved_real);
2167: gmi_reservation_util.println('value of l_qty2_reserved_real '|| l_qty2_reserved_real);
2168:
2169: -- Let's increment the counter
2170:
2171: l_count := g_demand_table.COUNT + 1;

Line 2194: gmi_reservation_util.println('value of l_high_lev_res_qty '||l_high_lev_res_qty);

2190: IF (l_is_noctl = FALSE) THEN
2191: OPEN high_level_reserved_qty(p_organization_id,l_inventory_item_id);
2192: FETCH high_level_reserved_qty INTO l_high_lev_res_qty, l_high_lev_res_qty2;
2193: CLOSE high_level_reserved_qty;
2194: gmi_reservation_util.println('value of l_high_lev_res_qty '||l_high_lev_res_qty);
2195: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);
2196: OPEN high_level_res_qty_real(p_item_id,l_whse_code);
2197: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
2198: CLOSE high_level_res_qty_real;

Line 2195: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);

2191: OPEN high_level_reserved_qty(p_organization_id,l_inventory_item_id);
2192: FETCH high_level_reserved_qty INTO l_high_lev_res_qty, l_high_lev_res_qty2;
2193: CLOSE high_level_reserved_qty;
2194: gmi_reservation_util.println('value of l_high_lev_res_qty '||l_high_lev_res_qty);
2195: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);
2196: OPEN high_level_res_qty_real(p_item_id,l_whse_code);
2197: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
2198: CLOSE high_level_res_qty_real;
2199: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);

Line 2199: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);

2195: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);
2196: OPEN high_level_res_qty_real(p_item_id,l_whse_code);
2197: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
2198: CLOSE high_level_res_qty_real;
2199: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);
2200: gmi_reservation_util.println('value of l_real_high_lev_res_qty2 '||l_real_high_lev_res_qty2);
2201: l_net_high_lev_res_qty := l_high_lev_res_qty - l_real_high_lev_res_qty;
2202: l_net_high_lev_res_qty2 := l_high_lev_res_qty2 - l_real_high_lev_res_qty2;
2203: IF l_net_high_lev_res_qty < 0 THEN -- This could happen in case of over allocation.

Line 2200: gmi_reservation_util.println('value of l_real_high_lev_res_qty2 '||l_real_high_lev_res_qty2);

2196: OPEN high_level_res_qty_real(p_item_id,l_whse_code);
2197: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
2198: CLOSE high_level_res_qty_real;
2199: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);
2200: gmi_reservation_util.println('value of l_real_high_lev_res_qty2 '||l_real_high_lev_res_qty2);
2201: l_net_high_lev_res_qty := l_high_lev_res_qty - l_real_high_lev_res_qty;
2202: l_net_high_lev_res_qty2 := l_high_lev_res_qty2 - l_real_high_lev_res_qty2;
2203: IF l_net_high_lev_res_qty < 0 THEN -- This could happen in case of over allocation.
2204: l_net_high_lev_res_qty := 0;

Line 2207: gmi_reservation_util.println('value of l_net_high_lev_res_qty '||l_net_high_lev_res_qty);

2203: IF l_net_high_lev_res_qty < 0 THEN -- This could happen in case of over allocation.
2204: l_net_high_lev_res_qty := 0;
2205: l_net_high_lev_res_qty2 := 0;
2206: END IF;
2207: gmi_reservation_util.println('value of l_net_high_lev_res_qty '||l_net_high_lev_res_qty);
2208: gmi_reservation_util.println('value of l_net_high_lev_res_qty2 '||l_net_high_lev_res_qty2);
2209: g_demand_table(l_count).qty_available := g_demand_table(l_count).qty_available - l_net_high_lev_res_qty;
2210: g_demand_table(l_count).qty2_available := g_demand_table(l_count).qty2_available - l_net_high_lev_res_qty2;
2211: END IF;

Line 2208: gmi_reservation_util.println('value of l_net_high_lev_res_qty2 '||l_net_high_lev_res_qty2);

2204: l_net_high_lev_res_qty := 0;
2205: l_net_high_lev_res_qty2 := 0;
2206: END IF;
2207: gmi_reservation_util.println('value of l_net_high_lev_res_qty '||l_net_high_lev_res_qty);
2208: gmi_reservation_util.println('value of l_net_high_lev_res_qty2 '||l_net_high_lev_res_qty2);
2209: g_demand_table(l_count).qty_available := g_demand_table(l_count).qty_available - l_net_high_lev_res_qty;
2210: g_demand_table(l_count).qty2_available := g_demand_table(l_count).qty2_available - l_net_high_lev_res_qty2;
2211: END IF;
2212: END IF;

Line 2219: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available '||g_demand_table(l_count).qty_available);

2215: g_demand_table(l_count).qty_available := nvl(g_demand_table(l_count).qty_available ,0);
2216: g_demand_table(l_count).qty2_available := nvl(g_demand_table(l_count).qty2_available,0);
2217: g_demand_table(l_count).qty_committed := nvl(g_demand_table(l_count).qty_committed, 0);
2218: g_demand_table(l_count).qty2_committed := nvl(g_demand_table(l_count).qty2_committed,0);
2219: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available '||g_demand_table(l_count).qty_available);
2220: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available '||g_demand_table(l_count).qty2_available);
2221: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed '||g_demand_table(l_count).qty_committed);
2222: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed '||g_demand_table(l_count).qty2_committed);
2223:

Line 2220: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available '||g_demand_table(l_count).qty2_available);

2216: g_demand_table(l_count).qty2_available := nvl(g_demand_table(l_count).qty2_available,0);
2217: g_demand_table(l_count).qty_committed := nvl(g_demand_table(l_count).qty_committed, 0);
2218: g_demand_table(l_count).qty2_committed := nvl(g_demand_table(l_count).qty2_committed,0);
2219: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available '||g_demand_table(l_count).qty_available);
2220: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available '||g_demand_table(l_count).qty2_available);
2221: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed '||g_demand_table(l_count).qty_committed);
2222: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed '||g_demand_table(l_count).qty2_committed);
2223:
2224: l_index := l_count;

Line 2221: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed '||g_demand_table(l_count).qty_committed);

2217: g_demand_table(l_count).qty_committed := nvl(g_demand_table(l_count).qty_committed, 0);
2218: g_demand_table(l_count).qty2_committed := nvl(g_demand_table(l_count).qty2_committed,0);
2219: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available '||g_demand_table(l_count).qty_available);
2220: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available '||g_demand_table(l_count).qty2_available);
2221: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed '||g_demand_table(l_count).qty_committed);
2222: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed '||g_demand_table(l_count).qty2_committed);
2223:
2224: l_index := l_count;
2225:

Line 2222: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed '||g_demand_table(l_count).qty2_committed);

2218: g_demand_table(l_count).qty2_committed := nvl(g_demand_table(l_count).qty2_committed,0);
2219: gmi_reservation_util.println('value of g_demand_table(l_count).qty_available '||g_demand_table(l_count).qty_available);
2220: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_available '||g_demand_table(l_count).qty2_available);
2221: gmi_reservation_util.println('value of g_demand_table(l_count).qty_committed '||g_demand_table(l_count).qty_committed);
2222: gmi_reservation_util.println('value of g_demand_table(l_count).qty2_committed '||g_demand_table(l_count).qty2_committed);
2223:
2224: l_index := l_count;
2225:
2226: --Bug 3551144 added OR condition

Line 2242: gmi_reservation_util.println('value of p_demand_source_line_id before calling res_qty is '||p_demand_source_line_id);

2238: END IF;
2239: END IF; -- of not l_demand_exists
2240:
2241: -- Let's get qty reserved from ic_tran_pnd
2242: gmi_reservation_util.println('value of p_demand_source_line_id before calling res_qty is '||p_demand_source_line_id);
2243: gmi_reservation_util.println('Value of p_item_id before calling res_q is '||p_item_id);
2244: gmi_reservation_util.println('Value of l_whse_code before calling res_q is '||l_whse_code);
2245:
2246: IF (l_is_noctl = TRUE) THEN

Line 2243: gmi_reservation_util.println('Value of p_item_id before calling res_q is '||p_item_id);

2239: END IF; -- of not l_demand_exists
2240:
2241: -- Let's get qty reserved from ic_tran_pnd
2242: gmi_reservation_util.println('value of p_demand_source_line_id before calling res_qty is '||p_demand_source_line_id);
2243: gmi_reservation_util.println('Value of p_item_id before calling res_q is '||p_item_id);
2244: gmi_reservation_util.println('Value of l_whse_code before calling res_q is '||l_whse_code);
2245:
2246: IF (l_is_noctl = TRUE) THEN
2247: l_qty_reserved := 0;

Line 2244: gmi_reservation_util.println('Value of l_whse_code before calling res_q is '||l_whse_code);

2240:
2241: -- Let's get qty reserved from ic_tran_pnd
2242: gmi_reservation_util.println('value of p_demand_source_line_id before calling res_qty is '||p_demand_source_line_id);
2243: gmi_reservation_util.println('Value of p_item_id before calling res_q is '||p_item_id);
2244: gmi_reservation_util.println('Value of l_whse_code before calling res_q is '||l_whse_code);
2245:
2246: IF (l_is_noctl = TRUE) THEN
2247: l_qty_reserved := 0;
2248: l_qty2_reserved := 0;

Line 2257: gmi_reservation_util.println('Value of l_qty_reserved is '||l_qty_reserved);

2253: END IF;
2254: l_qty_reserved := nvl(l_qty_reserved, 0);
2255: l_qty2_reserved := nvl(l_qty2_reserved, 0);
2256:
2257: gmi_reservation_util.println('Value of l_qty_reserved is '||l_qty_reserved);
2258: gmi_reservation_util.println('Value of l_qty2_reserved is '||l_qty2_reserved);
2259: gmi_reservation_util.println('value of l_count before checking is '||l_count);
2260: gmi_reservation_util.println('Value of l_index before checking is '||l_index);
2261:

Line 2258: gmi_reservation_util.println('Value of l_qty2_reserved is '||l_qty2_reserved);

2254: l_qty_reserved := nvl(l_qty_reserved, 0);
2255: l_qty2_reserved := nvl(l_qty2_reserved, 0);
2256:
2257: gmi_reservation_util.println('Value of l_qty_reserved is '||l_qty_reserved);
2258: gmi_reservation_util.println('Value of l_qty2_reserved is '||l_qty2_reserved);
2259: gmi_reservation_util.println('value of l_count before checking is '||l_count);
2260: gmi_reservation_util.println('Value of l_index before checking is '||l_index);
2261:
2262: l_qty_remaining := p_requested_quantity - l_qty_reserved;

Line 2259: gmi_reservation_util.println('value of l_count before checking is '||l_count);

2255: l_qty2_reserved := nvl(l_qty2_reserved, 0);
2256:
2257: gmi_reservation_util.println('Value of l_qty_reserved is '||l_qty_reserved);
2258: gmi_reservation_util.println('Value of l_qty2_reserved is '||l_qty2_reserved);
2259: gmi_reservation_util.println('value of l_count before checking is '||l_count);
2260: gmi_reservation_util.println('Value of l_index before checking is '||l_index);
2261:
2262: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2263: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;

Line 2260: gmi_reservation_util.println('Value of l_index before checking is '||l_index);

2256:
2257: gmi_reservation_util.println('Value of l_qty_reserved is '||l_qty_reserved);
2258: gmi_reservation_util.println('Value of l_qty2_reserved is '||l_qty2_reserved);
2259: gmi_reservation_util.println('value of l_count before checking is '||l_count);
2260: gmi_reservation_util.println('Value of l_index before checking is '||l_index);
2261:
2262: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2263: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;
2264:

Line 2265: gmi_reservation_util.println('Value of remainig requested qty is '||l_qty_remaining);

2261:
2262: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2263: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;
2264:
2265: gmi_reservation_util.println('Value of remainig requested qty is '||l_qty_remaining);
2266: gmi_reservation_util.println('Value of remainig requested qty2 is '||l_qty2_remaining);
2267: gmi_reservation_util.println('Value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
2268:
2269: IF l_qty_remaining <= 0 THEN

Line 2266: gmi_reservation_util.println('Value of remainig requested qty2 is '||l_qty2_remaining);

2262: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2263: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;
2264:
2265: gmi_reservation_util.println('Value of remainig requested qty is '||l_qty_remaining);
2266: gmi_reservation_util.println('Value of remainig requested qty2 is '||l_qty2_remaining);
2267: gmi_reservation_util.println('Value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
2268:
2269: IF l_qty_remaining <= 0 THEN
2270: x_result_qty1 := p_requested_quantity;

Line 2267: gmi_reservation_util.println('Value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);

2263: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;
2264:
2265: gmi_reservation_util.println('Value of remainig requested qty is '||l_qty_remaining);
2266: gmi_reservation_util.println('Value of remainig requested qty2 is '||l_qty2_remaining);
2267: gmi_reservation_util.println('Value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
2268:
2269: IF l_qty_remaining <= 0 THEN
2270: x_result_qty1 := p_requested_quantity;
2271: x_result_qty2 := p_requested_quantity2;

Line 2274: gmi_reservation_util.println('RELEASE TO WHSE');

2270: x_result_qty1 := p_requested_quantity;
2271: x_result_qty2 := p_requested_quantity2;
2272: ELSE -- remaining qty is > 0
2273: IF ( g_demand_table(l_index).qty_available - l_qty_remaining >= 0 ) THEN
2274: gmi_reservation_util.println('RELEASE TO WHSE');
2275: gmi_reservation_util.println('Returning Qty reserved from calculate_reservation');
2276: x_result_qty1 := p_requested_quantity;
2277: x_result_qty2 := p_requested_quantity2;
2278: g_demand_table(l_index).qty_available := g_demand_table(l_index).qty_available - p_requested_quantity ;

Line 2275: gmi_reservation_util.println('Returning Qty reserved from calculate_reservation');

2271: x_result_qty2 := p_requested_quantity2;
2272: ELSE -- remaining qty is > 0
2273: IF ( g_demand_table(l_index).qty_available - l_qty_remaining >= 0 ) THEN
2274: gmi_reservation_util.println('RELEASE TO WHSE');
2275: gmi_reservation_util.println('Returning Qty reserved from calculate_reservation');
2276: x_result_qty1 := p_requested_quantity;
2277: x_result_qty2 := p_requested_quantity2;
2278: g_demand_table(l_index).qty_available := g_demand_table(l_index).qty_available - p_requested_quantity ;
2279: g_demand_table(l_index).qty2_available := nvl(g_demand_table(l_index).qty2_available - p_requested_quantity2,0) ;

Line 2280: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);

2276: x_result_qty1 := p_requested_quantity;
2277: x_result_qty2 := p_requested_quantity2;
2278: g_demand_table(l_index).qty_available := g_demand_table(l_index).qty_available - p_requested_quantity ;
2279: g_demand_table(l_index).qty2_available := nvl(g_demand_table(l_index).qty2_available - p_requested_quantity2,0) ;
2280: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2281: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2282:
2283: ELSIF ( g_demand_table(l_index).qty_available - l_qty_remaining < 0
2284: AND g_demand_table(l_index).qty_available > 0 ) THEN -- SPLIT

Line 2281: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);

2277: x_result_qty2 := p_requested_quantity2;
2278: g_demand_table(l_index).qty_available := g_demand_table(l_index).qty_available - p_requested_quantity ;
2279: g_demand_table(l_index).qty2_available := nvl(g_demand_table(l_index).qty2_available - p_requested_quantity2,0) ;
2280: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2281: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2282:
2283: ELSIF ( g_demand_table(l_index).qty_available - l_qty_remaining < 0
2284: AND g_demand_table(l_index).qty_available > 0 ) THEN -- SPLIT
2285: gmi_reservation_util.println('SPLIT');

Line 2285: gmi_reservation_util.println('SPLIT');

2281: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2282:
2283: ELSIF ( g_demand_table(l_index).qty_available - l_qty_remaining < 0
2284: AND g_demand_table(l_index).qty_available > 0 ) THEN -- SPLIT
2285: gmi_reservation_util.println('SPLIT');
2286: gmi_reservation_util.println('Returning Qty available from caclulate_reservation');
2287: x_result_qty1 := g_demand_table(l_index).qty_available + l_qty_reserved;
2288: x_result_qty2 := g_demand_table(l_index).qty2_available + l_qty2_reserved;
2289: IF x_result_qty2 < 0 THEN

Line 2286: gmi_reservation_util.println('Returning Qty available from caclulate_reservation');

2282:
2283: ELSIF ( g_demand_table(l_index).qty_available - l_qty_remaining < 0
2284: AND g_demand_table(l_index).qty_available > 0 ) THEN -- SPLIT
2285: gmi_reservation_util.println('SPLIT');
2286: gmi_reservation_util.println('Returning Qty available from caclulate_reservation');
2287: x_result_qty1 := g_demand_table(l_index).qty_available + l_qty_reserved;
2288: x_result_qty2 := g_demand_table(l_index).qty2_available + l_qty2_reserved;
2289: IF x_result_qty2 < 0 THEN
2290: x_result_qty2 := 0;

Line 2296: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);

2292: g_demand_table(l_index).qty_available := g_demand_table(l_index).qty_available
2293: - x_result_qty1 ;
2294: g_demand_table(l_index).qty2_available := nvl(g_demand_table(l_index).qty2_available
2295: - x_result_qty2,0) ;
2296: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2297: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2298:
2299: ELSIF ( g_demand_table(l_index).qty_available <= 0 )THEN -- Backorder line
2300: /*gmi_reservation_util.println('BACKORDER');

Line 2297: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);

2293: - x_result_qty1 ;
2294: g_demand_table(l_index).qty2_available := nvl(g_demand_table(l_index).qty2_available
2295: - x_result_qty2,0) ;
2296: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2297: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2298:
2299: ELSIF ( g_demand_table(l_index).qty_available <= 0 )THEN -- Backorder line
2300: /*gmi_reservation_util.println('BACKORDER');
2301: gmi_reservation_util.println('Returning 0 from calculate_reservation');*/

Line 2300: /*gmi_reservation_util.println('BACKORDER');

2296: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2297: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2298:
2299: ELSIF ( g_demand_table(l_index).qty_available <= 0 )THEN -- Backorder line
2300: /*gmi_reservation_util.println('BACKORDER');
2301: gmi_reservation_util.println('Returning 0 from calculate_reservation');*/
2302: x_result_qty1 := 0;
2303: x_result_qty2 := 0;
2304: --/* bug 2585286, if the availability at high level has already been driven to sub-zero

Line 2301: gmi_reservation_util.println('Returning 0 from calculate_reservation');*/

2297: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2298:
2299: ELSIF ( g_demand_table(l_index).qty_available <= 0 )THEN -- Backorder line
2300: /*gmi_reservation_util.println('BACKORDER');
2301: gmi_reservation_util.println('Returning 0 from calculate_reservation');*/
2302: x_result_qty1 := 0;
2303: x_result_qty2 := 0;
2304: --/* bug 2585286, if the availability at high level has already been driven to sub-zero
2305: -- * need to check the real allocations for the del because user still can allocate a perticular

Line 2316: gmi_reservation_util.println('RELEASE qty1 '|| x_result_qty1 || ' TO WHSE because detail reservatin exists');

2312: - l_qty_reserved ;
2313: g_demand_table(l_index).qty2_available := nvl(g_demand_table(l_index).qty2_available
2314: - l_qty2_reserved,0) ;
2315: IF x_result_qty1 <> 0 THEN
2316: gmi_reservation_util.println('RELEASE qty1 '|| x_result_qty1 || ' TO WHSE because detail reservatin exists');
2317: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2318: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2319: ELSE
2320: gmi_reservation_util.println('BACKORDER');

Line 2317: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);

2313: g_demand_table(l_index).qty2_available := nvl(g_demand_table(l_index).qty2_available
2314: - l_qty2_reserved,0) ;
2315: IF x_result_qty1 <> 0 THEN
2316: gmi_reservation_util.println('RELEASE qty1 '|| x_result_qty1 || ' TO WHSE because detail reservatin exists');
2317: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2318: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2319: ELSE
2320: gmi_reservation_util.println('BACKORDER');
2321: gmi_reservation_util.println('Returning 0 from calculate_reservation');

Line 2318: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);

2314: - l_qty2_reserved,0) ;
2315: IF x_result_qty1 <> 0 THEN
2316: gmi_reservation_util.println('RELEASE qty1 '|| x_result_qty1 || ' TO WHSE because detail reservatin exists');
2317: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2318: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2319: ELSE
2320: gmi_reservation_util.println('BACKORDER');
2321: gmi_reservation_util.println('Returning 0 from calculate_reservation');
2322: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);

Line 2320: gmi_reservation_util.println('BACKORDER');

2316: gmi_reservation_util.println('RELEASE qty1 '|| x_result_qty1 || ' TO WHSE because detail reservatin exists');
2317: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2318: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2319: ELSE
2320: gmi_reservation_util.println('BACKORDER');
2321: gmi_reservation_util.println('Returning 0 from calculate_reservation');
2322: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2323: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2324: END IF;

Line 2321: gmi_reservation_util.println('Returning 0 from calculate_reservation');

2317: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2318: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2319: ELSE
2320: gmi_reservation_util.println('BACKORDER');
2321: gmi_reservation_util.println('Returning 0 from calculate_reservation');
2322: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2323: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2324: END IF;
2325: END IF;

Line 2322: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);

2318: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2319: ELSE
2320: gmi_reservation_util.println('BACKORDER');
2321: gmi_reservation_util.println('Returning 0 from calculate_reservation');
2322: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2323: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2324: END IF;
2325: END IF;
2326: END IF;

Line 2323: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);

2319: ELSE
2320: gmi_reservation_util.println('BACKORDER');
2321: gmi_reservation_util.println('Returning 0 from calculate_reservation');
2322: gmi_reservation_util.println('x_result_qty1 '||x_result_qty1);
2323: gmi_reservation_util.println('x_result_qty2 '||x_result_qty2);
2324: END IF;
2325: END IF;
2326: END IF;
2327:

Line 2336: GMI_RESERVATION_UTIL.PRINTLN('No Data found raised error in GMI_Reservation_PVT.calculate_reservation');

2332: WHEN fnd_api.g_exc_error THEN
2333: x_return_status := fnd_api.g_ret_sts_error;
2334:
2335: WHEN NO_DATA_FOUND THEN
2336: GMI_RESERVATION_UTIL.PRINTLN('No Data found raised error in GMI_Reservation_PVT.calculate_reservation');
2337:
2338: WHEN OTHERS THEN
2339: x_return_status := FND_API.G_RET_STS_ERROR;
2340: GMI_RESERVATION_UTIL.PRINTLN('RAISE WHEN OTHERS');

Line 2340: GMI_RESERVATION_UTIL.PRINTLN('RAISE WHEN OTHERS');

2336: GMI_RESERVATION_UTIL.PRINTLN('No Data found raised error in GMI_Reservation_PVT.calculate_reservation');
2337:
2338: WHEN OTHERS THEN
2339: x_return_status := FND_API.G_RET_STS_ERROR;
2340: GMI_RESERVATION_UTIL.PRINTLN('RAISE WHEN OTHERS');
2341:
2342:
2343: END Calculate_Reservation;
2344:

Line 2403: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details, Unreserve is allowed. ');

2399:
2400: IF (c_get_wsh_released_status%NOTFOUND)
2401: THEN
2402: -- There is no problem, the user can delete_reservation.
2403: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details, Unreserve is allowed. ');
2404: ELSE
2405: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details, Unreserve is forbidden. ');
2406: x_return_status := FND_API.G_RET_STS_ERROR;
2407: END IF;

Line 2405: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details, Unreserve is forbidden. ');

2401: THEN
2402: -- There is no problem, the user can delete_reservation.
2403: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details, Unreserve is allowed. ');
2404: ELSE
2405: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details, Unreserve is forbidden. ');
2406: x_return_status := FND_API.G_RET_STS_ERROR;
2407: END IF;
2408:
2409: CLOSE c_get_wsh_released_status;

Line 2427: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details EXCEPTION: Others, SqlCode='||SQLCODE);

2423: );
2424:
2425: WHEN OTHERS THEN
2426: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2427: GMI_reservation_Util.PrintLn('(opm_dbg) in PVT Check_Shipping_Details EXCEPTION: Others, SqlCode='||SQLCODE);
2428:
2429: IF c_get_wsh_released_status%ISOPEN THEN
2430: CLOSE c_get_wsh_released_status;
2431: END IF;

Line 2556: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);

2552: WHERE line_id = p_line_id;
2553:
2554: BEGIN
2555:
2556: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2557: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2558: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2559:
2560: -- Get whse code

Line 2557: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);

2553:
2554: BEGIN
2555:
2556: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2557: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2558: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2559:
2560: -- Get whse code
2561: OPEN get_whse_code (p_organization_id);

Line 2558: gmi_reservation_util.println('Value of item_id is '||p_item_id);

2554: BEGIN
2555:
2556: gmi_reservation_util.println('value of is p_organization_id'|| p_organization_id);
2557: gmi_reservation_util.println('value of p_demand_source_line_id is ' ||p_demand_source_line_id);
2558: gmi_reservation_util.println('Value of item_id is '||p_item_id);
2559:
2560: -- Get whse code
2561: OPEN get_whse_code (p_organization_id);
2562: FETCH get_whse_code INTO l_whse_code;

Line 2564: GMI_RESERVATION_UTIL.PRINTLN('Error retrieving whse code');

2560: -- Get whse code
2561: OPEN get_whse_code (p_organization_id);
2562: FETCH get_whse_code INTO l_whse_code;
2563: IF ( get_whse_code%NOTFOUND ) THEN
2564: GMI_RESERVATION_UTIL.PRINTLN('Error retrieving whse code');
2565: RAISE NO_DATA_FOUND;
2566: CLOSE get_whse_code;
2567: RETURN;
2568: END IF;

Line 2572: gmi_reservation_util.PRINTLN('Value of Whse Code is '||l_whse_code);

2568: END IF;
2569:
2570: CLOSE get_whse_code;
2571:
2572: gmi_reservation_util.PRINTLN('Value of Whse Code is '||l_whse_code);
2573: Open get_grade_ctl;
2574: Fetch get_grade_ctl Into l_grade_ctl;
2575: Close get_grade_ctl;
2576: gmi_reservation_util.Println('For ATP window');

Line 2576: gmi_reservation_util.Println('For ATP window');

2572: gmi_reservation_util.PRINTLN('Value of Whse Code is '||l_whse_code);
2573: Open get_grade_ctl;
2574: Fetch get_grade_ctl Into l_grade_ctl;
2575: Close get_grade_ctl;
2576: gmi_reservation_util.Println('For ATP window');
2577: OPEN c_get_grade(p_demand_source_line_id);
2578: FETCH c_get_grade into l_grade;
2579: CLOSE c_get_grade;
2580:

Line 2582: gmi_reservation_util.Println('For grade ');

2578: FETCH c_get_grade into l_grade;
2579: CLOSE c_get_grade;
2580:
2581: IF (l_grade_ctl > 0 and l_grade is not null) THEN
2582: gmi_reservation_util.Println('For grade ');
2583: OPEN reserved_quantity_for_grd(l_whse_code,p_item_id,l_grade);
2584: FETCH reserved_quantity_for_grd into l_qty_reserved_real,l_qty2_reserved_real;
2585: CLOSE reserved_quantity_for_grd;
2586: ELSE -- not grade ctl

Line 2587: gmi_reservation_util.Println('For NON grade ');

2583: OPEN reserved_quantity_for_grd(l_whse_code,p_item_id,l_grade);
2584: FETCH reserved_quantity_for_grd into l_qty_reserved_real,l_qty2_reserved_real;
2585: CLOSE reserved_quantity_for_grd;
2586: ELSE -- not grade ctl
2587: gmi_reservation_util.Println('For NON grade ');
2588: OPEN reserved_quantity_for_atp(l_whse_code,p_item_id);
2589: FETCH reserved_quantity_for_atp into l_qty_reserved_real,l_qty2_reserved_real;
2590: CLOSE reserved_quantity_for_atp;
2591: END IF;

Line 2594: gmi_reservation_util.Println('total reserved in ic_tran_pnd qty '|| l_qty_reserved_real);

2590: CLOSE reserved_quantity_for_atp;
2591: END IF;
2592: l_qty_reserved_real := nvl(l_qty_reserved_real, 0);
2593: l_qty2_reserved_real := nvl(l_qty2_reserved_real, 0);
2594: gmi_reservation_util.Println('total reserved in ic_tran_pnd qty '|| l_qty_reserved_real);
2595: gmi_reservation_util.Println('total reserved in ic_tran_pnd qty2 '|| l_qty2_reserved_real);
2596:
2597: IF (l_grade_ctl > 0 and l_grade is not null) THEN
2598: --- from ATP window

Line 2595: gmi_reservation_util.Println('total reserved in ic_tran_pnd qty2 '|| l_qty2_reserved_real);

2591: END IF;
2592: l_qty_reserved_real := nvl(l_qty_reserved_real, 0);
2593: l_qty2_reserved_real := nvl(l_qty2_reserved_real, 0);
2594: gmi_reservation_util.Println('total reserved in ic_tran_pnd qty '|| l_qty_reserved_real);
2595: gmi_reservation_util.Println('total reserved in ic_tran_pnd qty2 '|| l_qty2_reserved_real);
2596:
2597: IF (l_grade_ctl > 0 and l_grade is not null) THEN
2598: --- from ATP window
2599: OPEN qty_on_hand_grade(l_whse_code,p_item_id,l_grade);

Line 2620: gmi_reservation_util.println('value of l_onhand_qty1'||l_onhand_qty1);

2616: l_onhand_qty1:= nvl(l_onhand_qty1,0);
2617: l_onhand_qty2:= nvl(l_onhand_qty2,0);
2618: l_committedsales_qty1:= nvl(l_committedsales_qty1, 0);
2619: l_committedsales_qty2:= nvl(l_committedsales_qty2,0);
2620: gmi_reservation_util.println('value of l_onhand_qty1'||l_onhand_qty1);
2621: gmi_reservation_util.println('value of l_onhand_qty2'||l_onhand_qty2);
2622: gmi_reservation_util.println('value of l_committedsales_qty1'||l_committedsales_qty1);
2623: gmi_reservation_util.println('value of l_committedsales_qty2'||l_committedsales_qty2);
2624:

Line 2621: gmi_reservation_util.println('value of l_onhand_qty2'||l_onhand_qty2);

2617: l_onhand_qty2:= nvl(l_onhand_qty2,0);
2618: l_committedsales_qty1:= nvl(l_committedsales_qty1, 0);
2619: l_committedsales_qty2:= nvl(l_committedsales_qty2,0);
2620: gmi_reservation_util.println('value of l_onhand_qty1'||l_onhand_qty1);
2621: gmi_reservation_util.println('value of l_onhand_qty2'||l_onhand_qty2);
2622: gmi_reservation_util.println('value of l_committedsales_qty1'||l_committedsales_qty1);
2623: gmi_reservation_util.println('value of l_committedsales_qty2'||l_committedsales_qty2);
2624:
2625: -- Begin Bug 2801666 - Pushkar Upakare

Line 2622: gmi_reservation_util.println('value of l_committedsales_qty1'||l_committedsales_qty1);

2618: l_committedsales_qty1:= nvl(l_committedsales_qty1, 0);
2619: l_committedsales_qty2:= nvl(l_committedsales_qty2,0);
2620: gmi_reservation_util.println('value of l_onhand_qty1'||l_onhand_qty1);
2621: gmi_reservation_util.println('value of l_onhand_qty2'||l_onhand_qty2);
2622: gmi_reservation_util.println('value of l_committedsales_qty1'||l_committedsales_qty1);
2623: gmi_reservation_util.println('value of l_committedsales_qty2'||l_committedsales_qty2);
2624:
2625: -- Begin Bug 2801666 - Pushkar Upakare
2626: l_qty_available := l_onhand_qty1 + l_qty_reserved_real;

Line 2623: gmi_reservation_util.println('value of l_committedsales_qty2'||l_committedsales_qty2);

2619: l_committedsales_qty2:= nvl(l_committedsales_qty2,0);
2620: gmi_reservation_util.println('value of l_onhand_qty1'||l_onhand_qty1);
2621: gmi_reservation_util.println('value of l_onhand_qty2'||l_onhand_qty2);
2622: gmi_reservation_util.println('value of l_committedsales_qty1'||l_committedsales_qty1);
2623: gmi_reservation_util.println('value of l_committedsales_qty2'||l_committedsales_qty2);
2624:
2625: -- Begin Bug 2801666 - Pushkar Upakare
2626: l_qty_available := l_onhand_qty1 + l_qty_reserved_real;
2627: l_qty2_available := l_onhand_qty2 + l_qty2_reserved_real;

Line 2639: gmi_reservation_util.println('value of l_qty_reserved for this line is '||l_qty_reserved);

2635:
2636: l_qty_reserved := nvl(l_qty_reserved, 0);
2637: l_qty2_reserved := nvl(l_qty2_reserved, 0);
2638:
2639: gmi_reservation_util.println('value of l_qty_reserved for this line is '||l_qty_reserved);
2640: gmi_reservation_util.println('value of l_qty2_reserved for this line is '||l_qty2_reserved);
2641:
2642: x_onhand_qty1 := l_onhand_qty1 ;
2643: x_onhand_qty2 := l_onhand_qty2 ;

Line 2640: gmi_reservation_util.println('value of l_qty2_reserved for this line is '||l_qty2_reserved);

2636: l_qty_reserved := nvl(l_qty_reserved, 0);
2637: l_qty2_reserved := nvl(l_qty2_reserved, 0);
2638:
2639: gmi_reservation_util.println('value of l_qty_reserved for this line is '||l_qty_reserved);
2640: gmi_reservation_util.println('value of l_qty2_reserved for this line is '||l_qty2_reserved);
2641:
2642: x_onhand_qty1 := l_onhand_qty1 ;
2643: x_onhand_qty2 := l_onhand_qty2 ;
2644: x_avail_qty1 := l_qty_available + l_qty_reserved;

Line 2647: gmi_reservation_util.println('value of x_onhand_qty1 is '||x_onhand_qty1);

2643: x_onhand_qty2 := l_onhand_qty2 ;
2644: x_avail_qty1 := l_qty_available + l_qty_reserved;
2645: x_avail_qty2 := l_qty2_available+ l_qty2_reserved ;
2646:
2647: gmi_reservation_util.println('value of x_onhand_qty1 is '||x_onhand_qty1);
2648: gmi_reservation_util.println('value of x_avail_qty1 is '||x_avail_qty1);
2649:
2650: return;
2651: END query_qty_for_ATP;

Line 2648: gmi_reservation_util.println('value of x_avail_qty1 is '||x_avail_qty1);

2644: x_avail_qty1 := l_qty_available + l_qty_reserved;
2645: x_avail_qty2 := l_qty2_available+ l_qty2_reserved ;
2646:
2647: gmi_reservation_util.println('value of x_onhand_qty1 is '||x_onhand_qty1);
2648: gmi_reservation_util.println('value of x_avail_qty1 is '||x_avail_qty1);
2649:
2650: return;
2651: END query_qty_for_ATP;
2652:

Line 2745: GMI_RESERVATION_UTIL.PrintLn('In Procedure Calulate_Prior_Reservations');

2741: WHERE item_id=p_item_id;
2742:
2743: BEGIN
2744:
2745: GMI_RESERVATION_UTIL.PrintLn('In Procedure Calulate_Prior_Reservations');
2746:
2747: /* Initialize return status to success */
2748: x_return_status := FND_API.G_RET_STS_SUCCESS;
2749:

Line 2756: GMI_RESERVATION_UTIL.PrintLn('Error retrieving item details');

2752: IF(get_item_ctl%NOTFOUND)
2753: THEN
2754: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2755: CLOSE get_item_ctl;
2756: GMI_RESERVATION_UTIL.PrintLn('Error retrieving item details');
2757: FND_MESSAGE.Set_Name('GMI','GMI_API_ITEM_NOT_FOUND');
2758: FND_MESSAGE.Set_Token('ORGANIZATION_ID', p_organization_id);
2759: FND_MSG_PUB.Add;
2760: RAISE FND_API.G_EXC_ERROR;

Line 2771: GMI_RESERVATION_UTIL.PrintLn('Error retrieving whse code');

2767: FETCH get_whse_code INTO l_whse_code,l_whse_loct_ctl;
2768: IF ( get_whse_code%NOTFOUND ) THEN
2769: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2770: CLOSE get_whse_code;
2771: GMI_RESERVATION_UTIL.PrintLn('Error retrieving whse code');
2772: FND_MESSAGE.SET_NAME('GMI','GMI_API_WHSE_NOT_FOUND');
2773: FND_MESSAGE.SET_TOKEN('ORG', p_organization_id);
2774: FND_MESSAGE.SET_TOKEN('LINE_ID', p_demand_source_line_id);
2775: FND_MSG_PUB.Add;

Line 2784: GMI_RESERVATION_UTIL.PrintLn('Working with no control item');

2780:
2781: IF (l_lot_ctl = 0 AND (l_item_loct_ctl * l_whse_loct_ctl)= 0)
2782: THEN
2783: l_is_noctl := TRUE;
2784: GMI_RESERVATION_UTIL.PrintLn('Working with no control item');
2785: ELSE
2786: l_is_noctl := FALSE;
2787: END IF;
2788:

Line 2807: GMI_RESERVATION_UTIL.PrintLn('Error retrieving Reserved qunatity');

2803: FETCH get_trans_for_del INTO l_qty_reserved,l_qty2_reserved;
2804: IF (get_trans_for_del%NOTFOUND ) THEN
2805: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
2806: CLOSE get_trans_for_del;
2807: GMI_RESERVATION_UTIL.PrintLn('Error retrieving Reserved qunatity');
2808: RAISE FND_API.G_EXC_ERROR;
2809: ELSE
2810: CLOSE get_trans_for_del;
2811: END IF;

Line 2817: GMI_RESERVATION_UTIL.PrintLn('Value of l_qty_reserved is '||l_qty_reserved);

2813:
2814: l_qty_reserved := nvl(l_qty_reserved, 0);
2815: l_qty2_reserved := nvl(l_qty2_reserved, 0);
2816:
2817: GMI_RESERVATION_UTIL.PrintLn('Value of l_qty_reserved is '||l_qty_reserved);
2818: GMI_RESERVATION_UTIL.PrintLn('Value of l_qty2_reserved is '||l_qty2_reserved);
2819:
2820: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2821: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;

Line 2818: GMI_RESERVATION_UTIL.PrintLn('Value of l_qty2_reserved is '||l_qty2_reserved);

2814: l_qty_reserved := nvl(l_qty_reserved, 0);
2815: l_qty2_reserved := nvl(l_qty2_reserved, 0);
2816:
2817: GMI_RESERVATION_UTIL.PrintLn('Value of l_qty_reserved is '||l_qty_reserved);
2818: GMI_RESERVATION_UTIL.PrintLn('Value of l_qty2_reserved is '||l_qty2_reserved);
2819:
2820: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2821: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;
2822:

Line 2823: GMI_RESERVATION_UTIL.PrintLn('Value of remainig requested qty is '||l_qty_remaining);

2819:
2820: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2821: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;
2822:
2823: GMI_RESERVATION_UTIL.PrintLn('Value of remainig requested qty is '||l_qty_remaining);
2824: GMI_RESERVATION_UTIL.PrintLn('Value of remainig requested qty2 is '||l_qty2_remaining);
2825:
2826: IF l_qty_remaining <= 0 THEN
2827: x_result_qty1 := p_requested_quantity;

Line 2824: GMI_RESERVATION_UTIL.PrintLn('Value of remainig requested qty2 is '||l_qty2_remaining);

2820: l_qty_remaining := p_requested_quantity - l_qty_reserved;
2821: l_qty2_remaining := p_requested_quantity2 - l_qty2_reserved;
2822:
2823: GMI_RESERVATION_UTIL.PrintLn('Value of remainig requested qty is '||l_qty_remaining);
2824: GMI_RESERVATION_UTIL.PrintLn('Value of remainig requested qty2 is '||l_qty2_remaining);
2825:
2826: IF l_qty_remaining <= 0 THEN
2827: x_result_qty1 := p_requested_quantity;
2828: x_result_qty2 := p_requested_quantity2;

Line 2836: GMI_RESERVATION_UTIL.PrintLn('Returning from Procedure Calulate_Prior_Reservations with Success');

2832: END IF;
2833:
2834: x_return_status := FND_API.G_RET_STS_SUCCESS;
2835:
2836: GMI_RESERVATION_UTIL.PrintLn('Returning from Procedure Calulate_Prior_Reservations with Success');
2837:
2838: EXCEPTION
2839: WHEN FND_API.G_EXC_ERROR THEN
2840: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2842: GMI_RESERVATION_UTIL.PrintLn('Exeption GMI_Reservation_PVT.calculate_prior_reservations');

2838: EXCEPTION
2839: WHEN FND_API.G_EXC_ERROR THEN
2840: x_return_status := FND_API.G_RET_STS_ERROR;
2841:
2842: GMI_RESERVATION_UTIL.PrintLn('Exeption GMI_Reservation_PVT.calculate_prior_reservations');
2843: FND_MSG_PUB.Add_Exc_Msg (
2844: G_PKG_NAME
2845: , l_api_name);
2846:

Line 2854: GMI_RESERVATION_UTIL.PrintLn('No Data found Exception GMI_Reservation_PVT.calculate_prior_reservations');

2850: , p_data => x_msg_data);
2851:
2852: WHEN NO_DATA_FOUND THEN
2853: x_return_status := FND_API.G_RET_STS_ERROR;
2854: GMI_RESERVATION_UTIL.PrintLn('No Data found Exception GMI_Reservation_PVT.calculate_prior_reservations');
2855:
2856: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME
2857: , l_api_name);
2858:

Line 2867: GMI_RESERVATION_UTIL.PrintLn('OTHERS Exception GMI_Reservation_PVT.calculate_prior_reservations');

2863:
2864: WHEN OTHERS THEN
2865: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2866:
2867: GMI_RESERVATION_UTIL.PrintLn('OTHERS Exception GMI_Reservation_PVT.calculate_prior_reservations');
2868:
2869: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME
2870: , l_api_name);
2871:

Line 3008: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)

3004: ABS(SUM(nvl(trans_qty2,0)))
3005: FROM ic_tran_pnd
3006: WHERE item_id = l_opm_itm_id
3007: AND whse_code = l_whse_code
3008: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)
3009: AND completed_ind = 0
3010: AND delete_mark = 0
3011: AND trans_qty < 0;
3012:

Line 3040: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)

3036: SELECT NVL(ABS(SUM(nvl(trans_qty,0))),0), NVL(ABS(SUM(nvl(trans_qty2,0))),0)
3037: FROM ic_tran_pnd itp
3038: WHERE item_id = p_item_id
3039: AND whse_code = l_whse_code
3040: AND (lot_id <> 0 OR location <> GMI_RESERVATION_UTIL.G_DEFAULT_LOCT)
3041: AND completed_ind = 0
3042: AND delete_mark = 0
3043: AND trans_qty < 0
3044: AND EXISTS(SELECT 1

Line 3052: GMI_Reservation_Util.PrintLn('IN Calc_Reservation_For_shipset id ' || p_shipset_id );

3048: AND released_status = 'S');
3049:
3050: BEGIN
3051:
3052: GMI_Reservation_Util.PrintLn('IN Calc_Reservation_For_shipset id ' || p_shipset_id );
3053: -- check if record exists and shipset is already valid.
3054: -- If valid return requested quantity as quantity reserved.
3055: FOR i in 1..g_shipset_table.COUNT LOOP
3056: IF (g_shipset_table(i).shipset_id = p_shipset_id) THEN

Line 3059: GMI_Reservation_Util.PrintLn('Shipset Found in global table - RESERVED - Exiting from calc_reservation_for_shipset');

3055: FOR i in 1..g_shipset_table.COUNT LOOP
3056: IF (g_shipset_table(i).shipset_id = p_shipset_id) THEN
3057: l_shipset_found := 1;
3058: IF (g_shipset_table(i).shipset_reserved = 'Y' AND g_shipset_table(i).shipset_valid = 'Y') THEN
3059: GMI_Reservation_Util.PrintLn('Shipset Found in global table - RESERVED - Exiting from calc_reservation_for_shipset');
3060: x_shipset_reserved := 'Y';
3061: RETURN;
3062: ELSIF (g_shipset_table(i).shipset_reserved = 'N' OR g_shipset_table(i).shipset_valid = 'N') THEN
3063: GMI_Reservation_Util.PrintLn('Shipset Found in global table - NOT RESERVED - Exiting from calc_reservation_for_shipset');

Line 3063: GMI_Reservation_Util.PrintLn('Shipset Found in global table - NOT RESERVED - Exiting from calc_reservation_for_shipset');

3059: GMI_Reservation_Util.PrintLn('Shipset Found in global table - RESERVED - Exiting from calc_reservation_for_shipset');
3060: x_shipset_reserved := 'Y';
3061: RETURN;
3062: ELSIF (g_shipset_table(i).shipset_reserved = 'N' OR g_shipset_table(i).shipset_valid = 'N') THEN
3063: GMI_Reservation_Util.PrintLn('Shipset Found in global table - NOT RESERVED - Exiting from calc_reservation_for_shipset');
3064: x_shipset_reserved := 'N';
3065: RETURN;
3066: END IF;
3067: END IF;

Line 3070: GMI_Reservation_Util.PrintLn('Shipset NOT FOUND in global table ');

3066: END IF;
3067: END IF;
3068: END LOOP;
3069:
3070: GMI_Reservation_Util.PrintLn('Shipset NOT FOUND in global table ');
3071:
3072:
3073: -- If l_shipset_found is still zero need to load shipset in demand table.
3074: IF (l_shipset_found = 0) THEN

Line 3088: GMI_Reservation_Util.PrintLn('Working with no control item in shipset');

3084: CLOSE get_item_ctl;
3085:
3086: IF (l_lot_ctl = 0 AND (l_item_loct_ctl * p_whse_loct_ctl)= 0) THEN
3087: l_is_noctl := TRUE;
3088: GMI_Reservation_Util.PrintLn('Working with no control item in shipset');
3089: END IF;
3090:
3091: -- Now copy code below to build Demand table
3092: l_demand_exists := FALSE;

Line 3098: gmi_reservation_util.println('Building demand table for shipset if not already done');

3094: l_index := i;
3095: IF (g_demand_table(i).item_id= l_opm_itm_id AND
3096: g_demand_table(i).whse_code = p_whse_code) THEN
3097: l_demand_exists := TRUE;
3098: gmi_reservation_util.println('Building demand table for shipset if not already done');
3099: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');
3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);
3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);

Line 3099: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);

3095: IF (g_demand_table(i).item_id= l_opm_itm_id AND
3096: g_demand_table(i).whse_code = p_whse_code) THEN
3097: l_demand_exists := TRUE;
3098: gmi_reservation_util.println('Building demand table for shipset if not already done');
3099: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');
3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);
3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);
3103: gmi_reservation_util.println('value of g_demand_table(i).qty2_available found is '||g_demand_table(i).qty2_available);

Line 3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');

3096: g_demand_table(i).whse_code = p_whse_code) THEN
3097: l_demand_exists := TRUE;
3098: gmi_reservation_util.println('Building demand table for shipset if not already done');
3099: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');
3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);
3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);
3103: gmi_reservation_util.println('value of g_demand_table(i).qty2_available found is '||g_demand_table(i).qty2_available);
3104: gmi_reservation_util.println('value of g_demand_table(i).qty2_committed found is '||g_demand_table(i).qty2_committed);

Line 3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);

3097: l_demand_exists := TRUE;
3098: gmi_reservation_util.println('Building demand table for shipset if not already done');
3099: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');
3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);
3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);
3103: gmi_reservation_util.println('value of g_demand_table(i).qty2_available found is '||g_demand_table(i).qty2_available);
3104: gmi_reservation_util.println('value of g_demand_table(i).qty2_committed found is '||g_demand_table(i).qty2_committed);
3105: EXIT;

Line 3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);

3098: gmi_reservation_util.println('Building demand table for shipset if not already done');
3099: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');
3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);
3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);
3103: gmi_reservation_util.println('value of g_demand_table(i).qty2_available found is '||g_demand_table(i).qty2_available);
3104: gmi_reservation_util.println('value of g_demand_table(i).qty2_committed found is '||g_demand_table(i).qty2_committed);
3105: EXIT;
3106: END IF;

Line 3103: gmi_reservation_util.println('value of g_demand_table(i).qty2_available found is '||g_demand_table(i).qty2_available);

3099: gmi_reservation_util.println('Value of item_id found in loop is '||g_demand_table(i).item_id);
3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');
3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);
3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);
3103: gmi_reservation_util.println('value of g_demand_table(i).qty2_available found is '||g_demand_table(i).qty2_available);
3104: gmi_reservation_util.println('value of g_demand_table(i).qty2_committed found is '||g_demand_table(i).qty2_committed);
3105: EXIT;
3106: END IF;
3107: END LOOP;

Line 3104: gmi_reservation_util.println('value of g_demand_table(i).qty2_committed found is '||g_demand_table(i).qty2_committed);

3100: gmi_reservation_util.println('In opm calc_reservation_for_shipset Found the Reservation Details');
3101: gmi_reservation_util.println('value of g_demand_table(i).qty_available found is '||g_demand_table(i).qty_available);
3102: gmi_reservation_util.println('value of g_demand_table(i).qty_committed found is '||g_demand_table(i).qty_committed);
3103: gmi_reservation_util.println('value of g_demand_table(i).qty2_available found is '||g_demand_table(i).qty2_available);
3104: gmi_reservation_util.println('value of g_demand_table(i).qty2_committed found is '||g_demand_table(i).qty2_committed);
3105: EXIT;
3106: END IF;
3107: END LOOP;
3108:

Line 3110: gmi_reservation_util.Println('Building demand table For Shipset item id ' || l_opm_itm_id );

3106: END IF;
3107: END LOOP;
3108:
3109: IF (not l_demand_exists) THEN
3110: gmi_reservation_util.Println('Building demand table For Shipset item id ' || l_opm_itm_id );
3111:
3112: IF (l_is_noctl = TRUE) THEN
3113: gmi_reservation_util.println('Item warehouse combination is No Control');
3114: gmi_reservation_util.Println('inventory_item_id is '||l_apps_itm_id);

Line 3113: gmi_reservation_util.println('Item warehouse combination is No Control');

3109: IF (not l_demand_exists) THEN
3110: gmi_reservation_util.Println('Building demand table For Shipset item id ' || l_opm_itm_id );
3111:
3112: IF (l_is_noctl = TRUE) THEN
3113: gmi_reservation_util.println('Item warehouse combination is No Control');
3114: gmi_reservation_util.Println('inventory_item_id is '||l_apps_itm_id);
3115: OPEN reserved_quantity_nonctl(l_apps_itm_id);
3116: FETCH reserved_quantity_nonctl INTO l_qty_reserved_real,l_qty2_reserved_real;
3117: CLOSE reserved_quantity_nonctl;

Line 3114: gmi_reservation_util.Println('inventory_item_id is '||l_apps_itm_id);

3110: gmi_reservation_util.Println('Building demand table For Shipset item id ' || l_opm_itm_id );
3111:
3112: IF (l_is_noctl = TRUE) THEN
3113: gmi_reservation_util.println('Item warehouse combination is No Control');
3114: gmi_reservation_util.Println('inventory_item_id is '||l_apps_itm_id);
3115: OPEN reserved_quantity_nonctl(l_apps_itm_id);
3116: FETCH reserved_quantity_nonctl INTO l_qty_reserved_real,l_qty2_reserved_real;
3117: CLOSE reserved_quantity_nonctl;
3118: ELSE

Line 3126: gmi_reservation_util.println('value of l_qty_reserved_real '|| l_qty_reserved_real);

3122: END IF;
3123: l_qty_reserved_real := nvl(l_qty_reserved_real, 0);
3124: l_qty2_reserved_real := nvl(l_qty2_reserved_real, 0);
3125:
3126: gmi_reservation_util.println('value of l_qty_reserved_real '|| l_qty_reserved_real);
3127: gmi_reservation_util.println('value of l_qty2_reserved_real '|| l_qty2_reserved_real);
3128:
3129: -- Let's increment the counter
3130:

Line 3127: gmi_reservation_util.println('value of l_qty2_reserved_real '|| l_qty2_reserved_real);

3123: l_qty_reserved_real := nvl(l_qty_reserved_real, 0);
3124: l_qty2_reserved_real := nvl(l_qty2_reserved_real, 0);
3125:
3126: gmi_reservation_util.println('value of l_qty_reserved_real '|| l_qty_reserved_real);
3127: gmi_reservation_util.println('value of l_qty2_reserved_real '|| l_qty2_reserved_real);
3128:
3129: -- Let's increment the counter
3130:
3131: l_count := g_demand_table.COUNT + 1;

Line 3154: gmi_reservation_util.println('value of l_high_lev_res_qty '||l_high_lev_res_qty);

3150: IF (l_is_noctl = FALSE) THEN
3151: OPEN high_level_reserved_qty(p_organization_id,l_apps_itm_id);
3152: FETCH high_level_reserved_qty INTO l_high_lev_res_qty, l_high_lev_res_qty2;
3153: CLOSE high_level_reserved_qty;
3154: gmi_reservation_util.println('value of l_high_lev_res_qty '||l_high_lev_res_qty);
3155: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);
3156: OPEN high_level_res_qty_real(p_item_id,p_whse_code);
3157: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
3158: CLOSE high_level_res_qty_real;

Line 3155: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);

3151: OPEN high_level_reserved_qty(p_organization_id,l_apps_itm_id);
3152: FETCH high_level_reserved_qty INTO l_high_lev_res_qty, l_high_lev_res_qty2;
3153: CLOSE high_level_reserved_qty;
3154: gmi_reservation_util.println('value of l_high_lev_res_qty '||l_high_lev_res_qty);
3155: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);
3156: OPEN high_level_res_qty_real(p_item_id,p_whse_code);
3157: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
3158: CLOSE high_level_res_qty_real;
3159: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);

Line 3159: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);

3155: gmi_reservation_util.println('value of l_high_lev_res_qty2 '||l_high_lev_res_qty2);
3156: OPEN high_level_res_qty_real(p_item_id,p_whse_code);
3157: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
3158: CLOSE high_level_res_qty_real;
3159: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);
3160: gmi_reservation_util.println('value of l_real_high_lev_res_qty2 '||l_real_high_lev_res_qty2);
3161: l_net_high_lev_res_qty := l_high_lev_res_qty - l_real_high_lev_res_qty;
3162: l_net_high_lev_res_qty2 := l_high_lev_res_qty2 - l_real_high_lev_res_qty2;
3163: IF l_net_high_lev_res_qty < 0 THEN -- This could happen in case of over allocation.

Line 3160: gmi_reservation_util.println('value of l_real_high_lev_res_qty2 '||l_real_high_lev_res_qty2);

3156: OPEN high_level_res_qty_real(p_item_id,p_whse_code);
3157: FETCH high_level_res_qty_real into l_real_high_lev_res_qty,l_real_high_lev_res_qty2;
3158: CLOSE high_level_res_qty_real;
3159: gmi_reservation_util.println('value of l_real_high_lev_res_qty '||l_real_high_lev_res_qty);
3160: gmi_reservation_util.println('value of l_real_high_lev_res_qty2 '||l_real_high_lev_res_qty2);
3161: l_net_high_lev_res_qty := l_high_lev_res_qty - l_real_high_lev_res_qty;
3162: l_net_high_lev_res_qty2 := l_high_lev_res_qty2 - l_real_high_lev_res_qty2;
3163: IF l_net_high_lev_res_qty < 0 THEN -- This could happen in case of over allocation.
3164: l_net_high_lev_res_qty := 0;

Line 3167: gmi_reservation_util.println('value of l_net_high_lev_res_qty '||l_net_high_lev_res_qty);

3163: IF l_net_high_lev_res_qty < 0 THEN -- This could happen in case of over allocation.
3164: l_net_high_lev_res_qty := 0;
3165: l_net_high_lev_res_qty2 := 0;
3166: END IF;
3167: gmi_reservation_util.println('value of l_net_high_lev_res_qty '||l_net_high_lev_res_qty);
3168: gmi_reservation_util.println('value of l_net_high_lev_res_qty2 '||l_net_high_lev_res_qty2);
3169: g_demand_table(l_count).qty_available := g_demand_table(l_count).qty_available - l_net_high_lev_res_qty;
3170: g_demand_table(l_count).qty2_available := g_demand_table(l_count).qty2_available - l_net_high_lev_res_qty2;
3171: END IF;

Line 3168: gmi_reservation_util.println('value of l_net_high_lev_res_qty2 '||l_net_high_lev_res_qty2);

3164: l_net_high_lev_res_qty := 0;
3165: l_net_high_lev_res_qty2 := 0;
3166: END IF;
3167: gmi_reservation_util.println('value of l_net_high_lev_res_qty '||l_net_high_lev_res_qty);
3168: gmi_reservation_util.println('value of l_net_high_lev_res_qty2 '||l_net_high_lev_res_qty2);
3169: g_demand_table(l_count).qty_available := g_demand_table(l_count).qty_available - l_net_high_lev_res_qty;
3170: g_demand_table(l_count).qty2_available := g_demand_table(l_count).qty2_available - l_net_high_lev_res_qty2;
3171: END IF;
3172: END IF;

Line 3191: gmi_reservation_util.Println('Demand table Built For Shipset item id ' || l_opm_itm_id );

3187: IF g_demand_table(l_index).qty2_available < 0 THEN
3188: g_demand_table(l_index).qty2_available := 0;
3189: END IF;
3190:
3191: gmi_reservation_util.Println('Demand table Built For Shipset item id ' || l_opm_itm_id );
3192: gmi_reservation_util.println('value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
3193: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_available '||g_demand_table(l_index).qty2_available);
3194: gmi_reservation_util.println('value of g_demand_table(l_index).qty_committed '||g_demand_table(l_index).qty_committed);
3195: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_committed '||g_demand_table(l_index).qty2_committed);

Line 3192: gmi_reservation_util.println('value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);

3188: g_demand_table(l_index).qty2_available := 0;
3189: END IF;
3190:
3191: gmi_reservation_util.Println('Demand table Built For Shipset item id ' || l_opm_itm_id );
3192: gmi_reservation_util.println('value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
3193: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_available '||g_demand_table(l_index).qty2_available);
3194: gmi_reservation_util.println('value of g_demand_table(l_index).qty_committed '||g_demand_table(l_index).qty_committed);
3195: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_committed '||g_demand_table(l_index).qty2_committed);
3196:

Line 3193: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_available '||g_demand_table(l_index).qty2_available);

3189: END IF;
3190:
3191: gmi_reservation_util.Println('Demand table Built For Shipset item id ' || l_opm_itm_id );
3192: gmi_reservation_util.println('value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
3193: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_available '||g_demand_table(l_index).qty2_available);
3194: gmi_reservation_util.println('value of g_demand_table(l_index).qty_committed '||g_demand_table(l_index).qty_committed);
3195: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_committed '||g_demand_table(l_index).qty2_committed);
3196:
3197:

Line 3194: gmi_reservation_util.println('value of g_demand_table(l_index).qty_committed '||g_demand_table(l_index).qty_committed);

3190:
3191: gmi_reservation_util.Println('Demand table Built For Shipset item id ' || l_opm_itm_id );
3192: gmi_reservation_util.println('value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
3193: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_available '||g_demand_table(l_index).qty2_available);
3194: gmi_reservation_util.println('value of g_demand_table(l_index).qty_committed '||g_demand_table(l_index).qty_committed);
3195: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_committed '||g_demand_table(l_index).qty2_committed);
3196:
3197:
3198: END IF; -- of not l_demand_exists

Line 3195: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_committed '||g_demand_table(l_index).qty2_committed);

3191: gmi_reservation_util.Println('Demand table Built For Shipset item id ' || l_opm_itm_id );
3192: gmi_reservation_util.println('value of g_demand_table(l_index).qty_available '||g_demand_table(l_index).qty_available);
3193: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_available '||g_demand_table(l_index).qty2_available);
3194: gmi_reservation_util.println('value of g_demand_table(l_index).qty_committed '||g_demand_table(l_index).qty_committed);
3195: gmi_reservation_util.println('value of g_demand_table(l_index).qty2_committed '||g_demand_table(l_index).qty2_committed);
3196:
3197:
3198: END IF; -- of not l_demand_exists
3199: -- End copy of code below.

Line 3202: gmi_reservation_util.println('Global Demand table is now available for all items in Shipset id '||p_shipset_id);

3198: END IF; -- of not l_demand_exists
3199: -- End copy of code below.
3200: END LOOP;
3201:
3202: gmi_reservation_util.println('Global Demand table is now available for all items in Shipset id '||p_shipset_id);
3203:
3204: -- Now done building demand table. We should loop again to see if demand can be fulfilled.
3205: -- Validation loop should use group by item since same item/warehouse can exist in shipset (Generally not but it can)
3206: -- You have itm_rec for requested_qty and l_opm_itm_id. Find the record in demand table and check if .

Line 3214: gmi_reservation_util.println('Checking availability in global demand table for Item id '||l_opm_itm_id);

3210: l_apps_itm_id := itm_group_rec.inventory_item_id;
3211: OPEN opm_itm(l_apps_itm_id);
3212: FETCH opm_itm INTO l_opm_itm_id;
3213: CLOSE opm_itm;
3214: gmi_reservation_util.println('Checking availability in global demand table for Item id '||l_opm_itm_id);
3215: -- Find the rec in demand table
3216: FOR i in 1..g_demand_table.COUNT LOOP
3217: IF (g_demand_table(i).item_id= l_opm_itm_id AND
3218: g_demand_table(i).whse_code = p_whse_code) THEN

Line 3220: gmi_reservation_util.println('Demand can NOT be fulfilled for Item id '||l_opm_itm_id);

3216: FOR i in 1..g_demand_table.COUNT LOOP
3217: IF (g_demand_table(i).item_id= l_opm_itm_id AND
3218: g_demand_table(i).whse_code = p_whse_code) THEN
3219: IF (g_demand_table(i).qty_available < itm_group_rec.total_requested) THEN
3220: gmi_reservation_util.println('Demand can NOT be fulfilled for Item id '||l_opm_itm_id);
3221: l_shipset_qty_avl := 0;
3222: EXIT;
3223: ELSE
3224: gmi_reservation_util.println('Demand can be FULFILLED for Item id '||l_opm_itm_id);

Line 3224: gmi_reservation_util.println('Demand can be FULFILLED for Item id '||l_opm_itm_id);

3220: gmi_reservation_util.println('Demand can NOT be fulfilled for Item id '||l_opm_itm_id);
3221: l_shipset_qty_avl := 0;
3222: EXIT;
3223: ELSE
3224: gmi_reservation_util.println('Demand can be FULFILLED for Item id '||l_opm_itm_id);
3225: END IF;
3226: END IF;
3227: END LOOP;
3228: IF (l_shipset_qty_avl = 0) THEN

Line 3229: gmi_reservation_util.println('Demand check FAILED for Shipset id '||p_shipset_id);

3225: END IF;
3226: END IF;
3227: END LOOP;
3228: IF (l_shipset_qty_avl = 0) THEN
3229: gmi_reservation_util.println('Demand check FAILED for Shipset id '||p_shipset_id);
3230: EXIT;
3231: END IF;
3232: END LOOP;
3233: -- if l_shipset_qty_avl is still 1 means shipset availability check is successful. Then go and also book the demand

Line 3244: gmi_reservation_util.println('Exiting calc_reservation_for_shipset check FAILED for Shipset id '||p_shipset_id);

3240: g_shipset_table(l_count).order_id := p_source_header_id;
3241: g_shipset_table(l_count).shipset_valid := 'N';
3242: g_shipset_table(l_count).shipset_reserved := 'N';
3243: x_shipset_reserved := 'N';
3244: gmi_reservation_util.println('Exiting calc_reservation_for_shipset check FAILED for Shipset id '||p_shipset_id);
3245: RETURN;
3246: ELSIF (l_shipset_qty_avl = 1) THEN
3247: l_count := g_shipset_table.COUNT + 1;
3248: g_shipset_table(l_count).shipset_id := p_shipset_id;

Line 3252: gmi_reservation_util.println('Record added to global table check SUCCESSFUL for Shipset id '||p_shipset_id);

3248: g_shipset_table(l_count).shipset_id := p_shipset_id;
3249: g_shipset_table(l_count).order_id := p_source_header_id;
3250: g_shipset_table(l_count).shipset_valid := 'Y';
3251: g_shipset_table(l_count).shipset_reserved := 'N';
3252: gmi_reservation_util.println('Record added to global table check SUCCESSFUL for Shipset id '||p_shipset_id);
3253: END IF;
3254: -- Now book the demand for shipset
3255: gmi_reservation_util.println('Now Booking demand for Shipset id '||p_shipset_id);
3256: FOR itm_rec IN shipset_item LOOP

Line 3255: gmi_reservation_util.println('Now Booking demand for Shipset id '||p_shipset_id);

3251: g_shipset_table(l_count).shipset_reserved := 'N';
3252: gmi_reservation_util.println('Record added to global table check SUCCESSFUL for Shipset id '||p_shipset_id);
3253: END IF;
3254: -- Now book the demand for shipset
3255: gmi_reservation_util.println('Now Booking demand for Shipset id '||p_shipset_id);
3256: FOR itm_rec IN shipset_item LOOP
3257: l_apps_itm_id := itm_rec.inventory_item_id;
3258: OPEN opm_itm(l_apps_itm_id);
3259: FETCH opm_itm INTO l_opm_itm_id;

Line 3264: gmi_reservation_util.println('Booking demand for Item id '||l_opm_itm_id);

3260: CLOSE opm_itm;
3261: FOR i in 1..g_demand_table.COUNT LOOP
3262: IF (g_demand_table(i).item_id= l_opm_itm_id AND
3263: g_demand_table(i).whse_code = p_whse_code) THEN
3264: gmi_reservation_util.println('Booking demand for Item id '||l_opm_itm_id);
3265: g_demand_table(i).qty_available := g_demand_table(i).qty_available - itm_rec.requested_quantity;
3266: g_demand_table(i).qty2_available := g_demand_table(i).qty2_available - nvl(itm_rec.requested_quantity2, 0);
3267: gmi_reservation_util.Println('Demand table Updated For Shipset item id ' || l_opm_itm_id );
3268: gmi_reservation_util.println('value of g_demand_table(i).qty_available '||g_demand_table(i).qty_available);

Line 3267: gmi_reservation_util.Println('Demand table Updated For Shipset item id ' || l_opm_itm_id );

3263: g_demand_table(i).whse_code = p_whse_code) THEN
3264: gmi_reservation_util.println('Booking demand for Item id '||l_opm_itm_id);
3265: g_demand_table(i).qty_available := g_demand_table(i).qty_available - itm_rec.requested_quantity;
3266: g_demand_table(i).qty2_available := g_demand_table(i).qty2_available - nvl(itm_rec.requested_quantity2, 0);
3267: gmi_reservation_util.Println('Demand table Updated For Shipset item id ' || l_opm_itm_id );
3268: gmi_reservation_util.println('value of g_demand_table(i).qty_available '||g_demand_table(i).qty_available);
3269: gmi_reservation_util.println('value of g_demand_table(i).qty2_available '||g_demand_table(i).qty2_available);
3270:
3271: EXIT;

Line 3268: gmi_reservation_util.println('value of g_demand_table(i).qty_available '||g_demand_table(i).qty_available);

3264: gmi_reservation_util.println('Booking demand for Item id '||l_opm_itm_id);
3265: g_demand_table(i).qty_available := g_demand_table(i).qty_available - itm_rec.requested_quantity;
3266: g_demand_table(i).qty2_available := g_demand_table(i).qty2_available - nvl(itm_rec.requested_quantity2, 0);
3267: gmi_reservation_util.Println('Demand table Updated For Shipset item id ' || l_opm_itm_id );
3268: gmi_reservation_util.println('value of g_demand_table(i).qty_available '||g_demand_table(i).qty_available);
3269: gmi_reservation_util.println('value of g_demand_table(i).qty2_available '||g_demand_table(i).qty2_available);
3270:
3271: EXIT;
3272: END IF;

Line 3269: gmi_reservation_util.println('value of g_demand_table(i).qty2_available '||g_demand_table(i).qty2_available);

3265: g_demand_table(i).qty_available := g_demand_table(i).qty_available - itm_rec.requested_quantity;
3266: g_demand_table(i).qty2_available := g_demand_table(i).qty2_available - nvl(itm_rec.requested_quantity2, 0);
3267: gmi_reservation_util.Println('Demand table Updated For Shipset item id ' || l_opm_itm_id );
3268: gmi_reservation_util.println('value of g_demand_table(i).qty_available '||g_demand_table(i).qty_available);
3269: gmi_reservation_util.println('value of g_demand_table(i).qty2_available '||g_demand_table(i).qty2_available);
3270:
3271: EXIT;
3272: END IF;
3273: END LOOP;

Line 3278: gmi_reservation_util.println('EXITING Record Updated- RESERVED Shipset id '||p_shipset_id);

3274: END LOOP;
3275: -- Now Update g_shipset_table to mark Shipset as reserved.
3276: g_shipset_table(l_count).shipset_reserved := 'Y';
3277: x_shipset_reserved := 'Y';
3278: gmi_reservation_util.println('EXITING Record Updated- RESERVED Shipset id '||p_shipset_id);
3279: RETURN;
3280:
3281:
3282: END IF; -- (l_shipset_found = 0)