DBA Data[Home] [Help]

APPS.PO_NEGOTIATIONS4_PVT dependencies on MTL_SUPPLY

Line 1366: -- mtl_supply entries for old req lines. Second for

1362:
1363: --
1364: --
1365: -- SQL What: Doing two bulk statements. One to delete from
1366: -- mtl_supply entries for old req lines. Second for
1367: -- inserting into mtl_supply newly created lines
1368: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of
1369: -- req-split
1370: --

Line 1367: -- inserting into mtl_supply newly created lines

1363: --
1364: --
1365: -- SQL What: Doing two bulk statements. One to delete from
1366: -- mtl_supply entries for old req lines. Second for
1367: -- inserting into mtl_supply newly created lines
1368: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of
1369: -- req-split
1370: --
1371: -- Mark exclude_from_planning as 'Y' for CLM Documents

Line 1368: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of

1364: --
1365: -- SQL What: Doing two bulk statements. One to delete from
1366: -- mtl_supply entries for old req lines. Second for
1367: -- inserting into mtl_supply newly created lines
1368: -- SQL Why : To take care of update to MTL_SUPPLY tables in case of
1369: -- req-split
1370: --
1371: -- Mark exclude_from_planning as 'Y' for CLM Documents
1372: --

Line 1379: 'Before: Update MTL_SUPPLY');

1375: l_progress :='145';
1376: l_module := G_MODULE_PREFIX||l_api_name||'.'||'145'||'.';
1377: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1378: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1379: 'Before: Update MTL_SUPPLY');
1380: END IF;
1381:
1382: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT
1383: -- Insert New Supply for each new Line created by the Reqsplit

Line 1382: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT

1378: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1379: 'Before: Update MTL_SUPPLY');
1380: END IF;
1381:
1382: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT
1383: -- Insert New Supply for each new Line created by the Reqsplit
1384: INSERT INTO mtl_supply(supply_type_code,
1385: supply_source_id,
1386: last_updated_by,

Line 1384: INSERT INTO mtl_supply(supply_type_code,

1380: END IF;
1381:
1382: FORALL l_update_mtl_supply_index in 1.. new_req_line_id_rslt_tbl.COUNT
1383: -- Insert New Supply for each new Line created by the Reqsplit
1384: INSERT INTO mtl_supply(supply_type_code,
1385: supply_source_id,
1386: last_updated_by,
1387: last_update_date,
1388: last_update_login,

Line 1444: new_req_line_id_rslt_tbl(l_update_mtl_supply_index)

1440: DECODE(PO_CLM_INTG_GRP.IS_CLM_DOCUMENT('REQUISITION',prl.Requisition_header_id),'Y','Y','N',NULL,NULL) --
1441: FROM po_requisition_lines_all prl, --
1442: mtl_system_items msi
1443: WHERE prl.requisition_line_id =
1444: new_req_line_id_rslt_tbl(l_update_mtl_supply_index)
1445: AND prl.destination_organization_id = msi.organization_id(+)
1446: AND prl.item_id = msi.inventory_item_id(+)
1447: AND EXISTS
1448: (select 'Supply Exists'

Line 1449: from mtl_supply

1445: AND prl.destination_organization_id = msi.organization_id(+)
1446: AND prl.item_id = msi.inventory_item_id(+)
1447: AND EXISTS
1448: (select 'Supply Exists'
1449: from mtl_supply
1450: where supply_type_code = 'REQ'
1451: AND supply_source_id =
1452: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1453:

Line 1452: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));

1448: (select 'Supply Exists'
1449: from mtl_supply
1450: where supply_type_code = 'REQ'
1451: AND supply_source_id =
1452: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1453:
1454: --Delete the entry in mtl_supply for original req line
1455: FORALL l_delete_mtl_supply_index in
1456: 1.. requisition_line_id_rslt_tbl.COUNT

Line 1454: --Delete the entry in mtl_supply for original req line

1450: where supply_type_code = 'REQ'
1451: AND supply_source_id =
1452: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1453:
1454: --Delete the entry in mtl_supply for original req line
1455: FORALL l_delete_mtl_supply_index in
1456: 1.. requisition_line_id_rslt_tbl.COUNT
1457: DELETE FROM mtl_supply
1458: WHERE supply_type_code = 'REQ'

Line 1455: FORALL l_delete_mtl_supply_index in

1451: AND supply_source_id =
1452: requisition_line_id_rslt_tbl(l_update_mtl_supply_index));
1453:
1454: --Delete the entry in mtl_supply for original req line
1455: FORALL l_delete_mtl_supply_index in
1456: 1.. requisition_line_id_rslt_tbl.COUNT
1457: DELETE FROM mtl_supply
1458: WHERE supply_type_code = 'REQ'
1459: AND supply_source_id =

Line 1457: DELETE FROM mtl_supply

1453:
1454: --Delete the entry in mtl_supply for original req line
1455: FORALL l_delete_mtl_supply_index in
1456: 1.. requisition_line_id_rslt_tbl.COUNT
1457: DELETE FROM mtl_supply
1458: WHERE supply_type_code = 'REQ'
1459: AND supply_source_id =
1460: requisition_line_id_rslt_tbl(l_delete_mtl_supply_index);
1461:

Line 1460: requisition_line_id_rslt_tbl(l_delete_mtl_supply_index);

1456: 1.. requisition_line_id_rslt_tbl.COUNT
1457: DELETE FROM mtl_supply
1458: WHERE supply_type_code = 'REQ'
1459: AND supply_source_id =
1460: requisition_line_id_rslt_tbl(l_delete_mtl_supply_index);
1461:
1462: l_progress :='146';
1463: l_module := G_MODULE_PREFIX||l_api_name||'.'||'146'||'.';
1464: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 1466: 'After: Update MTL_SUPPLY;Updated'

1462: l_progress :='146';
1463: l_module := G_MODULE_PREFIX||l_api_name||'.'||'146'||'.';
1464: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1465: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1466: 'After: Update MTL_SUPPLY;Updated'
1467: ||sql%rowcount||' requisition lines ');
1468: END IF;
1469:
1470: EXCEPTION

Line 1479: 'Exception: Update MTL_SUPPLY');

1475: sqlcode);
1476: FND_MSG_PUB.Add;
1477: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1478: FND_LOG.string(FND_LOG.LEVEL_STATEMENT, l_module,
1479: 'Exception: Update MTL_SUPPLY');
1480: END IF;
1481: RAISE;
1482:
1483: END;