DBA Data[Home] [Help]

APPS.CSP_PARTS_ORDER dependencies on CSP_PARTS_ORDER

Line 1: PACKAGE BODY CSP_PARTS_ORDER AS

1: PACKAGE BODY CSP_PARTS_ORDER AS
2: /* $Header: cspvpodb.pls 120.17.12010000.6 2008/12/24 07:40:59 htank ship $ */
3:
4: --
5: -- Purpose: Create/Update/Cancel Internal Parts Order for Spares

Line 12: G_PKG_NAME CONSTANT VARCHAR2(30) := 'csp_parts_order';

8: -- Person Date Comments
9: -- --------- ------ ------------------------------------------
10: -- phegde 05/01/01 Created new package body
11:
12: G_PKG_NAME CONSTANT VARCHAR2(30) := 'csp_parts_order';
13: G_FILE_NAME CONSTANT VARCHAR2(30) := 'cspvpodb.pls';
14:
15: -- This procedure is to get the Unit Price for Internal Requisition
16: -- If the Currency Code is same for both Source and Destination Organization

Line 1017: l_dist_Rec csp_parts_order.req_dist_rec_type;

1013:
1014: l_header_rec csp_parts_requirement.header_rec_type;
1015: l_line_rec csp_parts_requirement.line_rec_type;
1016: l_line_tbl csp_parts_requirement.Line_tbl_type;
1017: l_dist_Rec csp_parts_order.req_dist_rec_type;
1018:
1019: l_transferred_to_oe_flag VARCHAR2(1) := 'Y';
1020: l_msg varchar2(2000);
1021: -- Record and table types for oe process_order

Line 1255: 'csp.plsql.csp_parts_order.process_order',

1251: BEGIN
1252:
1253: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1254: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1255: 'csp.plsql.csp_parts_order.process_order',
1256: 'Begin');
1257: end if;
1258:
1259: SAVEPOINT Process_Order_PUB;

Line 1285: IF (l_line_Tbl.count <= 0 AND l_header_rec.operation <> CSP_PARTS_ORDER.G_OPR_CANCEL) THEN

1281:
1282: l_header_rec := px_header_rec;
1283: l_line_tbl := px_line_table;
1284:
1285: IF (l_line_Tbl.count <= 0 AND l_header_rec.operation <> CSP_PARTS_ORDER.G_OPR_CANCEL) THEN
1286: return;
1287: END IF;
1288:
1289: -- get all the values required to insert into po_requisition_header table

Line 1303: 'csp.plsql.csp_parts_order.process_order',

1299: po_moac_utils_pvt.set_org_context(l_org_id);
1300:
1301: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1302: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1303: 'csp.plsql.csp_parts_order.process_order',
1304: 'Setting org context for l_org_id = ' || l_org_id);
1305: end if;
1306:
1307: EXCEPTION

Line 1320: 'csp.plsql.csp_parts_order.process_order',

1316: CLOSE set_of_books_cur;
1317:
1318: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1319: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1320: 'csp.plsql.csp_parts_order.process_order',
1321: 'l_header_rec.operation = ' || l_header_rec.operation);
1322: end if;
1323:
1324: IF (l_header_rec.operation = CSP_PARTS_ORDER.G_OPR_CANCEL) THEN

Line 1324: IF (l_header_rec.operation = CSP_PARTS_ORDER.G_OPR_CANCEL) THEN

1320: 'csp.plsql.csp_parts_order.process_order',
1321: 'l_header_rec.operation = ' || l_header_rec.operation);
1322: end if;
1323:
1324: IF (l_header_rec.operation = CSP_PARTS_ORDER.G_OPR_CANCEL) THEN
1325: Cancel_Order( p_header_rec => l_header_rec,
1326: p_line_table => l_line_tbl,
1327: p_process_type => p_process_type,
1328: x_return_status => l_return_status,

Line 1340: 'csp.plsql.csp_parts_order.process_order',

1336: ELSE
1337:
1338: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1339: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1340: 'csp.plsql.csp_parts_order.process_order',
1341: 'p_process_Type = ' || p_process_Type);
1342: end if;
1343:
1344: IF (p_process_Type = 'BOTH' or p_process_type = 'ORDER') THEN

Line 1354: 'csp.plsql.csp_parts_order.process_order',

1350: CLOSE address_type_cur;
1351:
1352: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1353: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1354: 'csp.plsql.csp_parts_order.process_order',
1355: 'l_address_type = ' || l_address_type
1356: || ', l_ship_to_location_id = ' || l_ship_to_location_id
1357: || ', l_resource_id = ' || l_resource_id
1358: || ', l_resource_type = ' || l_resource_type);

Line 1466: 'csp.plsql.csp_parts_order.process_order',

1462: END IF;
1463:
1464: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1465: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1466: 'csp.plsql.csp_parts_order.process_order',
1467: 'l_header_rec.requisition_header_id = ' || l_header_rec.requisition_header_id
1468: || ', l_header_rec.requisition_number = ' || l_header_rec.requisition_number);
1469: end if;
1470:

Line 1503: 'csp.plsql.csp_parts_order.process_order',

1499: END;
1500:
1501: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1502: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1503: 'csp.plsql.csp_parts_order.process_order',
1504: 'Inserting data into PO_REQUISITION_HEADERS');
1505: end if;
1506:
1507: -- create approved requisition headers

Line 1618: 'csp.plsql.csp_parts_order.process_order',

1614: );
1615:
1616: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1617: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1618: 'csp.plsql.csp_parts_order.process_order',
1619: 'Inserting data into PO_ACTION_HISTORY');
1620: end if;
1621:
1622: -- insert 2 lines of history, one for SUBMIT and one for APPROVE

Line 1668: 'csp.plsql.csp_parts_order.process_order',

1664: '' );
1665:
1666: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1667: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1668: 'csp.plsql.csp_parts_order.process_order',
1669: 'Inserting data into PO_ACTION_HISTORY');
1670: end if;
1671:
1672: INSERT into PO_ACTION_HISTORY

Line 1734: 'csp.plsql.csp_parts_order.process_order',

1730: END;
1731:
1732: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1733: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1734: 'csp.plsql.csp_parts_order.process_order',
1735: 'l_org_id = ' || l_org_id
1736: || ', l_source_operating_unit = ' || l_source_operating_unit);
1737: end if;
1738:

Line 1756: 'csp.plsql.csp_parts_order.process_order',

1752: END IF;
1753:
1754: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1755: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1756: 'csp.plsql.csp_parts_order.process_order',
1757: 'l_header_rec.order_type_id = ' || l_header_rec.order_type_id);
1758: end if;
1759:
1760: -- get all required information for passing to process_orders

Line 1790: 'csp.plsql.csp_parts_order.process_order',

1786: END;
1787:
1788: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1789: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1790: 'csp.plsql.csp_parts_order.process_order',
1791: 'l_price_list_id = ' || l_price_list_id
1792: || ', l_currency_code = ' || l_currency_code
1793: || ', l_order_line_type_id = ' || l_order_line_type_id
1794: || ', l_line_price_list_id = ' || l_line_price_list_id

Line 1819: 'csp.plsql.csp_parts_order.process_order',

1815: END IF;
1816:
1817: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1818: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1819: 'csp.plsql.csp_parts_order.process_order',
1820: 'l_currency_code = ' || l_currency_code);
1821: end if;
1822:
1823: -- get customer and ship to site

Line 1830: 'csp.plsql.csp_parts_order.process_order',

1826: CLOSE cust_site_cur;
1827:
1828: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1829: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1830: 'csp.plsql.csp_parts_order.process_order',
1831: 'l_customer_id = ' || l_customer_id
1832: || ', l_site_use_id = ' || l_site_use_id
1833: || ', l_cust_acct_id = ' || l_cust_acct_id);
1834: end if;

Line 1846: 'csp.plsql.csp_parts_order.process_order',

1842: END IF;
1843:
1844: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1845: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1846: 'csp.plsql.csp_parts_order.process_order',
1847: 'l_header_rec.order_header_id = ' || l_header_rec.order_header_id);
1848: end if;
1849:
1850: -- Required attributes (e.g. Order Type and Customer)

Line 1965: 'csp.plsql.csp_parts_order.process_order',

1961: CLOSE unit_of_measure_cur;
1962:
1963: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1964: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1965: 'csp.plsql.csp_parts_order.process_order',
1966: 'Getting Unit Price...');
1967: end if;
1968:
1969: /* Get Unit Price and Currency Code*/

Line 1981: 'csp.plsql.csp_parts_order.process_order',

1977: ,l_item_cost );
1978:
1979: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
1980: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
1981: 'csp.plsql.csp_parts_order.process_order',
1982: 'Inserting data into PO_REQUISITION_LINES...');
1983: end if;
1984:
1985: -- insert into po_requisition_lines table

Line 2087: 'csp.plsql.csp_parts_order.process_order',

2083: l_line_Tbl(i).dest_subinventory);
2084:
2085: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2086: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2087: 'csp.plsql.csp_parts_order.process_order',
2088: 'Checking Valid Account Id...');
2089: end if;
2090:
2091:

Line 2153: 'csp.plsql.csp_parts_order.process_order',

2149: END IF;
2150:
2151: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2152: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2153: 'csp.plsql.csp_parts_order.process_order',
2154: 'Inserting data into po_req_distributions ...');
2155: end if;
2156:
2157: -- create po_req_distributions

Line 2307: 'csp.plsql.csp_parts_order.process_order',

2303: END IF;
2304:
2305: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2306: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2307: 'csp.plsql.csp_parts_order.process_order',
2308: 'l_line_tbl(i).order_line_id ('
2309: || to_char(i) || ') = ' || l_line_tbl(i).order_line_id);
2310: end if;
2311:

Line 2362: ELSIF (l_header_rec.operation = CSP_PARTS_ORDER.G_OPR_UPDATE) THEN

2358: l_oe_line_rec.booked_flag := l_line_tbl(i).booked_Flag; --N;
2359: l_oe_line_rec.operation := OE_GLOBALS.G_OPR_CREATE;
2360: END IF;
2361:
2362: ELSIF (l_header_rec.operation = CSP_PARTS_ORDER.G_OPR_UPDATE) THEN
2363: IF (p_process_Type = 'REQUISITION') THEN
2364: IF (l_line_Tbl(I).requisition_line_id IS NULL) THEN
2365: FND_MESSAGE.SET_NAME ('CSP', 'CSP_MISSING_PARAMETERS');
2366: FND_MESSAGE.SET_TOKEN ('PARAMETER', 'l_line_rec.requisition_line_id', FALSE);

Line 2454: 'csp.plsql.csp_parts_order.process_order',

2450: BEGIN
2451:
2452: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2453: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2454: 'csp.plsql.csp_parts_order.process_order',
2455: 'Deleting record from mtl_supply...');
2456: end if;
2457:
2458: DELETE FROM mtl_supply ms1

Line 2473: 'csp.plsql.csp_parts_order.process_order',

2469: AND ms1.supply_type_code = 'REQ';
2470:
2471: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2472: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2473: 'csp.plsql.csp_parts_order.process_order',
2474: 'Inserting data into mtl_supply...');
2475: end if;
2476:
2477: INSERT INTO mtl_supply

Line 2572: 'csp.plsql.csp_parts_order.process_order',

2568: CLOSE get_new_context;
2569:
2570: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2571: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2572: 'csp.plsql.csp_parts_order.process_order',
2573: 'new_user_id = ' || new_user_id
2574: || ', new_resp_id = ' || new_resp_id
2575: || ', new_resp_appl_id = ' || new_resp_appl_id);
2576: end if;

Line 2602: 'csp.plsql.csp_parts_order.process_order',

2598: l_oe_control_rec.default_Attributes := TRUE;
2599:
2600: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2601: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2602: 'csp.plsql.csp_parts_order.process_order',
2603: 'Now finally calling OE_Order_PUB.Process_Order for operation = '
2604: || l_oe_header_rec.operation);
2605: end if;
2606:

Line 2706: 'csp.plsql.csp_parts_order.process_order',

2702: x_return_status := FND_API.G_RET_STS_ERROR;
2703:
2704: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
2705: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
2706: 'csp.plsql.csp_parts_order.process_order',
2707: 'Error in OE_Order_PUB.Process_Order API... Message = '
2708: || l_msg);
2709: end if;
2710: