DBA Data[Home] [Help]

APPS.GME_RELEASE_BATCH_PVT dependencies on GME_COMMON_PVT

Line 13: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

9: PROCEDURE release_batch
10: (p_batch_header_rec IN gme_batch_header%ROWTYPE
11: ,p_phantom_product_id IN NUMBER DEFAULT NULL
12: ,p_yield IN BOOLEAN DEFAULT NULL
13: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
14: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
15: ,x_return_status OUT NOCOPY VARCHAR2) IS
16:
17:

Line 22: AND line_type = gme_common_pvt.g_line_type_ing;

18: CURSOR Cur_batch_ingredients(v_batch_id NUMBER) IS
19: SELECT *
20: FROM gme_material_details
21: WHERE batch_id = v_batch_id
22: AND line_type = gme_common_pvt.g_line_type_ing;
23:
24: CURSOR Cur_associated_step(v_matl_dtl_id NUMBER) IS
25: SELECT s.*
26: FROM gme_batch_steps s, gme_batch_step_items item

Line 33: l_matl_dtl_tab gme_common_pvt.material_details_tab;

29:
30: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_BATCH';
31:
32: l_step_rec gme_batch_steps%ROWTYPE;
33: l_matl_dtl_tab gme_common_pvt.material_details_tab;
34: l_matl_dtl_rec gme_material_details%ROWTYPE;
35: l_release_type NUMBER;
36: l_phantom_batch_rec gme_batch_header%ROWTYPE;
37: l_item_rec mtl_system_items_b%ROWTYPE;

Line 87: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_wip;

83: IF l_return_status <> fnd_api.g_ret_sts_success THEN
84: RAISE error_unexp_phantom;
85: END IF;
86: -- set batch status
87: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_wip;
88:
89: -- set actual start date...
90: -- this is expected to be populated and validated (from either user input or timestamp)
91: x_batch_header_rec.actual_start_date := p_batch_header_rec.actual_start_date;

Line 99: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;

95: RAISE error_update_batch;
96: END IF;
97:
98: -- Update WHO columns for output structure
99: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
100: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
101: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
102:
103: -- retrieve all ingredients, don't blindly exclude auto by step, because these can really be auto

Line 100: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;

96: END IF;
97:
98: -- Update WHO columns for output structure
99: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
100: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
101: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
102:
103: -- retrieve all ingredients, don't blindly exclude auto by step, because these can really be auto
104: -- if not associated to a step...

Line 101: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;

97:
98: -- Update WHO columns for output structure
99: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
100: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
101: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
102:
103: -- retrieve all ingredients, don't blindly exclude auto by step, because these can really be auto
104: -- if not associated to a step...
105: OPEN Cur_batch_ingredients(p_batch_header_rec.batch_id);

Line 113: IF l_release_type = gme_common_pvt.g_mtl_autobystep_release THEN

109: FOR i IN 1..l_matl_dtl_tab.COUNT LOOP
110: l_matl_dtl_rec := l_matl_dtl_tab(i);
111:
112: l_release_type := l_matl_dtl_rec.release_type;
113: IF l_release_type = gme_common_pvt.g_mtl_autobystep_release THEN
114: OPEN Cur_associated_step(l_matl_dtl_rec.material_detail_id);
115: FETCH Cur_associated_step INTO l_step_rec;
116: IF Cur_associated_step%NOTFOUND THEN
117: l_release_type := gme_common_pvt.g_mtl_auto_release;

Line 117: l_release_type := gme_common_pvt.g_mtl_auto_release;

113: IF l_release_type = gme_common_pvt.g_mtl_autobystep_release THEN
114: OPEN Cur_associated_step(l_matl_dtl_rec.material_detail_id);
115: FETCH Cur_associated_step INTO l_step_rec;
116: IF Cur_associated_step%NOTFOUND THEN
117: l_release_type := gme_common_pvt.g_mtl_auto_release;
118: END IF;
119: CLOSE Cur_associated_step;
120: END IF;
121:

Line 122: IF l_release_type <> gme_common_pvt.g_mtl_autobystep_release THEN

118: END IF;
119: CLOSE Cur_associated_step;
120: END IF;
121:
122: IF l_release_type <> gme_common_pvt.g_mtl_autobystep_release THEN
123: IF l_release_type = gme_common_pvt.g_mtl_auto_release THEN
124: l_consume := TRUE;
125: ELSE
126: l_consume := FALSE;

Line 123: IF l_release_type = gme_common_pvt.g_mtl_auto_release THEN

119: CLOSE Cur_associated_step;
120: END IF;
121:
122: IF l_release_type <> gme_common_pvt.g_mtl_autobystep_release THEN
123: IF l_release_type = gme_common_pvt.g_mtl_auto_release THEN
124: l_consume := TRUE;
125: ELSE
126: l_consume := FALSE;
127: END IF;

Line 137: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

133: ,p_update_inv_ind => x_batch_header_rec.update_inventory_ind
134: ,x_exception_material_tbl => x_exception_material_tbl
135: ,x_return_status => l_return_status);
136:
137: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
138: x_return_status := l_return_status;
139: RAISE error_process_ingredient;
140: END IF;
141:

Line 142: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

138: x_return_status := l_return_status;
139: RAISE error_process_ingredient;
140: END IF;
141:
142: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
143: x_return_status := gme_common_pvt.g_exceptions_err;
144: END IF;
145: END IF; -- IF l_release_type <> gme_common_pvt.g_mtl_autobystep_release THEN
146: END LOOP;

Line 143: x_return_status := gme_common_pvt.g_exceptions_err;

139: RAISE error_process_ingredient;
140: END IF;
141:
142: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
143: x_return_status := gme_common_pvt.g_exceptions_err;
144: END IF;
145: END IF; -- IF l_release_type <> gme_common_pvt.g_mtl_autobystep_release THEN
146: END LOOP;
147:

Line 145: END IF; -- IF l_release_type <> gme_common_pvt.g_mtl_autobystep_release THEN

141:
142: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
143: x_return_status := gme_common_pvt.g_exceptions_err;
144: END IF;
145: END IF; -- IF l_release_type <> gme_common_pvt.g_mtl_autobystep_release THEN
146: END LOOP;
147:
148: -- Yield the phantom product for this batch... that will also take care of the phantom ingredient
149: IF p_phantom_product_id IS NOT NULL THEN

Line 188: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

184: ,x_exception_material_tbl => x_exception_material_tbl
185: ,x_actual_qty => l_actual_qty
186: ,x_return_status => l_return_status);
187:
188: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
189: x_return_status := l_return_status;
190: RAISE error_yield_material;
191: END IF;
192:

Line 193: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

189: x_return_status := l_return_status;
190: RAISE error_yield_material;
191: END IF;
192:
193: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
194: x_return_status := gme_common_pvt.g_exceptions_err;
195: END IF;
196:
197: l_matl_dtl_rec.actual_qty := l_actual_qty;

Line 194: x_return_status := gme_common_pvt.g_exceptions_err;

190: RAISE error_yield_material;
191: END IF;
192:
193: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
194: x_return_status := gme_common_pvt.g_exceptions_err;
195: END IF;
196:
197: l_matl_dtl_rec.actual_qty := l_actual_qty;
198: ELSE

Line 214: last_updated_by = gme_common_pvt.g_user_ident,

210: -- Update the phantom product
211: UPDATE gme_material_details
212: SET actual_qty = l_matl_dtl_rec.actual_qty,
213: wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
214: last_updated_by = gme_common_pvt.g_user_ident,
215: last_update_date = gme_common_pvt.g_timestamp,
216: last_update_login = gme_common_pvt.g_login_id
217: WHERE material_detail_id = l_matl_dtl_rec.material_detail_id;
218:

Line 215: last_update_date = gme_common_pvt.g_timestamp,

211: UPDATE gme_material_details
212: SET actual_qty = l_matl_dtl_rec.actual_qty,
213: wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
214: last_updated_by = gme_common_pvt.g_user_ident,
215: last_update_date = gme_common_pvt.g_timestamp,
216: last_update_login = gme_common_pvt.g_login_id
217: WHERE material_detail_id = l_matl_dtl_rec.material_detail_id;
218:
219: -- Update the phantom ingredient actual_qty and WIP plan qty...

Line 216: last_update_login = gme_common_pvt.g_login_id

212: SET actual_qty = l_matl_dtl_rec.actual_qty,
213: wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
214: last_updated_by = gme_common_pvt.g_user_ident,
215: last_update_date = gme_common_pvt.g_timestamp,
216: last_update_login = gme_common_pvt.g_login_id
217: WHERE material_detail_id = l_matl_dtl_rec.material_detail_id;
218:
219: -- Update the phantom ingredient actual_qty and WIP plan qty...
220: -- the transaction would have been taken care of

Line 224: last_updated_by = gme_common_pvt.g_user_ident,

220: -- the transaction would have been taken care of
221: UPDATE gme_material_details
222: SET actual_qty = l_matl_dtl_rec.actual_qty,
223: wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
224: last_updated_by = gme_common_pvt.g_user_ident,
225: last_update_date = gme_common_pvt.g_timestamp,
226: last_update_login = gme_common_pvt.g_login_id
227: WHERE material_detail_id = l_matl_dtl_rec.phantom_line_id;
228:

Line 225: last_update_date = gme_common_pvt.g_timestamp,

221: UPDATE gme_material_details
222: SET actual_qty = l_matl_dtl_rec.actual_qty,
223: wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
224: last_updated_by = gme_common_pvt.g_user_ident,
225: last_update_date = gme_common_pvt.g_timestamp,
226: last_update_login = gme_common_pvt.g_login_id
227: WHERE material_detail_id = l_matl_dtl_rec.phantom_line_id;
228:
229: END IF;

Line 226: last_update_login = gme_common_pvt.g_login_id

222: SET actual_qty = l_matl_dtl_rec.actual_qty,
223: wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
224: last_updated_by = gme_common_pvt.g_user_ident,
225: last_update_date = gme_common_pvt.g_timestamp,
226: last_update_login = gme_common_pvt.g_login_id
227: WHERE material_detail_id = l_matl_dtl_rec.phantom_line_id;
228:
229: END IF;
230:

Line 236: IF NOT gme_common_pvt.create_history

232: SET wip_plan_qty = plan_qty
233: WHERE batch_id = p_batch_header_rec.batch_id
234: AND wip_plan_qty is NULL;
235:
236: IF NOT gme_common_pvt.create_history
237: (p_batch_header_rec => x_batch_header_rec
238: ,p_original_status => gme_common_pvt.g_batch_pending
239: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN
240: IF g_debug <= gme_debug.g_log_procedure THEN

Line 238: ,p_original_status => gme_common_pvt.g_batch_pending

234: AND wip_plan_qty is NULL;
235:
236: IF NOT gme_common_pvt.create_history
237: (p_batch_header_rec => x_batch_header_rec
238: ,p_original_status => gme_common_pvt.g_batch_pending
239: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN
240: IF g_debug <= gme_debug.g_log_procedure THEN
241: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' create history returned error');
242: END IF;

Line 239: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN

235:
236: IF NOT gme_common_pvt.create_history
237: (p_batch_header_rec => x_batch_header_rec
238: ,p_original_status => gme_common_pvt.g_batch_pending
239: ,p_event_id => NVL(gme_common_pvt.g_transaction_header_id,-9999)) THEN
240: IF g_debug <= gme_debug.g_log_procedure THEN
241: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' create history returned error');
242: END IF;
243: END IF;

Line 275: --gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);

271: x_return_status := FND_API.G_RET_STS_ERROR;
272:
273: WHEN error_update_batch OR error_update_row OR error_fetch_material THEN
274: /* Bug 5554841 No need to set messsage it is set by called APIs */
275: --gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
276: x_return_status := FND_API.g_ret_sts_unexp_error;
277: WHEN error_process_ingredient OR error_consume_material OR error_yield_material OR error_get_item THEN
278: NULL;
279: WHEN error_unexp_phantom THEN

Line 280: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');

276: x_return_status := FND_API.g_ret_sts_unexp_error;
277: WHEN error_process_ingredient OR error_consume_material OR error_yield_material OR error_get_item THEN
278: NULL;
279: WHEN error_unexp_phantom THEN
280: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');
281: x_return_status := FND_API.G_RET_STS_ERROR;
282: WHEN OTHERS THEN
283: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
284: IF g_debug <= gme_debug.g_log_procedure THEN

Line 295: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

291: (p_material_detail_rec IN gme_material_details%ROWTYPE
292: ,p_consume IN BOOLEAN
293: ,p_trans_date IN DATE
294: ,p_update_inv_ind IN VARCHAR2
295: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
296: ,x_return_status OUT NOCOPY VARCHAR2) IS
297:
298:
299: l_api_name CONSTANT VARCHAR2 (30) := 'process_ingredient';

Line 358: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

354: ,x_batch_header_rec => l_phantom_batch_rec
355: ,x_return_status => l_return_status
356: ,x_exception_material_tbl => x_exception_material_tbl);
357:
358: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
359: x_return_status := l_return_status;
360: RAISE error_release_batch;
361: END IF;
362:

Line 363: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

359: x_return_status := l_return_status;
360: RAISE error_release_batch;
361: END IF;
362:
363: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
364: x_return_status := gme_common_pvt.g_exceptions_err;
365: END IF;
366:
367: l_update_matl := FALSE;

Line 364: x_return_status := gme_common_pvt.g_exceptions_err;

360: RAISE error_release_batch;
361: END IF;
362:
363: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
364: x_return_status := gme_common_pvt.g_exceptions_err;
365: END IF;
366:
367: l_update_matl := FALSE;
368:

Line 410: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

406: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
407: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' after consume_material; it returned actual_qty='||l_actual_qty);
408: END IF;
409:
410: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
411: x_return_status := l_return_status;
412: RAISE error_consume_material;
413: END IF;
414:

Line 415: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

411: x_return_status := l_return_status;
412: RAISE error_consume_material;
413: END IF;
414:
415: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
416: x_return_status := gme_common_pvt.g_exceptions_err;
417: END IF;
418: ELSE
419: l_matl_dtl_rec.actual_qty := l_matl_dtl_rec.plan_qty;

Line 416: x_return_status := gme_common_pvt.g_exceptions_err;

412: RAISE error_consume_material;
413: END IF;
414:
415: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
416: x_return_status := gme_common_pvt.g_exceptions_err;
417: END IF;
418: ELSE
419: l_matl_dtl_rec.actual_qty := l_matl_dtl_rec.plan_qty;
420: END IF;

Line 449: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);

445: END IF;
446:
447: EXCEPTION
448: WHEN error_update_row OR error_fetch_batch THEN
449: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
450: x_return_status := FND_API.g_ret_sts_unexp_error;
451: WHEN error_release_batch OR error_consume_material OR error_get_item THEN
452: NULL;
453: WHEN error_dispense_non_reserve THEN

Line 454: gme_common_pvt.log_message ('GME_DISPENSE_NON_RESERVE');

450: x_return_status := FND_API.g_ret_sts_unexp_error;
451: WHEN error_release_batch OR error_consume_material OR error_get_item THEN
452: NULL;
453: WHEN error_dispense_non_reserve THEN
454: gme_common_pvt.log_message ('GME_DISPENSE_NON_RESERVE');
455: x_return_status := fnd_api.g_ret_sts_error;
456: WHEN OTHERS THEN
457: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
458: IF g_debug <= gme_debug.g_log_procedure THEN

Line 469: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

465: PROCEDURE consume_material(p_material_dtl_rec IN gme_material_details%ROWTYPE
466: ,p_consume_qty IN NUMBER := NULL
467: ,p_trans_date IN DATE := NULL
468: ,p_item_rec IN mtl_system_items_b%ROWTYPE
469: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
470: ,x_actual_qty OUT NOCOPY NUMBER
471: ,x_return_status OUT NOCOPY VARCHAR2) IS
472:
473: l_api_name CONSTANT VARCHAR2 (30) := 'CONSUME_MATERIAL';

Line 476: l_reservation_tab gme_common_pvt.reservations_tab;

472:
473: l_api_name CONSTANT VARCHAR2 (30) := 'CONSUME_MATERIAL';
474:
475: l_reservation_rec mtl_reservations%ROWTYPE;
476: l_reservation_tab gme_common_pvt.reservations_tab;
477: i NUMBER;
478: l_rsrv_type NUMBER;
479: l_start_actual_qty NUMBER;
480:

Line 481: l_PLR_tab gme_common_pvt.reservations_tab;

477: i NUMBER;
478: l_rsrv_type NUMBER;
479: l_start_actual_qty NUMBER;
480:
481: l_PLR_tab gme_common_pvt.reservations_tab;
482: j NUMBER;
483: l_try_PLR BOOLEAN;
484: l_partial_rec mtl_reservations%ROWTYPE;
485: l_pending_mo_ind BOOLEAN := NULL;

Line 517: AND effectivity_date <= gme_common_pvt.g_timestamp

513: SELECT revision
514: FROM mtl_item_revisions_b
515: WHERE inventory_item_id = v_item_id
516: AND organization_id = v_org_id
517: AND effectivity_date <= gme_common_pvt.g_timestamp
518: ORDER BY effectivity_date desc;
519:
520: error_get_item EXCEPTION;
521: error_build_trxn EXCEPTION;

Line 559: IF gme_common_pvt.g_auto_consume_supply_sub_only = 1 THEN

555: -- If consume from supply sub is set to Yes and there's no supply sub, then return with exceptions... can't do anything
556: -- If consume from supply sub is set to No and there's no supply sub, then consume DLR, and return with exceptions (if appl)
557: -- If reservable is set to No don't bother to retrieve the reservations... there aren't any...
558:
559: IF gme_common_pvt.g_auto_consume_supply_sub_only = 1 THEN
560: IF p_material_dtl_rec.subinventory IS NULL THEN
561: l_pending_mo_ind := FALSE; -- can't have move order if sub is NULL
562: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
563: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' auto consume from supply sub is ON and subinv on material is NULL; cant consume anything; get exceptions');

Line 593: l_trans_date := NVL(p_trans_date, gme_common_pvt.g_timestamp);

589: RAISE error_get_reservations;
590: END IF;
591:
592: l_consume_qty := NVL(p_consume_qty, p_material_dtl_rec.plan_qty);
593: l_trans_date := NVL(p_trans_date, gme_common_pvt.g_timestamp);
594:
595: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
596: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' l_consume_qty='||l_consume_qty);
597: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' l_trans_date='||to_char(p_trans_date

Line 601: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' auto consume from supply sub='||gme_common_pvt.g_auto_consume_supply_sub_only);

597: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' l_trans_date='||to_char(p_trans_date
598: ,'YYYY-MON-DD HH24:MI:SS'));
599: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' x_actual_qty='||x_actual_qty);
600: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' number of reservations='||l_reservation_tab.COUNT);
601: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' auto consume from supply sub='||gme_common_pvt.g_auto_consume_supply_sub_only);
602: END IF;
603:
604: i := 1;
605: j := 1;

Line 635: IF (gme_common_pvt.g_auto_consume_supply_sub_only = 0) OR

631: -- save these for later; if there's not enough DLR, PLR will be filled in and used
632: l_PLR_tab(j) := l_reservation_rec;
633: j := j + 1;
634: ELSE -- detailed level reservation
635: IF (gme_common_pvt.g_auto_consume_supply_sub_only = 0) OR
636: (gme_common_pvt.g_auto_consume_supply_sub_only = 1 AND
637: l_reservation_rec.subinventory_code = l_subinv) THEN
638: -- GMO Changes
639: IF ((NVL(p_material_dtl_rec.dispense_ind,'N') = 'Y' AND

Line 636: (gme_common_pvt.g_auto_consume_supply_sub_only = 1 AND

632: l_PLR_tab(j) := l_reservation_rec;
633: j := j + 1;
634: ELSE -- detailed level reservation
635: IF (gme_common_pvt.g_auto_consume_supply_sub_only = 0) OR
636: (gme_common_pvt.g_auto_consume_supply_sub_only = 1 AND
637: l_reservation_rec.subinventory_code = l_subinv) THEN
638: -- GMO Changes
639: IF ((NVL(p_material_dtl_rec.dispense_ind,'N') = 'Y' AND
640: l_reservation_rec.external_source_line_id IS NOT NULL ) OR

Line 654: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

650: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
651: ,x_actual_qty => x_actual_qty
652: ,x_return_status => l_return_status);
653:
654: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
655: x_return_status := l_return_status;
656: RAISE error_build_trxn;
657: END IF;
658: END IF; -- p_material_dtl_rec.dispense_ind = 'Y'

Line 659: END IF; -- IF (gme_common_pvt.g_auto_consume_supply_sub_only = 0) OR...

655: x_return_status := l_return_status;
656: RAISE error_build_trxn;
657: END IF;
658: END IF; -- p_material_dtl_rec.dispense_ind = 'Y'
659: END IF; -- IF (gme_common_pvt.g_auto_consume_supply_sub_only = 0) OR...
660: END IF; -- IF l_rsrv_type = ...
661: i := i + 1; -- move on to the next reservation
662: END LOOP;
663:

Line 672: IF (gme_common_pvt.g_auto_consume_supply_sub_only = 0 AND l_subinv IS NULL) THEN

668: -- done!
669: RAISE consume_done;
670: END IF;
671:
672: IF (gme_common_pvt.g_auto_consume_supply_sub_only = 0 AND l_subinv IS NULL) THEN
673: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
674: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' exception; qty not met; consume from supply sub is FALSE and material subinv is NULL');
675: END IF;
676: RAISE error_get_exception;

Line 695: IF gme_common_pvt.g_auto_consume_supply_sub_only = 1 THEN -- auto consume -> Yes

691: ,p_batch_id => p_material_dtl_rec.batch_id
692: ,p_material_detail_id => p_material_dtl_rec.material_detail_id);
693:
694: IF p_item_rec.lot_control_code = 2 THEN -- lot control
695: IF gme_common_pvt.g_auto_consume_supply_sub_only = 1 THEN -- auto consume -> Yes
696: IF l_pending_mo_ind THEN
697: l_try_PLR := FALSE;
698: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
699: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' consume from supply sub ON; pending MO TRUE: l_try_PLR := FALSE; get batch exception');

Line 743: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

739: ,p_revision => NULL
740: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
741: ,x_actual_qty => x_actual_qty
742: ,x_return_status => l_return_status);
743: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
744: x_return_status := l_return_status;
745: RAISE error_build_trxn;
746: END IF;
747: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS for gme_reservations_pvt.convert_partial_to_dlr

Line 782: gme_common_pvt.eff_locator_control

778: IF l_locator_id IS NULL THEN
779: -- check if it's locator control, we need a locator...
780: /* Bug 5441643 Added NVL condition for location control code*/
781: l_eff_locator_control :=
782: gme_common_pvt.eff_locator_control
783: (p_organization_id => p_material_dtl_rec.organization_id
784: ,p_org_control => gme_common_pvt.g_org_locator_control
785: ,p_subinventory => p_material_dtl_rec.subinventory
786: ,p_item_control => NVL(p_item_rec.location_control_code,1)

Line 784: ,p_org_control => gme_common_pvt.g_org_locator_control

780: /* Bug 5441643 Added NVL condition for location control code*/
781: l_eff_locator_control :=
782: gme_common_pvt.eff_locator_control
783: (p_organization_id => p_material_dtl_rec.organization_id
784: ,p_org_control => gme_common_pvt.g_org_locator_control
785: ,p_subinventory => p_material_dtl_rec.subinventory
786: ,p_item_control => NVL(p_item_rec.location_control_code,1)
787: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
788: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

Line 788: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

784: ,p_org_control => gme_common_pvt.g_org_locator_control
785: ,p_subinventory => p_material_dtl_rec.subinventory
786: ,p_item_control => NVL(p_item_rec.location_control_code,1)
787: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
788: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
789: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
790: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' l_eff_locator_control='||l_eff_locator_control);
791: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' organization_id='||p_material_dtl_rec.organization_id);
792: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' g_org_locator_control='||gme_common_pvt.g_org_locator_control);

Line 792: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' g_org_locator_control='||gme_common_pvt.g_org_locator_control);

788: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
789: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
790: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' l_eff_locator_control='||l_eff_locator_control);
791: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' organization_id='||p_material_dtl_rec.organization_id);
792: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' g_org_locator_control='||gme_common_pvt.g_org_locator_control);
793: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' subinventory='||p_material_dtl_rec.subinventory);
794: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' inventory_item_id='||p_item_rec.inventory_item_id);
795: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' location_control_code='||p_item_rec.location_control_code);
796: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' restrict_locators_code='||p_item_rec.restrict_locators_code);

Line 797: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_action='||gme_common_pvt.g_ing_issue_txn_action);

793: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' subinventory='||p_material_dtl_rec.subinventory);
794: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' inventory_item_id='||p_item_rec.inventory_item_id);
795: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' location_control_code='||p_item_rec.location_control_code);
796: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' restrict_locators_code='||p_item_rec.restrict_locators_code);
797: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_action='||gme_common_pvt.g_ing_issue_txn_action);
798: END IF;
799: IF l_eff_locator_control <> 1 THEN
800: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
801: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' locator on material is NULL and material is eff locator control; cant get quantities from inventory; get exceptions');

Line 819: ,p_demand_source_type_id => gme_common_pvt.g_txn_source_type

815: ,p_inventory_item_id => p_material_dtl_rec.inventory_item_id
816: ,p_tree_mode => inv_quantity_tree_pub.g_transaction_mode
817: ,p_is_serial_control => FALSE
818: ,p_grade_code => NULL
819: ,p_demand_source_type_id => gme_common_pvt.g_txn_source_type
820: ,p_demand_source_header_id => p_material_dtl_rec.batch_id
821: ,p_demand_source_line_id => p_material_dtl_rec.material_detail_id
822: ,p_demand_source_name => NULL
823: ,p_lot_expiration_date => NULL

Line 873: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

869: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
870: ,x_actual_qty => x_actual_qty
871: ,x_return_status => l_return_status);
872:
873: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
874: x_return_status := l_return_status;
875: RAISE error_build_trxn;
876: END IF;
877: END IF;

Line 948: l_lot_rec gme_common_pvt.mtl_trans_lots_inter_tbl;

944:
945: l_api_name CONSTANT VARCHAR2 (30) := 'build_and_create_transaction';
946:
947: l_transaction_rec mtl_transactions_interface%ROWTYPE;
948: l_lot_rec gme_common_pvt.mtl_trans_lots_inter_tbl;
949: l_rsrv_mode BOOLEAN;
950: l_trxn_qty NUMBER;
951: l_dtl_qty NUMBER;
952: l_prim_qty NUMBER;

Line 1048: ,precision => gme_common_pvt.g_precision

1044: l_to_um := p_mtl_dtl_rec.dtl_um;
1045:
1046: l_dtl_qty := inv_convert.inv_um_convert
1047: (item_id => p_mtl_dtl_rec.inventory_item_id
1048: ,precision => gme_common_pvt.g_precision
1049: ,from_quantity => p_att
1050: ,from_unit => l_from_um
1051: ,to_unit => l_to_um
1052: ,from_name => NULL

Line 1103: l_transaction_rec.transaction_type_id := gme_common_pvt.g_ing_issue;

1099: l_prim_qty := NULL;
1100: l_sec_qty := NULL;
1101: END IF;
1102:
1103: l_transaction_rec.transaction_type_id := gme_common_pvt.g_ing_issue;
1104: l_transaction_rec.transaction_date := p_trans_date;
1105: l_transaction_rec.transaction_quantity := l_trxn_qty;
1106: l_transaction_rec.secondary_uom_code := p_secondary_uom_code;
1107:

Line 1169: ,precision => gme_common_pvt.g_precision

1165: l_from_um := p_mtl_dtl_rec.dtl_um;
1166: l_to_um := p_rsrv_rec.primary_uom_code;
1167: l_prim_qty := inv_convert.inv_um_convert
1168: (item_id => p_mtl_dtl_rec.inventory_item_id
1169: ,precision => gme_common_pvt.g_precision
1170: ,from_quantity => l_trxn_qty
1171: ,from_unit => l_from_um
1172: ,to_unit => l_to_um
1173: ,from_name => NULL

Line 1202: IF l_transaction_rec.transaction_type_id = gme_common_pvt.g_ing_issue THEN

1198: gme_debug.put_line (g_pkg_name||'.'||l_api_name||'ext sour line_id'||p_rsrv_rec.external_source_line_id);
1199:
1200: END IF;
1201: IF NVL(p_dispense_ind,'N') = 'Y' THEN
1202: IF l_transaction_rec.transaction_type_id = gme_common_pvt.g_ing_issue THEN
1203: -- For consume
1204: GMO_DISPENSE_GRP.CHANGE_DISPENSE_STATUS
1205: (p_api_version => 1.0,
1206: p_init_msg_list => 'F',

Line 1256: ,x_mmli_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_inter_tbl

1252:
1253: PROCEDURE constr_mmti_from_reservation
1254: (p_rsrv_rec IN mtl_reservations%ROWTYPE
1255: ,x_mmti_rec OUT NOCOPY mtl_transactions_interface%ROWTYPE
1256: ,x_mmli_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_inter_tbl
1257: ,x_return_status OUT NOCOPY VARCHAR2) IS
1258:
1259: l_api_name CONSTANT VARCHAR2 (30) := 'CONSTR_MMTI_FROM_RESERVATION';
1260: BEGIN

Line 1358: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

1354: ,p_pending_rsrv_ind IN BOOLEAN := NULL
1355: ,p_transacted_qty IN NUMBER := NULL
1356: ,p_exception_qty IN NUMBER := NULL
1357: ,p_force_unconsumed IN VARCHAR2 := fnd_api.g_true
1358: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
1359: ,x_return_status OUT NOCOPY VARCHAR2) IS
1360:
1361: l_api_name CONSTANT VARCHAR2 (30) := 'create_batch_exception';
1362:

Line 1417: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN

1413:
1414: IF p_force_unconsumed = fnd_api.g_true THEN
1415: l_display_unconsumed := fnd_api.g_true;
1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1417: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1418: l_display_unconsumed := fnd_api.g_true;
1419: ELSE
1420: l_display_unconsumed := fnd_api.g_false;
1421: END IF;

Line 1424: IF p_material_dtl_rec.line_type = gme_common_pvt.g_line_type_ing AND p_material_dtl_rec.phantom_line_id IS NOT NULL THEN

1420: l_display_unconsumed := fnd_api.g_false;
1421: END IF;
1422: END IF;
1423:
1424: IF p_material_dtl_rec.line_type = gme_common_pvt.g_line_type_ing AND p_material_dtl_rec.phantom_line_id IS NOT NULL THEN
1425: -- don't report the phantom ingredients; just return; phantom products will be reported
1426: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1427: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' called for phantom ingredient... returning, only report for phantom product');
1428: END IF;

Line 1432: IF p_pending_move_order_ind IS NULL AND p_material_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN

1428: END IF;
1429: RAISE error_no_exception;
1430: END IF;
1431:
1432: IF p_pending_move_order_ind IS NULL AND p_material_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
1433: l_pending_mo_ind := gme_move_orders_pvt.pending_move_orders_exist
1434: (p_organization_id => p_material_dtl_rec.organization_id
1435: ,p_batch_id => p_material_dtl_rec.batch_id
1436: ,p_material_detail_id => p_material_dtl_rec.material_detail_id);

Line 1442: IF p_material_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN

1438: l_pending_mo_ind := NVL(p_pending_move_order_ind, FALSE);
1439: END IF;
1440:
1441: IF p_pending_rsrv_ind IS NULL THEN
1442: IF p_material_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
1443: l_pending_rsrv_ind:= gme_reservations_pvt.pending_reservations_exist
1444: (p_organization_id => p_material_dtl_rec.organization_id
1445: ,p_batch_id => p_material_dtl_rec.batch_id
1446: ,p_material_detail_id => p_material_dtl_rec.material_detail_id);

Line 1474: l_exceptions_rec.exception_qty := ROUND(l_exceptions_rec.exception_qty, gme_common_pvt.g_precision);

1470: l_exceptions_rec.material_detail_id := p_material_dtl_rec.material_detail_id;
1471: l_exceptions_rec.batch_id := p_material_dtl_rec.batch_id;
1472: l_exceptions_rec.transacted_qty := NVL(p_transacted_qty, p_material_dtl_rec.actual_qty);
1473: l_exceptions_rec.exception_qty := NVL(p_exception_qty, p_material_dtl_rec.plan_qty - p_material_dtl_rec.actual_qty);
1474: l_exceptions_rec.exception_qty := ROUND(l_exceptions_rec.exception_qty, gme_common_pvt.g_precision);
1475:
1476: IF l_pending_rsrv_ind OR l_pending_mo_ind OR
1477: (l_display_unconsumed = FND_API.g_true AND l_exceptions_rec.exception_qty > 0) OR
1478: -- next line is for negative IB

Line 1483: IF NOT gme_common_pvt.insert_exceptions(p_exception_rec => l_exceptions_rec) THEN

1479: (l_display_unconsumed = FND_API.g_true AND p_exception_qty < 0) THEN
1480: i := x_exception_material_tbl.COUNT + 1;
1481: x_exception_material_tbl(i) := l_exceptions_rec;
1482:
1483: IF NOT gme_common_pvt.insert_exceptions(p_exception_rec => l_exceptions_rec) THEN
1484: RAISE error_insert_exceptions;
1485: END IF;
1486:
1487: x_return_status := gme_common_pvt.g_exceptions_err;

Line 1487: x_return_status := gme_common_pvt.g_exceptions_err;

1483: IF NOT gme_common_pvt.insert_exceptions(p_exception_rec => l_exceptions_rec) THEN
1484: RAISE error_insert_exceptions;
1485: END IF;
1486:
1487: x_return_status := gme_common_pvt.g_exceptions_err;
1488: ELSE
1489: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1490: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' exception not found');
1491: END IF;

Line 1526: AND line_type = gme_common_pvt.g_line_type_ing

1522: CURSOR cur_get_phantom_ingred(v_batch_id NUMBER) IS
1523: SELECT *
1524: FROM gme_material_details
1525: WHERE batch_id = v_batch_id
1526: AND line_type = gme_common_pvt.g_line_type_ing
1527: AND phantom_type <> 0;
1528:
1529: CURSOR Cur_associated_step(v_matl_dtl_id NUMBER) IS
1530: SELECT s.batchstep_id

Line 1539: l_matl_dtl_tab gme_common_pvt.material_details_tab;

1535: l_api_name CONSTANT VARCHAR2 (30) := 'check_unexploded_phantom';
1536:
1537: l_step_id NUMBER;
1538:
1539: l_matl_dtl_tab gme_common_pvt.material_details_tab;
1540:
1541: l_matl_dtl_id NUMBER;
1542: l_phantom_id NUMBER;
1543: l_release_type NUMBER;

Line 1572: IF p_auto_by_step IN (0,1) AND l_release_type = gme_common_pvt.g_mtl_autobystep_release THEN

1568: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' phantom ingredient found: material_detail_id='||l_matl_dtl_id);
1569: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' partner phantom batch id: batch_id='||l_phantom_id);
1570: END IF;
1571:
1572: IF p_auto_by_step IN (0,1) AND l_release_type = gme_common_pvt.g_mtl_autobystep_release THEN
1573: OPEN Cur_associated_step(l_matl_dtl_id);
1574: FETCH Cur_associated_step INTO l_step_id;
1575: IF Cur_associated_step%NOTFOUND THEN
1576: l_release_type := gme_common_pvt.g_mtl_auto_release;

Line 1576: l_release_type := gme_common_pvt.g_mtl_auto_release;

1572: IF p_auto_by_step IN (0,1) AND l_release_type = gme_common_pvt.g_mtl_autobystep_release THEN
1573: OPEN Cur_associated_step(l_matl_dtl_id);
1574: FETCH Cur_associated_step INTO l_step_id;
1575: IF Cur_associated_step%NOTFOUND THEN
1576: l_release_type := gme_common_pvt.g_mtl_auto_release;
1577: END IF;
1578: CLOSE Cur_associated_step;
1579: END IF;
1580:

Line 1581: IF ((p_auto_by_step = 0 AND l_release_type <> gme_common_pvt.g_mtl_autobystep_release) OR

1577: END IF;
1578: CLOSE Cur_associated_step;
1579: END IF;
1580:
1581: IF ((p_auto_by_step = 0 AND l_release_type <> gme_common_pvt.g_mtl_autobystep_release) OR
1582: (p_auto_by_step = 1 AND
1583: l_step_id = p_batchstep_id AND
1584: l_release_type = gme_common_pvt.g_mtl_autobystep_release) OR
1585: (p_auto_by_step = 2)) THEN

Line 1584: l_release_type = gme_common_pvt.g_mtl_autobystep_release) OR

1580:
1581: IF ((p_auto_by_step = 0 AND l_release_type <> gme_common_pvt.g_mtl_autobystep_release) OR
1582: (p_auto_by_step = 1 AND
1583: l_step_id = p_batchstep_id AND
1584: l_release_type = gme_common_pvt.g_mtl_autobystep_release) OR
1585: (p_auto_by_step = 2)) THEN
1586: IF l_phantom_id IS NULL THEN
1587: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1588: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' phantom ingredient unexploded: material_detail_id='||l_matl_dtl_id);

Line 1612: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');

1608: END IF;
1609:
1610: EXCEPTION
1611: WHEN error_unexp_phantom THEN
1612: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');
1613: x_return_status := FND_API.G_RET_STS_ERROR;
1614: WHEN error_unexp_downstream THEN
1615: NULL;
1616: WHEN OTHERS THEN

Line 1668: IF p_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

1664:
1665: -- set output structure
1666: x_batch_header_rec := p_batch_header_rec;
1667:
1668: IF p_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
1669: RAISE error_batch_type;
1670: END IF;
1671:
1672: IF p_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN

Line 1672: IF p_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN

1668: IF p_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
1669: RAISE error_batch_type;
1670: END IF;
1671:
1672: IF p_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
1673: RAISE error_batch_status;
1674: END IF;
1675:
1676: -- set actual start date if it's not passed

Line 1714: IF NOT gme_common_pvt.check_validity_rule_dates (

1710: RAISE error_vr_dates;
1711: END IF;*/
1712: --sunitha ch. Bug 5336007 aded call to check_validity_rule_dates and passed p_validate_plan_dates_ind=1
1713: --to validate planned start date against validate rule dates
1714: IF NOT gme_common_pvt.check_validity_rule_dates (
1715: p_validity_rule_id => p_batch_header_rec.recipe_validity_rule_id
1716: ,p_start_date => p_batch_header_rec.actual_start_date
1717: ,p_cmplt_date => p_batch_header_rec.actual_cmplt_date
1718: ,p_batch_header_rec => p_batch_header_rec

Line 1755: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');

1751: NULL;
1752: WHEN error_vr_dates THEN
1753: x_return_status := FND_API.G_RET_STS_ERROR;
1754: WHEN error_validity_status THEN
1755: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
1756: x_return_status := FND_API.G_RET_STS_ERROR;
1757: WHEN error_vr_not_found THEN
1758: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
1759: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1758: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');

1754: WHEN error_validity_status THEN
1755: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
1756: x_return_status := FND_API.G_RET_STS_ERROR;
1757: WHEN error_vr_not_found THEN
1758: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
1759: x_return_status := FND_API.G_RET_STS_ERROR;
1760: WHEN error_phantom THEN
1761: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1762: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1761: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');

1757: WHEN error_vr_not_found THEN
1758: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
1759: x_return_status := FND_API.G_RET_STS_ERROR;
1760: WHEN error_phantom THEN
1761: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1762: x_return_status := FND_API.G_RET_STS_ERROR;
1763: WHEN error_batch_type OR error_batch_status THEN
1764: gme_common_pvt.log_message('GME_API_INVALID_BATCH_REL');
1765: x_return_status := fnd_api.g_ret_sts_error;

Line 1764: gme_common_pvt.log_message('GME_API_INVALID_BATCH_REL');

1760: WHEN error_phantom THEN
1761: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1762: x_return_status := FND_API.G_RET_STS_ERROR;
1763: WHEN error_batch_type OR error_batch_status THEN
1764: gme_common_pvt.log_message('GME_API_INVALID_BATCH_REL');
1765: x_return_status := fnd_api.g_ret_sts_error;
1766: WHEN error_future_date THEN
1767: fnd_message.set_name ('GMA', 'SY_NOFUTUREDATE');
1768: fnd_msg_pub.ADD;