DBA Data[Home] [Help]

APPS.GME_API_GRP dependencies on GME_COMMON_PVT

Line 97: IF gme_common_pvt.g_user_ident IS NULL THEN

93: END IF;
94:
95: -- Bug 8841650 - Initialize user and timestamp just in case this is
96: -- called from an outside process like transact move order.
97: IF gme_common_pvt.g_user_ident IS NULL THEN
98: gme_common_pvt.set_who;
99: END IF;
100:
101: gme_transactions_pvt.gme_post_process

Line 98: gme_common_pvt.set_who;

94:
95: -- Bug 8841650 - Initialize user and timestamp just in case this is
96: -- called from an outside process like transact move order.
97: IF gme_common_pvt.g_user_ident IS NULL THEN
98: gme_common_pvt.set_who;
99: END IF;
100:
101: gme_transactions_pvt.gme_post_process
102: (p_transaction_id => p_transaction_id

Line 145: gme_common_pvt.set_who ;

141: ,x_return_status OUT NOCOPY VARCHAR2)
142: IS
143: BEGIN
144:
145: gme_common_pvt.set_who ;
146: gme_common_pvt.material_date_change
147: (p_material_detail_id => p_material_detail_id
148: ,p_material_date => p_material_date
149: ,x_return_status => x_return_status);

Line 146: gme_common_pvt.material_date_change

142: IS
143: BEGIN
144:
145: gme_common_pvt.set_who ;
146: gme_common_pvt.material_date_change
147: (p_material_detail_id => p_material_detail_id
148: ,p_material_date => p_material_date
149: ,x_return_status => x_return_status);
150: /* FPBug#4585491

Line 218: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'ORGANIZATION_ID');

214: IF g_debug <= gme_debug.g_log_statement THEN
215: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' validate for mandatory input parameters ');
216: END IF;
217: IF p_organization_id IS NULL THEN
218: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'ORGANIZATION_ID');
219: RAISE input_param_missing;
220: ELSIF p_item_id IS NULL THEN
221: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'ITEM_ID');
222: RAISE input_param_missing;

Line 221: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'ITEM_ID');

217: IF p_organization_id IS NULL THEN
218: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'ORGANIZATION_ID');
219: RAISE input_param_missing;
220: ELSIF p_item_id IS NULL THEN
221: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'ITEM_ID');
222: RAISE input_param_missing;
223: ELSIF p_supply_demand_code IS NULL THEN
224: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_CODE');
225: RAISE input_param_missing;

Line 224: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_CODE');

220: ELSIF p_item_id IS NULL THEN
221: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'ITEM_ID');
222: RAISE input_param_missing;
223: ELSIF p_supply_demand_code IS NULL THEN
224: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_CODE');
225: RAISE input_param_missing;
226: ELSIF p_supply_demand_type_id IS NULL THEN
227: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');
228: RAISE input_param_missing;

Line 227: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');

223: ELSIF p_supply_demand_code IS NULL THEN
224: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_CODE');
225: RAISE input_param_missing;
226: ELSIF p_supply_demand_type_id IS NULL THEN
227: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');
228: RAISE input_param_missing;
229: ELSIF p_supply_demand_header_id IS NULL THEN
230: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');
231: RAISE input_param_missing;

Line 230: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');

226: ELSIF p_supply_demand_type_id IS NULL THEN
227: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');
228: RAISE input_param_missing;
229: ELSIF p_supply_demand_header_id IS NULL THEN
230: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');
231: RAISE input_param_missing;
232: ELSIF p_supply_demand_line_id IS NULL THEN
233: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_LINE_ID');
234: RAISE input_param_missing;

Line 233: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_LINE_ID');

229: ELSIF p_supply_demand_header_id IS NULL THEN
230: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');
231: RAISE input_param_missing;
232: ELSIF p_supply_demand_line_id IS NULL THEN
233: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_LINE_ID');
234: RAISE input_param_missing;
235: END IF;
236:
237: /* Retrieve batch header row */

Line 252: gme_common_pvt.log_message('GME_INVENTORY_UPDATE_BLOCKED');

248: END IF;
249:
250: /* Verify that update_inventory is allowed for the Batch */
251: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN
252: gme_common_pvt.log_message('GME_INVENTORY_UPDATE_BLOCKED');
253: RAISE validation_error;
254: END IF;
255:
256: /* Verify that Batch is in either Pending or WIP status */

Line 257: IF l_batch_header_rec.batch_status NOT IN (gme_common_pvt.g_batch_pending,

253: RAISE validation_error;
254: END IF;
255:
256: /* Verify that Batch is in either Pending or WIP status */
257: IF l_batch_header_rec.batch_status NOT IN (gme_common_pvt.g_batch_pending,
258: gme_common_pvt.g_batch_wip) THEN
259: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS', 'PROCESS', 'RESERVATION');
260: RAISE validation_error;
261: END IF;

Line 258: gme_common_pvt.g_batch_wip) THEN

254: END IF;
255:
256: /* Verify that Batch is in either Pending or WIP status */
257: IF l_batch_header_rec.batch_status NOT IN (gme_common_pvt.g_batch_pending,
258: gme_common_pvt.g_batch_wip) THEN
259: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS', 'PROCESS', 'RESERVATION');
260: RAISE validation_error;
261: END IF;
262:

Line 259: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS', 'PROCESS', 'RESERVATION');

255:
256: /* Verify that Batch is in either Pending or WIP status */
257: IF l_batch_header_rec.batch_status NOT IN (gme_common_pvt.g_batch_pending,
258: gme_common_pvt.g_batch_wip) THEN
259: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS', 'PROCESS', 'RESERVATION');
260: RAISE validation_error;
261: END IF;
262:
263: /* Verify that Batch is WIP status for conversion api calls. */

Line 264: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip AND

260: RAISE validation_error;
261: END IF;
262:
263: /* Verify that Batch is WIP status for conversion api calls. */
264: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip AND
265: p_called_by = 'CVT') THEN
266: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS', 'CONVERT', 'RESERVATION');
267: RAISE validation_error;
268: END IF;

Line 266: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS', 'CONVERT', 'RESERVATION');

262:
263: /* Verify that Batch is WIP status for conversion api calls. */
264: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip AND
265: p_called_by = 'CVT') THEN
266: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS', 'CONVERT', 'RESERVATION');
267: RAISE validation_error;
268: END IF;
269:
270: /* Reservation OR conversion not permitted for FPOs */

Line 271: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

267: RAISE validation_error;
268: END IF;
269:
270: /* Reservation OR conversion not permitted for FPOs */
271: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
272: gme_common_pvt.log_message('GME_FPO_RESERVATION_ERROR');
273: RAISE validation_error;
274: END IF;
275:

Line 272: gme_common_pvt.log_message('GME_FPO_RESERVATION_ERROR');

268: END IF;
269:
270: /* Reservation OR conversion not permitted for FPOs */
271: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
272: gme_common_pvt.log_message('GME_FPO_RESERVATION_ERROR');
273: RAISE validation_error;
274: END IF;
275:
276: /* Retrieve material details record */

Line 289: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','ORGANIZATION_ID');

285:
286: /* Verify that the supplied organization_id and item are consistent with the material details row */
287: IF p_organization_id <> l_material_details_rec.organization_id THEN
288: --Bug#5439736 replaced the following message
289: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','ORGANIZATION_ID');
290: RAISE validation_error;
291: ELSIF p_item_id <> l_material_details_rec.inventory_item_id THEN
292: --Bug#5439736
293: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','INVENTORY_ITEM_ID');

Line 293: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','INVENTORY_ITEM_ID');

289: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','ORGANIZATION_ID');
290: RAISE validation_error;
291: ELSIF p_item_id <> l_material_details_rec.inventory_item_id THEN
292: --Bug#5439736
293: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','INVENTORY_ITEM_ID');
294: RAISE validation_error;
295: END IF;
296:
297: /* Verify that Reservation is not for phantom ingredient */

Line 299: gme_common_pvt.log_message('GME_INVALID_RSV_FOR_PHANTOM');

295: END IF;
296:
297: /* Verify that Reservation is not for phantom ingredient */
298: IF l_material_details_rec.phantom_type IN (1,2) THEN
299: gme_common_pvt.log_message('GME_INVALID_RSV_FOR_PHANTOM');
300: RAISE validation_error;
301: END IF;
302:
303: /* Verify that Reservation is not for sample by-product */

Line 304: IF l_material_details_rec.line_type = gme_common_pvt.g_line_type_byprod AND

300: RAISE validation_error;
301: END IF;
302:
303: /* Verify that Reservation is not for sample by-product */
304: IF l_material_details_rec.line_type = gme_common_pvt.g_line_type_byprod AND
305: l_material_details_rec.by_product_type = 'Y' THEN
306: gme_common_pvt.log_message('GME_INVALID_RSV_FOR_BYPROD');
307: RAISE validation_error;
308: END IF;

Line 306: gme_common_pvt.log_message('GME_INVALID_RSV_FOR_BYPROD');

302:
303: /* Verify that Reservation is not for sample by-product */
304: IF l_material_details_rec.line_type = gme_common_pvt.g_line_type_byprod AND
305: l_material_details_rec.by_product_type = 'Y' THEN
306: gme_common_pvt.log_message('GME_INVALID_RSV_FOR_BYPROD');
307: RAISE validation_error;
308: END IF;
309:
310: IF g_debug <= gme_debug.g_log_statement THEN

Line 315: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_ing THEN

311: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Material Release Type '||l_material_details_rec.release_type);
312: END IF;
313: /* Verify p_supply_demand_code and line_type. */
314: IF p_supply_demand_code = 2 /* Demand */ AND
315: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_ing THEN
316: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
317: RAISE supply_demand_error;
318: ELSIF p_supply_demand_code = 1 /* Supply */ AND
319: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_prod THEN

Line 316: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

312: END IF;
313: /* Verify p_supply_demand_code and line_type. */
314: IF p_supply_demand_code = 2 /* Demand */ AND
315: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_ing THEN
316: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
317: RAISE supply_demand_error;
318: ELSIF p_supply_demand_code = 1 /* Supply */ AND
319: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_prod THEN
320: gme_common_pvt.log_message('GME_INVALID_SUPPLY_LINE');

Line 319: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_prod THEN

315: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_ing THEN
316: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
317: RAISE supply_demand_error;
318: ELSIF p_supply_demand_code = 1 /* Supply */ AND
319: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_prod THEN
320: gme_common_pvt.log_message('GME_INVALID_SUPPLY_LINE');
321: RAISE supply_demand_error;
322: ELSIF NVL(p_supply_demand_code,0) NOT IN (1,2) THEN
323: gme_common_pvt.log_message('GME_INVALID_SUPPLY_DEMAND');

Line 320: gme_common_pvt.log_message('GME_INVALID_SUPPLY_LINE');

316: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
317: RAISE supply_demand_error;
318: ELSIF p_supply_demand_code = 1 /* Supply */ AND
319: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_prod THEN
320: gme_common_pvt.log_message('GME_INVALID_SUPPLY_LINE');
321: RAISE supply_demand_error;
322: ELSIF NVL(p_supply_demand_code,0) NOT IN (1,2) THEN
323: gme_common_pvt.log_message('GME_INVALID_SUPPLY_DEMAND');
324: RAISE supply_demand_error;

Line 323: gme_common_pvt.log_message('GME_INVALID_SUPPLY_DEMAND');

319: l_material_details_rec.line_type <> gme_common_pvt.g_line_type_prod THEN
320: gme_common_pvt.log_message('GME_INVALID_SUPPLY_LINE');
321: RAISE supply_demand_error;
322: ELSIF NVL(p_supply_demand_code,0) NOT IN (1,2) THEN
323: gme_common_pvt.log_message('GME_INVALID_SUPPLY_DEMAND');
324: RAISE supply_demand_error;
325: ELSIF p_supply_demand_code = 2 /* Demand */ AND
326: l_material_details_rec.line_type = gme_common_pvt.g_line_type_ing THEN
327: IF l_material_details_rec.release_type NOT IN ( gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN

Line 326: l_material_details_rec.line_type = gme_common_pvt.g_line_type_ing THEN

322: ELSIF NVL(p_supply_demand_code,0) NOT IN (1,2) THEN
323: gme_common_pvt.log_message('GME_INVALID_SUPPLY_DEMAND');
324: RAISE supply_demand_error;
325: ELSIF p_supply_demand_code = 2 /* Demand */ AND
326: l_material_details_rec.line_type = gme_common_pvt.g_line_type_ing THEN
327: IF l_material_details_rec.release_type NOT IN ( gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN
328: l_mat_status := gme_common_pvt.is_material_auto_release(l_material_details_rec.material_detail_id);
329: ELSE
330: l_mat_status := l_material_details_rec.release_type;

Line 327: IF l_material_details_rec.release_type NOT IN ( gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN

323: gme_common_pvt.log_message('GME_INVALID_SUPPLY_DEMAND');
324: RAISE supply_demand_error;
325: ELSIF p_supply_demand_code = 2 /* Demand */ AND
326: l_material_details_rec.line_type = gme_common_pvt.g_line_type_ing THEN
327: IF l_material_details_rec.release_type NOT IN ( gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN
328: l_mat_status := gme_common_pvt.is_material_auto_release(l_material_details_rec.material_detail_id);
329: ELSE
330: l_mat_status := l_material_details_rec.release_type;
331: END IF;

Line 328: l_mat_status := gme_common_pvt.is_material_auto_release(l_material_details_rec.material_detail_id);

324: RAISE supply_demand_error;
325: ELSIF p_supply_demand_code = 2 /* Demand */ AND
326: l_material_details_rec.line_type = gme_common_pvt.g_line_type_ing THEN
327: IF l_material_details_rec.release_type NOT IN ( gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN
328: l_mat_status := gme_common_pvt.is_material_auto_release(l_material_details_rec.material_detail_id);
329: ELSE
330: l_mat_status := l_material_details_rec.release_type;
331: END IF;
332: --Bug#4604943 following code is commented out

Line 334: IF l_mat_status in ( gme_common_pvt.g_mtl_auto_release ,gme_common_pvt.g_mtl_autobystep_release) AND

330: l_mat_status := l_material_details_rec.release_type;
331: END IF;
332: --Bug#4604943 following code is commented out
333: /* BUG 4604943 BEGIN - check for auto AND autobystep here
334: IF l_mat_status in ( gme_common_pvt.g_mtl_auto_release ,gme_common_pvt.g_mtl_autobystep_release) AND
335: l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
336: IF g_debug <= gme_debug.g_log_statement THEN
337: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic Release Material in WIP batch not a valid demand');
338: END IF;

Line 335: l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN

331: END IF;
332: --Bug#4604943 following code is commented out
333: /* BUG 4604943 BEGIN - check for auto AND autobystep here
334: IF l_mat_status in ( gme_common_pvt.g_mtl_auto_release ,gme_common_pvt.g_mtl_autobystep_release) AND
335: l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
336: IF g_debug <= gme_debug.g_log_statement THEN
337: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic Release Material in WIP batch not a valid demand');
338: END IF;
339: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

Line 339: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

335: l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
336: IF g_debug <= gme_debug.g_log_statement THEN
337: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic Release Material in WIP batch not a valid demand');
338: END IF;
339: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
340: RAISE supply_demand_error;
341: BUG 4604943 END
342: ELS */
343: IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND

Line 343: IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND

339: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
340: RAISE supply_demand_error;
341: BUG 4604943 END
342: ELS */
343: IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND
344: l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
345: IF p_called_by <> 'CVT' THEN
346: IF g_debug <= gme_debug.g_log_statement THEN
347: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic Release Material in WIP batch not a valid demand');

Line 344: l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN

340: RAISE supply_demand_error;
341: BUG 4604943 END
342: ELS */
343: IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND
344: l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
345: IF p_called_by <> 'CVT' THEN
346: IF g_debug <= gme_debug.g_log_statement THEN
347: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic Release Material in WIP batch not a valid demand');
348: END IF;

Line 349: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

345: IF p_called_by <> 'CVT' THEN
346: IF g_debug <= gme_debug.g_log_statement THEN
347: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic Release Material in WIP batch not a valid demand');
348: END IF;
349: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
350: RAISE supply_demand_error;
351: END IF;
352: ELSIF l_mat_status = gme_common_pvt.g_mtl_autobystep_release THEN
353: IF NOT gme_common_pvt.get_assoc_step(l_material_details_rec.material_detail_id,l_step_id,l_step_status) THEN

Line 352: ELSIF l_mat_status = gme_common_pvt.g_mtl_autobystep_release THEN

348: END IF;
349: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
350: RAISE supply_demand_error;
351: END IF;
352: ELSIF l_mat_status = gme_common_pvt.g_mtl_autobystep_release THEN
353: IF NOT gme_common_pvt.get_assoc_step(l_material_details_rec.material_detail_id,l_step_id,l_step_status) THEN
354: IF g_debug <= gme_debug.g_log_statement THEN
355: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Error in get_assoc_step');
356: END IF;

Line 353: IF NOT gme_common_pvt.get_assoc_step(l_material_details_rec.material_detail_id,l_step_id,l_step_status) THEN

349: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
350: RAISE supply_demand_error;
351: END IF;
352: ELSIF l_mat_status = gme_common_pvt.g_mtl_autobystep_release THEN
353: IF NOT gme_common_pvt.get_assoc_step(l_material_details_rec.material_detail_id,l_step_id,l_step_status) THEN
354: IF g_debug <= gme_debug.g_log_statement THEN
355: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Error in get_assoc_step');
356: END IF;
357: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

Line 357: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

353: IF NOT gme_common_pvt.get_assoc_step(l_material_details_rec.material_detail_id,l_step_id,l_step_status) THEN
354: IF g_debug <= gme_debug.g_log_statement THEN
355: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Error in get_assoc_step');
356: END IF;
357: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
358: RAISE supply_demand_error;
359: ELSIF l_step_id IS NOT NULL THEN
360: /* for conversions of reservations, the step status should not be pending and
361: for creating the reservations, the step status should be greater than pending */

Line 362: IF (p_called_by = 'CVT' and NVL(l_step_status,-1) <> gme_common_pvt.g_step_wip)

358: RAISE supply_demand_error;
359: ELSIF l_step_id IS NOT NULL THEN
360: /* for conversions of reservations, the step status should not be pending and
361: for creating the reservations, the step status should be greater than pending */
362: IF (p_called_by = 'CVT' and NVL(l_step_status,-1) <> gme_common_pvt.g_step_wip)
363: OR (p_called_by <> 'CVT' and NVL(l_step_status,-1) >= gme_common_pvt.g_step_wip) THEN
364: IF g_debug <= gme_debug.g_log_statement THEN
365: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic By Step Material in step: '||l_step_id||
366: ' with status of '||l_step_status||' not a valid demand');

Line 363: OR (p_called_by <> 'CVT' and NVL(l_step_status,-1) >= gme_common_pvt.g_step_wip) THEN

359: ELSIF l_step_id IS NOT NULL THEN
360: /* for conversions of reservations, the step status should not be pending and
361: for creating the reservations, the step status should be greater than pending */
362: IF (p_called_by = 'CVT' and NVL(l_step_status,-1) <> gme_common_pvt.g_step_wip)
363: OR (p_called_by <> 'CVT' and NVL(l_step_status,-1) >= gme_common_pvt.g_step_wip) THEN
364: IF g_debug <= gme_debug.g_log_statement THEN
365: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic By Step Material in step: '||l_step_id||
366: ' with status of '||l_step_status||' not a valid demand');
367: END IF;

Line 368: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

364: IF g_debug <= gme_debug.g_log_statement THEN
365: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Automatic By Step Material in step: '||l_step_id||
366: ' with status of '||l_step_status||' not a valid demand');
367: END IF;
368: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
369: RAISE supply_demand_error;
370: END IF;
371: END IF; -- IF l_step_id IS NOT NULL AND NVL(l_step_status,-1) = gme_common_pvt.g_step_wip THEN
372: END IF; -- IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND

Line 371: END IF; -- IF l_step_id IS NOT NULL AND NVL(l_step_status,-1) = gme_common_pvt.g_step_wip THEN

367: END IF;
368: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
369: RAISE supply_demand_error;
370: END IF;
371: END IF; -- IF l_step_id IS NOT NULL AND NVL(l_step_status,-1) = gme_common_pvt.g_step_wip THEN
372: END IF; -- IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND
373: END IF;
374:
375: IF g_debug <= gme_debug.g_log_procedure THEN

Line 372: END IF; -- IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND

368: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
369: RAISE supply_demand_error;
370: END IF;
371: END IF; -- IF l_step_id IS NOT NULL AND NVL(l_step_status,-1) = gme_common_pvt.g_step_wip THEN
372: END IF; -- IF l_mat_status = gme_common_pvt.g_mtl_auto_release AND
373: END IF;
374:
375: IF g_debug <= gme_debug.g_log_procedure THEN
376: gme_debug.put_line ('Completed '|| l_api_name|| ' at '|| TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));

Line 384: gme_common_pvt.count_and_get(x_count => x_msg_count,

380: WHEN invalid_version OR input_param_missing OR validation_error
381: OR fetch_failure OR supply_demand_error THEN
382: x_return_status := FND_API.g_ret_sts_error;
383: x_valid_status := 'N';
384: gme_common_pvt.count_and_get(x_count => x_msg_count,
385: p_encoded => FND_API.g_false,
386: x_data => x_msg_data);
387: WHEN OTHERS THEN
388: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 393: gme_common_pvt.count_and_get(x_count => x_msg_count,

389: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
390: END IF;
391: x_return_status := FND_API.g_ret_sts_unexp_error;
392: x_valid_status := 'N';
393: gme_common_pvt.count_and_get(x_count => x_msg_count,
394: p_encoded => FND_API.g_false,
395: x_data => x_msg_data);
396: END validate_supply_demand;
397:

Line 472: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_CODE');

468: IF g_debug <= gme_debug.g_log_statement THEN
469: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' validate for mandatory input parameters ');
470: END IF;
471: IF p_supply_demand_code IS NULL THEN
472: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_CODE');
473: RAISE input_param_missing;
474: ELSIF p_supply_demand_type_id IS NULL THEN
475: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');
476: RAISE input_param_missing;

Line 475: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');

471: IF p_supply_demand_code IS NULL THEN
472: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_CODE');
473: RAISE input_param_missing;
474: ELSIF p_supply_demand_type_id IS NULL THEN
475: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');
476: RAISE input_param_missing;
477: ELSIF p_supply_demand_header_id IS NULL THEN
478: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');
479: RAISE input_param_missing;

Line 478: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');

474: ELSIF p_supply_demand_type_id IS NULL THEN
475: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_TYPE_ID');
476: RAISE input_param_missing;
477: ELSIF p_supply_demand_header_id IS NULL THEN
478: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');
479: RAISE input_param_missing;
480: ELSIF p_supply_demand_line_id IS NULL THEN
481: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_LINE_ID');
482: RAISE input_param_missing;

Line 481: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_LINE_ID');

477: ELSIF p_supply_demand_header_id IS NULL THEN
478: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_HEADER_ID');
479: RAISE input_param_missing;
480: ELSIF p_supply_demand_line_id IS NULL THEN
481: gme_common_pvt.log_message('GME_FIELD_VALUE_REQUIRED','FIELD_NAME', 'SUPPLY_DEMAND_LINE_ID');
482: RAISE input_param_missing;
483: END IF;
484:
485: /* Retrieve batch header */

Line 496: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_completed THEN

492: RAISE fetch_failure;
493: END IF;
494:
495: /* For Batch in Completed status , return 0*/
496: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_completed THEN
497: x_available_quantity := 0;
498: IF g_debug <= gme_debug.g_log_statement THEN
499: gme_debug.put_line(g_pkg_name||'.'||l_api_name||
500: 'Batch status is completed so return available of 0 ');

Line 522: IF (NVL(l_step_status, 0) = gme_common_pvt.g_step_completed AND l_material_details_rec.release_type = 3) OR

518: CLOSE cur_get_step_status;
519:
520: -- Bug 10182779 -- Allow access for materials associated to steps for completed
521: -- steps if they are not autobystep. Also added check for closed steps.
522: IF (NVL(l_step_status, 0) = gme_common_pvt.g_step_completed AND l_material_details_rec.release_type = 3) OR
523: NVL(l_step_status, 0) = gme_common_pvt.g_step_closed THEN
524: x_available_quantity := 0;
525: RETURN;
526: END IF;

Line 523: NVL(l_step_status, 0) = gme_common_pvt.g_step_closed THEN

519:
520: -- Bug 10182779 -- Allow access for materials associated to steps for completed
521: -- steps if they are not autobystep. Also added check for closed steps.
522: IF (NVL(l_step_status, 0) = gme_common_pvt.g_step_completed AND l_material_details_rec.release_type = 3) OR
523: NVL(l_step_status, 0) = gme_common_pvt.g_step_closed THEN
524: x_available_quantity := 0;
525: RETURN;
526: END IF;
527:

Line 531: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','ORGANIZATION_ID');

527:
528: /* If supplied,verify that the supplied organization_id and item are consistent with the material details row */
529: IF p_organization_id is NOT NULL THEN
530: IF p_organization_id <> l_material_details_rec.organization_id THEN
531: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','ORGANIZATION_ID');
532: RAISE validation_error;
533: END IF;
534: END IF;
535:

Line 538: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','INVENTORY_ITEM_ID');

534: END IF;
535:
536: IF p_item_id is NOT NULL THEN
537: IF p_item_id <> l_material_details_rec.inventory_item_id THEN
538: gme_common_pvt.log_message('GME_INCONSISTENT_FIELD','FIELD_NAME','INVENTORY_ITEM_ID');
539: RAISE validation_error;
540: END IF;
541: END IF;
542:

Line 586: gme_common_pvt.count_and_get(x_count => x_msg_count,

582: EXCEPTION
583: /* Exception handling */
584: WHEN invalid_version OR input_param_missing OR validation_error OR fetch_failure THEN
585: x_return_status := FND_API.g_ret_sts_error;
586: gme_common_pvt.count_and_get(x_count => x_msg_count,
587: p_encoded => FND_API.g_false,
588: x_data => x_msg_data);
589: WHEN OTHERS THEN
590: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 594: gme_common_pvt.count_and_get(x_count => x_msg_count,

590: IF g_debug <= gme_debug.g_log_unexpected THEN
591: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
592: END IF;
593: x_return_status := FND_API.g_ret_sts_unexp_error;
594: gme_common_pvt.count_and_get(x_count => x_msg_count,
595: p_encoded => FND_API.g_false,
596: x_data => x_msg_data);
597: END get_available_supply_demand;
598:

Line 608: IF NOT gme_common_pvt.g_setup_done THEN

604: IS
605: l_batch_step gme_batch_steps%ROWTYPE;
606: expected_err EXCEPTION;
607: BEGIN
608: IF NOT gme_common_pvt.g_setup_done THEN
609: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_id);
610:
611: IF NOT gme_common_pvt.g_setup_done THEN
612: x_return_status := fnd_api.g_ret_sts_error;

Line 609: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_id);

605: l_batch_step gme_batch_steps%ROWTYPE;
606: expected_err EXCEPTION;
607: BEGIN
608: IF NOT gme_common_pvt.g_setup_done THEN
609: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_id);
610:
611: IF NOT gme_common_pvt.g_setup_done THEN
612: x_return_status := fnd_api.g_ret_sts_error;
613: RAISE expected_err;

Line 611: IF NOT gme_common_pvt.g_setup_done THEN

607: BEGIN
608: IF NOT gme_common_pvt.g_setup_done THEN
609: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_id);
610:
611: IF NOT gme_common_pvt.g_setup_done THEN
612: x_return_status := fnd_api.g_ret_sts_error;
613: RAISE expected_err;
614: END IF;
615: END IF;

Line 617: gme_common_pvt.set_timestamp;

613: RAISE expected_err;
614: END IF;
615: END IF;
616:
617: gme_common_pvt.set_timestamp;
618: l_batch_step.batchstep_id := p_batchstep_id;
619:
620: IF (NOT (gme_batch_steps_dbl.fetch_row (l_batch_step, l_batch_step) ) ) THEN
621: RAISE expected_err;

Line 627: gme_common_pvt.log_message ('GME_INV_STEP_QUALITY_STATUS');

623:
624: IF ( p_quality_status IS NULL
625: OR p_quality_status < 1
626: OR p_quality_status > 6) THEN
627: gme_common_pvt.log_message ('GME_INV_STEP_QUALITY_STATUS');
628: RAISE expected_err;
629: END IF;
630:
631: IF (l_batch_step.step_status > 2) THEN

Line 632: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');

628: RAISE expected_err;
629: END IF;
630:
631: IF (l_batch_step.step_status > 2) THEN
632: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
633: RAISE expected_err;
634: END IF;
635:
636: IF (l_batch_step.step_status = 1 AND p_quality_status > 2)

Line 638: gme_common_pvt.log_message ('GME_INV_STEP_STATUS_QUALITY');

634: END IF;
635:
636: IF (l_batch_step.step_status = 1 AND p_quality_status > 2)
637: OR (l_batch_step.step_status = 2 AND p_quality_status <= 2) THEN
638: gme_common_pvt.log_message ('GME_INV_STEP_STATUS_QUALITY');
639: RAISE expected_err;
640: END IF;
641:
642: l_batch_step.quality_status := p_quality_status;

Line 667: ,x_exception_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

663: ,p_batch_id IN NUMBER
664: ,p_invoke_mode IN VARCHAR2
665: ,p_tree_mode IN NUMBER
666: ,x_return_status OUT NOCOPY VARCHAR2
667: ,x_exception_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
668: IS
669: l_api_name CONSTANT VARCHAR2 (30) := 'get_batch_shortages';
670: BEGIN
671: -- Initially let us assign the return status to success

Line 686: gme_common_pvt.get_batch_shortages (

682: || p_batch_id);
683: END IF;
684:
685: IF p_batch_id IS NOT NULL THEN
686: gme_common_pvt.get_batch_shortages (
687: p_organization_id => p_organization_id
688: ,p_batch_id => p_batch_id
689: ,p_invoke_mode => p_invoke_mode
690: ,p_tree_mode => p_tree_mode

Line 709: gme_common_pvt.count_and_get (x_count => x_msg_count

705: || x_return_status);
706: END IF;
707: EXCEPTION
708: WHEN fnd_api.g_exc_error THEN
709: gme_common_pvt.count_and_get (x_count => x_msg_count
710: ,p_encoded => fnd_api.g_false
711: ,x_data => x_msg_data);
712:
713: WHEN OTHERS THEN

Line 724: gme_common_pvt.count_and_get (x_count => x_msg_count

720: || ':'
721: || 'WHEN OTHERS:'
722: || SQLERRM);
723: END IF;
724: gme_common_pvt.count_and_get (x_count => x_msg_count
725: ,p_encoded => fnd_api.g_false
726: ,x_data => x_msg_data);
727: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
728: END;

Line 738: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)

734: ,p_organization_id IN NUMBER
735: ,p_batch_id IN NUMBER
736: ,p_material_detail_id IN NUMBER
737: ,x_return_status OUT NOCOPY VARCHAR2
738: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)
739:
740: IS
741: l_api_name CONSTANT VARCHAR2 (30) := 'get_material_reservations';
742: BEGIN

Line 780: gme_common_pvt.count_and_get (x_count => x_msg_count

776: || x_return_status);
777: END IF;
778: EXCEPTION
779: WHEN fnd_api.g_exc_error THEN
780: gme_common_pvt.count_and_get (x_count => x_msg_count
781: ,p_encoded => fnd_api.g_false
782: ,x_data => x_msg_data);
783:
784: WHEN OTHERS THEN

Line 795: gme_common_pvt.count_and_get (x_count => x_msg_count

791: || ':'
792: || 'WHEN OTHERS:'
793: || SQLERRM);
794: END IF;
795: gme_common_pvt.count_and_get (x_count => x_msg_count
796: ,p_encoded => fnd_api.g_false
797: ,x_data => x_msg_data);
798: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
799: END get_material_reservations;

Line 819: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab

815: ,p_proc_param_tbl IN gmd_recipe_fetch_pub.recp_resc_proc_param_tbl
816: ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE
817: ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE
818: ,x_batch_header_rec OUT NOCOPY gme_batch_header%rowtype
819: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
820: ) IS
821:
822: l_api_name CONSTANT VARCHAR2(30) := 'CREATE_LCF_BATCH';
823: BEGIN

Line 834: gme_common_pvt.g_error_count := 0;

830: || l_api_name);
831: END IF;
832: IF p_init_msg_list = fnd_api.g_true THEN
833: fnd_msg_pub.initialize;
834: gme_common_pvt.g_error_count := 0;
835: END IF;
836: /* Make sure we are call compatible */
837: IF NOT fnd_api.compatible_api_call (1
838: ,p_api_version

Line 842: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

838: ,p_api_version
839: ,'create_lcf_batch'
840: ,g_pkg_name) THEN
841: x_return_status := fnd_api.g_ret_sts_error;
842: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
843: RAISE fnd_api.g_exc_error;
844: END IF;
845: /* Setup the common constants used accross the apis */
846: IF g_debug <= gme_debug.g_log_procedure THEN

Line 847: gme_debug.put_line ('Calling gme_common_pvt.setup.');

843: RAISE fnd_api.g_exc_error;
844: END IF;
845: /* Setup the common constants used accross the apis */
846: IF g_debug <= gme_debug.g_log_procedure THEN
847: gme_debug.put_line ('Calling gme_common_pvt.setup.');
848: END IF;
849:
850: gme_common_pvt.g_setup_done :=
851: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id

Line 850: gme_common_pvt.g_setup_done :=

846: IF g_debug <= gme_debug.g_log_procedure THEN
847: gme_debug.put_line ('Calling gme_common_pvt.setup.');
848: END IF;
849:
850: gme_common_pvt.g_setup_done :=
851: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
852: ,p_org_code => NULL);
853:
854: IF g_debug <= gme_debug.g_log_procedure THEN

Line 851: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id

847: gme_debug.put_line ('Calling gme_common_pvt.setup.');
848: END IF;
849:
850: gme_common_pvt.g_setup_done :=
851: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
852: ,p_org_code => NULL);
853:
854: IF g_debug <= gme_debug.g_log_procedure THEN
855: gme_debug.put_line ('After calling gme_common_pvt.setup.');

Line 855: gme_debug.put_line ('After calling gme_common_pvt.setup.');

851: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
852: ,p_org_code => NULL);
853:
854: IF g_debug <= gme_debug.g_log_procedure THEN
855: gme_debug.put_line ('After calling gme_common_pvt.setup.');
856: END IF;
857:
858: IF NOT gme_common_pvt.g_setup_done THEN
859: x_return_status := fnd_api.g_ret_sts_error;

Line 858: IF NOT gme_common_pvt.g_setup_done THEN

854: IF g_debug <= gme_debug.g_log_procedure THEN
855: gme_debug.put_line ('After calling gme_common_pvt.setup.');
856: END IF;
857:
858: IF NOT gme_common_pvt.g_setup_done THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: RAISE fnd_api.g_exc_error;
861: END IF;
862: gme_common_pvt.set_timestamp;

Line 862: gme_common_pvt.set_timestamp;

858: IF NOT gme_common_pvt.g_setup_done THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: RAISE fnd_api.g_exc_error;
861: END IF;
862: gme_common_pvt.set_timestamp;
863: gme_common_pvt.materials := p_formula_dtl_tbl;
864: gme_common_pvt.routings := p_recipe_rout_tbl;
865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;

Line 863: gme_common_pvt.materials := p_formula_dtl_tbl;

859: x_return_status := fnd_api.g_ret_sts_error;
860: RAISE fnd_api.g_exc_error;
861: END IF;
862: gme_common_pvt.set_timestamp;
863: gme_common_pvt.materials := p_formula_dtl_tbl;
864: gme_common_pvt.routings := p_recipe_rout_tbl;
865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;
867: gme_common_pvt.activities := p_oprn_act_tbl;

Line 864: gme_common_pvt.routings := p_recipe_rout_tbl;

860: RAISE fnd_api.g_exc_error;
861: END IF;
862: gme_common_pvt.set_timestamp;
863: gme_common_pvt.materials := p_formula_dtl_tbl;
864: gme_common_pvt.routings := p_recipe_rout_tbl;
865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;
867: gme_common_pvt.activities := p_oprn_act_tbl;
868: gme_common_pvt.resources := p_oprn_resc_tbl;

Line 865: gme_common_pvt.steps := p_recipe_step_tbl;

861: END IF;
862: gme_common_pvt.set_timestamp;
863: gme_common_pvt.materials := p_formula_dtl_tbl;
864: gme_common_pvt.routings := p_recipe_rout_tbl;
865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;
867: gme_common_pvt.activities := p_oprn_act_tbl;
868: gme_common_pvt.resources := p_oprn_resc_tbl;
869: gme_common_pvt.process_parameters := p_proc_param_tbl;

Line 866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;

862: gme_common_pvt.set_timestamp;
863: gme_common_pvt.materials := p_formula_dtl_tbl;
864: gme_common_pvt.routings := p_recipe_rout_tbl;
865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;
867: gme_common_pvt.activities := p_oprn_act_tbl;
868: gme_common_pvt.resources := p_oprn_resc_tbl;
869: gme_common_pvt.process_parameters := p_proc_param_tbl;
870: gme_create_batch_pvt.create_batch(

Line 867: gme_common_pvt.activities := p_oprn_act_tbl;

863: gme_common_pvt.materials := p_formula_dtl_tbl;
864: gme_common_pvt.routings := p_recipe_rout_tbl;
865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;
867: gme_common_pvt.activities := p_oprn_act_tbl;
868: gme_common_pvt.resources := p_oprn_resc_tbl;
869: gme_common_pvt.process_parameters := p_proc_param_tbl;
870: gme_create_batch_pvt.create_batch(
871: p_validation_level => 100

Line 868: gme_common_pvt.resources := p_oprn_resc_tbl;

864: gme_common_pvt.routings := p_recipe_rout_tbl;
865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;
867: gme_common_pvt.activities := p_oprn_act_tbl;
868: gme_common_pvt.resources := p_oprn_resc_tbl;
869: gme_common_pvt.process_parameters := p_proc_param_tbl;
870: gme_create_batch_pvt.create_batch(
871: p_validation_level => 100
872: ,x_return_status => x_return_status

Line 869: gme_common_pvt.process_parameters := p_proc_param_tbl;

865: gme_common_pvt.steps := p_recipe_step_tbl;
866: gme_common_pvt.step_dependencies := p_routing_depd_tbl;
867: gme_common_pvt.activities := p_oprn_act_tbl;
868: gme_common_pvt.resources := p_oprn_resc_tbl;
869: gme_common_pvt.process_parameters := p_proc_param_tbl;
870: gme_create_batch_pvt.create_batch(
871: p_validation_level => 100
872: ,x_return_status => x_return_status
873: ,p_batch_header_rec => p_batch_header_rec

Line 884: IF x_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_inv_short_err,'C') THEN

880: ,p_contiguity_override => p_contiguity_override
881: ,p_is_phantom => 'N'
882: ,x_exception_material_tbl => x_exception_material_tbl
883: );
884: IF x_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_inv_short_err,'C') THEN
885: IF g_debug <= gme_debug.g_log_procedure THEN
886: gme_debug.put_line ('Error in Create Batch: return status'||x_return_status);
887: END IF;
888: RAISE fnd_api.g_exc_error;

Line 899: gme_common_pvt.count_and_get (x_count => x_message_count

895: EXCEPTION
896: WHEN fnd_api.g_exc_error THEN
897: x_return_status := fnd_api.g_ret_sts_error;
898: x_batch_header_rec := null;
899: gme_common_pvt.count_and_get (x_count => x_message_count
900: ,p_encoded => fnd_api.g_false
901: ,x_data => x_message_list);
902: WHEN fnd_api.g_exc_unexpected_error THEN
903: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 905: gme_common_pvt.count_and_get (x_count => x_message_count

901: ,x_data => x_message_list);
902: WHEN fnd_api.g_exc_unexpected_error THEN
903: x_return_status := fnd_api.g_ret_sts_unexp_error;
904: x_batch_header_rec := null;
905: gme_common_pvt.count_and_get (x_count => x_message_count
906: ,p_encoded => fnd_api.g_false
907: ,x_data => x_message_list);
908: WHEN OTHERS THEN
909: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 951: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => l_mtl_dtl_rec

947: l_mtl_dtl_rec.plan_qty := p_prim_plan_qty;
948: l_mtl_dtl_rec.wip_plan_qty := p_prim_wip_plan_qty;
949: l_mtl_dtl_rec.actual_qty := p_prim_actual_qty;
950: l_mtl_dtl_rec.dtl_um := p_prim_uom;
951: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => l_mtl_dtl_rec
952: ,p_called_by => 'S'
953: ,x_open_qty => l_open_qty
954: ,x_return_status => l_return_status);
955:

Line 1016: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

1012:
1013: IF cur_rsv_rec%NOTFOUND THEN
1014: CLOSE cur_rsv_rec;
1015:
1016: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
1017: ,'TABLE_NAME'
1018: ,'MTL_RESERVATIONS');
1019:
1020: IF g_debug <= gme_debug.g_log_statement THEN

Line 1043: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

1039:
1040: IF cur_fetch_item%NOTFOUND THEN
1041: CLOSE cur_fetch_item;
1042:
1043: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
1044: ,'TABLE_NAME'
1045: ,'MTL_SYSTEM_ITEMS');
1046:
1047: IF g_debug <= gme_debug.g_log_statement THEN

Line 1076: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');

1072: || TO_CHAR (l_rsv_type) );
1073: END IF;
1074:
1075: IF l_rsv_type = -1 THEN
1076: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');
1077: RAISE error_unexpected;
1078: END IF;
1079:
1080: IF l_rsv_type IN (0, 2) THEN

Line 1088: gme_common_pvt.count_and_get (x_count => l_msg_count

1084: END IF;
1085: EXCEPTION
1086: WHEN error_unexpected OR fetch_error THEN
1087: RETURN 0;
1088: gme_common_pvt.count_and_get (x_count => l_msg_count
1089: ,p_encoded => fnd_api.g_false
1090: ,x_data => l_msg_list);
1091:
1092: WHEN OTHERS THEN

Line 1117: -- gme_api_grp.log_message calls replaced by gme_common_pvt.log_message

1113: -- org_id, from and to batch_no, start and end dates.
1114: --
1115: -- HISTORY:
1116: -- Sivakumar.G FPBug#4351032 08-DEC-2005
1117: -- gme_api_grp.log_message calls replaced by gme_common_pvt.log_message
1118: -- Namit Singhi FPBug#5674398 01-JAN-2007
1119: -- Modified for ingred sub enhancement FP
1120: -- G. Muratore 05-SEP-2008 Bug 7352169
1121: -- Do not call auto detail line during item substitution.

Line 1186: l_material_details_tbl gme_common_pvt.material_details_tab;

1182: AND message_name = v_msg_name;
1183:
1184: l_formula_tbl gmdfmval_pub.formula_detail_tbl;
1185: l_trolin_tbl inv_move_order_pub.trolin_tbl_type;
1186: l_material_details_tbl gme_common_pvt.material_details_tab;
1187: l_material_details_tbl_out gme_common_pvt.material_details_tab;
1188: l_material_detail_rec gme_material_details%ROWTYPE;
1189: l_return BOOLEAN;
1190: l_return_status VARCHAR2 (1);

Line 1187: l_material_details_tbl_out gme_common_pvt.material_details_tab;

1183:
1184: l_formula_tbl gmdfmval_pub.formula_detail_tbl;
1185: l_trolin_tbl inv_move_order_pub.trolin_tbl_type;
1186: l_material_details_tbl gme_common_pvt.material_details_tab;
1187: l_material_details_tbl_out gme_common_pvt.material_details_tab;
1188: l_material_detail_rec gme_material_details%ROWTYPE;
1189: l_return BOOLEAN;
1190: l_return_status VARCHAR2 (1);
1191: x_return_status VARCHAR2 (1);

Line 1212: gme_common_pvt.g_setup_done :=

1208: l_ingred_sub_date DATE; -- nsinghi bug#5674398
1209: setup_failure EXCEPTION;
1210: BEGIN
1211:
1212: gme_common_pvt.g_setup_done :=
1213: gme_common_pvt.setup (p_org_id => p_org_id);
1214:
1215: IF NOT gme_common_pvt.g_setup_done THEN
1216: x_return_status := fnd_api.g_ret_sts_error;

Line 1213: gme_common_pvt.setup (p_org_id => p_org_id);

1209: setup_failure EXCEPTION;
1210: BEGIN
1211:
1212: gme_common_pvt.g_setup_done :=
1213: gme_common_pvt.setup (p_org_id => p_org_id);
1214:
1215: IF NOT gme_common_pvt.g_setup_done THEN
1216: x_return_status := fnd_api.g_ret_sts_error;
1217: RAISE setup_failure;

Line 1215: IF NOT gme_common_pvt.g_setup_done THEN

1211:
1212: gme_common_pvt.g_setup_done :=
1213: gme_common_pvt.setup (p_org_id => p_org_id);
1214:
1215: IF NOT gme_common_pvt.g_setup_done THEN
1216: x_return_status := fnd_api.g_ret_sts_error;
1217: RAISE setup_failure;
1218: END IF;
1219: --set the timestamp

Line 1220: gme_common_pvt.set_timestamp;

1216: x_return_status := fnd_api.g_ret_sts_error;
1217: RAISE setup_failure;
1218: END IF;
1219: --set the timestamp
1220: gme_common_pvt.set_timestamp;
1221:
1222: IF (g_debug IS NOT NULL) THEN
1223: gme_debug.log_initialize ('IngredientSubstitution');
1224: END IF;

Line 1309: gme_common_pvt.count_and_get (x_count => l_message_count,

1305: l_batch_header_rec.batch_id := rec.batch_id;
1306:
1307: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec, l_batch_header_rec)) THEN
1308: l_oneitem_error := TRUE;
1309: gme_common_pvt.count_and_get (x_count => l_message_count,
1310: p_encoded => fnd_api.g_false,
1311: x_data => l_message_list
1312: );
1313: GOTO NEXT_RECORD; --GO to next record

Line 1323: gme_common_pvt.count_and_get (x_count => l_message_count,

1319: IF NOT gme_material_details_dbl.fetch_row (p_material_detail => l_material_detail_rec,
1320: x_material_detail => l_material_detail_rec
1321: ) THEN
1322: l_oneitem_error := TRUE;
1323: gme_common_pvt.count_and_get (x_count => l_message_count,
1324: p_encoded => fnd_api.g_false,
1325: x_data => l_message_list
1326: );
1327: --FPBug#4991508 replaced hard coded output messages

Line 1341: --FPBug#4351032 used gme_common_pvt.log_message

1337: fnd_file.new_line (fnd_file.output, 1);
1338: */
1339:
1340:
1341: --FPBug#4351032 used gme_common_pvt.log_message
1342: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1343: ,p_token1_name => 'DOC'
1344: ,P_token1_value => l_doc_str||' '||rec.batch_no
1345: ,p_token2_name => 'LINE'

Line 1342: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1338: */
1339:
1340:
1341: --FPBug#4351032 used gme_common_pvt.log_message
1342: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1343: ,p_token1_name => 'DOC'
1344: ,P_token1_value => l_doc_str||' '||rec.batch_no
1345: ,p_token2_name => 'LINE'
1346: ,P_token2_value => rec.line_no

Line 1354: gme_common_pvt.count_and_get (x_count => l_message_count,

1350: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1351: ,p_token5_name => 'MSG'
1352: ,P_token5_value => l_message_list
1353: );
1354: gme_common_pvt.count_and_get (x_count => l_message_count,
1355: p_encoded => fnd_api.g_false,
1356: x_data => l_message_list
1357: );
1358: fnd_file.put(fnd_file.output,l_message_list);

Line 1391: --FPBug#4351032 used gme_common_pvt.log_message

1387: fnd_file.put(fnd_file.output,l_message_list);
1388: fnd_file.new_line (fnd_file.output, 1);
1389: */
1390:
1391: --FPBug#4351032 used gme_common_pvt.log_message
1392: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION_EXEC'
1393: ,p_token1_name => 'DOC'
1394: ,P_token1_value => l_doc_str||' '||rec.batch_no
1395: ,p_token2_name => 'LINE'

Line 1392: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION_EXEC'

1388: fnd_file.new_line (fnd_file.output, 1);
1389: */
1390:
1391: --FPBug#4351032 used gme_common_pvt.log_message
1392: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION_EXEC'
1393: ,p_token1_name => 'DOC'
1394: ,P_token1_value => l_doc_str||' '||rec.batch_no
1395: ,p_token2_name => 'LINE'
1396: ,P_token2_value => rec.line_no

Line 1404: gme_common_pvt.count_and_get (x_count => l_message_count,

1400: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1401: ,p_token5_name => 'NEWITEM'
1402: ,P_token5_value => l_new_item_rec.concatenated_segments
1403: );
1404: gme_common_pvt.count_and_get (x_count => l_message_count,
1405: p_encoded => fnd_api.g_false,
1406: x_data => l_message_list
1407: );
1408: fnd_file.put(fnd_file.output,l_message_list);

Line 1430: --FPBug#4351032 used gme_common_pvt.log_message

1426: fnd_file.put(fnd_file.output,l_message_list);
1427: fnd_file.new_line (fnd_file.output, 1);
1428: */
1429:
1430: --FPBug#4351032 used gme_common_pvt.log_message
1431: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION_ENG'
1432: ,p_token1_name => 'DOC'
1433: ,P_token1_value => l_doc_str||' '||rec.batch_no
1434: ,p_token2_name => 'LINE'

Line 1431: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION_ENG'

1427: fnd_file.new_line (fnd_file.output, 1);
1428: */
1429:
1430: --FPBug#4351032 used gme_common_pvt.log_message
1431: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION_ENG'
1432: ,p_token1_name => 'DOC'
1433: ,P_token1_value => l_doc_str||' '||rec.batch_no
1434: ,p_token2_name => 'LINE'
1435: ,P_token2_value => rec.line_no

Line 1443: gme_common_pvt.count_and_get (x_count => l_message_count,

1439: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1440: ,p_token5_name => 'NEWITEM'
1441: ,P_token5_value => l_new_item_rec.concatenated_segments
1442: );
1443: gme_common_pvt.count_and_get (x_count => l_message_count,
1444: p_encoded => fnd_api.g_false,
1445: x_data => l_message_list
1446: );
1447: fnd_file.put(fnd_file.output,l_message_list);

Line 1464: gme_common_pvt.count_and_get (x_count => l_message_count,

1460: ,x_return_status => l_return_status);
1461:
1462: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1463: l_oneitem_error := TRUE;
1464: gme_common_pvt.count_and_get (x_count => l_message_count,
1465: p_encoded => fnd_api.g_false,
1466: x_data => l_message_list
1467: );
1468: --FPBug#4991508 replaced hard coded output messages

Line 1482: --FPBug#4351032 used gme_common_pvt.log_message

1478: fnd_file.put(fnd_file.output,l_message_list);
1479: fnd_file.new_line (fnd_file.output, 1);
1480: */
1481:
1482: --FPBug#4351032 used gme_common_pvt.log_message
1483: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1484: ,p_token1_name => 'DOC'
1485: ,P_token1_value => l_doc_str||' '||rec.batch_no
1486: ,p_token2_name => 'LINE'

Line 1483: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1479: fnd_file.new_line (fnd_file.output, 1);
1480: */
1481:
1482: --FPBug#4351032 used gme_common_pvt.log_message
1483: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1484: ,p_token1_name => 'DOC'
1485: ,P_token1_value => l_doc_str||' '||rec.batch_no
1486: ,p_token2_name => 'LINE'
1487: ,P_token2_value => rec.line_no

Line 1495: gme_common_pvt.count_and_get (x_count => l_message_count,

1491: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1492: ,p_token5_name => 'MSG'
1493: ,P_token5_value => l_message_list
1494: );
1495: gme_common_pvt.count_and_get (x_count => l_message_count,
1496: p_encoded => fnd_api.g_false,
1497: x_data => l_message_list
1498: );
1499: fnd_file.put(fnd_file.output,l_message_list);

Line 1515: gme_common_pvt.count_and_get (x_count => l_message_count,

1511: ,x_return_status => l_return_status);
1512:
1513: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1514: l_oneitem_error := TRUE;
1515: gme_common_pvt.count_and_get (x_count => l_message_count,
1516: p_encoded => fnd_api.g_false,
1517: x_data => l_message_list
1518: );
1519: --FPBug#4991508 replaced hard coded output messages

Line 1533: --FPBug#4351032 used gme_common_pvt.log_message

1529: fnd_file.put(fnd_file.output,l_message_list);
1530: fnd_file.new_line (fnd_file.output, 1);
1531: */
1532:
1533: --FPBug#4351032 used gme_common_pvt.log_message
1534: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1535: ,p_token1_name => 'DOC'
1536: ,P_token1_value => l_doc_str||' '||rec.batch_no
1537: ,p_token2_name => 'LINE'

Line 1534: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1530: fnd_file.new_line (fnd_file.output, 1);
1531: */
1532:
1533: --FPBug#4351032 used gme_common_pvt.log_message
1534: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1535: ,p_token1_name => 'DOC'
1536: ,P_token1_value => l_doc_str||' '||rec.batch_no
1537: ,p_token2_name => 'LINE'
1538: ,P_token2_value => rec.line_no

Line 1546: gme_common_pvt.count_and_get (x_count => l_message_count,

1542: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1543: ,p_token5_name => 'MSG'
1544: ,P_token5_value => l_message_list
1545: );
1546: gme_common_pvt.count_and_get (x_count => l_message_count,
1547: p_encoded => fnd_api.g_false,
1548: x_data => l_message_list
1549: );
1550: fnd_file.put(fnd_file.output,l_message_list);

Line 1586: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type

1582: l_material_details_tbl(1) := l_material_detail_rec;
1583:
1584: gme_move_orders_pvt.create_move_order_lines (
1585: p_move_order_header_id => l_batch_header_rec.move_order_header_id
1586: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
1587: ,p_material_details_tbl => l_material_details_tbl
1588: ,x_material_details_tbl => l_material_details_tbl_out
1589: ,x_trolin_tbl => l_trolin_tbl
1590: ,x_return_status => l_return_status);

Line 1594: gme_common_pvt.count_and_get (x_count => l_message_count,

1590: ,x_return_status => l_return_status);
1591:
1592: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1593: l_oneitem_error := TRUE;
1594: gme_common_pvt.count_and_get (x_count => l_message_count,
1595: p_encoded => fnd_api.g_false,
1596: x_data => l_message_list
1597: );
1598:

Line 1613: --FPBug#4351032 used gme_common_pvt.log_message

1609: fnd_file.put(fnd_file.output,l_message_list);
1610: fnd_file.new_line (fnd_file.output, 1);
1611: */
1612:
1613: --FPBug#4351032 used gme_common_pvt.log_message
1614: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1615: ,p_token1_name => 'DOC'
1616: ,P_token1_value => l_doc_str||' '||rec.batch_no
1617: ,p_token2_name => 'LINE'

Line 1614: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1610: fnd_file.new_line (fnd_file.output, 1);
1611: */
1612:
1613: --FPBug#4351032 used gme_common_pvt.log_message
1614: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1615: ,p_token1_name => 'DOC'
1616: ,P_token1_value => l_doc_str||' '||rec.batch_no
1617: ,p_token2_name => 'LINE'
1618: ,P_token2_value => rec.line_no

Line 1626: gme_common_pvt.count_and_get (x_count => l_message_count,

1622: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1623: ,p_token5_name => 'MSG'
1624: ,P_token5_value => l_message_list
1625: );
1626: gme_common_pvt.count_and_get (x_count => l_message_count,
1627: p_encoded => fnd_api.g_false,
1628: x_data => l_message_list
1629: );
1630: fnd_file.put(fnd_file.output,l_message_list);

Line 1645: gme_common_pvt.count_and_get (x_count => l_message_count,

1641: --Call material_line_dbl.update_rec
1642: l_return := gme_material_details_dbl.update_row (l_material_detail_rec);
1643:
1644: IF (l_return = FALSE) THEN
1645: gme_common_pvt.count_and_get (x_count => l_message_count,
1646: p_encoded => fnd_api.g_false,
1647: x_data => l_message_list
1648: );
1649: l_oneitem_error := TRUE;

Line 1664: --FPBug#4351032 used gme_common_pvt.log_message

1660: fnd_file.put(fnd_file.output,l_message_list);
1661: fnd_file.new_line (fnd_file.output, 1);
1662: */
1663:
1664: --FPBug#4351032 used gme_common_pvt.log_message
1665: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1666: ,p_token1_name => 'DOC'
1667: ,P_token1_value => l_doc_str||' '||rec.batch_no
1668: ,p_token2_name => 'LINE'

Line 1665: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1661: fnd_file.new_line (fnd_file.output, 1);
1662: */
1663:
1664: --FPBug#4351032 used gme_common_pvt.log_message
1665: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1666: ,p_token1_name => 'DOC'
1667: ,P_token1_value => l_doc_str||' '||rec.batch_no
1668: ,p_token2_name => 'LINE'
1669: ,P_token2_value => rec.line_no

Line 1677: gme_common_pvt.count_and_get (x_count => l_message_count,

1673: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1674: ,p_token5_name => 'MSG'
1675: ,P_token5_value => l_message_list
1676: );
1677: gme_common_pvt.count_and_get (x_count => l_message_count,
1678: p_encoded => fnd_api.g_false,
1679: x_data => l_message_list
1680: );
1681: fnd_file.put(fnd_file.output,l_message_list);

Line 1697: l_material_detail_rec.last_update_date := gme_common_pvt.get_timestamp;

1693: UPDATE gme_material_details
1694: SET original_primary_qty = l_material_detail_rec.original_primary_qty
1695: WHERE material_detail_id = l_material_detail_rec.material_detail_id;
1696:
1697: l_material_detail_rec.last_update_date := gme_common_pvt.get_timestamp;
1698:
1699: /* Bug 7352169 - do not call auto detail line.
1700: -- Swapna K Bug#4354690 12-MAY-2005
1701: IF l_batch_header_rec.update_inventory_ind = 'Y' AND

Line 1716: gme_common_pvt.count_and_get (x_count => l_message_count,

1712: END IF;
1713:
1714: -- Validate Return Status
1715: IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN
1716: gme_common_pvt.count_and_get (x_count => l_message_count,
1717: p_encoded => fnd_api.g_false,
1718: x_data => l_message_list
1719: );
1720: l_oneitem_error := TRUE;

Line 1733: --FPBug#4351032 used gme_common_pvt.log_message

1729: fnd_file.put (fnd_file.output,fnd_message.get);
1730:
1731: fnd_file.put(fnd_file.output,l_message_list);
1732: fnd_file.new_line (fnd_file.output, 1);
1733: --FPBug#4351032 used gme_common_pvt.log_message
1734: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1735: ,p_token1_name => 'DOC'
1736: ,P_token1_value => l_doc_str||' '||rec.batch_no
1737: ,p_token2_name => 'LINE'

Line 1734: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1730:
1731: fnd_file.put(fnd_file.output,l_message_list);
1732: fnd_file.new_line (fnd_file.output, 1);
1733: --FPBug#4351032 used gme_common_pvt.log_message
1734: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1735: ,p_token1_name => 'DOC'
1736: ,P_token1_value => l_doc_str||' '||rec.batch_no
1737: ,p_token2_name => 'LINE'
1738: ,P_token2_value => rec.line_no

Line 1746: gme_common_pvt.count_and_get (x_count => l_message_count,

1742: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1743: ,p_token5_name => 'MSG'
1744: ,P_token5_value => l_message_list
1745: );
1746: gme_common_pvt.count_and_get (x_count => l_message_count,
1747: p_encoded => fnd_api.g_false,
1748: x_data => l_message_list
1749: );
1750: fnd_file.put(fnd_file.output,l_message_list);

Line 1779: gme_common_pvt.count_and_get (x_count => l_message_count,

1775: x_return_status => l_return_status
1776: );
1777:
1778: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1779: gme_common_pvt.count_and_get (x_count => l_message_count,
1780: p_encoded => fnd_api.g_false,
1781: x_data => l_message_list
1782: );
1783: l_oneitem_error := TRUE;

Line 1798: --FPBug#4351032 used gme_common_pvt.log_message

1794: fnd_file.put(fnd_file.output,l_message_list);
1795: fnd_file.new_line (fnd_file.output, 1);
1796: */
1797:
1798: --FPBug#4351032 used gme_common_pvt.log_message
1799: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1800: ,p_token1_name => 'DOC'
1801: ,P_token1_value => l_doc_str||' '||rec.batch_no
1802: ,p_token2_name => 'LINE'

Line 1799: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1795: fnd_file.new_line (fnd_file.output, 1);
1796: */
1797:
1798: --FPBug#4351032 used gme_common_pvt.log_message
1799: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1800: ,p_token1_name => 'DOC'
1801: ,P_token1_value => l_doc_str||' '||rec.batch_no
1802: ,p_token2_name => 'LINE'
1803: ,P_token2_value => rec.line_no

Line 1811: gme_common_pvt.count_and_get (x_count => l_message_count,

1807: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1808: ,p_token5_name => 'MSG'
1809: ,P_token5_value => l_message_list
1810: );
1811: gme_common_pvt.count_and_get (x_count => l_message_count,
1812: p_encoded => fnd_api.g_false,
1813: x_data => l_message_list
1814: );
1815: fnd_file.put(fnd_file.output,l_message_list);

Line 1841: gme_common_pvt.count_and_get (x_count => l_message_count,

1837: END IF;
1838: -- Swapna K Bug#4354690 12-MAY-2005
1839: /* l_return_status is replaced with x_return_status in the below if condition */
1840: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1841: gme_common_pvt.count_and_get (x_count => l_message_count,
1842: p_encoded => fnd_api.g_false,
1843: x_data => l_message_list
1844: );
1845: l_oneitem_error := TRUE;

Line 1861: --FPBug#4351032 used gme_common_pvt.log_message

1857: fnd_file.put(fnd_file.output,l_message_list);
1858: fnd_file.new_line (fnd_file.output, 1);
1859: */
1860:
1861: --FPBug#4351032 used gme_common_pvt.log_message
1862: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1863: ,p_token1_name => 'DOC'
1864: ,P_token1_value => l_doc_str||' '||rec.batch_no
1865: ,p_token2_name => 'LINE'

Line 1862: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1858: fnd_file.new_line (fnd_file.output, 1);
1859: */
1860:
1861: --FPBug#4351032 used gme_common_pvt.log_message
1862: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1863: ,p_token1_name => 'DOC'
1864: ,P_token1_value => l_doc_str||' '||rec.batch_no
1865: ,p_token2_name => 'LINE'
1866: ,P_token2_value => rec.line_no

Line 1874: gme_common_pvt.count_and_get (x_count => l_message_count,

1870: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1871: ,p_token5_name => 'MSG'
1872: ,P_token5_value => l_message_list
1873: );
1874: gme_common_pvt.count_and_get (x_count => l_message_count,
1875: p_encoded => fnd_api.g_false,
1876: x_data => l_message_list
1877: );
1878: fnd_file.put(fnd_file.output,l_message_list);

Line 1901: gme_common_pvt.count_and_get (x_count => l_message_count,

1897: gme_debug.put_line ('After consolidate resource transactions' || x_return_status);
1898: END IF;
1899:
1900: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1901: gme_common_pvt.count_and_get (x_count => l_message_count,
1902: p_encoded => fnd_api.g_false,
1903: x_data => l_message_list
1904: );
1905: l_oneitem_error := TRUE;

Line 1921: --FPBug#4351032 used gme_common_pvt.log_message

1917: fnd_file.put(fnd_file.output,l_message_list);
1918: fnd_file.new_line (fnd_file.output, 1);
1919: */
1920:
1921: --FPBug#4351032 used gme_common_pvt.log_message
1922: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1923: ,p_token1_name => 'DOC'
1924: ,P_token1_value => l_doc_str||' '||rec.batch_no
1925: ,p_token2_name => 'LINE'

Line 1922: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'

1918: fnd_file.new_line (fnd_file.output, 1);
1919: */
1920:
1921: --FPBug#4351032 used gme_common_pvt.log_message
1922: gme_common_pvt.log_message(p_message_code => 'GME_NO_SUBSTITUTION'
1923: ,p_token1_name => 'DOC'
1924: ,P_token1_value => l_doc_str||' '||rec.batch_no
1925: ,p_token2_name => 'LINE'
1926: ,P_token2_value => rec.line_no

Line 1934: gme_common_pvt.count_and_get (x_count => l_message_count,

1930: ,P_token4_value => rec.plan_qty||' '||rec.dtl_um
1931: ,p_token5_name => 'MSG'
1932: ,P_token5_value => l_message_list
1933: );
1934: gme_common_pvt.count_and_get (x_count => l_message_count,
1935: p_encoded => fnd_api.g_false,
1936: x_data => l_message_list
1937: );
1938: fnd_file.put(fnd_file.output,l_message_list);

Line 1963: --FPBug#4351032 used gme_common_pvt.log_message

1959: fnd_file.put(fnd_file.output,l_message_list);
1960: fnd_file.new_line (fnd_file.output, 1);
1961: */
1962:
1963: --FPBug#4351032 used gme_common_pvt.log_message
1964: gme_common_pvt.log_message(p_message_code => 'GME_SUBSTITUTION_SUCCESS'
1965: ,p_token1_name => 'DOC'
1966: ,P_token1_value => l_doc_str||' '||rec.batch_no
1967: ,p_token2_name => 'LINE'

Line 1964: gme_common_pvt.log_message(p_message_code => 'GME_SUBSTITUTION_SUCCESS'

1960: fnd_file.new_line (fnd_file.output, 1);
1961: */
1962:
1963: --FPBug#4351032 used gme_common_pvt.log_message
1964: gme_common_pvt.log_message(p_message_code => 'GME_SUBSTITUTION_SUCCESS'
1965: ,p_token1_name => 'DOC'
1966: ,P_token1_value => l_doc_str||' '||rec.batch_no
1967: ,p_token2_name => 'LINE'
1968: ,P_token2_value => rec.line_no

Line 1978: gme_common_pvt.count_and_get (x_count => l_message_count,

1974: ,P_token5_value => l_new_item_rec.concatenated_segments
1975: ,p_token6_name => 'NEWQTY'
1976: ,P_token6_value => l_formula_tbl (1).qty||' '||l_formula_tbl (1).detail_uom
1977: );
1978: gme_common_pvt.count_and_get (x_count => l_message_count,
1979: p_encoded => fnd_api.g_false,
1980: x_data => l_message_list
1981: );
1982: fnd_file.put(fnd_file.output,l_message_list);

Line 1992: gme_common_pvt.log_message('GME_ATLEAST_ONE_NOT_SUBSTITUTE');

1988:
1989: fnd_file.new_line (fnd_file.output, 1);
1990:
1991: IF l_oneitem_success = TRUE AND l_oneitem_error = TRUE THEN
1992: gme_common_pvt.log_message('GME_ATLEAST_ONE_NOT_SUBSTITUTE');
1993: gme_common_pvt.count_and_get (x_count => l_message_count,
1994: p_encoded => fnd_api.g_false,
1995: x_data => l_message_list
1996: );

Line 1993: gme_common_pvt.count_and_get (x_count => l_message_count,

1989: fnd_file.new_line (fnd_file.output, 1);
1990:
1991: IF l_oneitem_success = TRUE AND l_oneitem_error = TRUE THEN
1992: gme_common_pvt.log_message('GME_ATLEAST_ONE_NOT_SUBSTITUTE');
1993: gme_common_pvt.count_and_get (x_count => l_message_count,
1994: p_encoded => fnd_api.g_false,
1995: x_data => l_message_list
1996: );
1997: fnd_file.put(fnd_file.output,l_message_list);

Line 2014: gme_common_pvt.log_message('GME_NONE_SUBSTITUTED');

2010: fnd_message.set_name('GME','GME_NONE_SUBSTITUTED');
2011: fnd_file.put_line (fnd_file.output, fnd_message.get);
2012: */
2013:
2014: gme_common_pvt.log_message('GME_NONE_SUBSTITUTED');
2015: gme_common_pvt.count_and_get (x_count => l_message_count,
2016: p_encoded => fnd_api.g_false,
2017: x_data => l_message_list
2018: );

Line 2015: gme_common_pvt.count_and_get (x_count => l_message_count,

2011: fnd_file.put_line (fnd_file.output, fnd_message.get);
2012: */
2013:
2014: gme_common_pvt.log_message('GME_NONE_SUBSTITUTED');
2015: gme_common_pvt.count_and_get (x_count => l_message_count,
2016: p_encoded => fnd_api.g_false,
2017: x_data => l_message_list
2018: );
2019: fnd_file.put(fnd_file.output,l_message_list);

Line 2030: gme_common_pvt.log_message('GME_SUBSTITUTION_SUCCESSFUL');

2026: fnd_file.put_line (fnd_file.output, fnd_message.get);
2027: */
2028:
2029: errbuf := 'Substitutions are successful';
2030: gme_common_pvt.log_message('GME_SUBSTITUTION_SUCCESSFUL');
2031: gme_common_pvt.count_and_get (x_count => l_message_count,
2032: p_encoded => fnd_api.g_false,
2033: x_data => l_message_list
2034: );

Line 2031: gme_common_pvt.count_and_get (x_count => l_message_count,

2027: */
2028:
2029: errbuf := 'Substitutions are successful';
2030: gme_common_pvt.log_message('GME_SUBSTITUTION_SUCCESSFUL');
2031: gme_common_pvt.count_and_get (x_count => l_message_count,
2032: p_encoded => fnd_api.g_false,
2033: x_data => l_message_list
2034: );
2035: fnd_file.put(fnd_file.output,l_message_list);

Line 2109: gme_common_pvt.log_message ('GME_INVALID_BATCH','ID','BATCH_ID');

2105: gme_debug.put_line('Entering gme_api_grp.get_total_quantity with batch id '||p_batch_id);
2106: END IF;
2107:
2108: IF p_batch_id IS NULL THEN
2109: gme_common_pvt.log_message ('GME_INVALID_BATCH','ID','BATCH_ID');
2110: RAISE invalid_batch_id;
2111: END IF;
2112:
2113:

Line 2157: gme_common_pvt.log_message

2153: gme_debug.put_line('To UOM '||prod_uom);
2154: END IF;
2155:
2156: -- Bug 9975725
2157: gme_common_pvt.log_message
2158: (p_message_code => 'INV_UOM_CONVERSION_ERROR'
2159: ,p_token1_name => 'uom1'
2160: ,p_token1_value => l_item_um
2161: ,p_token2_name => 'uom2'

Line 2264: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

2260: ,x_msg_data OUT NOCOPY VARCHAR2
2261: ,x_return_status OUT NOCOPY VARCHAR2
2262: ) IS
2263: l_mmt_rec mtl_material_transactions%ROWTYPE;
2264: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
2265: l_ret boolean;
2266: l_api_name VARCHAR2 (50) := 'check_inv_negative';
2267: BEGIN
2268: IF NVL (g_debug, gme_debug.g_log_procedure + 1) <=

Line 2289: ,p_org_neg_control => gme_common_pvt.g_allow_neg_inv

2285:
2286: l_ret := gme_unrelease_batch_pvt.check_inv_negative
2287: ( p_mmt_rec => l_mmt_rec
2288: ,p_mmln_tbl => l_mmln_tbl
2289: ,p_org_neg_control => gme_common_pvt.g_allow_neg_inv
2290: ,p_item_no => p_item_no
2291: );
2292: IF l_ret THEN
2293: RAISE fnd_api.g_exc_error;

Line 2296: gme_common_pvt.count_and_get

2292: IF l_ret THEN
2293: RAISE fnd_api.g_exc_error;
2294: END IF;
2295:
2296: gme_common_pvt.count_and_get
2297: ( x_count => x_msg_count
2298: ,p_encoded => fnd_api.g_false
2299: ,x_data => x_msg_data);
2300:

Line 2314: gme_common_pvt.count_and_get

2310: EXCEPTION
2311:
2312: WHEN fnd_api.g_exc_error THEN
2313: x_return_status := fnd_api.g_ret_sts_error;
2314: gme_common_pvt.count_and_get
2315: ( x_count => x_msg_count
2316: ,p_encoded => fnd_api.g_false
2317: ,x_data => x_msg_data);
2318: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2320: gme_common_pvt.count_and_get

2316: ,p_encoded => fnd_api.g_false
2317: ,x_data => x_msg_data);
2318: WHEN fnd_api.g_exc_unexpected_error THEN
2319: x_return_status := fnd_api.g_ret_sts_unexp_error;
2320: gme_common_pvt.count_and_get
2321: ( x_count => x_msg_count
2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_msg_data);
2324: WHEN OTHERS THEN

Line 2327: gme_common_pvt.count_and_get

2323: ,x_data => x_msg_data);
2324: WHEN OTHERS THEN
2325: x_return_status := fnd_api.g_ret_sts_unexp_error;
2326: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2327: gme_common_pvt.count_and_get
2328: ( x_count => x_msg_count
2329: ,p_encoded => fnd_api.g_false
2330: ,x_data => x_msg_data);
2331: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN

Line 2377: l_ingred_sub_date := gme_common_pvt.g_ingr_sub_date;

2373: l_api_name VARCHAR2 (50) := 'get_ingr_sub_date';
2374:
2375: BEGIN
2376: --Take the value of the profile,GME: Ingredient Substitution Date
2377: l_ingred_sub_date := gme_common_pvt.g_ingr_sub_date;
2378: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2379: gme_debug.put_line ( g_pkg_name
2380: || '.'
2381: || l_api_name

Line 2446: AND mr.demand_source_type_id = gme_common_pvt.g_txn_source_type

2442: OPEN x_resvns_cur FOR
2443: SELECT mr.*
2444: FROM mtl_reservations mr
2445: WHERE mr.organization_id = p_organization_id
2446: AND mr.demand_source_type_id = gme_common_pvt.g_txn_source_type
2447: AND mr.demand_source_header_id = p_batch_id
2448: AND mr.demand_source_line_id = p_mat_det_id
2449: AND NOT EXISTS (SELECT 1
2450: FROM mtl_material_transactions_temp

Line 2502: AND transaction_source_type_id = gme_common_pvt.g_txn_source_type

2498: SELECT *
2499: FROM mtl_material_transactions mmt
2500: WHERE trx_source_line_id = p_mat_det_id
2501: AND transaction_source_id = p_batch_id
2502: AND transaction_source_type_id = gme_common_pvt.g_txn_source_type
2503: AND NOT EXISTS (SELECT /*+ no_unnest */
2504: transaction_id1
2505: FROM gme_transaction_pairs
2506: WHERE transaction_id1 = mmt.transaction_id

Line 2507: AND pair_type = gme_common_pvt.g_pairs_reversal_type)

2503: AND NOT EXISTS (SELECT /*+ no_unnest */
2504: transaction_id1
2505: FROM gme_transaction_pairs
2506: WHERE transaction_id1 = mmt.transaction_id
2507: AND pair_type = gme_common_pvt.g_pairs_reversal_type)
2508: ORDER BY mmt.transaction_id;
2509: EXCEPTION
2510: WHEN OTHERS THEN
2511: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2541: p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl,

2537: END IF;
2538: END get_lot_trans;
2539:
2540: PROCEDURE create_material_txn(p_mmti_rec IN mtl_transactions_interface%ROWTYPE,
2541: p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl,
2542: x_return_status OUT NOCOPY VARCHAR2) IS
2543: l_api_name CONSTANT VARCHAR2 (30) := 'create_material_txn';
2544: l_return_status VARCHAR2(1);
2545: setup_failed EXCEPTION;

Line 2553: IF NOT(gme_common_pvt.g_setup_done) THEN

2549: IF g_debug <= gme_debug.g_log_procedure THEN
2550: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2551: END IF;
2552: x_return_status := FND_API.G_RET_STS_SUCCESS;
2553: IF NOT(gme_common_pvt.g_setup_done) THEN
2554: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2555: IF NOT(gme_common_pvt.g_setup_done) THEN
2556: RAISE setup_failed;
2557: END IF;

Line 2554: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);

2550: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2551: END IF;
2552: x_return_status := FND_API.G_RET_STS_SUCCESS;
2553: IF NOT(gme_common_pvt.g_setup_done) THEN
2554: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2555: IF NOT(gme_common_pvt.g_setup_done) THEN
2556: RAISE setup_failed;
2557: END IF;
2558: END IF;

Line 2555: IF NOT(gme_common_pvt.g_setup_done) THEN

2551: END IF;
2552: x_return_status := FND_API.G_RET_STS_SUCCESS;
2553: IF NOT(gme_common_pvt.g_setup_done) THEN
2554: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2555: IF NOT(gme_common_pvt.g_setup_done) THEN
2556: RAISE setup_failed;
2557: END IF;
2558: END IF;
2559: IF (gme_common_pvt.g_timestamp IS NULL) THEN

Line 2559: IF (gme_common_pvt.g_timestamp IS NULL) THEN

2555: IF NOT(gme_common_pvt.g_setup_done) THEN
2556: RAISE setup_failed;
2557: END IF;
2558: END IF;
2559: IF (gme_common_pvt.g_timestamp IS NULL) THEN
2560: gme_common_pvt.set_timestamp;
2561: END IF;
2562: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => p_mmti_rec,
2563: p_mmli_tbl => p_mmli_tbl,

Line 2560: gme_common_pvt.set_timestamp;

2556: RAISE setup_failed;
2557: END IF;
2558: END IF;
2559: IF (gme_common_pvt.g_timestamp IS NULL) THEN
2560: gme_common_pvt.set_timestamp;
2561: END IF;
2562: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => p_mmti_rec,
2563: p_mmli_tbl => p_mmli_tbl,
2564: p_mode => 'I',

Line 2593: p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl,

2589: END create_material_txn;
2590:
2591: PROCEDURE update_material_txn(p_transaction_id IN NUMBER,
2592: p_mmti_rec IN mtl_transactions_interface%ROWTYPE,
2593: p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl,
2594: x_return_status OUT NOCOPY VARCHAR2) IS
2595: l_api_name CONSTANT VARCHAR2 (30) := 'update_material_txn';
2596: l_return_status VARCHAR2(1);
2597: l_org_id NUMBER;

Line 2614: IF NOT(gme_common_pvt.g_setup_done) THEN

2610: IF g_debug <= gme_debug.g_log_procedure THEN
2611: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2612: END IF;
2613: x_return_status := FND_API.G_RET_STS_SUCCESS;
2614: IF NOT(gme_common_pvt.g_setup_done) THEN
2615: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2616: IF NOT(gme_common_pvt.g_setup_done) THEN
2617: RAISE setup_failed;
2618: END IF;

Line 2615: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);

2611: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2612: END IF;
2613: x_return_status := FND_API.G_RET_STS_SUCCESS;
2614: IF NOT(gme_common_pvt.g_setup_done) THEN
2615: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2616: IF NOT(gme_common_pvt.g_setup_done) THEN
2617: RAISE setup_failed;
2618: END IF;
2619: END IF;

Line 2616: IF NOT(gme_common_pvt.g_setup_done) THEN

2612: END IF;
2613: x_return_status := FND_API.G_RET_STS_SUCCESS;
2614: IF NOT(gme_common_pvt.g_setup_done) THEN
2615: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2616: IF NOT(gme_common_pvt.g_setup_done) THEN
2617: RAISE setup_failed;
2618: END IF;
2619: END IF;
2620: IF (gme_common_pvt.g_timestamp IS NULL) THEN

Line 2620: IF (gme_common_pvt.g_timestamp IS NULL) THEN

2616: IF NOT(gme_common_pvt.g_setup_done) THEN
2617: RAISE setup_failed;
2618: END IF;
2619: END IF;
2620: IF (gme_common_pvt.g_timestamp IS NULL) THEN
2621: gme_common_pvt.set_timestamp;
2622: END IF;
2623: OPEN Cur_get_trans(p_transaction_id);
2624: FETCH Cur_get_trans INTO l_org_id, l_batch_id, l_material_detail_id, l_txn_type_id;

Line 2621: gme_common_pvt.set_timestamp;

2617: RAISE setup_failed;
2618: END IF;
2619: END IF;
2620: IF (gme_common_pvt.g_timestamp IS NULL) THEN
2621: gme_common_pvt.set_timestamp;
2622: END IF;
2623: OPEN Cur_get_trans(p_transaction_id);
2624: FETCH Cur_get_trans INTO l_org_id, l_batch_id, l_material_detail_id, l_txn_type_id;
2625: CLOSE Cur_get_trans;

Line 2653: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');

2649: EXCEPTION
2650: WHEN setup_failed THEN
2651: x_return_status := FND_API.G_RET_STS_ERROR;
2652: WHEN update_txn_mismatch THEN
2653: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
2654: x_return_status := FND_API.G_RET_STS_ERROR;
2655: WHEN update_txn_fail OR validate_txn_fail THEN
2656: x_return_status := l_return_status;
2657: WHEN OTHERS THEN

Line 2671: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

2667: x_return_status OUT NOCOPY VARCHAR2) IS
2668: l_api_name CONSTANT VARCHAR2 (30) := 'delete_material_txn';
2669: l_return_status VARCHAR2(1);
2670: l_mmt_rec mtl_material_transactions%ROWTYPE;
2671: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
2672: l_mmti_rec mtl_transactions_interface%ROWTYPE;
2673: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
2674: setup_failed EXCEPTION;
2675: delete_txn_fail EXCEPTION;

Line 2673: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

2669: l_return_status VARCHAR2(1);
2670: l_mmt_rec mtl_material_transactions%ROWTYPE;
2671: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
2672: l_mmti_rec mtl_transactions_interface%ROWTYPE;
2673: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
2674: setup_failed EXCEPTION;
2675: delete_txn_fail EXCEPTION;
2676: get_txn_fail EXCEPTION;
2677: const_txn_fail EXCEPTION;

Line 2684: IF NOT(gme_common_pvt.g_setup_done) THEN

2680: IF g_debug <= gme_debug.g_log_procedure THEN
2681: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2682: END IF;
2683: x_return_status := FND_API.G_RET_STS_SUCCESS;
2684: IF NOT(gme_common_pvt.g_setup_done) THEN
2685: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_organization_id);
2686: IF NOT(gme_common_pvt.g_setup_done) THEN
2687: RAISE setup_failed;
2688: END IF;

Line 2685: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_organization_id);

2681: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2682: END IF;
2683: x_return_status := FND_API.G_RET_STS_SUCCESS;
2684: IF NOT(gme_common_pvt.g_setup_done) THEN
2685: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_organization_id);
2686: IF NOT(gme_common_pvt.g_setup_done) THEN
2687: RAISE setup_failed;
2688: END IF;
2689: END IF;

Line 2686: IF NOT(gme_common_pvt.g_setup_done) THEN

2682: END IF;
2683: x_return_status := FND_API.G_RET_STS_SUCCESS;
2684: IF NOT(gme_common_pvt.g_setup_done) THEN
2685: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_organization_id);
2686: IF NOT(gme_common_pvt.g_setup_done) THEN
2687: RAISE setup_failed;
2688: END IF;
2689: END IF;
2690: IF (gme_common_pvt.g_timestamp IS NULL) THEN

Line 2690: IF (gme_common_pvt.g_timestamp IS NULL) THEN

2686: IF NOT(gme_common_pvt.g_setup_done) THEN
2687: RAISE setup_failed;
2688: END IF;
2689: END IF;
2690: IF (gme_common_pvt.g_timestamp IS NULL) THEN
2691: gme_common_pvt.set_timestamp;
2692: END IF;
2693: gme_transactions_pvt.get_mmt_transactions(p_transaction_id => p_transaction_id,
2694: x_mmt_rec => l_mmt_rec,

Line 2691: gme_common_pvt.set_timestamp;

2687: RAISE setup_failed;
2688: END IF;
2689: END IF;
2690: IF (gme_common_pvt.g_timestamp IS NULL) THEN
2691: gme_common_pvt.set_timestamp;
2692: END IF;
2693: gme_transactions_pvt.get_mmt_transactions(p_transaction_id => p_transaction_id,
2694: x_mmt_rec => l_mmt_rec,
2695: x_mmln_tbl => l_mmln_tbl,

Line 2767: IF NOT(gme_common_pvt.g_setup_done) THEN

2763: IF g_debug <= gme_debug.g_log_procedure THEN
2764: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2765: END IF;
2766: x_return_status := FND_API.G_RET_STS_SUCCESS;
2767: IF NOT(gme_common_pvt.g_setup_done) THEN
2768: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2769: IF NOT(gme_common_pvt.g_setup_done) THEN
2770: RAISE setup_failed;
2771: END IF;

Line 2768: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);

2764: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2765: END IF;
2766: x_return_status := FND_API.G_RET_STS_SUCCESS;
2767: IF NOT(gme_common_pvt.g_setup_done) THEN
2768: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2769: IF NOT(gme_common_pvt.g_setup_done) THEN
2770: RAISE setup_failed;
2771: END IF;
2772: END IF;

Line 2769: IF NOT(gme_common_pvt.g_setup_done) THEN

2765: END IF;
2766: x_return_status := FND_API.G_RET_STS_SUCCESS;
2767: IF NOT(gme_common_pvt.g_setup_done) THEN
2768: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2769: IF NOT(gme_common_pvt.g_setup_done) THEN
2770: RAISE setup_failed;
2771: END IF;
2772: END IF;
2773: gme_common_pvt.set_timestamp;

Line 2773: gme_common_pvt.set_timestamp;

2769: IF NOT(gme_common_pvt.g_setup_done) THEN
2770: RAISE setup_failed;
2771: END IF;
2772: END IF;
2773: gme_common_pvt.set_timestamp;
2774: gme_resource_engine_pvt.validate_rsrc_txn_param(p_called_from => 3
2775: ,p_batchstep_rsrc_id => p_rsrc_txn_gtmp_rec.line_id
2776: ,p_org_code => gme_common_pvt.g_organization_code
2777: ,p_trans_date => p_rsrc_txn_gtmp_rec.trans_date

Line 2776: ,p_org_code => gme_common_pvt.g_organization_code

2772: END IF;
2773: gme_common_pvt.set_timestamp;
2774: gme_resource_engine_pvt.validate_rsrc_txn_param(p_called_from => 3
2775: ,p_batchstep_rsrc_id => p_rsrc_txn_gtmp_rec.line_id
2776: ,p_org_code => gme_common_pvt.g_organization_code
2777: ,p_trans_date => p_rsrc_txn_gtmp_rec.trans_date
2778: ,p_start_date => p_rsrc_txn_gtmp_rec.start_date
2779: ,p_end_date => p_rsrc_txn_gtmp_rec.end_date
2780: ,p_usage => p_rsrc_txn_gtmp_rec.resource_usage

Line 2797: ,user_id => gme_common_pvt.g_user_ident);

2793: RAISE validate_txn_fail;
2794: END IF;
2795: l_usage_time := (p_rsrc_txn_gtmp_rec.end_date - p_rsrc_txn_gtmp_rec.start_date) * 24;
2796: l_hour_um := fnd_profile.value_specific(name => 'BOM:HOUR_UOM_CODE'
2797: ,user_id => gme_common_pvt.g_user_ident);
2798: IF (l_hour_um IS NULL) THEN
2799: gme_common_pvt.log_message('GME_API_UNABLE_TO_GET_CONSTANT','CONSTANT_NAME','BOM:HOUR_UOM_CODE');
2800: RAISE missing_profile_option;
2801: END IF;

Line 2799: gme_common_pvt.log_message('GME_API_UNABLE_TO_GET_CONSTANT','CONSTANT_NAME','BOM:HOUR_UOM_CODE');

2795: l_usage_time := (p_rsrc_txn_gtmp_rec.end_date - p_rsrc_txn_gtmp_rec.start_date) * 24;
2796: l_hour_um := fnd_profile.value_specific(name => 'BOM:HOUR_UOM_CODE'
2797: ,user_id => gme_common_pvt.g_user_ident);
2798: IF (l_hour_um IS NULL) THEN
2799: gme_common_pvt.log_message('GME_API_UNABLE_TO_GET_CONSTANT','CONSTANT_NAME','BOM:HOUR_UOM_CODE');
2800: RAISE missing_profile_option;
2801: END IF;
2802: IF l_hour_um <> p_rsrc_txn_gtmp_rec.trans_um THEN
2803: l_txn_usage := inv_convert.inv_um_convert (item_id => 0

Line 2811: gme_common_pvt.log_message ('GME_RSRC_USG_NT_CNV_SYUOM', 'SY_UOM', l_hour_um, 'RSRC_USG_UOM', p_rsrc_txn_gtmp_rec.trans_um);

2807: ,to_unit => p_rsrc_txn_gtmp_rec.trans_um
2808: ,from_name => NULL
2809: ,to_name => NULL);
2810: IF (l_txn_usage = -99999) THEN
2811: gme_common_pvt.log_message ('GME_RSRC_USG_NT_CNV_SYUOM', 'SY_UOM', l_hour_um, 'RSRC_USG_UOM', p_rsrc_txn_gtmp_rec.trans_um);
2812: RAISE uom_conversion_err;
2813: END IF;
2814: ELSE
2815: l_txn_usage := l_usage_time;

Line 2889: IF NOT(gme_common_pvt.g_setup_done) THEN

2885: IF g_debug <= gme_debug.g_log_procedure THEN
2886: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2887: END IF;
2888: x_return_status := FND_API.G_RET_STS_SUCCESS;
2889: IF NOT(gme_common_pvt.g_setup_done) THEN
2890: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2891: IF NOT(gme_common_pvt.g_setup_done) THEN
2892: RAISE setup_failed;
2893: END IF;

Line 2890: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);

2886: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2887: END IF;
2888: x_return_status := FND_API.G_RET_STS_SUCCESS;
2889: IF NOT(gme_common_pvt.g_setup_done) THEN
2890: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2891: IF NOT(gme_common_pvt.g_setup_done) THEN
2892: RAISE setup_failed;
2893: END IF;
2894: END IF;

Line 2891: IF NOT(gme_common_pvt.g_setup_done) THEN

2887: END IF;
2888: x_return_status := FND_API.G_RET_STS_SUCCESS;
2889: IF NOT(gme_common_pvt.g_setup_done) THEN
2890: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2891: IF NOT(gme_common_pvt.g_setup_done) THEN
2892: RAISE setup_failed;
2893: END IF;
2894: END IF;
2895: gme_common_pvt.set_timestamp;

Line 2895: gme_common_pvt.set_timestamp;

2891: IF NOT(gme_common_pvt.g_setup_done) THEN
2892: RAISE setup_failed;
2893: END IF;
2894: END IF;
2895: gme_common_pvt.set_timestamp;
2896: gme_resource_engine_pvt.validate_rsrc_txn_param(p_called_from => 1
2897: ,p_batchstep_rsrc_id => p_rsrc_txn_gtmp_rec.line_id
2898: ,p_org_code => gme_common_pvt.g_organization_code
2899: ,p_trans_date => p_rsrc_txn_gtmp_rec.trans_date

Line 2898: ,p_org_code => gme_common_pvt.g_organization_code

2894: END IF;
2895: gme_common_pvt.set_timestamp;
2896: gme_resource_engine_pvt.validate_rsrc_txn_param(p_called_from => 1
2897: ,p_batchstep_rsrc_id => p_rsrc_txn_gtmp_rec.line_id
2898: ,p_org_code => gme_common_pvt.g_organization_code
2899: ,p_trans_date => p_rsrc_txn_gtmp_rec.trans_date
2900: ,p_start_date => p_rsrc_txn_gtmp_rec.start_date
2901: ,p_end_date => p_rsrc_txn_gtmp_rec.end_date
2902: ,p_usage => p_rsrc_txn_gtmp_rec.resource_usage

Line 2991: IF NOT(gme_common_pvt.g_setup_done) THEN

2987: IF g_debug <= gme_debug.g_log_procedure THEN
2988: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2989: END IF;
2990: x_return_status := FND_API.G_RET_STS_SUCCESS;
2991: IF NOT(gme_common_pvt.g_setup_done) THEN
2992: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2993: IF NOT(gme_common_pvt.g_setup_done) THEN
2994: RAISE setup_failed;
2995: END IF;

Line 2992: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);

2988: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2989: END IF;
2990: x_return_status := FND_API.G_RET_STS_SUCCESS;
2991: IF NOT(gme_common_pvt.g_setup_done) THEN
2992: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2993: IF NOT(gme_common_pvt.g_setup_done) THEN
2994: RAISE setup_failed;
2995: END IF;
2996: END IF;

Line 2993: IF NOT(gme_common_pvt.g_setup_done) THEN

2989: END IF;
2990: x_return_status := FND_API.G_RET_STS_SUCCESS;
2991: IF NOT(gme_common_pvt.g_setup_done) THEN
2992: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2993: IF NOT(gme_common_pvt.g_setup_done) THEN
2994: RAISE setup_failed;
2995: END IF;
2996: END IF;
2997: gme_common_pvt.set_timestamp;

Line 2997: gme_common_pvt.set_timestamp;

2993: IF NOT(gme_common_pvt.g_setup_done) THEN
2994: RAISE setup_failed;
2995: END IF;
2996: END IF;
2997: gme_common_pvt.set_timestamp;
2998: IF NOT gme_resource_txns_gtmp_dbl.fetch_row(p_rsrc_txn_gtmp_rec, l_rsrc_txn_gtmp_rec) THEN
2999: RAISE fetch_txn_failed;
3000: END IF;
3001: OPEN Cur_get_step(l_rsrc_txn_gtmp_rec.line_id);

Line 3005: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');

3001: OPEN Cur_get_step(l_rsrc_txn_gtmp_rec.line_id);
3002: FETCH Cur_get_step INTO l_step_status, l_asqc;
3003: CLOSE Cur_get_step;
3004: IF l_step_status NOT IN (2, 3) THEN
3005: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
3006: RAISE validation_fail;
3007: END IF;
3008: IF (l_asqc = 1 AND l_step_status = 2) THEN
3009: gme_common_pvt.log_message ('GME_INV_STEP_STATUS_ASQC');

Line 3009: gme_common_pvt.log_message ('GME_INV_STEP_STATUS_ASQC');

3005: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
3006: RAISE validation_fail;
3007: END IF;
3008: IF (l_asqc = 1 AND l_step_status = 2) THEN
3009: gme_common_pvt.log_message ('GME_INV_STEP_STATUS_ASQC');
3010: RAISE validation_fail;
3011: END IF;
3012: gme_resource_engine_pvt.delete_resource_trans(p_tran_rec => l_rsrc_txn_gtmp_rec
3013: ,x_return_status => l_return_status);