DBA Data[Home] [Help]

APPS.GME_PENDING_PRODUCT_LOTS_PVT dependencies on GME_PENDING_PRODUCT_LOTS

Line 1: PACKAGE BODY gme_pending_product_lots_pvt AS

1: PACKAGE BODY gme_pending_product_lots_pvt AS
2: /* $Header: GMEVPPLB.pls 120.15.12010000.1 2008/07/25 10:31:19 appldev ship $ */
3:
4: g_debug VARCHAR2 (5) := fnd_profile.VALUE ('AFLOG_LEVEL');
5: g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_PENDING_PRODUCT_LOTS_PVT';

Line 5: g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_PENDING_PRODUCT_LOTS_PVT';

1: PACKAGE BODY gme_pending_product_lots_pvt AS
2: /* $Header: GMEVPPLB.pls 120.15.12010000.1 2008/07/25 10:31:19 appldev ship $ */
3:
4: g_debug VARCHAR2 (5) := fnd_profile.VALUE ('AFLOG_LEVEL');
5: g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_PENDING_PRODUCT_LOTS_PVT';
6:
7: /*************************************************************************************************/
8: /* Oracle Process Manufacturing Process Execution APIs */
9: /* */

Line 26: FROM gme_pending_product_lots

22: ,x_pending_product_lot_tbl OUT NOCOPY gme_common_pvt.pending_lots_tab) IS
23:
24: CURSOR cur_get_lots (v_mtl_dtl_id NUMBER) IS
25: SELECT *
26: FROM gme_pending_product_lots
27: WHERE material_detail_id = v_mtl_dtl_id
28: ORDER BY sequence asc, lot_number asc;
29:
30: l_api_name CONSTANT VARCHAR2 (30) := 'GET_PENDING_LOT';

Line 61: FROM gme_pending_product_lots

57: ,x_return_status OUT NOCOPY VARCHAR2) IS
58:
59: CURSOR cur_get_pending_lot_qty (v_pending_lot_id NUMBER) IS
60: SELECT quantity, secondary_quantity
61: FROM gme_pending_product_lots
62: WHERE pending_product_lot_id = v_pending_lot_id;
63:
64: l_qty NUMBER;
65: l_sec_qty NUMBER;

Line 68: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;

64: l_qty NUMBER;
65: l_sec_qty NUMBER;
66: l_api_name CONSTANT VARCHAR2 (30) := 'RELIEVE_PENDING_LOT';
67: --Bug#5186388
68: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
69: l_return_status VARCHAR2(1);
70: error_delete_row EXCEPTION;
71: BEGIN
72: IF g_debug <= gme_debug.g_log_procedure THEN

Line 93: /*UPDATE gme_pending_product_lots

89: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
90: RAISE error_delete_row;
91: END IF;
92:
93: /*UPDATE gme_pending_product_lots
94: SET quantity = 0,
95: last_updated_by = gme_common_pvt.g_user_ident,
96: last_update_date = gme_common_pvt.g_timestamp,
97: last_update_login = gme_common_pvt.g_login_id

Line 101: UPDATE gme_pending_product_lots

97: last_update_login = gme_common_pvt.g_login_id
98: WHERE pending_product_lot_id = p_pending_lot_id;
99:
100: IF l_sec_qty IS NOT NULL THEN
101: UPDATE gme_pending_product_lots
102: SET secondary_quantity = 0
103: WHERE pending_product_lot_id = p_pending_lot_id;
104: END IF; -- IF l_sec_qty IS NOT NULL THEN */
105: ELSE

Line 106: UPDATE gme_pending_product_lots

102: SET secondary_quantity = 0
103: WHERE pending_product_lot_id = p_pending_lot_id;
104: END IF; -- IF l_sec_qty IS NOT NULL THEN */
105: ELSE
106: UPDATE gme_pending_product_lots
107: SET quantity = quantity - p_quantity,
108: last_updated_by = gme_common_pvt.g_user_ident,
109: last_update_date = gme_common_pvt.g_timestamp,
110: last_update_login = gme_common_pvt.g_login_id

Line 114: UPDATE gme_pending_product_lots

110: last_update_login = gme_common_pvt.g_login_id
111: WHERE pending_product_lot_id = p_pending_lot_id;
112:
113: IF l_sec_qty IS NOT NULL THEN
114: UPDATE gme_pending_product_lots
115: SET secondary_quantity = secondary_quantity - p_secondary_quantity
116: WHERE pending_product_lot_id = p_pending_lot_id;
117: END IF; -- IF l_sec_qty IS NOT NULL THEN
118: END IF; -- IF p_quantity >= l_qty THEN

Line 381: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

377:
378: END create_product_lot;
379:
380: PROCEDURE create_pending_product_lot
381: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
382: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
383: ,x_return_status OUT NOCOPY VARCHAR2) IS
384:
385: l_pp_lot_rec gme_pending_product_lots%ROWTYPE;

Line 382: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE

378: END create_product_lot;
379:
380: PROCEDURE create_pending_product_lot
381: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
382: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
383: ,x_return_status OUT NOCOPY VARCHAR2) IS
384:
385: l_pp_lot_rec gme_pending_product_lots%ROWTYPE;
386: error_insert_row EXCEPTION;

Line 385: l_pp_lot_rec gme_pending_product_lots%ROWTYPE;

381: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
382: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
383: ,x_return_status OUT NOCOPY VARCHAR2) IS
384:
385: l_pp_lot_rec gme_pending_product_lots%ROWTYPE;
386: error_insert_row EXCEPTION;
387:
388: l_api_name CONSTANT VARCHAR2 (30) := 'create_pending_product_lot';
389:

Line 397: IF NOT gme_pending_product_lots_dbl.insert_row

393: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
394: END IF;
395: x_return_status := FND_API.G_RET_STS_SUCCESS;
396:
397: IF NOT gme_pending_product_lots_dbl.insert_row
398: (p_pending_product_lots_rec => p_pending_product_lots_rec
399: ,x_pending_product_lots_rec => l_pp_lot_rec) THEN
400: RAISE error_insert_row;
401: END IF;

Line 422: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

418: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
419: END create_pending_product_lot;
420:
421: PROCEDURE update_pending_product_lot
422: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
423: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
424: ,x_return_status OUT NOCOPY VARCHAR2) IS
425:
426: error_update_row EXCEPTION;

Line 423: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE

419: END create_pending_product_lot;
420:
421: PROCEDURE update_pending_product_lot
422: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
423: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
424: ,x_return_status OUT NOCOPY VARCHAR2) IS
425:
426: error_update_row EXCEPTION;
427: error_fetch_row EXCEPTION;

Line 437: IF NOT gme_pending_product_lots_dbl.update_row

433: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
434: END IF;
435: x_return_status := FND_API.G_RET_STS_SUCCESS;
436:
437: IF NOT gme_pending_product_lots_dbl.update_row
438: (p_pending_product_lots_rec => p_pending_product_lots_rec) THEN
439: RAISE error_update_row;
440: END IF;
441:

Line 442: IF NOT gme_pending_product_lots_dbl.fetch_row

438: (p_pending_product_lots_rec => p_pending_product_lots_rec) THEN
439: RAISE error_update_row;
440: END IF;
441:
442: IF NOT gme_pending_product_lots_dbl.fetch_row
443: (p_pending_product_lots_rec => p_pending_product_lots_rec
444: ,x_pending_product_lots_rec => x_pending_product_lots_rec) THEN
445: RAISE error_fetch_row;
446: END IF;

Line 465: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

461: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
462: END update_pending_product_lot;
463:
464: PROCEDURE delete_pending_product_lot
465: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
466: ,x_return_status OUT NOCOPY VARCHAR2) IS
467:
468: error_delete_row EXCEPTION;
469: l_api_name CONSTANT VARCHAR2 (30) := 'delete_pending_product_lot';

Line 478: IF NOT gme_pending_product_lots_dbl.delete_row

474: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
475: END IF;
476: x_return_status := FND_API.G_RET_STS_SUCCESS;
477:
478: IF NOT gme_pending_product_lots_dbl.delete_row
479: (p_pending_product_lots_rec => p_pending_product_lots_rec) THEN
480: RAISE error_delete_row;
481: END IF;
482:

Line 506: FROM gme_pending_product_lots

502: ,x_return_status OUT NOCOPY VARCHAR2)
503: IS
504: CURSOR c_get_pending_lots IS
505: SELECT pending_product_lot_id
506: FROM gme_pending_product_lots
507: WHERE material_detail_id = p_material_detail_id;
508:
509: l_api_name CONSTANT VARCHAR2 (30) := 'delete_pending_product_lot';
510: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;

Line 510: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;

506: FROM gme_pending_product_lots
507: WHERE material_detail_id = p_material_detail_id;
508:
509: l_api_name CONSTANT VARCHAR2 (30) := 'delete_pending_product_lot';
510: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
511:
512: error_delete_row EXCEPTION;
513: BEGIN
514: IF g_debug <= gme_debug.g_log_procedure THEN

Line 525: IF NOT gme_pending_product_lots_dbl.delete_row

521: LOOP
522: FETCH c_get_pending_lots INTO l_pending_product_lots_rec.pending_product_lot_id;
523: EXIT WHEN c_get_pending_lots%NOTFOUND;
524: --call dbl layer
525: IF NOT gme_pending_product_lots_dbl.delete_row
526: (p_pending_product_lots_rec => l_pending_product_lots_rec) THEN
527: CLOSE c_get_pending_lots;
528: RAISE error_delete_row;
529: END IF;

Line 620: FROM gme_pending_product_lots

616: ,x_return_status OUT NOCOPY VARCHAR2)
617: RETURN NUMBER IS
618: CURSOR cur_get_sequ(v_dtl_id NUMBER) IS
619: SELECT max(sequence)
620: FROM gme_pending_product_lots
621: WHERE material_detail_id = v_dtl_id;
622:
623: l_api_name CONSTANT VARCHAR2 (30) := 'get_last_sequence';
624:

Line 654: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

650: END get_last_sequence;
651:
652: PROCEDURE validate_record_for_create
653: (p_material_detail_rec IN gme_material_details%ROWTYPE
654: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
655: ,p_create_lot IN VARCHAR2
656: ,p_generate_lot IN VARCHAR2
657: ,p_generate_parent_lot IN VARCHAR2
658: ,p_parent_lot IN mtl_lot_numbers.lot_number%TYPE := NULL

Line 661: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE

657: ,p_generate_parent_lot IN VARCHAR2
658: ,p_parent_lot IN mtl_lot_numbers.lot_number%TYPE := NULL
659: /* nsinghi bug#4486074 Added the p_expiration_Date parameter. */
660: ,p_expiration_date IN mtl_lot_numbers.expiration_date%TYPE := NULL
661: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
662: ,x_return_status OUT NOCOPY VARCHAR2) IS
663:
664: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_create';
665:

Line 865: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

861: END validate_material_for_update;
862:
863: PROCEDURE validate_record_for_update
864: (p_material_detail_rec IN gme_material_details%ROWTYPE
865: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
866: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
867: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
868: ,x_return_status OUT NOCOPY VARCHAR2) IS
869:

Line 866: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

862:
863: PROCEDURE validate_record_for_update
864: (p_material_detail_rec IN gme_material_details%ROWTYPE
865: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
866: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
867: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
868: ,x_return_status OUT NOCOPY VARCHAR2) IS
869:
870: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_update';

Line 867: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE

863: PROCEDURE validate_record_for_update
864: (p_material_detail_rec IN gme_material_details%ROWTYPE
865: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
866: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
867: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
868: ,x_return_status OUT NOCOPY VARCHAR2) IS
869:
870: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_update';
871:

Line 872: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;

868: ,x_return_status OUT NOCOPY VARCHAR2) IS
869:
870: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_update';
871:
872: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
873: l_db_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
874: l_in_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
875:
876: l_dtl_qty NUMBER;

Line 873: l_db_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;

869:
870: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_update';
871:
872: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
873: l_db_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
874: l_in_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
875:
876: l_dtl_qty NUMBER;
877: l_sec_qty NUMBER;

Line 874: l_in_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;

870: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_update';
871:
872: l_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
873: l_db_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
874: l_in_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
875:
876: l_dtl_qty NUMBER;
877: l_sec_qty NUMBER;
878:

Line 905: IF NOT gme_pending_product_lots_dbl.fetch_row

901: l_in_pending_product_lots_rec := p_pending_product_lots_rec;
902: l_in_pending_product_lots_rec.material_detail_id := p_material_detail_rec.material_detail_id;
903: l_in_pending_product_lots_rec.batch_id := p_material_detail_rec.batch_id;
904:
905: IF NOT gme_pending_product_lots_dbl.fetch_row
906: (p_pending_product_lots_rec => l_in_pending_product_lots_rec
907: ,x_pending_product_lots_rec => l_db_pending_product_lots_rec) THEN
908: RAISE error_fetch_row;
909: END IF;

Line 1108: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

1104: END validate_material_for_delete;
1105:
1106: PROCEDURE validate_record_for_delete
1107: (p_material_detail_rec IN gme_material_details%ROWTYPE
1108: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
1109: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
1110: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
1111: ,x_return_status OUT NOCOPY VARCHAR2) IS
1112:

Line 1109: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

1105:
1106: PROCEDURE validate_record_for_delete
1107: (p_material_detail_rec IN gme_material_details%ROWTYPE
1108: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
1109: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
1110: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
1111: ,x_return_status OUT NOCOPY VARCHAR2) IS
1112:
1113: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_delete';

Line 1110: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE

1106: PROCEDURE validate_record_for_delete
1107: (p_material_detail_rec IN gme_material_details%ROWTYPE
1108: ,p_db_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
1109: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
1110: ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE
1111: ,x_return_status OUT NOCOPY VARCHAR2) IS
1112:
1113: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_delete';
1114:

Line 1115: l_in_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;

1111: ,x_return_status OUT NOCOPY VARCHAR2) IS
1112:
1113: l_api_name CONSTANT VARCHAR2 (30) := 'validate_record_for_delete';
1114:
1115: l_in_pending_product_lots_rec gme_pending_product_lots%ROWTYPE;
1116:
1117: error_fetch_row EXCEPTION;
1118:
1119: BEGIN

Line 1133: IF NOT gme_pending_product_lots_dbl.fetch_row

1129: l_in_pending_product_lots_rec := p_pending_product_lots_rec;
1130: l_in_pending_product_lots_rec.material_detail_id := p_material_detail_rec.material_detail_id;
1131: l_in_pending_product_lots_rec.batch_id := p_material_detail_rec.batch_id;
1132:
1133: IF NOT gme_pending_product_lots_dbl.fetch_row
1134: (p_pending_product_lots_rec => l_in_pending_product_lots_rec
1135: ,x_pending_product_lots_rec => x_pending_product_lots_rec) THEN
1136: RAISE error_fetch_row;
1137: END IF;

Line 1377: FROM gme_pending_product_lots

1373: l_api_name CONSTANT VARCHAR2 (30) := 'validate_sequence';
1374:
1375: CURSOR cur_is_sequence (v_matl_dtl_id NUMBER, v_sequ NUMBER) IS
1376: SELECT 1
1377: FROM gme_pending_product_lots
1378: WHERE material_detail_id = v_matl_dtl_id
1379: AND sequence = v_sequ;
1380:
1381: l_return BOOLEAN;

Line 1540: FROM gme_pending_product_lots

1536: l_is_pplot NUMBER;
1537:
1538: CURSOR cur_pp_lot_exist (v_batch_id NUMBER, v_matl_dtl_id NUMBER) IS
1539: SELECT 1
1540: FROM gme_pending_product_lots
1541: WHERE batch_id = v_batch_id
1542: AND material_detail_id = v_matl_dtl_id
1543: AND quantity <> 0
1544: AND rownum = 1;

Line 1626: END gme_pending_product_lots_pvt;

1622: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1623: x_return_status := fnd_api.g_ret_sts_unexp_error;
1624: END get_pnd_prod_lot_qty;
1625:
1626: END gme_pending_product_lots_pvt;