DBA Data[Home] [Help]

APPS.JMF_SHIKYU_ALLOCATION_PVT dependencies on JMF_SHIKYU_REPLENISHMENTS

Line 85: --| of the JMF_SHIKYU_REPLENISHMENTS table for |

81: --| in the Get_Available_Replenishment_Po procedure |
82: --| 26-OCT-2005 vchu Replaced dbms_output calls with FND_LOG calls. |
83: --| Also modified the value to populate into the |
84: --| TP_SUPPLIER_ID and TP_SUPPLIER_SITE_ID columns |
85: --| of the JMF_SHIKYU_REPLENISHMENTS table for |
86: --| fixing the wrong value issue of the |
87: --| Manufacturing Partner / MP site as described |
88: --| in bug 4651480. |
89: --| 09-NOV-2005 vchu Modified the query of the c_avail_replen_so_cur |

Line 113: --| JMF_SHIKYU_REPLENISHMENTS to populate the |

109: --| update statements. |
110: --| 21-APR-2006 vchu Modified the Reconcile_Partial_Shipments |
111: --| procedure (for bug 5166092): |
112: --| 1) Modified the INSERT statement for |
113: --| JMF_SHIKYU_REPLENISHMENTS to populate the |
114: --| additional_supply, primary_uom, and the primary |
115: --| uom quantity columns properly. |
116: --| 2) Added an UPDATE statement to update the |
117: --| allocable quantity of the parent Replenishment |

Line 146: --| JMF_SHIKYU_REPLENISHMENTS table. |

142: --| option if creation of Replenishment SOs has |
143: --| already failed when trying to create |
144: --| Replenishment SOs for the Replenishment POs |
145: --| that do not yet present in the |
146: --| JMF_SHIKYU_REPLENISHMENTS table. |
147: --| 08-MAY-2006 vchu Modified validate_price to consider the uom |
148: --| column first before the primary uom column of |
149: --| the jmf_shikyu_components table. |
150: --| Also added debug log messages. |

Line 163: --| jmf_shikyu_replenishments record if there were |

159: --| out the sqlerrm. Also replaced hardcoding of |
160: --| the 'S' status by FND_API.G_RET_STS_SUCCESS. |
161: --| 11-MAY-2006 vchu Modified Delete_Allocations to only update |
162: --| the allocated_quantity of the corresponding |
163: --| jmf_shikyu_replenishments record if there were |
164: --| indeed allocations being deleted. The wrong |
165: --| condition was used to check for an empty table |
166: --| before. Should check to see if |
167: --| x_deleted_allocations_tbl.FIRST is NULL or not |

Line 358: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;

354:
355: l_qty_to_allocate NUMBER;
356: l_exists VARCHAR2(1) := 'N';
357:
358: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;
359: l_replen_uom JMF_SHIKYU_REPLENISHMENTS.uom%TYPE;
360: l_replen_allocated_primary_qty
361: JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
362: l_replen_allocable_primary_qty

Line 359: l_replen_uom JMF_SHIKYU_REPLENISHMENTS.uom%TYPE;

355: l_qty_to_allocate NUMBER;
356: l_exists VARCHAR2(1) := 'N';
357:
358: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;
359: l_replen_uom JMF_SHIKYU_REPLENISHMENTS.uom%TYPE;
360: l_replen_allocated_primary_qty
361: JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
362: l_replen_allocable_primary_qty
363: JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;

Line 361: JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;

357:
358: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;
359: l_replen_uom JMF_SHIKYU_REPLENISHMENTS.uom%TYPE;
360: l_replen_allocated_primary_qty
361: JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
362: l_replen_allocable_primary_qty
363: JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;
364: l_replen_allocated_qty JMF_SHIKYU_REPLENISHMENTS.allocated_quantity%TYPE;
365: l_replen_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;

Line 363: JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;

359: l_replen_uom JMF_SHIKYU_REPLENISHMENTS.uom%TYPE;
360: l_replen_allocated_primary_qty
361: JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
362: l_replen_allocable_primary_qty
363: JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;
364: l_replen_allocated_qty JMF_SHIKYU_REPLENISHMENTS.allocated_quantity%TYPE;
365: l_replen_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;
366: l_allocated_uom JMF_SHIKYU_ALLOCATIONS.uom%TYPE;
367: l_allocation_qty JMF_SHIKYU_ALLOCATIONS.allocated_quantity%TYPE;

Line 364: l_replen_allocated_qty JMF_SHIKYU_REPLENISHMENTS.allocated_quantity%TYPE;

360: l_replen_allocated_primary_qty
361: JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
362: l_replen_allocable_primary_qty
363: JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;
364: l_replen_allocated_qty JMF_SHIKYU_REPLENISHMENTS.allocated_quantity%TYPE;
365: l_replen_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;
366: l_allocated_uom JMF_SHIKYU_ALLOCATIONS.uom%TYPE;
367: l_allocation_qty JMF_SHIKYU_ALLOCATIONS.allocated_quantity%TYPE;
368: l_replen_so_header_id OE_ORDER_LINES_ALL.header_id%TYPE := NULL;

Line 365: l_replen_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;

361: JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
362: l_replen_allocable_primary_qty
363: JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;
364: l_replen_allocated_qty JMF_SHIKYU_REPLENISHMENTS.allocated_quantity%TYPE;
365: l_replen_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;
366: l_allocated_uom JMF_SHIKYU_ALLOCATIONS.uom%TYPE;
367: l_allocation_qty JMF_SHIKYU_ALLOCATIONS.allocated_quantity%TYPE;
368: l_replen_so_header_id OE_ORDER_LINES_ALL.header_id%TYPE := NULL;
369: l_sub_comp MTL_SYSTEM_ITEMS_B.segment1%TYPE;

Line 394: -- JMF_SHIKYU_REPLENISHMENTS and get the related attributes

390:
391: -- TO DO: Call reconcile_replen_so_line_split here! (Do we need this?)
392:
393: -- Look for the Replenishment Sales Order Line in the
394: -- JMF_SHIKYU_REPLENISHMENTS and get the related attributes
395: -- by calling a private procedure.
396: Get_Replen_So_Attributes
397: ( p_replen_so_line_id => p_replen_so_line_id
398: , x_header_id => l_replen_so_header_id

Line 576: UPDATE JMF_SHIKYU_REPLENISHMENTS

572: END IF; /* IF l_primary_uom <> l_replen_uom */
573:
574: -- update allocated_quantity and allocated_primary_uom_quantity
575: -- of the Replenishment SO Line after the new allocation
576: UPDATE JMF_SHIKYU_REPLENISHMENTS
577: SET allocated_primary_uom_quantity = l_replen_allocated_primary_qty,
578: allocated_quantity = l_replen_allocated_qty,
579: last_update_date = sysdate,
580: last_updated_by = FND_GLOBAL.user_id,

Line 611: ' not in JMF_SHIKYU_REPLENISHMENTS table');

607: THEN
608: FND_LOG.string( FND_LOG.LEVEL_EXCEPTION
609: , G_MODULE_PREFIX || l_api_name || '.g_replen_so_line_not_exist'
610: , 'Sales Order with ID ' || p_replen_so_line_id ||
611: ' not in JMF_SHIKYU_REPLENISHMENTS table');
612: END IF;
613:
614: WHEN OTHERS THEN
615:

Line 858: FROM jmf_shikyu_replenishments jsr,

854: jsr.primary_uom,
855: oola.schedule_ship_date,
856: --Bugfix 14246759: Adding actual_shipment_date
857: oola.actual_shipment_date
858: FROM jmf_shikyu_replenishments jsr,
859: jmf_subcontract_orders jso,
860: oe_order_lines_all oola
861: WHERE jsr.oem_organization_id = jso.oem_organization_id
862: AND jsr.tp_organization_id = jso.tp_organization_id

Line 1296: FROM jmf_shikyu_replenishments jsr

1292: AND NVL(pla.cancel_flag, 'N') = 'N'
1293: AND NVL(plla.cancel_flag, 'N') = 'N'
1294: AND plla.unit_meas_lookup_code = muomv.unit_of_measure
1295: AND NOT EXISTS (SELECT jsr.replenishment_so_line_id
1296: FROM jmf_shikyu_replenishments jsr
1297: WHERE jsr.replenishment_po_shipment_id = plla.line_location_id)
1298: ORDER BY NVL(plla.need_by_date, plla.promised_date),
1299: pha.segment1,
1300: pla.line_num,

Line 1635: -- JMF_SHIKYU_REPLENISHMENTS table

1631: END IF;
1632: -- *** vchu end: new code 8/18
1633:
1634: -- Insert the new Replenishment SO Line into the
1635: -- JMF_SHIKYU_REPLENISHMENTS table
1636: Populate_Replenishment
1637: ( p_replen_so_line_id => l_new_replen_so_line_id
1638: , p_replen_po_shipment_id => l_new_replen_po_shipment_id
1639: , p_component_id => p_component_id

Line 1929: -- JMF_SHIKYU_REPLENISHMENTS table

1925: || l_new_order_line_id);
1926: END IF;
1927:
1928: -- Insert the new Replenishment SO Line into the
1929: -- JMF_SHIKYU_REPLENISHMENTS table
1930: Populate_Replenishment
1931: ( p_replen_so_line_id => l_new_order_line_id
1932: , p_replen_po_shipment_id => l_replen_po_rec.replenishment_po_shipment_id
1933: , p_component_id => p_component_id

Line 3093: FROM JMF_SHIKYU_REPLENISHMENTS jsr

3089:
3090: -- Get UOM of the Replenishment SO Line
3091: SELECT jsr.uom
3092: INTO l_replen_uom
3093: FROM JMF_SHIKYU_REPLENISHMENTS jsr
3094: WHERE jsr.replenishment_so_line_id = x_deleted_allocations_tbl(l_tbl_index).replenishment_so_line_id;
3095:
3096: IF l_replen_uom <> x_deleted_allocations_tbl(l_tbl_index).qty_uom
3097: THEN

Line 3114: UPDATE jmf_shikyu_replenishments

3110: l_deleted_primary_uom_qty := x_deleted_allocations_tbl(l_tbl_index).qty;
3111:
3112: END IF;
3113:
3114: UPDATE jmf_shikyu_replenishments
3115: SET allocated_quantity = allocated_quantity - l_deleted_primary_uom_qty,
3116: allocated_primary_uom_quantity
3117: = allocated_primary_uom_quantity - x_deleted_allocations_tbl(l_tbl_index).qty,
3118: last_update_date = sysdate,

Line 3193: FROM jmf_shikyu_replenishments jsr,

3189: oola.schedule_ship_date,
3190: --Bugfix 14246759: Adding this because the record structure g_replen_so_qty_rec_type
3191: --has changed.
3192: oola.actual_shipment_date
3193: FROM jmf_shikyu_replenishments jsr,
3194: oe_order_lines_all oola
3195: WHERE jsr.replenishment_so_line_id = oola.line_id
3196: --Bugfix 14078692: Adding nvl.
3197: AND nvl(jsr.status, 'XXX') <> 'CLOSED'

Line 3411: UPDATE JMF_SHIKYU_REPLENISHMENTS

3407:
3408: END IF; /* IF l_ordered_qty > l_closed_so_line_rec.qty */
3409:
3410: -- Updating the allocable quantity to the shipped quantity of the SO Line
3411: UPDATE JMF_SHIKYU_REPLENISHMENTS
3412: SET allocable_quantity = l_closed_so_line_rec.qty,
3413: allocable_primary_uom_quantity = l_closed_so_line_rec.primary_uom_qty,
3414: status = 'CLOSED',
3415: last_update_date = sysdate,

Line 3503: l_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;

3499:
3500: l_subcontract_po_shipment_id JMF_SUBCONTRACT_ORDERS.subcontract_po_shipment_id%TYPE;
3501: l_primary_uom JMF_SHIKYU_COMPONENTS.primary_uom%TYPE;
3502: l_component_id JMF_SHIKYU_COMPONENTS.shikyu_component_id%TYPE;
3503: l_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;
3504: l_allocable_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;
3505: l_allocated_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
3506: l_unallocated_primary_qty NUMBER;
3507: l_shipped_primary_qty NUMBER;

Line 3504: l_allocable_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;

3500: l_subcontract_po_shipment_id JMF_SUBCONTRACT_ORDERS.subcontract_po_shipment_id%TYPE;
3501: l_primary_uom JMF_SHIKYU_COMPONENTS.primary_uom%TYPE;
3502: l_component_id JMF_SHIKYU_COMPONENTS.shikyu_component_id%TYPE;
3503: l_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;
3504: l_allocable_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;
3505: l_allocated_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
3506: l_unallocated_primary_qty NUMBER;
3507: l_shipped_primary_qty NUMBER;
3508: l_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;

Line 3505: l_allocated_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;

3501: l_primary_uom JMF_SHIKYU_COMPONENTS.primary_uom%TYPE;
3502: l_component_id JMF_SHIKYU_COMPONENTS.shikyu_component_id%TYPE;
3503: l_allocable_qty JMF_SHIKYU_REPLENISHMENTS.allocable_quantity%TYPE;
3504: l_allocable_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocable_primary_uom_quantity%TYPE;
3505: l_allocated_primary_qty JMF_SHIKYU_REPLENISHMENTS.allocated_primary_uom_quantity%TYPE;
3506: l_unallocated_primary_qty NUMBER;
3507: l_shipped_primary_qty NUMBER;
3508: l_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
3509: l_ordered_uom OE_ORDER_LINES_ALL.order_quantity_uom%TYPE;

Line 3592: FROM JMF_SHIKYU_REPLENISHMENTS jsr,

3588: l_allocable_primary_qty,
3589: l_allocated_primary_qty,
3590: l_shipped_primary_qty,
3591: l_ordered_uom
3592: FROM JMF_SHIKYU_REPLENISHMENTS jsr,
3593: OE_ORDER_LINES_ALL oola
3594: WHERE jsr.REPLENISHMENT_SO_LINE_ID = p_replen_order_line_id
3595: AND jsr.replenishment_so_line_id = oola.line_id;
3596:

Line 3623: -- from JMF_SHIKYU_REPLENISHMENTS by an appropriate amount.

3619: THEN
3620: --
3621: -- Bug 9883090
3622: -- Instead of returning without any processing, reduce the replenishment
3623: -- from JMF_SHIKYU_REPLENISHMENTS by an appropriate amount.
3624: -- skolluku
3625: --
3626: -- Calculate the new allocable quantity by subtracting the excess quantity
3627: l_allocable_primary_qty := l_allocable_primary_qty - p_excess_qty;

Line 3651: UPDATE JMF_SHIKYU_REPLENISHMENTS

3647:
3648: -- Update the allocable qty of the Replensiment SO Line being reconciled, so that
3649: -- it will not be reallocated again to the Subcontracting Order Shipments being
3650: -- deallocated from it in order to reconcile the excess qty
3651: UPDATE JMF_SHIKYU_REPLENISHMENTS
3652: SET allocable_quantity = l_allocable_qty,
3653: allocable_primary_uom_quantity = l_allocable_primary_qty,
3654: last_update_date = sysdate,
3655: last_updated_by = FND_GLOBAL.user_id,

Line 3695: -- Remove the Replenishment SO Line from the JMF_SHIKYU_REPLENISHMENTS table,

3691: , P_REPLEN_SO_LINE_ID => p_replen_order_line_id
3692: , X_DELETED_ALLOCATIONS_TBL => l_reduced_allocations_tbl
3693: );
3694:
3695: -- Remove the Replenishment SO Line from the JMF_SHIKYU_REPLENISHMENTS table,
3696: -- since excess qty = allocable qty, and hence there are no available qty on
3697: -- this Replenishment SO Line anymore
3698: --
3699: -- Bug 9883090

Line 3704: --DELETE FROM jmf_shikyu_replenishments

3700: -- Instead of deleting, update the record to set the allocable
3701: -- quantity to 0, so that no new RSO is created for the same PO.
3702: -- skolluku
3703: --
3704: --DELETE FROM jmf_shikyu_replenishments
3705: --WHERE replenishment_so_line_id = p_replen_order_line_id;
3706: UPDATE JMF_SHIKYU_REPLENISHMENTS
3707: SET allocable_quantity = 0,
3708: allocable_primary_uom_quantity = 0,

Line 3706: UPDATE JMF_SHIKYU_REPLENISHMENTS

3702: -- skolluku
3703: --
3704: --DELETE FROM jmf_shikyu_replenishments
3705: --WHERE replenishment_so_line_id = p_replen_order_line_id;
3706: UPDATE JMF_SHIKYU_REPLENISHMENTS
3707: SET allocable_quantity = 0,
3708: allocable_primary_uom_quantity = 0,
3709: allocated_quantity = 0,
3710: allocated_primary_uom_quantity = 0,

Line 3809: UPDATE JMF_SHIKYU_REPLENISHMENTS

3805:
3806: -- Update the allocable qty of the Replensiment SO Line being reconciled, so that
3807: -- it will not be reallocated again to the Subcontracting Order Shipments being
3808: -- deallocated from it in order to reconcile the excess qty
3809: UPDATE JMF_SHIKYU_REPLENISHMENTS
3810: SET allocable_quantity = l_allocable_qty,
3811: allocable_primary_uom_quantity = l_allocable_primary_qty,
3812: last_update_date = sysdate,
3813: last_updated_by = FND_GLOBAL.user_id,

Line 4060: FROM JMF_SHIKYU_REPLENISHMENTS jsr

4056: , jsa.subcontract_po_shipment_id subcontract_po_shipment_id
4057: , jsr.ALLOCABLE_PRIMARY_UOM_QUANTITY allocable_primary_UOM_quantity
4058: , jsr.allocable_quantity allocable_quantity
4059: , jsr.allocated_quantity allocated_quantity
4060: FROM JMF_SHIKYU_REPLENISHMENTS jsr
4061: , OE_ORDER_LINES_ALL oel
4062: , OE_ORDER_HEADERS_ALL oeh
4063: , JMF_SHIKYU_ALLOCATIONS jsa
4064: WHERE oeh.header_id = jsr.REPLENISHMENT_SO_HEADER_ID

Line 4271: FROM JMF_SHIKYU_REPLENISHMENTS

4267: SELECT UOM,
4268: PRIMARY_UOM
4269: INTO l_uom,
4270: l_primary_uom
4271: FROM JMF_SHIKYU_REPLENISHMENTS
4272: WHERE REPLENISHMENT_SO_LINE_ID = C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID;
4273:
4274: IF g_fnd_debug = 'Y' AND
4275: FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL

Line 4316: UPDATE JMF_SHIKYU_REPLENISHMENTS

4312: ':Old allocable qty:' || C_SHIKYU_REPLENISHMENT_rec.allocable_primary_UOM_quantity );
4313: END IF;
4314:
4315: --Updating the JSR with new quantities.
4316: UPDATE JMF_SHIKYU_REPLENISHMENTS
4317: SET allocable_quantity = C_SHIKYU_REPLENISHMENT_rec.oel_ordered_quantity,
4318: allocable_primary_uom_quantity = l_primary_uom_qty,
4319: ordered_quantity = C_SHIKYU_REPLENISHMENT_rec.oel_ordered_quantity,
4320: ordered_primary_uom_quantity = l_primary_uom_qty,

Line 4419: --DELETE FROM JMF_SHIKYU_REPLENISHMENTS

4415: -- Bug 14978692
4416: -- Instead of deleting, update the record to set the allocable
4417: -- quantity to 0, so that no new RSO is created for the same PO.
4418:
4419: --DELETE FROM JMF_SHIKYU_REPLENISHMENTS
4420: --WHERE REPLENISHMENT_SO_LINE_ID =
4421: -- C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID
4422: --AND REPLENISHMENT_SO_HEADER_ID =
4423: -- C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_header_id ;

Line 4425: UPDATE JMF_SHIKYU_REPLENISHMENTS

4421: -- C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID
4422: --AND REPLENISHMENT_SO_HEADER_ID =
4423: -- C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_header_id ;
4424:
4425: UPDATE JMF_SHIKYU_REPLENISHMENTS
4426: SET allocable_quantity = 0,
4427: allocable_primary_uom_quantity = 0,
4428: allocated_quantity = 0,
4429: allocated_primary_uom_quantity = 0,

Line 4441: , 'JMFVSKAB :AFter Updating JMF_SHIKYU_REPLENISHMENTS:'

4437:
4438: IF FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL
4439: THEN
4440: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE
4441: , 'JMFVSKAB :AFter Updating JMF_SHIKYU_REPLENISHMENTS:'
4442: , C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID );
4443: END IF;
4444:
4445: IF l_deleted_qty > 0

Line 4499: FROM JMF_SHIKYU_REPLENISHMENTS

4495: SELECT UOM,
4496: PRIMARY_UOM
4497: INTO l_uom,
4498: l_primary_uom
4499: FROM JMF_SHIKYU_REPLENISHMENTS
4500: WHERE REPLENISHMENT_SO_LINE_ID =
4501: C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID;
4502:
4503: -- Converting the new allocable quantity of the parent SO Line

Line 4591: UPDATE JMF_SHIKYU_REPLENISHMENTS

4587: -- Need to update the allocable quantity columns of the parent
4588: -- Replenishment SO Line, since some of this quantity has been
4589: -- splitted into the child SO Lines. This needs to be done in
4590: -- order to prevent over-allocation of the parent SO Line.
4591: UPDATE JMF_SHIKYU_REPLENISHMENTS
4592: SET allocable_quantity = C_SHIKYU_REPLENISHMENT_rec.oel_ordered_quantity,
4593: allocable_primary_uom_quantity = l_primary_uom_qty,
4594: ordered_quantity = C_SHIKYU_REPLENISHMENT_rec.oel_ordered_quantity,
4595: ordered_primary_uom_quantity = l_primary_uom_qty,

Line 4605: , 'After UPDATE JMF_SHIKYU_REPLENISHMENTS for line_id :' ||

4601: IF FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL
4602: THEN
4603: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE
4604: , G_MODULE_PREFIX || l_api_name
4605: , 'After UPDATE JMF_SHIKYU_REPLENISHMENTS for line_id :' ||
4606: C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID
4607: );
4608: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE
4609: , G_MODULE_PREFIX || l_api_name

Line 4671: INSERT INTO JMF_SHIKYU_REPLENISHMENTS

4667:
4668: -- Insert ONLY if the C_child_so_lines_rec.line_id is not already
4669: -- present in the table
4670:
4671: INSERT INTO JMF_SHIKYU_REPLENISHMENTS
4672: ( REPLENISHMENT_SO_LINE_ID
4673: , REPLENISHMENT_SO_HEADER_ID
4674: , SCHEDULE_SHIP_DATE
4675: , REPLENISHMENT_PO_HEADER_ID

Line 4734: FROM JMF_SHIKYU_REPLENISHMENTS jsr

4730: , REQUEST_ID
4731: , PROGRAM_APPLICATION_ID
4732: , PROGRAM_ID
4733: , PROGRAM_UPDATE_DATE
4734: FROM JMF_SHIKYU_REPLENISHMENTS jsr
4735: WHERE REPLENISHMENT_SO_LINE_ID =
4736: C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID
4737: AND NOT EXISTS (
4738: SELECT jsr1.REPLENISHMENT_SO_LINE_ID

Line 4739: FROM JMF_SHIKYU_REPLENISHMENTS jsr1

4735: WHERE REPLENISHMENT_SO_LINE_ID =
4736: C_SHIKYU_REPLENISHMENT_rec.REPLENISHMENT_SO_LINE_ID
4737: AND NOT EXISTS (
4738: SELECT jsr1.REPLENISHMENT_SO_LINE_ID
4739: FROM JMF_SHIKYU_REPLENISHMENTS jsr1
4740: WHERE jsr1.REPLENISHMENT_SO_LINE_ID =
4741: C_child_so_lines_rec.line_id );
4742:
4743: /*AND REPLENISHMENT_SO_HEADER_ID =

Line 4912: FROM JMF_SHIKYU_REPLENISHMENTS jsr,

4908: x_allocated_primary_uom_qty,
4909: x_uom,
4910: x_primary_uom,
4911: x_replen_so_line_exists
4912: FROM JMF_SHIKYU_REPLENISHMENTS jsr,
4913: OE_ORDER_LINES_ALL oola
4914: WHERE jsr.replenishment_so_line_id = p_replen_so_line_id
4915: AND jsr.replenishment_so_line_id = oola.line_id;
4916:

Line 5011: l_tp_supplier_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_id%TYPE;

5007: l_replen_po_line_id PO_LINE_LOCATIONS_ALL.po_line_id%TYPE;
5008: --l_supplier_id PO_HEADERS_ALL.vendor_id%TYPE;
5009: --l_supplier_site_id PO_HEADERS_ALL.vendor_site_id%TYPE;
5010:
5011: l_tp_supplier_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_id%TYPE;
5012: l_tp_supplier_site_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_site_id%TYPE;
5013:
5014: -- Information computed for JMF_SHIKYU_REPLENISHMENTS
5015:

Line 5012: l_tp_supplier_site_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_site_id%TYPE;

5008: --l_supplier_id PO_HEADERS_ALL.vendor_id%TYPE;
5009: --l_supplier_site_id PO_HEADERS_ALL.vendor_site_id%TYPE;
5010:
5011: l_tp_supplier_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_id%TYPE;
5012: l_tp_supplier_site_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_site_id%TYPE;
5013:
5014: -- Information computed for JMF_SHIKYU_REPLENISHMENTS
5015:
5016: l_primary_uom_qty JMF_SHIKYU_REPLENISHMENTS.ordered_primary_uom_quantity%TYPE;

Line 5014: -- Information computed for JMF_SHIKYU_REPLENISHMENTS

5010:
5011: l_tp_supplier_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_id%TYPE;
5012: l_tp_supplier_site_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_site_id%TYPE;
5013:
5014: -- Information computed for JMF_SHIKYU_REPLENISHMENTS
5015:
5016: l_primary_uom_qty JMF_SHIKYU_REPLENISHMENTS.ordered_primary_uom_quantity%TYPE;
5017: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;
5018:

Line 5016: l_primary_uom_qty JMF_SHIKYU_REPLENISHMENTS.ordered_primary_uom_quantity%TYPE;

5012: l_tp_supplier_site_id JMF_SHIKYU_REPLENISHMENTS.tp_supplier_site_id%TYPE;
5013:
5014: -- Information computed for JMF_SHIKYU_REPLENISHMENTS
5015:
5016: l_primary_uom_qty JMF_SHIKYU_REPLENISHMENTS.ordered_primary_uom_quantity%TYPE;
5017: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;
5018:
5019: BEGIN
5020:

Line 5017: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;

5013:
5014: -- Information computed for JMF_SHIKYU_REPLENISHMENTS
5015:
5016: l_primary_uom_qty JMF_SHIKYU_REPLENISHMENTS.ordered_primary_uom_quantity%TYPE;
5017: l_primary_uom JMF_SHIKYU_REPLENISHMENTS.primary_uom%TYPE;
5018:
5019: BEGIN
5020:
5021: IF (g_fnd_debug = 'Y' AND

Line 5143: INSERT INTO JMF_SHIKYU_REPLENISHMENTS

5139: || ', l_primary_uom_qty = ' || l_primary_uom_qty
5140: );
5141: END IF;
5142:
5143: INSERT INTO JMF_SHIKYU_REPLENISHMENTS
5144: ( replenishment_so_line_id
5145: , replenishment_so_header_id
5146: , schedule_ship_date
5147: , replenishment_po_header_id

Line 5551: FROM JMF_SHIKYU_REPLENISHMENTS

5547:
5548: -- Get UOM of the Replenishment SO Line
5549: SELECT uom
5550: INTO l_replen_uom
5551: FROM JMF_SHIKYU_REPLENISHMENTS
5552: WHERE replenishment_so_line_id = p_replen_so_line_id;
5553:
5554: IF (g_fnd_debug = 'Y' AND
5555: FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE)

Line 5605: UPDATE JMF_SHIKYU_REPLENISHMENTS

5601:
5602: -- Update the allocated and allocable quantities (and their primary
5603: -- UOM counterparts) of the Replenishment SO Line that was deallocated
5604: -- from the Subcontracting Component specified by the IN parameters
5605: UPDATE JMF_SHIKYU_REPLENISHMENTS
5606: SET allocated_quantity = allocated_quantity - l_remain_qty_to_reduce,
5607: allocated_primary_uom_quantity = allocated_primary_uom_quantity - l_reduce_replen_uom_qty
5608: WHERE replenishment_so_line_id = p_replen_so_line_id;
5609:

Line 5709: from jmf_shikyu_replenishments jsr,

5705: jsr.schedule_ship_date jmf_schedule_ship_date,
5706: jsr.oem_organization_id oem_organization_id,
5707: jsr.tp_organization_id tp_organization_id,
5708: oel.schedule_ship_date om_schedule_ship_date
5709: from jmf_shikyu_replenishments jsr,
5710: oe_order_lines_all oel
5711: where oel.line_id = jsr.replenishment_so_line_id
5712: and oel.schedule_ship_date <> jsr.schedule_ship_date
5713: and oel.actual_shipment_date is null --pick up only unshipped lines. Rescheduling can only be done if the line is not shipped though.

Line 5753: update jmf_shikyu_replenishments

5749: l_line_id := so_date_change_rec.line_id;
5750:
5751: if so_date_change_rec.om_schedule_ship_date < so_date_change_rec.jmf_schedule_ship_date
5752: then
5753: update jmf_shikyu_replenishments
5754: set schedule_ship_date = so_date_change_rec.om_schedule_ship_date,
5755: last_update_date = sysdate,
5756: last_updated_by = FND_GLOBAL.user_id,
5757: last_update_login = FND_GLOBAL.login_id

Line 5921: update jmf_shikyu_replenishments

5917: null;
5918: end loop; --c_alloc_cur
5919:
5920: if l_deletion_failed = 0 then
5921: update jmf_shikyu_replenishments
5922: set schedule_ship_date = so_date_change_rec.om_schedule_ship_date,
5923: last_update_date = sysdate,
5924: last_updated_by = FND_GLOBAL.user_id,
5925: last_update_login = FND_GLOBAL.login_id