DBA Data[Home] [Help]

APPS.GMI_RESERVATION_UTIL dependencies on IC_TRAN_PND

Line 101: to ic_tran_pnd/ic_tran_cmp */

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

Line 103: g_co_code IC_TRAN_PND.CO_CODE%TYPE;

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

Line 439: ( x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER

435: END Validation_for_Query;
436:
437:
438: PROCEDURE Get_Default_Lot
439: ( x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER
440: , x_return_status OUT NOCOPY VARCHAR2
441: , x_msg_count OUT NOCOPY NUMBER
442: , x_msg_data OUT NOCOPY VARCHAR2
443: ) IS

Line 454: x_ic_tran_pnd_index := 0;

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

Line 468: x_ic_tran_pnd_index := i;

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

Line 478: IF x_ic_tran_pnd_index = 0

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

Line 484: default_lot_index='||x_ic_tran_pnd_index);

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

Line 531: l_tran_row IC_TRAN_PND%ROWTYPE;

527:
528: l_api_name CONSTANT VARCHAR2 (30) := 'Create_Default_Lot';
529:
530: l_ictran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
531: l_tran_row IC_TRAN_PND%ROWTYPE;
532: l_tmp_qty NUMBER(19,9);
533:
534: ll_trans_id NUMBER;
535:

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

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

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

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

Line 1014: , x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER

1010: END Validation_Before_Allocate;
1011:
1012: PROCEDURE Get_Allocation
1013: ( p_trans_id IN NUMBER
1014: , x_ic_tran_pnd_index OUT NOCOPY BINARY_INTEGER
1015: , x_return_status OUT NOCOPY VARCHAR2
1016: , x_msg_count OUT NOCOPY NUMBER
1017: , x_msg_data OUT NOCOPY VARCHAR2
1018: ) IS

Line 1029: x_ic_tran_pnd_index := 0;

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

Line 1039: x_ic_tran_pnd_index := i;

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

Line 1049: IF x_ic_tran_pnd_index = 0

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

Line 1622: x_ic_tran_pnd_index => l_default_lot_index

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

Line 1661: from ic_tran_pnd

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

Line 1671: from ic_tran_pnd

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

Line 1686: From ic_tran_pnd

1682: x_allocated_qty := l_quantity_reserved; */
1683:
1684: Select count(*)
1685: INTO x_allocated_trans
1686: From ic_tran_pnd
1687: Where line_id = p_query_input.demand_source_line_id
1688: And line_detail_id = p_query_input.attribute4
1689: And delete_mark=0;
1690:

Line 1762: x_ic_tran_pnd_index => x_default_lot_index

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

Line 2297: l_temp_tran_row ic_tran_pnd%ROWTYPE;

2293: l_default_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2294: l_original_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2295: l_ic_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2296: ll_ic_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
2297: l_temp_tran_row ic_tran_pnd%ROWTYPE;
2298:
2299: l_delta_qty1 NUMBER(19,9);
2300: l_delta_qty2 NUMBER(19,9);
2301: -- HW nocopy

Line 2654: x_ic_tran_pnd_index => l_default_lot_index

2650: THEN
2651: /* Retrieve the default lot transaction we'll need it later */
2652: GMI_reservation_Util.PrintLn('(opm_dbg) in Set_Pick_Lots: we have rows now calling Get_Default_Lot.', 'pick_lots.log');
2653: GMI_Reservation_Util.Get_Default_Lot(
2654: x_ic_tran_pnd_index => l_default_lot_index
2655: , x_return_status => x_return_status
2656: , x_msg_count => x_msg_count
2657: , x_msg_data => x_msg_data);
2658:

Line 2745: ,x_ic_tran_pnd_index => l_original_tran_index

2741: THEN
2742: /* This is NOT the default lot. */
2743: GMI_Reservation_Util.Get_Allocation(
2744: p_trans_id => ll_ic_tran_rec.trans_id
2745: ,x_ic_tran_pnd_index => l_original_tran_index
2746: ,x_return_status => x_return_status
2747: ,x_msg_count => x_msg_count
2748: ,x_msg_data => x_msg_data);
2749:

Line 2971: UPDATE ic_tran_pnd

2967: FND_MSG_PUB.Add;
2968: RAISE FND_API.G_EXC_ERROR;
2969: END IF;
2970:
2971: UPDATE ic_tran_pnd
2972: SET pick_slip_number = l_pick_slip_number
2973: WHERE trans_id = l_temp_tran_row.trans_id;
2974: END IF;
2975: /* End enhancement 1928979 - lakshmi swamy */

Line 3014: from ic_tran_pnd

3010: IF l_ic_item_mst_rec.lot_ctl <> 0
3011: THEN
3012: SELECT SUM(ABS(TRANS_QTY)), SUM(ABS(TRANS_QTY2))
3013: INTO l_NEW_ALLOCATED_QTY, l_NEW_ALLOCATED_QTY2
3014: from ic_tran_pnd
3015: where line_id = p_ic_tran_rec.line_id
3016: and staged_ind = 0
3017: and completed_ind = 0
3018: and delete_mark = 0

Line 3029: from ic_tran_pnd

3025: ELSIF ((l_ic_item_mst_rec.loct_ctl * l_whse_ctl) <> 0 )
3026: THEN
3027: SELECT SUM(ABS(TRANS_QTY)), SUM(ABS(TRANS_QTY2))
3028: INTO l_NEW_ALLOCATED_QTY, l_NEW_ALLOCATED_QTY2
3029: from ic_tran_pnd
3030: where line_id = p_ic_tran_rec.line_id
3031: and staged_ind = 0
3032: and completed_ind = 0
3033: and delete_mark = 0

Line 3043: from ic_tran_pnd

3039: Where move_order_line_id = p_mo_line_id);
3040: ELSE
3041: SELECT SUM(ABS(TRANS_QTY)), SUM(ABS(TRANS_QTY2))
3042: INTO l_NEW_ALLOCATED_QTY, l_NEW_ALLOCATED_QTY2
3043: from ic_tran_pnd
3044: where line_id = p_ic_tran_rec.line_id
3045: and staged_ind = 0
3046: and completed_ind = 0
3047: and delete_mark = 0

Line 3150: l_temp_tran_row ic_tran_pnd%ROWTYPE;

3146: l_trans_qty2 NUMBER;
3147: l_commit VARCHAR2(5) := FND_API.G_FALSE;
3148: l_validation_level VARCHAR2(4) := FND_API.G_VALID_LEVEL_FULL;
3149: l_ic_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3150: l_temp_tran_row ic_tran_pnd%ROWTYPE;
3151: l_organization_id NUMBER;
3152: l_inventory_item_id NUMBER;
3153: l_ctl_ind VARCHAR2(1) ;
3154: l_opm_item_id NUMBER;

Line 3161: From ic_tran_pnd

3157: l_orgn_code VARCHAR2(6);
3158:
3159: Cursor get_trans_qty IS
3160: Select nvl(sum(trans_qty),0), nvl(sum(trans_qty2),0)
3161: From ic_tran_pnd
3162: Where line_id = l_line_rec.line_id
3163: And doc_type = 'OMSO'
3164: And item_id = p_opm_item_id
3165: And delete_mark = 0

Line 3176: From ic_tran_pnd

3172: /* for a default lot, staged=1 means it is shipconfirmed
3173: completed=1 means it has been interfaced */
3174: Cursor get_trans_qty_non_ctl IS
3175: Select nvl(sum(trans_qty),0), nvl(sum(trans_qty2),0)
3176: From ic_tran_pnd
3177: Where line_id = l_line_rec.line_id
3178: And doc_type = 'OMSO'
3179: And item_id = p_opm_item_id
3180: And (staged_ind = 1 or completed_ind = 1)

Line 3448: l_temp_tran_row ic_tran_pnd%ROWTYPE;

3444: l_validation_flag VARCHAR2(10) := FND_API.G_TRUE;
3445: l_commit VARCHAR2(5) := FND_API.G_FALSE;
3446: l_validation_level VARCHAR2(4) := FND_API.G_VALID_LEVEL_FULL;
3447:
3448: l_temp_tran_row ic_tran_pnd%ROWTYPE;
3449: l_original_tran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3450: l_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
3451: l_mtl_reservation_tbl inv_reservation_global.mtl_reservation_tbl_type;
3452: l_mtl_reservation_tbl_count NUMBER;

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

3488:
3489: /* ============================================================================================= */
3490: /* No default lot exist AND MANUAL Allocation. Then create the default lot */
3491: /* ============================================================================================= */
3492: /* Fill the ic_tran_pnd record type, and then insert into ic_tran_pnd */
3493: l_original_tran_rec.item_id := p_ic_tran_rec.item_id;
3494: l_original_tran_rec.line_id := p_ic_tran_rec.line_id;
3495: l_original_tran_rec.co_code := p_ic_tran_rec.co_code;
3496: l_original_tran_rec.orgn_code := p_ic_tran_rec.orgn_code;

Line 3620: x_ic_tran_pnd_index => x_default_lot_index

3616: END IF;
3617:
3618: GMI_reservation_Util.PrintLn('(opm_dbg) in Create_Empty_Default_Lot: we have rows now calling Get_Default_Lot.', 'pick_lots.log');
3619: GMI_Reservation_Util.Get_Default_Lot(
3620: x_ic_tran_pnd_index => x_default_lot_index
3621: , x_return_status => x_return_status
3622: , x_msg_count => x_msg_count
3623: , x_msg_data => x_msg_data);
3624:

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

3692:
3693: /* Cursor for Checking the Default Lot existence : */
3694: CURSOR c_default_exist(l_line_id IN NUMBER,
3695: l_item_id IN NUMBER) IS
3696: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */trans_id
3697: FROM ic_tran_pnd
3698: WHERE lot_id = 0
3699: AND delete_mark = 0
3700: AND doc_type = 'OMSO'

Line 3697: FROM ic_tran_pnd

3693: /* Cursor for Checking the Default Lot existence : */
3694: CURSOR c_default_exist(l_line_id IN NUMBER,
3695: l_item_id IN NUMBER) IS
3696: SELECT /*+ INDEX (ic_tran_pnd, ic_tran_pndi3) */trans_id
3697: FROM ic_tran_pnd
3698: WHERE lot_id = 0
3699: AND delete_mark = 0
3700: AND doc_type = 'OMSO'
3701: AND item_id = l_item_id

Line 3766: l_tran_row IC_TRAN_PND%ROWTYPE;

3762: , x_msg_count OUT NOCOPY NUMBER
3763: , x_msg_data OUT NOCOPY VARCHAR2
3764: ) IS
3765: l_ictran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3766: l_tran_row IC_TRAN_PND%ROWTYPE;
3767: l_uom1 Varchar2(5);
3768: l_uom2 Varchar2(5);
3769: l_orgn_code Varchar2(10);
3770: l_co_code Varchar2(10);

Line 3897: l_tran_row IC_TRAN_PND%ROWTYPE;

3893: , x_msg_data OUT NOCOPY VARCHAR2
3894: ) IS
3895:
3896: l_ictran_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
3897: l_tran_row IC_TRAN_PND%ROWTYPE;
3898: l_uom1 Varchar2(5);
3899: l_uom2 Varchar2(5);
3900: l_orgn_code Varchar2(10);
3901: l_co_code Varchar2(10);

Line 4360: From ic_tran_pnd

4356: x_return_status := FND_API.G_RET_STS_SUCCESS;
4357:
4358: Select count(*)
4359: INTO l_count
4360: From ic_tran_pnd
4361: Where line_id = p_so_line_id
4362: and doc_type='OMSO'
4363: and delete_mark=0
4364: and completed_ind=0

Line 4372: Update ic_tran_pnd

4368:
4369: --B2523798 Add check for location not equal to default location to
4370: --accomodate for location only items.
4371: IF l_count <> 0 THEN
4372: Update ic_tran_pnd
4373: Set line_detail_id = p_new_delivery_detail_id
4374: Where line_id = p_so_line_id
4375: and doc_type='OMSO'
4376: and delete_mark=0

Line 4521: From ic_tran_pnd

4517:
4518: GMI_reservation_Util.PrintLn('(opm_dbg) trans_id '|| p_reservation_id);
4519: Select staged_ind
4520: Into l_staged_flag
4521: From ic_tran_pnd
4522: Where trans_id = p_reservation_id;
4523:
4524: IF l_staged_flag = 1 THEN
4525: x_staged_flag := 'Y';

Line 4540: From ic_tran_pnd

4536: p_line_id IN NUMBER) IS
4537:
4538: CURSOR find_trans IS
4539: Select trans_id
4540: From ic_tran_pnd
4541: Where line_id = p_line_id
4542: And doc_type = 'OMSO'
4543: And delete_mark = 0
4544: And completed_ind = 0

Line 4568: l_item_id ic_tran_pnd.item_id%TYPE;

4564: p_inventory_item_id IN NUMBER
4565: ,p_mtl_organization_id IN NUMBER
4566: ,x_ctl_ind OUT NOCOPY VARCHAR2)
4567: IS
4568: l_item_id ic_tran_pnd.item_id%TYPE;
4569: l_lot_ctl NUMBER;
4570: l_loct_ctl NUMBER;
4571: l_whse_ctl NUMBER;
4572: l_inventory_item_id NUMBER;

Line 4625: l_old_transaction_row ic_tran_pnd%ROWTYPE ;

4621: x_msg_data OUT NOCOPY VARCHAR2)
4622: IS
4623: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4624: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4625: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4626: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4627: l_trans_id ic_tran_pnd.trans_id%TYPE;
4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4629: l_item_id ic_tran_pnd.item_id%TYPE;

Line 4626: l_new_transaction_row ic_tran_pnd%ROWTYPE;

4622: IS
4623: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4624: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4625: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4626: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4627: l_trans_id ic_tran_pnd.trans_id%TYPE;
4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4629: l_item_id ic_tran_pnd.item_id%TYPE;
4630: l_location ic_tran_pnd.location%TYPE;

Line 4627: l_trans_id ic_tran_pnd.trans_id%TYPE;

4623: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4624: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4625: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4626: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4627: l_trans_id ic_tran_pnd.trans_id%TYPE;
4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4629: l_item_id ic_tran_pnd.item_id%TYPE;
4630: l_location ic_tran_pnd.location%TYPE;
4631: l_lot_id ic_tran_pnd.lot_id%TYPE;

Line 4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;

4624: l_new_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4625: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4626: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4627: l_trans_id ic_tran_pnd.trans_id%TYPE;
4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4629: l_item_id ic_tran_pnd.item_id%TYPE;
4630: l_location ic_tran_pnd.location%TYPE;
4631: l_lot_id ic_tran_pnd.lot_id%TYPE;
4632: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;

Line 4629: l_item_id ic_tran_pnd.item_id%TYPE;

4625: l_old_transaction_row ic_tran_pnd%ROWTYPE ;
4626: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4627: l_trans_id ic_tran_pnd.trans_id%TYPE;
4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4629: l_item_id ic_tran_pnd.item_id%TYPE;
4630: l_location ic_tran_pnd.location%TYPE;
4631: l_lot_id ic_tran_pnd.lot_id%TYPE;
4632: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;
4633: l_new_delivery_detail_id NUMBER;

Line 4630: l_location ic_tran_pnd.location%TYPE;

4626: l_new_transaction_row ic_tran_pnd%ROWTYPE;
4627: l_trans_id ic_tran_pnd.trans_id%TYPE;
4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4629: l_item_id ic_tran_pnd.item_id%TYPE;
4630: l_location ic_tran_pnd.location%TYPE;
4631: l_lot_id ic_tran_pnd.lot_id%TYPE;
4632: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;
4633: l_new_delivery_detail_id NUMBER;
4634: l_source_line_id NUMBER;

Line 4631: l_lot_id ic_tran_pnd.lot_id%TYPE;

4627: l_trans_id ic_tran_pnd.trans_id%TYPE;
4628: l_new_trans_id ic_tran_pnd.trans_id%TYPE;
4629: l_item_id ic_tran_pnd.item_id%TYPE;
4630: l_location ic_tran_pnd.location%TYPE;
4631: l_lot_id ic_tran_pnd.lot_id%TYPE;
4632: l_line_detail_id wsh_delivery_details.delivery_detail_id%TYPE;
4633: l_new_delivery_detail_id NUMBER;
4634: l_source_line_id NUMBER;
4635: l_fulfilled_qty NUMBER;

Line 4651: FROM ic_tran_pnd

4647: l_released_status VARCHAR2(5);
4648:
4649: cursor c_reservations IS
4650: SELECT trans_id, doc_id
4651: FROM ic_tran_pnd
4652: WHERE line_id = p_old_source_line_id
4653: AND delete_mark = 0
4654: AND doc_type = 'OMSO'
4655: AND trans_qty <> 0

Line 4662: FROM ic_tran_pnd

4658: ORDER BY trans_qty desc; /* the smaller qty is at the top, keep in mind it is neg */
4659: /* or should consider the alloc rules */
4660: cursor c_reserved_qty IS
4661: SELECT abs(sum(trans_qty)),abs(sum(trans_qty2))
4662: FROM ic_tran_pnd
4663: WHERE line_id = p_old_source_line_id
4664: AND delete_mark = 0
4665: AND completed_ind = 0
4666: AND staged_ind = 0

Line 4757: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4753: /* if not exist, create a default trans for the new line_id */
4754: /* this would be just a place holder where trans_qty would be 0 */
4755: /* trans qty would be udpated when balance default lot is called */
4756: l_old_transaction_rec.trans_id := l_trans_id;
4757: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4758: (l_old_transaction_rec, l_old_transaction_rec )
4759: THEN
4760: l_new_transaction_rec := l_old_transaction_rec;
4761: l_new_transaction_rec.trans_id := NULL;

Line 4802: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4798: EXIT WHEN c_reservations%NOTFOUND;
4799:
4800: l_old_transaction_rec.trans_id := l_trans_id;
4801:
4802: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4803: (l_old_transaction_rec, l_old_transaction_rec )
4804: THEN
4805: GMI_RESERVATION_UTIL.Println('got trans for trans_id '||l_trans_id);
4806: GMI_RESERVATION_UTIL.Println('l_qty_to_fulfil '||l_qty_to_fulfil);

Line 4817: update ic_tran_pnd

4813: l_qty2_to_fulfil := l_qty2_to_fulfil - abs(l_old_transaction_rec.trans_qty2);
4814: ELSIF abs(l_old_transaction_rec.trans_qty) > l_qty_to_fulfil
4815: AND l_qty_to_fulfil > 0 THEN
4816:
4817: update ic_tran_pnd
4818: set trans_qty = -1 * l_qty_to_fulfil
4819: , trans_qty2 = -1 * l_qty2_to_fulfil
4820: Where trans_id = l_trans_id;
4821:

Line 4877: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4873: );
4874: IF l_trans_id > 0 THEN -- if it does not exist, don't bother
4875: l_old_transaction_rec.trans_id := l_trans_id;
4876:
4877: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4878: (l_old_transaction_rec, l_old_transaction_rec )
4879: THEN
4880: GMI_RESERVATION_UTIL.PrintLn('balancing default lot for old source line_id '|| p_old_source_line_id);
4881: GMI_RESERVATION_UTIL.balance_default_lot

Line 4906: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

4902: IF l_trans_id > 0 AND p_new_source_line_id <> p_old_source_line_id
4903: THEN -- if it does not exist, don't bother
4904: l_old_transaction_rec.trans_id := l_trans_id;
4905:
4906: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
4907: (l_old_transaction_rec, l_old_transaction_rec )
4908: THEN
4909: GMI_RESERVATION_UTIL.PrintLn('balancing default lot for new source line_id '|| p_new_source_line_id);
4910: GMI_RESERVATION_UTIL.balance_default_lot

Line 4952: l_old_transaction_row ic_tran_pnd%ROWTYPE;

4948:
4949: IS
4950:
4951: l_old_transaction_rec GMI_TRANS_ENGINE_PUB.ictran_rec;
4952: l_old_transaction_row ic_tran_pnd%ROWTYPE;
4953:
4954: -- HW cursor for cntl items
4955: CURSOR get_opm_txn_cntl (p_trans_id NUMBER) IS
4956: SELECT IC.trans_id

Line 4958: FROM IC_TRAN_PND IC

4954: -- HW cursor for cntl items
4955: CURSOR get_opm_txn_cntl (p_trans_id NUMBER) IS
4956: SELECT IC.trans_id
4957:
4958: FROM IC_TRAN_PND IC
4959: WHERE IC.trans_id = p_trans_id
4960: AND IC.DOC_TYPE='OMSO'
4961: AND IC.DELETE_MARK =0
4962: AND IC.COMPLETED_IND =0

Line 4971: FROM IC_TRAN_PND IC

4967: -- Cursor for non-ctl items
4968: CURSOR get_opm_txn_non_cntl (p_trans_id NUMBER) IS
4969: SELECT IC.trans_id
4970:
4971: FROM IC_TRAN_PND IC
4972: WHERE IC.trans_id = p_trans_id
4973: AND IC.DOC_TYPE='OMSO'
4974: AND IC.DELETE_MARK =0
4975: AND IC.COMPLETED_IND =0

Line 5021: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND

5017: END IF;
5018: CLOSE get_opm_txn_non_cntl;
5019: END IF;
5020:
5021: IF GMI_TRAN_PND_DB_PVT.FETCH_IC_TRAN_PND
5022: (l_old_transaction_rec, l_old_transaction_rec ) THEN
5023:
5024: -- Update staged_ind
5025: l_old_transaction_rec.staged_ind :=1;

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

5057: x_return_status := FND_API.G_RET_STS_ERROR;
5058: RETURN;
5059: END IF; -- of fetching OPM trx
5060:
5061: gmi_reservation_util.println('Done upating ic_tran_pnd in update_opm_trxns.');
5062:
5063: END update_opm_trxns;
5064:
5065: -- HW OPM BUG#:2536589 New procedure

Line 5077: FROM IC_TRAN_PND IC

5073:
5074: -- Cursor to fetch all lots for items that are lot control
5075: CURSOR lot_info IS
5076: SELECT IC.LOT_ID
5077: FROM IC_TRAN_PND IC
5078: WHERE IC.TRANS_ID = P_TRANS_ID
5079: AND IC.DOC_TYPE='OMSO'
5080: AND IC.DELETE_MARK =0
5081: AND IC.COMPLETED_IND =0

Line 5220: FROM IC_TRAN_PND IC

5216: -- HW cursor for ctl_items
5217: CURSOR get_opm_txn_cntl IS
5218: SELECT COUNT(1)
5219:
5220: FROM IC_TRAN_PND IC
5221: WHERE IC.LINE_ID = p_line_id
5222: AND IC.line_detail_id=p_delivery_detail_id
5223: AND IC.DOC_TYPE='OMSO'
5224: AND IC.DELETE_MARK =0

Line 5233: FROM IC_TRAN_PND IC

5229: -- Cursor for non-ctl items
5230: CURSOR get_opm_txn_non_cntl IS
5231: SELECT COUNT(1)
5232:
5233: FROM IC_TRAN_PND IC
5234: WHERE IC.trans_id = p_line_id
5235: AND IC.line_detail_id=p_delivery_detail_id
5236: AND IC.DOC_TYPE='OMSO'
5237: AND IC.DELETE_MARK =0

Line 5351: FROM IC_TRAN_PND IC

5347: -- HW cursor for ctl_items
5348: CURSOR get_opm_txn_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

Line 5363: FROM IC_TRAN_PND IC

5359: -- Cursor for non-ctl items
5360: CURSOR get_opm_txn_non_cntl IS
5361: SELECT COUNT(1)
5362:
5363: FROM IC_TRAN_PND IC
5364: WHERE IC.line_detail_id=p_delivery_detail_id
5365: AND IC.DOC_TYPE='OMSO'
5366: AND IC.DELETE_MARK =0
5367: AND IC.COMPLETED_IND =0