DBA Data[Home] [Help]

APPS.GMI_RESERVATION_UTIL dependencies on IC_TRAN_PND

Line 97: to ic_tran_pnd/ic_tran_cmp */

93: /* B1731568 - There is a need to distinguish between the co_code
94: associated with the OPM cust_no and that associated with
95: inventory transactions (orgn_code owning the warehouse).
96: This global var is to be used when writing inv transactions
97: to ic_tran_pnd/ic_tran_cmp */
98:
99: g_co_code IC_TRAN_PND.CO_CODE%TYPE;
100:
101: PROCEDURE Check_Missing

Line 99: g_co_code IC_TRAN_PND.CO_CODE%TYPE;

95: inventory transactions (orgn_code owning the warehouse).
96: This global var is to be used when writing inv transactions
97: to ic_tran_pnd/ic_tran_cmp */
98:
99: g_co_code IC_TRAN_PND.CO_CODE%TYPE;
100:
101: PROCEDURE Check_Missing
102: ( p_event IN VARCHAR2
103: , p_rec_to_check IN INV_Reservation_Global.mtl_reservation_rec_type

Line 435: ( x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER

431: END Validation_for_Query;
432:
433:
434: PROCEDURE Get_Default_Lot
435: ( x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER
436: , x_return_status OUT NOCOPY VARCHAR2
437: , x_msg_count OUT NOCOPY NUMBER
438: , x_msg_data OUT NOCOPY VARCHAR2
439: ) IS

Line 450: x_ic_tran_pnd_index := 0;

446: /* ======================================================================= */
447: /* Init variables */
448: /* ======================================================================= */
449: x_return_status := FND_API.G_RET_STS_SUCCESS;
450: x_ic_tran_pnd_index := 0;
451:
452: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Get_Default_Lot. default lot='
453: ||GMI_Reservation_Util.G_DEFAULT_LOCT||', ic_tran.COUNT='
454: ||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT);

Line 464: x_ic_tran_pnd_index := i;

460: LOOP
461: IF (ic_tran_rec_tbl(i).location = GMI_Reservation_Util.G_DEFAULT_LOCT
462: AND ic_tran_rec_tbl(i).lot_id = 0 )
463: THEN
464: x_ic_tran_pnd_index := i;
465: /* Exit at the next loop. */
466: i := 0;
467: /* EXIT; */
468: ELSE

Line 474: IF x_ic_tran_pnd_index = 0

470: END IF;
471: END LOOP;
472: END IF;
473:
474: IF x_ic_tran_pnd_index = 0
475: THEN
476: /* the default lot doesn't exist */
477: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Get_default_lot_qty. no default lot.');
478: ELSE

Line 480: default_lot_index='||x_ic_tran_pnd_index);

476: /* the default lot doesn't exist */
477: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Get_default_lot_qty. no default lot.');
478: ELSE
479: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Get_default_lot_qty. default lot exists.
480: default_lot_index='||x_ic_tran_pnd_index);
481:
482: END IF;
483: GMI_reservation_Util.PrintLn('(opm_dbg) end of Util Get_default_lot_qty NO Error.');
484:

Line 527: l_tran_row IC_TRAN_PND%ROWTYPE;

523:
524: l_api_name CONSTANT VARCHAR2 (30) := 'Create_Default_Lot';
525:
526: l_ictran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
527: l_tran_row IC_TRAN_PND%ROWTYPE;
528: l_tmp_qty NUMBER(19,9);
529:
530: ll_trans_id NUMBER;
531:

Line 548: /* Fill the ic_tran_pnd record type, and then insert into ic_tran_pnd */

544: /* ======================================================================= */
545: x_return_status := FND_API.G_RET_STS_SUCCESS;
546:
547: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Create_default_lot.');
548: /* Fill the ic_tran_pnd record type, and then insert into ic_tran_pnd */
549: l_ictran_rec.item_id := p_ic_item_mst_rec.item_id;
550: l_ictran_rec.line_id := p_allocation_rec.line_id;
551: l_ictran_rec.co_code := g_co_code; -- B1731567
552: l_ictran_rec.orgn_code := p_orgn_code;

Line 584: /* Invert the quantity for ic_tran_pnd */

580: pnew_uom => p_ic_item_mst_rec.item_um,
581: onew_qty => l_tmp_qty);
582:
583:
584: /* Invert the quantity for ic_tran_pnd */
585: l_ictran_rec.trans_qty := l_tmp_qty * (-1);
586:
587: ELSE
588: l_ictran_rec.trans_qty := p_allocation_rec.order_qty1 * (-1);

Line 1010: , x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER

1006: END Validation_Before_Allocate;
1007:
1008: PROCEDURE Get_Allocation
1009: ( p_trans_id IN NUMBER
1010: , x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER
1011: , x_return_status OUT NOCOPY VARCHAR2
1012: , x_msg_count OUT NOCOPY NUMBER
1013: , x_msg_data OUT NOCOPY VARCHAR2
1014: ) IS

Line 1025: x_ic_tran_pnd_index := 0;

1021: /* ======================================================================= */
1022: /* Init variables */
1023: /* ======================================================================= */
1024: x_return_status := FND_API.G_RET_STS_SUCCESS;
1025: x_ic_tran_pnd_index := 0;
1026:
1027: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Get_Allocation.');
1028: IF GMI_Reservation_Util.ic_tran_rec_tbl.COUNT > 0
1029: THEN

Line 1035: x_ic_tran_pnd_index := i;

1031: WHILE i <= GMI_Reservation_Util.ic_tran_rec_tbl.COUNT
1032: LOOP
1033: IF (ic_tran_rec_tbl(i).trans_id = p_trans_id )
1034: THEN
1035: x_ic_tran_pnd_index := i;
1036: /* Exit at the next loop. */
1037: i := GMI_Reservation_Util.ic_tran_rec_tbl.COUNT +1;
1038: /* EXIT; */
1039: ELSE

Line 1045: IF x_ic_tran_pnd_index = 0

1041: END IF;
1042: END LOOP;
1043: END IF;
1044:
1045: IF x_ic_tran_pnd_index = 0
1046: THEN
1047: /* the default lot doesn't exist */
1048: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Get_Allocation. no transaction='||p_trans_id);
1049: ELSE

Line 1618: x_ic_tran_pnd_index => l_default_lot_index

1614:
1615: /* Get the Default Lot, and default lot quantity */
1616: /* Retrieve the default lot in the transaction (being aware of the item controls) */
1617: GMI_Reservation_Util.Get_Default_Lot(
1618: x_ic_tran_pnd_index => l_default_lot_index
1619: , x_return_status => x_return_status
1620: , x_msg_count => x_msg_count
1621: , x_msg_data => x_msg_data);
1622: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS)

Line 1657: from ic_tran_pnd

1653:
1654: IF (l_ctl_ind = 'Y') THEN --- either lot or location control exists
1655: select NVL(SUM(ABS(TRANS_QTY)),0)
1656: into x_allocated_qty
1657: from ic_tran_pnd
1658: where line_id = p_query_input.demand_source_line_id
1659: and trans_id <> l_default_tran_rec.trans_id
1660: and (lot_id <> 0 or location <> gmi_reservation_util.g_default_loct)
1661: and doc_type='OMSO'

Line 1667: from ic_tran_pnd

1663: and completed_ind=0;
1664: ELSE --- no control
1665: select NVL(SUM(ABS(TRANS_QTY)),0)
1666: into x_allocated_qty
1667: from ic_tran_pnd
1668: where line_id = p_query_input.demand_source_line_id
1669: and lot_id = 0
1670: and location = gmi_reservation_util.g_default_loct
1671: and doc_type='OMSO'

Line 1682: From ic_tran_pnd

1678: x_allocated_qty := l_quantity_reserved; */
1679:
1680: Select count(*)
1681: INTO x_allocated_trans
1682: From ic_tran_pnd
1683: Where line_id = p_query_input.demand_source_line_id
1684: And line_detail_id = p_query_input.attribute4
1685: And delete_mark=0;
1686:

Line 1758: x_ic_tran_pnd_index => x_default_lot_index

1754:
1755: /* Get the Default Lot, and default lot quantity */
1756: /* Retrieve the default lot in the transaction */
1757: GMI_Reservation_Util.Get_Default_Lot(
1758: x_ic_tran_pnd_index => x_default_lot_index
1759: , x_return_status => x_return_status
1760: , x_msg_count => x_msg_count
1761: , x_msg_data => x_msg_data);
1762:

Line 2285: l_temp_tran_row ic_tran_pnd%ROWTYPE;

2281: l_default_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2282: l_original_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2283: l_ic_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2284: ll_ic_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2285: l_temp_tran_row ic_tran_pnd%ROWTYPE;
2286:
2287: l_delta_qty1 NUMBER(19,9);
2288: l_delta_qty2 NUMBER(19,9);
2289: -- HW nocopy

Line 2642: x_ic_tran_pnd_index => l_default_lot_index

2638: THEN
2639: /* Retrieve the default lot transaction we'll need it later */
2640: GMI_reservation_Util.PrintLn('(opm_dbg) in Set_Pick_Lots: we have rows now calling Get_Default_Lot.', 'pick_lots.log');
2641: GMI_Reservation_Util.Get_Default_Lot(
2642: x_ic_tran_pnd_index => l_default_lot_index
2643: , x_return_status => x_return_status
2644: , x_msg_count => x_msg_count
2645: , x_msg_data => x_msg_data);
2646:

Line 2733: ,x_ic_tran_pnd_index => l_original_tran_index

2729: THEN
2730: /* This is NOT the default lot. */
2731: GMI_Reservation_Util.Get_Allocation(
2732: p_trans_id => ll_ic_tran_rec.trans_id
2733: ,x_ic_tran_pnd_index => l_original_tran_index
2734: ,x_return_status => x_return_status
2735: ,x_msg_count => x_msg_count
2736: ,x_msg_data => x_msg_data);
2737:

Line 2959: UPDATE ic_tran_pnd

2955: FND_MSG_PUB.Add;
2956: RAISE FND_API.G_EXC_ERROR;
2957: END IF;
2958:
2959: UPDATE ic_tran_pnd
2960: SET pick_slip_number = l_pick_slip_number
2961: WHERE trans_id = l_temp_tran_row.trans_id;
2962: END IF;
2963: /* End enhancement 1928979 - lakshmi swamy */

Line 3002: from ic_tran_pnd

2998: IF l_ic_item_mst_rec.lot_ctl <> 0
2999: THEN
3000: SELECT SUM(ABS(TRANS_QTY)), SUM(ABS(TRANS_QTY2))
3001: INTO l_NEW_ALLOCATED_QTY, l_NEW_ALLOCATED_QTY2
3002: from ic_tran_pnd
3003: where line_id = p_ic_tran_rec.line_id
3004: and staged_ind = 0
3005: and completed_ind = 0
3006: and delete_mark = 0

Line 3017: from ic_tran_pnd

3013: ELSIF ((l_ic_item_mst_rec.loct_ctl * l_whse_ctl) <> 0 )
3014: THEN
3015: SELECT SUM(ABS(TRANS_QTY)), SUM(ABS(TRANS_QTY2))
3016: INTO l_NEW_ALLOCATED_QTY, l_NEW_ALLOCATED_QTY2
3017: from ic_tran_pnd
3018: where line_id = p_ic_tran_rec.line_id
3019: and staged_ind = 0
3020: and completed_ind = 0
3021: and delete_mark = 0

Line 3031: from ic_tran_pnd

3027: Where move_order_line_id = p_mo_line_id);
3028: ELSE
3029: SELECT SUM(ABS(TRANS_QTY)), SUM(ABS(TRANS_QTY2))
3030: INTO l_NEW_ALLOCATED_QTY, l_NEW_ALLOCATED_QTY2
3031: from ic_tran_pnd
3032: where line_id = p_ic_tran_rec.line_id
3033: and staged_ind = 0
3034: and completed_ind = 0
3035: and delete_mark = 0

Line 3138: l_temp_tran_row ic_tran_pnd%ROWTYPE;

3134: l_trans_qty2 NUMBER;
3135: l_commit VARCHAR2(5) := FND_API.G_FALSE;
3136: l_validation_level VARCHAR2(4) := FND_API.G_VALID_LEVEL_FULL;
3137: l_ic_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3138: l_temp_tran_row ic_tran_pnd%ROWTYPE;
3139: l_organization_id NUMBER;
3140: l_inventory_item_id NUMBER;
3141: l_ctl_ind VARCHAR2(1) ;
3142: l_opm_item_id NUMBER;

Line 3149: From ic_tran_pnd

3145: l_orgn_code VARCHAR2(6);
3146:
3147: Cursor get_trans_qty IS
3148: Select nvl(sum(trans_qty),0), nvl(sum(trans_qty2),0)
3149: From ic_tran_pnd
3150: Where line_id = l_line_rec.line_id
3151: And doc_type = 'OMSO'
3152: And item_id = p_opm_item_id
3153: And delete_mark = 0

Line 3164: From ic_tran_pnd

3160: /* for a default lot, staged=1 means it is shipconfirmed
3161: completed=1 means it has been interfaced */
3162: Cursor get_trans_qty_non_ctl IS
3163: Select nvl(sum(trans_qty),0), nvl(sum(trans_qty2),0)
3164: From ic_tran_pnd
3165: Where line_id = l_line_rec.line_id
3166: And doc_type = 'OMSO'
3167: And item_id = p_opm_item_id
3168: And (staged_ind = 1 or completed_ind = 1)

Line 3436: l_temp_tran_row ic_tran_pnd%ROWTYPE;

3432: l_validation_flag VARCHAR2(10) := FND_API.G_TRUE;
3433: l_commit VARCHAR2(5) := FND_API.G_FALSE;
3434: l_validation_level VARCHAR2(4) := FND_API.G_VALID_LEVEL_FULL;
3435:
3436: l_temp_tran_row ic_tran_pnd%ROWTYPE;
3437: l_original_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3438: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
3439: l_mtl_reservation_tbl inv_reservation_global.mtl_reservation_tbl_type;
3440: l_mtl_reservation_tbl_count NUMBER;

Line 3480: /* Fill the ic_tran_pnd record type, and then insert into ic_tran_pnd */

3476:
3477: /* ============================================================================================= */
3478: /* No default lot exist AND MANUAL Allocation. Then create the default lot */
3479: /* ============================================================================================= */
3480: /* Fill the ic_tran_pnd record type, and then insert into ic_tran_pnd */
3481: l_original_tran_rec.item_id := p_ic_tran_rec.item_id;
3482: l_original_tran_rec.line_id := p_ic_tran_rec.line_id;
3483: l_original_tran_rec.co_code := p_ic_tran_rec.co_code;
3484: l_original_tran_rec.orgn_code := p_ic_tran_rec.orgn_code;

Line 3608: x_ic_tran_pnd_index => x_default_lot_index

3604: END IF;
3605:
3606: GMI_reservation_Util.PrintLn('(opm_dbg) in Create_Empty_Default_Lot: we have rows now calling Get_Default_Lot.', 'pick_lots.log');
3607: GMI_Reservation_Util.Get_Default_Lot(
3608: x_ic_tran_pnd_index => x_default_lot_index
3609: , x_return_status => x_return_status
3610: , x_msg_count => x_msg_count
3611: , x_msg_data => x_msg_data);
3612:

Line 3684: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */trans_id

3680:
3681: /* Cursor for Checking the Default Lot existence : */
3682: CURSOR c_default_exist(l_line_id IN NUMBER,
3683: l_item_id IN NUMBER) IS
3684: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */trans_id
3685: FROM ic_tran_pnd
3686: WHERE lot_id = 0
3687: AND delete_mark = 0
3688: AND doc_type = 'OMSO'

Line 3685: FROM ic_tran_pnd

3681: /* Cursor for Checking the Default Lot existence : */
3682: CURSOR c_default_exist(l_line_id IN NUMBER,
3683: l_item_id IN NUMBER) IS
3684: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */trans_id
3685: FROM ic_tran_pnd
3686: WHERE lot_id = 0
3687: AND delete_mark = 0
3688: AND doc_type = 'OMSO'
3689: AND item_id = l_item_id

Line 3754: l_tran_row IC_TRAN_PND%ROWTYPE;

3750: , x_msg_count OUT NOCOPY NUMBER
3751: , x_msg_data OUT NOCOPY VARCHAR2
3752: ) IS
3753: l_ictran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3754: l_tran_row IC_TRAN_PND%ROWTYPE;
3755: l_uom1 Varchar2(5);
3756: l_uom2 Varchar2(5);
3757: l_orgn_code Varchar2(10);
3758: l_co_code Varchar2(10);

Line 3885: l_tran_row IC_TRAN_PND%ROWTYPE;

3881: , x_msg_data OUT NOCOPY VARCHAR2
3882: ) IS
3883:
3884: l_ictran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3885: l_tran_row IC_TRAN_PND%ROWTYPE;
3886: l_uom1 Varchar2(5);
3887: l_uom2 Varchar2(5);
3888: l_orgn_code Varchar2(10);
3889: l_co_code Varchar2(10);

Line 4348: From ic_tran_pnd

4344: x_return_status := FND_API.G_RET_STS_SUCCESS;
4345:
4346: Select count(*)
4347: INTO l_count
4348: From ic_tran_pnd
4349: Where line_id = p_so_line_id
4350: and doc_type='OMSO'
4351: and delete_mark=0
4352: and completed_ind=0

Line 4360: Update ic_tran_pnd

4356:
4357: --B2523798 Add check for location not equal to default location to
4358: --accomodate for location only items.
4359: IF l_count <> 0 THEN
4360: Update ic_tran_pnd
4361: Set line_detail_id = p_new_delivery_detail_id
4362: Where line_id = p_so_line_id
4363: and doc_type='OMSO'
4364: and delete_mark=0

Line 4509: From ic_tran_pnd

4505:
4506: GMI_reservation_Util.PrintLn('(opm_dbg) trans_id '|| p_reservation_id);
4507: Select staged_ind
4508: Into l_staged_flag
4509: From ic_tran_pnd
4510: Where trans_id = p_reservation_id;
4511:
4512: IF l_staged_flag = 1 THEN
4513: x_staged_flag := 'Y';

Line 4528: From ic_tran_pnd

4524: p_line_id IN NUMBER) IS
4525:
4526: CURSOR find_trans IS
4527: Select trans_id
4528: From ic_tran_pnd
4529: Where line_id = p_line_id
4530: And doc_type = 'OMSO'
4531: And delete_mark = 0
4532: And completed_ind = 0

Line 4556: l_item_id ic_tran_pnd.item_id%TYPE;

4552: p_inventory_item_id IN NUMBER
4553: ,p_mtl_organization_id IN NUMBER
4554: ,x_ctl_ind OUT NOCOPY VARCHAR2)
4555: IS
4556: l_item_id ic_tran_pnd.item_id%TYPE;
4557: l_lot_ctl NUMBER;
4558: l_loct_ctl NUMBER;
4559: l_whse_ctl NUMBER;
4560: l_inventory_item_id NUMBER;

Line 4613: l_old_transaction_row ic_tran_pnd%ROWTYPE ;

4609: x_msg_data OUT NOCOPY VARCHAR2)
4610: IS
4611: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4612: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4613: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4614: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4615: l_trans_id ic_tran_pnd.trans_id%TYPE;
4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4617: l_item_id ic_tran_pnd.item_id%TYPE;

Line 4614: l_new_transaction_row ic_tran_pnd%ROWTYPE;

4610: IS
4611: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4612: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4613: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4614: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4615: l_trans_id ic_tran_pnd.trans_id%TYPE;
4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4617: l_item_id ic_tran_pnd.item_id%TYPE;
4618: l_location ic_tran_pnd.location%TYPE;

Line 4615: l_trans_id ic_tran_pnd.trans_id%TYPE;

4611: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4612: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4613: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4614: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4615: l_trans_id ic_tran_pnd.trans_id%TYPE;
4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4617: l_item_id ic_tran_pnd.item_id%TYPE;
4618: l_location ic_tran_pnd.location%TYPE;
4619: l_lot_id ic_tran_pnd.lot_id%TYPE;

Line 4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;

4612: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4613: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4614: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4615: l_trans_id ic_tran_pnd.trans_id%TYPE;
4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4617: l_item_id ic_tran_pnd.item_id%TYPE;
4618: l_location ic_tran_pnd.location%TYPE;
4619: l_lot_id ic_tran_pnd.lot_id%TYPE;
4620: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;

Line 4617: l_item_id ic_tran_pnd.item_id%TYPE;

4613: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4614: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4615: l_trans_id ic_tran_pnd.trans_id%TYPE;
4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4617: l_item_id ic_tran_pnd.item_id%TYPE;
4618: l_location ic_tran_pnd.location%TYPE;
4619: l_lot_id ic_tran_pnd.lot_id%TYPE;
4620: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;
4621: l_new_delivery_detail_id NUMBER;

Line 4618: l_location ic_tran_pnd.location%TYPE;

4614: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4615: l_trans_id ic_tran_pnd.trans_id%TYPE;
4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4617: l_item_id ic_tran_pnd.item_id%TYPE;
4618: l_location ic_tran_pnd.location%TYPE;
4619: l_lot_id ic_tran_pnd.lot_id%TYPE;
4620: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;
4621: l_new_delivery_detail_id NUMBER;
4622: l_source_line_id NUMBER;

Line 4619: l_lot_id ic_tran_pnd.lot_id%TYPE;

4615: l_trans_id ic_tran_pnd.trans_id%TYPE;
4616: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4617: l_item_id ic_tran_pnd.item_id%TYPE;
4618: l_location ic_tran_pnd.location%TYPE;
4619: l_lot_id ic_tran_pnd.lot_id%TYPE;
4620: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;
4621: l_new_delivery_detail_id NUMBER;
4622: l_source_line_id NUMBER;
4623: l_fulfilled_qty NUMBER;

Line 4639: FROM ic_tran_pnd

4635: l_released_status VARCHAR2(5);
4636:
4637: cursor c_reservations IS
4638: SELECT trans_id, doc_id
4639: FROM ic_tran_pnd
4640: WHERE line_id = p_old_source_line_id
4641: AND delete_mark = 0
4642: AND doc_type = 'OMSO'
4643: AND trans_qty <> 0

Line 4650: FROM ic_tran_pnd

4646: ORDER BY trans_qty desc; /* the smaller qty is at the top, keep in mind it is neg */
4647: /* or should consider the alloc rules */
4648: cursor c_reserved_qty IS
4649: SELECT abs(sum(trans_qty)),abs(sum(trans_qty2))
4650: FROM ic_tran_pnd
4651: WHERE line_id = p_old_source_line_id
4652: AND delete_mark = 0
4653: AND completed_ind = 0
4654: AND staged_ind = 0

Line 4745: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4741: /* if not exist, create a default trans for the new line_id */
4742: /* this would be just a place holder where trans_qty would be 0 */
4743: /* trans qty would be udpated when balance default lot is called */
4744: l_old_transaction_rec.trans_id := l_trans_id;
4745: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4746: (l_old_transaction_rec, l_old_transaction_rec )
4747: THEN
4748: l_new_transaction_rec := l_old_transaction_rec;
4749: l_new_transaction_rec.trans_id := NULL;

Line 4790: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4786: EXIT WHEN c_reservations%NOTFOUND;
4787:
4788: l_old_transaction_rec.trans_id := l_trans_id;
4789:
4790: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4791: (l_old_transaction_rec, l_old_transaction_rec )
4792: THEN
4793: GMI_RESERVATION_UTIL.Println('got trans for trans_id '||l_trans_id);
4794: GMI_RESERVATION_UTIL.Println('l_qty_to_fulfil '||l_qty_to_fulfil);

Line 4805: update ic_tran_pnd

4801: l_qty2_to_fulfil := l_qty2_to_fulfil - abs(l_old_transaction_rec.trans_qty2);
4802: ELSIF abs(l_old_transaction_rec.trans_qty) > l_qty_to_fulfil
4803: AND l_qty_to_fulfil > 0 THEN
4804:
4805: update ic_tran_pnd
4806: set trans_qty = -1 * l_qty_to_fulfil
4807: , trans_qty2 = -1 * l_qty2_to_fulfil
4808: Where trans_id = l_trans_id;
4809:

Line 4865: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4861: );
4862: IF l_trans_id > 0 THEN -- if it does not exist, don't bother
4863: l_old_transaction_rec.trans_id := l_trans_id;
4864:
4865: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4866: (l_old_transaction_rec, l_old_transaction_rec )
4867: THEN
4868: GMI_RESERVATION_UTIL.PrintLn('balancing default lot for old source line_id '|| p_old_source_line_id);
4869: GMI_RESERVATION_UTIL.balance_default_lot

Line 4894: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4890: IF l_trans_id > 0 AND p_new_source_line_id <> p_old_source_line_id
4891: THEN -- if it does not exist, don't bother
4892: l_old_transaction_rec.trans_id := l_trans_id;
4893:
4894: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4895: (l_old_transaction_rec, l_old_transaction_rec )
4896: THEN
4897: GMI_RESERVATION_UTIL.PrintLn('balancing default lot for new source line_id '|| p_new_source_line_id);
4898: GMI_RESERVATION_UTIL.balance_default_lot

Line 4940: l_old_transaction_row ic_tran_pnd%ROWTYPE;

4936:
4937: IS
4938:
4939: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4940: l_old_transaction_row ic_tran_pnd%ROWTYPE;
4941:
4942: -- HW cursor for cntl items
4943: CURSOR get_opm_txn_cntl (p_trans_id NUMBER) IS
4944: SELECT IC.trans_id

Line 4946: FROM IC_TRAN_PND IC

4942: -- HW cursor for cntl items
4943: CURSOR get_opm_txn_cntl (p_trans_id NUMBER) IS
4944: SELECT IC.trans_id
4945:
4946: FROM IC_TRAN_PND IC
4947: WHERE IC.trans_id = p_trans_id
4948: AND IC.DOC_TYPE='OMSO'
4949: AND IC.DELETE_MARK =0
4950: AND IC.COMPLETED_IND =0

Line 4959: FROM IC_TRAN_PND IC

4955: -- Cursor for non-ctl items
4956: CURSOR get_opm_txn_non_cntl (p_trans_id NUMBER) IS
4957: SELECT IC.trans_id
4958:
4959: FROM IC_TRAN_PND IC
4960: WHERE IC.trans_id = p_trans_id
4961: AND IC.DOC_TYPE='OMSO'
4962: AND IC.DELETE_MARK =0
4963: AND IC.COMPLETED_IND =0

Line 5009: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

5005: END IF;
5006: CLOSE get_opm_txn_non_cntl;
5007: END IF;
5008:
5009: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
5010: (l_old_transaction_rec, l_old_transaction_rec ) THEN
5011:
5012: -- Update staged_ind
5013: l_old_transaction_rec.staged_ind :=1;

Line 5049: gmi_reservation_util.println('Done upating ic_tran_pnd in update_opm_trxns.');

5045: x_return_status := FND_API.G_RET_STS_ERROR;
5046: RETURN;
5047: END IF; -- of fetching OPM trx
5048:
5049: gmi_reservation_util.println('Done upating ic_tran_pnd in update_opm_trxns.');
5050:
5051: END update_opm_trxns;
5052:
5053: -- HW OPM BUG#:2536589 New procedure

Line 5065: FROM IC_TRAN_PND IC

5061:
5062: -- Cursor to fetch all lots for items that are lot control
5063: CURSOR lot_info IS
5064: SELECT IC.LOT_ID
5065: FROM IC_TRAN_PND IC
5066: WHERE IC.TRANS_ID = P_TRANS_ID
5067: AND IC.DOC_TYPE='OMSO'
5068: AND IC.DELETE_MARK =0
5069: AND IC.COMPLETED_IND =0

Line 5208: FROM IC_TRAN_PND IC

5204: -- HW cursor for ctl_items
5205: CURSOR get_opm_txn_cntl IS
5206: SELECT COUNT(1)
5207:
5208: FROM IC_TRAN_PND IC
5209: WHERE IC.LINE_ID = p_line_id
5210: AND IC.line_detail_id=p_delivery_detail_id
5211: AND IC.DOC_TYPE='OMSO'
5212: AND IC.DELETE_MARK =0

Line 5221: FROM IC_TRAN_PND IC

5217: -- Cursor for non-ctl items
5218: CURSOR get_opm_txn_non_cntl IS
5219: SELECT COUNT(1)
5220:
5221: FROM IC_TRAN_PND IC
5222: WHERE IC.trans_id = p_line_id
5223: AND IC.line_detail_id=p_delivery_detail_id
5224: AND IC.DOC_TYPE='OMSO'
5225: AND IC.DELETE_MARK =0

Line 5339: FROM IC_TRAN_PND IC

5335: -- HW cursor for ctl_items
5336: CURSOR get_opm_txn_cntl IS
5337: SELECT COUNT(1)
5338:
5339: FROM IC_TRAN_PND IC
5340: WHERE IC.line_detail_id=p_delivery_detail_id
5341: AND IC.DOC_TYPE='OMSO'
5342: AND IC.DELETE_MARK =0
5343: AND IC.COMPLETED_IND =0

Line 5351: FROM IC_TRAN_PND IC

5347: -- Cursor for non-ctl items
5348: CURSOR get_opm_txn_non_cntl IS
5349: SELECT COUNT(1)
5350:
5351: FROM IC_TRAN_PND IC
5352: WHERE IC.line_detail_id=p_delivery_detail_id
5353: AND IC.DOC_TYPE='OMSO'
5354: AND IC.DELETE_MARK =0
5355: AND IC.COMPLETED_IND =0