DBA Data[Home] [Help]

APPS.WIP_OSP dependencies on FND_API

Line 1604: x_return_status := fnd_api.g_ret_sts_success;

1600: x_returnStatus => l_returnStatus);
1601: END IF;
1602:
1603: SAVEPOINT s_update_po_nbd;
1604: x_return_status := fnd_api.g_ret_sts_success;
1605: -- Set OU context before calling PO API. This change is mandatory for
1606: -- MOAC change in R12.
1607: mo_global.set_policy_context('S',p_ou_id);
1608: -- Update PO need by date and promise date

Line 1628: p_init_msg_list => fnd_api.g_true,

1624: p_need_by_date => p_new_NBD);
1625:
1626: po_wip_integration_grp.update_document(
1627: p_api_version => 1.0,
1628: p_init_msg_list => fnd_api.g_true,
1629: p_changes => l_po_changes,
1630: p_run_submission_checks => fnd_api.g_true,
1631: p_launch_approvals_flag => fnd_api.g_true,
1632: p_buyer_id => NULL,

Line 1630: p_run_submission_checks => fnd_api.g_true,

1626: po_wip_integration_grp.update_document(
1627: p_api_version => 1.0,
1628: p_init_msg_list => fnd_api.g_true,
1629: p_changes => l_po_changes,
1630: p_run_submission_checks => fnd_api.g_true,
1631: p_launch_approvals_flag => fnd_api.g_true,
1632: p_buyer_id => NULL,
1633: p_update_source => NULL,
1634: p_override_date => NULL,

Line 1631: p_launch_approvals_flag => fnd_api.g_true,

1627: p_api_version => 1.0,
1628: p_init_msg_list => fnd_api.g_true,
1629: p_changes => l_po_changes,
1630: p_run_submission_checks => fnd_api.g_true,
1631: p_launch_approvals_flag => fnd_api.g_true,
1632: p_buyer_id => NULL,
1633: p_update_source => NULL,
1634: p_override_date => NULL,
1635: x_return_status => x_return_status,

Line 1638: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1634: p_override_date => NULL,
1635: x_return_status => x_return_status,
1636: x_api_errors => l_errors_rec);
1637:
1638: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1639: FOR i IN 1..l_errors_rec.message_name.count LOOP
1640: fnd_message.set_name('PO', l_errors_rec.message_name(i));
1641: fnd_msg_pub.add;
1642: END LOOP;

Line 1643: raise fnd_api.g_exc_unexpected_error;

1639: FOR i IN 1..l_errors_rec.message_name.count LOOP
1640: fnd_message.set_name('PO', l_errors_rec.message_name(i));
1641: fnd_msg_pub.add;
1642: END LOOP;
1643: raise fnd_api.g_exc_unexpected_error;
1644: END IF;
1645: ELSE -- PO in status that do not allow update
1646: fnd_message.set_name('WIP', 'WIP_INVALID_PO_STATUS');
1647: fnd_msg_pub.add;

Line 1649: raise fnd_api.g_exc_unexpected_error;

1645: ELSE -- PO in status that do not allow update
1646: fnd_message.set_name('WIP', 'WIP_INVALID_PO_STATUS');
1647: fnd_msg_pub.add;
1648: l_errMsg := 'PO is in status that does not allow update';
1649: raise fnd_api.g_exc_unexpected_error;
1650: END IF; -- Check PO status
1651: ELSIF (p_po_req_type = 'REQUISITION') THEN
1652: -- Call PO API to update requisition
1653: l_req_changes := PO_REQ_CHANGES_REC_TYPE(

Line 1678: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1674: x_return_status => x_return_status,
1675: x_msg_count => l_msgCount,
1676: x_msg_data => l_msgData);
1677:
1678: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1679: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
1680: fnd_message.set_token('MESSAGE', l_msgData);
1681: fnd_msg_pub.add;
1682: raise fnd_api.g_exc_unexpected_error;

Line 1682: raise fnd_api.g_exc_unexpected_error;

1678: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1679: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
1680: fnd_message.set_token('MESSAGE', l_msgData);
1681: fnd_msg_pub.add;
1682: raise fnd_api.g_exc_unexpected_error;
1683: END IF;
1684: END IF; -- PO or Requisition
1685: -- write to the log file
1686: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 1693: WHEN fnd_api.g_exc_unexpected_error THEN

1689: p_msg => 'procedure complete',
1690: x_returnStatus => l_returnStatus);
1691: END IF;
1692: EXCEPTION
1693: WHEN fnd_api.g_exc_unexpected_error THEN
1694: ROLLBACK TO SAVEPOINT s_update_po_nbd;
1695: x_return_status := fnd_api.g_ret_sts_unexp_error;
1696: IF (l_logLevel <= wip_constants.trace_logging) THEN
1697: wip_logger.exitPoint(p_procName => 'wip_osp.updatePOReqNBD',

Line 1695: x_return_status := fnd_api.g_ret_sts_unexp_error;

1691: END IF;
1692: EXCEPTION
1693: WHEN fnd_api.g_exc_unexpected_error THEN
1694: ROLLBACK TO SAVEPOINT s_update_po_nbd;
1695: x_return_status := fnd_api.g_ret_sts_unexp_error;
1696: IF (l_logLevel <= wip_constants.trace_logging) THEN
1697: wip_logger.exitPoint(p_procName => 'wip_osp.updatePOReqNBD',
1698: p_procReturnStatus => x_return_status,
1699: p_msg => l_errMsg,

Line 1705: x_return_status := fnd_api.g_ret_sts_unexp_error;

1701: END IF;
1702:
1703: WHEN others THEN
1704: ROLLBACK TO SAVEPOINT s_update_po_nbd;
1705: x_return_status := fnd_api.g_ret_sts_unexp_error;
1706: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1707: IF (l_logLevel <= wip_constants.trace_logging) THEN
1708: wip_logger.exitPoint(p_procName => 'wip_osp.updatePOReqNBD',
1709: p_procReturnStatus => x_return_status,

Line 2057: x_return_status := fnd_api.g_ret_sts_success;

2053: x_returnStatus => l_returnStatus);
2054: END IF;
2055:
2056: SAVEPOINT s_update_po_qty;
2057: x_return_status := fnd_api.g_ret_sts_success;
2058:
2059: IF(p_repetitive_id IS NULL) THEN
2060: -- Discrete jobs
2061: SELECT po_creation_time

Line 2096: raise fnd_api.g_exc_unexpected_error;

2092: fnd_message.set_name('WIP', 'WIP_REQUISITION_PENDING');
2093: fnd_msg_pub.add;
2094: l_errMsg := 'There are some pending records in ' ||
2095: 'PO_REQUISITIONS_INTERFACE_ALL';
2096: raise fnd_api.g_exc_unexpected_error;
2097: END IF;
2098: end if; /* if((p_is_scrap_txn = WIP_CONSTANTS.YES AND */
2099:
2100: OPEN c_multiple_po;

Line 2107: raise fnd_api.g_exc_unexpected_error;

2103: IF (c_multiple_po%FOUND) THEN
2104: fnd_message.set_name('WIP', 'WIP_MULTIPLE_PO_FOUND');
2105: fnd_msg_pub.add;
2106: l_errMsg := 'Multiple PO/requisitions found for this job/schedule';
2107: raise fnd_api.g_exc_unexpected_error;
2108: ELSE
2109: -- Update PO quantity
2110: FOR l_update_po_qty IN c_update_po_qty LOOP
2111: -- Set OU context before calling PO API. This change is

Line 2142: p_init_msg_list => fnd_api.g_true,

2138: END IF;
2139:
2140: po_wip_integration_grp.update_document(
2141: p_api_version => 1.0,
2142: p_init_msg_list => fnd_api.g_true,
2143: p_changes => l_po_changes,
2144: p_run_submission_checks => fnd_api.g_true,
2145: p_launch_approvals_flag => fnd_api.g_true,
2146: p_buyer_id => NULL,

Line 2144: p_run_submission_checks => fnd_api.g_true,

2140: po_wip_integration_grp.update_document(
2141: p_api_version => 1.0,
2142: p_init_msg_list => fnd_api.g_true,
2143: p_changes => l_po_changes,
2144: p_run_submission_checks => fnd_api.g_true,
2145: p_launch_approvals_flag => fnd_api.g_true,
2146: p_buyer_id => NULL,
2147: p_update_source => NULL,
2148: p_override_date => NULL,

Line 2145: p_launch_approvals_flag => fnd_api.g_true,

2141: p_api_version => 1.0,
2142: p_init_msg_list => fnd_api.g_true,
2143: p_changes => l_po_changes,
2144: p_run_submission_checks => fnd_api.g_true,
2145: p_launch_approvals_flag => fnd_api.g_true,
2146: p_buyer_id => NULL,
2147: p_update_source => NULL,
2148: p_override_date => NULL,
2149: x_return_status => x_return_status,

Line 2152: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

2148: p_override_date => NULL,
2149: x_return_status => x_return_status,
2150: x_api_errors => l_errors_rec);
2151:
2152: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2153: FOR i IN 1..l_errors_rec.message_name.count LOOP
2154: fnd_message.set_name('PO', l_errors_rec.message_name(i));
2155: fnd_msg_pub.add;
2156: END LOOP;

Line 2157: raise fnd_api.g_exc_unexpected_error;

2153: FOR i IN 1..l_errors_rec.message_name.count LOOP
2154: fnd_message.set_name('PO', l_errors_rec.message_name(i));
2155: fnd_msg_pub.add;
2156: END LOOP;
2157: raise fnd_api.g_exc_unexpected_error;
2158: END IF;
2159: ELSE -- PO is in the status that does not allow update
2160: fnd_message.set_name('WIP', 'WIP_INVALID_PO_STATUS');
2161: fnd_msg_pub.add;

Line 2163: raise fnd_api.g_exc_unexpected_error;

2159: ELSE -- PO is in the status that does not allow update
2160: fnd_message.set_name('WIP', 'WIP_INVALID_PO_STATUS');
2161: fnd_msg_pub.add;
2162: l_errMsg := 'PO is in status that does not allow update';
2163: raise fnd_api.g_exc_unexpected_error;
2164: END IF; -- Check PO status
2165: ELSIF (l_update_po_qty.po_req_type = 'REQUISITION') THEN
2166: -- Call PO API to update QUANTITY in PO_REQUISITION_LINES_ALL.
2167: l_req_changes := PO_REQ_CHANGES_REC_TYPE(

Line 2201: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

2197: x_return_status => x_return_status,
2198: x_msg_count => l_msgCount,
2199: x_msg_data => l_msgData);
2200:
2201: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2202: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
2203: fnd_message.set_token('MESSAGE', l_msgData);
2204: fnd_msg_pub.add;
2205: raise fnd_api.g_exc_unexpected_error;

Line 2205: raise fnd_api.g_exc_unexpected_error;

2201: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2202: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
2203: fnd_message.set_token('MESSAGE', l_msgData);
2204: fnd_msg_pub.add;
2205: raise fnd_api.g_exc_unexpected_error;
2206: END IF;
2207: END IF; -- PO or Requisition
2208: END LOOP;
2209: END IF;-- Multiple PO found for the same job,same item,and same op.

Line 2224: WHEN fnd_api.g_exc_unexpected_error THEN

2220: p_msg => 'procedure complete',
2221: x_returnStatus => l_returnStatus);
2222: END IF;
2223: EXCEPTION
2224: WHEN fnd_api.g_exc_unexpected_error THEN
2225: ROLLBACK TO SAVEPOINT s_update_po_qty;
2226: IF(c_multiple_po%ISOPEN) THEN
2227: CLOSE c_multiple_po;
2228: END IF;

Line 2229: x_return_status := fnd_api.g_ret_sts_unexp_error;

2225: ROLLBACK TO SAVEPOINT s_update_po_qty;
2226: IF(c_multiple_po%ISOPEN) THEN
2227: CLOSE c_multiple_po;
2228: END IF;
2229: x_return_status := fnd_api.g_ret_sts_unexp_error;
2230: IF (l_logLevel <= wip_constants.trace_logging) THEN
2231: wip_logger.exitPoint(p_procName => 'wip_osp.updatePOReqQuantity',
2232: p_procReturnStatus => x_return_status,
2233: p_msg => l_errMsg,

Line 2242: x_return_status := fnd_api.g_ret_sts_unexp_error;

2238: ROLLBACK TO SAVEPOINT s_update_po_qty;
2239: IF(c_multiple_po%ISOPEN) THEN
2240: CLOSE c_multiple_po;
2241: END IF;
2242: x_return_status := fnd_api.g_ret_sts_unexp_error;
2243: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2244: IF (l_logLevel <= wip_constants.trace_logging) THEN
2245: wip_logger.exitPoint(p_procName => 'wip_osp.updatePOReqQuantity',
2246: p_procReturnStatus => x_return_status,

Line 2429: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

2425: x_return_status => x_return_status,
2426: x_msg_count => l_msgCount,
2427: x_msg_data => l_msgData);
2428:
2429: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2430: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
2431: fnd_message.set_token('MESSAGE', l_msgData);
2432: fnd_msg_pub.add;
2433: raise fnd_api.g_exc_unexpected_error;

Line 2433: raise fnd_api.g_exc_unexpected_error;

2429: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2430: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
2431: fnd_message.set_token('MESSAGE', l_msgData);
2432: fnd_msg_pub.add;
2433: raise fnd_api.g_exc_unexpected_error;
2434: END IF;
2435: ELSE
2436: IF (l_logLevel <= wip_constants.full_logging) THEN
2437: l_debugMsg := 'req_header_id = ' || l_po_req.req_header_id|| ' ; '

Line 2455: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

2451: x_return_status => x_return_status,
2452: x_msg_count => l_msgCount,
2453: x_msg_data => l_msgData);
2454:
2455: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2456: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
2457: fnd_message.set_token('MESSAGE', l_msgData);
2458: fnd_msg_pub.add;
2459: raise fnd_api.g_exc_unexpected_error;

Line 2459: raise fnd_api.g_exc_unexpected_error;

2455: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2456: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
2457: fnd_message.set_token('MESSAGE', l_msgData);
2458: fnd_msg_pub.add;
2459: raise fnd_api.g_exc_unexpected_error;
2460: END IF;
2461: END IF;
2462: EXCEPTION
2463: WHEN others THEN

Line 2469: x_return_status := fnd_api.g_ret_sts_unexp_error;

2465: END;
2466: END LOOP;
2467:
2468: IF (l_err_count > 0) THEN
2469: x_return_status := fnd_api.g_ret_sts_unexp_error;
2470: fnd_message.set_name('WIP','WIP_UNABLE_TO_CANCEL_PO');
2471: fnd_msg_pub.add;
2472: ELSE
2473: SELECT count(*)

Line 2480: x_return_status := fnd_api.g_ret_sts_unexp_error;

2476: WHERE wip_entity_id = p_job_id;
2477: IF(l_pending_recs <> 0) THEN
2478: fnd_message.set_name('WIP', 'WIP_REQUISITION_PENDING');
2479: fnd_msg_pub.add;
2480: x_return_status := fnd_api.g_ret_sts_unexp_error;
2481: ELSE
2482: x_return_status := fnd_api.g_ret_sts_success;
2483: END IF;
2484: END IF;

Line 2482: x_return_status := fnd_api.g_ret_sts_success;

2478: fnd_message.set_name('WIP', 'WIP_REQUISITION_PENDING');
2479: fnd_msg_pub.add;
2480: x_return_status := fnd_api.g_ret_sts_unexp_error;
2481: ELSE
2482: x_return_status := fnd_api.g_ret_sts_success;
2483: END IF;
2484: END IF;
2485: -- write to the log file
2486: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 2494: x_return_status := fnd_api.g_ret_sts_unexp_error;

2490: x_returnStatus => l_returnStatus);
2491: END IF;
2492: EXCEPTION
2493: WHEN others THEN
2494: x_return_status := fnd_api.g_ret_sts_unexp_error;
2495: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2496: IF (l_logLevel <= wip_constants.trace_logging) THEN
2497: wip_logger.exitPoint(p_procName => 'wip_osp.cancelPOReq',
2498: p_procReturnStatus => x_return_status,