330:
331: l_offset_days NUMBER;
332:
333: BEGIN
334: x_return_status := FND_API.G_RET_STS_SUCCESS;
335:
336: if p_source_type = 3 then -- external req
337:
338: -- rkaza. Need to consider post process lead time only for
379: END IF;
380:
381: EXCEPTION
382:
383: when FND_API.G_EXC_ERROR THEN
384: IF PG_DEBUG <> 0 THEN
385: oe_debug_pub.add('get_need_by_date: ' || 'expected error: ' || sqlerrm, 1);
386: END IF;
387: x_return_status := FND_API.G_RET_STS_ERROR;
383: when FND_API.G_EXC_ERROR THEN
384: IF PG_DEBUG <> 0 THEN
385: oe_debug_pub.add('get_need_by_date: ' || 'expected error: ' || sqlerrm, 1);
386: END IF;
387: x_return_status := FND_API.G_RET_STS_ERROR;
388:
389: when FND_API.G_EXC_UNEXPECTED_ERROR then
390: IF PG_DEBUG <> 0 THEN
391: oe_debug_pub.add('get_need_by_date: ' || 'unexpected error: ' || sqlerrm, 1);
385: oe_debug_pub.add('get_need_by_date: ' || 'expected error: ' || sqlerrm, 1);
386: END IF;
387: x_return_status := FND_API.G_RET_STS_ERROR;
388:
389: when FND_API.G_EXC_UNEXPECTED_ERROR then
390: IF PG_DEBUG <> 0 THEN
391: oe_debug_pub.add('get_need_by_date: ' || 'unexpected error: ' || sqlerrm, 1);
392: END IF;
393: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
389: when FND_API.G_EXC_UNEXPECTED_ERROR then
390: IF PG_DEBUG <> 0 THEN
391: oe_debug_pub.add('get_need_by_date: ' || 'unexpected error: ' || sqlerrm, 1);
392: END IF;
393: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
394:
395: when others then
396: IF PG_DEBUG <> 0 THEN
397: oe_debug_pub.add('get_need_by_date: ' || 'exception others: ' || sqlerrm, 1);
395: when others then
396: IF PG_DEBUG <> 0 THEN
397: oe_debug_pub.add('get_need_by_date: ' || 'exception others: ' || sqlerrm, 1);
398: END IF;
399: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
400:
401: END get_need_by_date;
402:
403: --Bugfix 13500057: Adding a new function
697: p_organization_id,
698: p_offset_days,
699: x_return_status);
700:
701: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
702: oe_debug_pub.add ('Failed to load the lines into GTT.');
703: raise FND_API.G_EXC_ERROR;
704: end if;
705:
699: x_return_status);
700:
701: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
702: oe_debug_pub.add ('Failed to load the lines into GTT.');
703: raise FND_API.G_EXC_ERROR;
704: end if;
705:
706: -- set the return status.
707: x_return_status := FND_API.G_RET_STS_SUCCESS ;
703: raise FND_API.G_EXC_ERROR;
704: end if;
705:
706: -- set the return status.
707: x_return_status := FND_API.G_RET_STS_SUCCESS ;
708:
709: -- Set the return code to success
710: RETCODE := 0;
711:
862:
863:
864: /* begin bug fix 3590305 / 3599860 */
865:
866: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
867:
868: -- rkaza. 05/06/2005. Honoring create req type parameter.
869: -- All the ineligible lines will not be processed further.
870: -- A line is ineligible if it is make or multiple sources
959: ,x_return_status => x_Return_Status
960: ,x_msg_count => x_Msg_Count
961: ,x_msg_data => x_Msg_Data );
962:
963: IF x_return_status <> FND_API.G_RET_STS_SUCCESS Then
964: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'Error in the set_created_by_context',1);
965: RETCODE := 1;
966: rollback to begin_line;
967: update_bcolt_line_status(line_id_tab(tab_index), 3, x_return_status);
991: x_return_status => v_x_hold_return_status,
992: x_msg_count => v_x_error_msg_count,
993: x_msg_data => v_x_error_msg);
994:
995: IF (v_x_hold_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
996: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'Failed in Check Hold ' || v_x_hold_return_status, 1);
997: RETCODE := 1;
998: rollback to begin_line;
999: update_bcolt_line_status(line_id_tab(tab_index).line_id, 3, x_return_status); --7559710
1004: IF PG_DEBUG <> 0 THEN
1005: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'Success in Check Hold ' || v_x_hold_return_status, 1);
1006: END IF;
1007:
1008: IF (v_x_hold_result_out = FND_API.G_TRUE) THEN
1009:
1010: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'Order Line ID ' || to_char(so_line.line_id )|| 'is on HOLD. ' ||v_x_hold_result_out,1);
1011: fnd_message.set_name('BOM', 'CTO_ORDER_LINE_ON_HOLD');
1012: oe_msg_pub.add;
1034: p_schedule_ship_date => so_line.schedule_ship_date,
1035: x_need_by_date => l_need_by_date,
1036: x_return_status => x_return_status);
1037:
1038: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1039: IF PG_DEBUG <> 0 THEN
1040: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'success from get_need_by_date' || ' l_need_by_date=' || l_need_by_date, 5);
1041: END IF;
1042: elsif x_return_status = FND_API.G_RET_STS_ERROR THEN
1038: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1039: IF PG_DEBUG <> 0 THEN
1040: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'success from get_need_by_date' || ' l_need_by_date=' || l_need_by_date, 5);
1041: END IF;
1042: elsif x_return_status = FND_API.G_RET_STS_ERROR THEN
1043: IF PG_DEBUG <> 0 THEN
1044: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'expected error in get_need_by_date', 5);
1045: END IF;
1046: raise fnd_api.g_exc_error;
1042: elsif x_return_status = FND_API.G_RET_STS_ERROR THEN
1043: IF PG_DEBUG <> 0 THEN
1044: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'expected error in get_need_by_date', 5);
1045: END IF;
1046: raise fnd_api.g_exc_error;
1047: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1048: IF PG_DEBUG <> 0 THEN
1049: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'unexpected error in get_need_by_date', 5);
1050: END IF;
1043: IF PG_DEBUG <> 0 THEN
1044: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'expected error in get_need_by_date', 5);
1045: END IF;
1046: raise fnd_api.g_exc_error;
1047: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1048: IF PG_DEBUG <> 0 THEN
1049: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'unexpected error in get_need_by_date', 5);
1050: END IF;
1051: raise fnd_api.g_exc_unexpected_error;
1047: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1048: IF PG_DEBUG <> 0 THEN
1049: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'unexpected error in get_need_by_date', 5);
1050: END IF;
1051: raise fnd_api.g_exc_unexpected_error;
1052: END IF;
1053:
1054: IF PG_DEBUG <> 0 THEN
1055: oe_debug_pub.add('Need by date: '|| l_need_by_date, 1);
1087: so_line.order_number,
1088: l_req_input_data, -- req_interface_input_data
1089: x_return_status );
1090:
1091: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1092: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'populate_req_interface failed with status '|| x_return_status,1);
1093: RETCODE := 1;
1094: rollback to begin_line;
1095: update_bcolt_line_status(line_id_tab(tab_index).line_id, 3, x_return_status); --7559710
1276:
1277: -- removed pg_debug check since messages need to be printed irrespective
1278: -- of debug level.
1279: EXCEPTION
1280: WHEN FND_API.G_EXC_ERROR THEN
1281: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'AUTO_CREATE_PUR_REQ_CR::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
1282: rollback to begin_line; --bug fix 3590305/3599860
1283: x_return_status := FND_API.G_RET_STS_ERROR;
1284: RETCODE := 2;
1279: EXCEPTION
1280: WHEN FND_API.G_EXC_ERROR THEN
1281: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'AUTO_CREATE_PUR_REQ_CR::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
1282: rollback to begin_line; --bug fix 3590305/3599860
1283: x_return_status := FND_API.G_RET_STS_ERROR;
1284: RETCODE := 2;
1285: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
1286:
1287: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1283: x_return_status := FND_API.G_RET_STS_ERROR;
1284: RETCODE := 2;
1285: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
1286:
1287: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1288: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'AUTO_CREATE_PUR_REQ_CR::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
1289: rollback to begin_line; --bug fix 3590305/3599860
1290: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1291: RETCODE := 2;
1286:
1287: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1288: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'AUTO_CREATE_PUR_REQ_CR::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
1289: rollback to begin_line; --bug fix 3590305/3599860
1290: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1291: RETCODE := 2;
1292: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
1293:
1294: WHEN OTHERS THEN
1293:
1294: WHEN OTHERS THEN
1295: oe_debug_pub.add('auto_create_pur_req_cr: ' || 'AUTO_CREATE_PUR_REQ_CR::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
1296: rollback to begin_line; --bug fix 3590305/3599860
1297: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1298: RETCODE := 2;
1299: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
1300:
1301: END auto_create_pur_req_cr;
1335: );
1336:
1337: Begin
1338:
1339: x_return_status := FND_API.G_RET_STS_SUCCESS;
1340:
1341: -- get the location_id from hr_organization_units.
1342:
1343: if p_source_type = 1 then
1383: When no_data_found THEN
1384: IF PG_DEBUG <> 0 THEN
1385: oe_debug_pub.add('get_deliver_to_location_id: ' || 'exception No location_id found', 1);
1386: END IF;
1387: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1388:
1389: when FND_API.G_EXC_ERROR THEN
1390: IF PG_DEBUG <> 0 THEN
1391: oe_debug_pub.add('get_deliver_to_location_id: ' || 'expected error: ' || sqlerrm, 1);
1385: oe_debug_pub.add('get_deliver_to_location_id: ' || 'exception No location_id found', 1);
1386: END IF;
1387: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1388:
1389: when FND_API.G_EXC_ERROR THEN
1390: IF PG_DEBUG <> 0 THEN
1391: oe_debug_pub.add('get_deliver_to_location_id: ' || 'expected error: ' || sqlerrm, 1);
1392: END IF;
1393: x_return_status := FND_API.G_RET_STS_ERROR;
1389: when FND_API.G_EXC_ERROR THEN
1390: IF PG_DEBUG <> 0 THEN
1391: oe_debug_pub.add('get_deliver_to_location_id: ' || 'expected error: ' || sqlerrm, 1);
1392: END IF;
1393: x_return_status := FND_API.G_RET_STS_ERROR;
1394:
1395: when FND_API.G_EXC_UNEXPECTED_ERROR then
1396: IF PG_DEBUG <> 0 THEN
1397: oe_debug_pub.add('get_deliver_to_location_id: ' || 'unexpected error: ' || sqlerrm, 1);
1391: oe_debug_pub.add('get_deliver_to_location_id: ' || 'expected error: ' || sqlerrm, 1);
1392: END IF;
1393: x_return_status := FND_API.G_RET_STS_ERROR;
1394:
1395: when FND_API.G_EXC_UNEXPECTED_ERROR then
1396: IF PG_DEBUG <> 0 THEN
1397: oe_debug_pub.add('get_deliver_to_location_id: ' || 'unexpected error: ' || sqlerrm, 1);
1398: END IF;
1399: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1395: when FND_API.G_EXC_UNEXPECTED_ERROR then
1396: IF PG_DEBUG <> 0 THEN
1397: oe_debug_pub.add('get_deliver_to_location_id: ' || 'unexpected error: ' || sqlerrm, 1);
1398: END IF;
1399: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1400:
1401: when others then
1402: IF PG_DEBUG <> 0 THEN
1403: oe_debug_pub.add('get_deliver_to_location_id: ' || 'exception others: ' || sqlerrm, 1);
1401: when others then
1402: IF PG_DEBUG <> 0 THEN
1403: oe_debug_pub.add('get_deliver_to_location_id: ' || 'exception others: ' || sqlerrm, 1);
1404: END IF;
1405: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1406:
1407: End get_deliver_to_location_id;
1408:
1409: --Begin bugfix 10145427
1657: p_req_interface_input_data.source_type,
1658: l_location_id,
1659: x_return_status);
1660:
1661: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1662: IF PG_DEBUG <> 0 THEN
1663: oe_debug_pub.add('populate_req_interface: ' || 'success from get_deliver_to_location_id' || ' l_location_id = ' || l_location_id, 1);
1664: END IF;
1665: elsif x_return_status = FND_API.G_RET_STS_ERROR THEN
1661: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1662: IF PG_DEBUG <> 0 THEN
1663: oe_debug_pub.add('populate_req_interface: ' || 'success from get_deliver_to_location_id' || ' l_location_id = ' || l_location_id, 1);
1664: END IF;
1665: elsif x_return_status = FND_API.G_RET_STS_ERROR THEN
1666: IF PG_DEBUG <> 0 THEN
1667: oe_debug_pub.add('populate_req_interface: ' || 'expected error in get_deliver_to_location_id', 1);
1668: END IF;
1669: raise fnd_api.g_exc_error;
1665: elsif x_return_status = FND_API.G_RET_STS_ERROR THEN
1666: IF PG_DEBUG <> 0 THEN
1667: oe_debug_pub.add('populate_req_interface: ' || 'expected error in get_deliver_to_location_id', 1);
1668: END IF;
1669: raise fnd_api.g_exc_error;
1670: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1671: IF PG_DEBUG <> 0 THEN
1672: oe_debug_pub.add('populate_req_interface: ' || 'unexpected error in get_deliver_to_location_id', 1);
1673: END IF;
1666: IF PG_DEBUG <> 0 THEN
1667: oe_debug_pub.add('populate_req_interface: ' || 'expected error in get_deliver_to_location_id', 1);
1668: END IF;
1669: raise fnd_api.g_exc_error;
1670: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1671: IF PG_DEBUG <> 0 THEN
1672: oe_debug_pub.add('populate_req_interface: ' || 'unexpected error in get_deliver_to_location_id', 1);
1673: END IF;
1674: raise fnd_api.g_exc_unexpected_error;
1670: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1671: IF PG_DEBUG <> 0 THEN
1672: oe_debug_pub.add('populate_req_interface: ' || 'unexpected error in get_deliver_to_location_id', 1);
1673: END IF;
1674: raise fnd_api.g_exc_unexpected_error;
1675: END IF;
1676:
1677:
1678:
1773: IF PG_DEBUG <> 0 THEN
1774: oe_debug_pub.add('FAILED IN call to FND_INSTALLATION.GET_APP_INFO',1);
1775: END IF;
1776:
1777: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1778:
1779: END IF;
1780:
1781: --end bugfix 3871646
1836: when NO_DATA_FOUND then --bugfix 3054055: added no_data_found excepn. Also added debug check above.
1837: l_user_item_desc := NULL;
1838:
1839: when OTHERS then
1840: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1841: END;
1842:
1843:
1844:
2018: ,p_operating_unit =>l_operating_unit
2019: ,x_charge_account_id =>p_receiving_account_id
2020: ,x_accrual_account_id =>l_accrual_account_id
2021: ,x_return_status =>x_return_status);
2022: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2023:
2024: IF PG_DEBUG <> 0 THEN
2025: oe_debug_pub.add('populate_req_interface: ' || 'OPMCharge Account ID : '||to_char(p_receiving_account_id),1);
2026: oe_debug_pub.add('populate_req_interface: ' || 'OPMCharge Account ID : '||to_char(l_accrual_account_id),1);
2028: ELSE
2029: IF PG_DEBUG <> 0 THEN
2030: oe_debug_pub.add('populate_req_interface: ' || 'Get_opm_charge_account RET STATUS : '||x_return_status,1);
2031: END IF;
2032: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2033: END IF;
2034:
2035:
2036:
2137:
2138: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::exp error:: In the insert statment::'||
2139: to_char(l_stmt_num)||'::'||sqlerrm,1);
2140: END IF;
2141: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2142: END;
2143:
2144:
2145: EXCEPTION
2142: END;
2143:
2144:
2145: EXCEPTION
2146: WHEN FND_API.G_EXC_ERROR THEN
2147: IF PG_DEBUG <> 0 THEN
2148: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2149: END IF;
2150: x_return_status := FND_API.G_RET_STS_ERROR;
2146: WHEN FND_API.G_EXC_ERROR THEN
2147: IF PG_DEBUG <> 0 THEN
2148: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2149: END IF;
2150: x_return_status := FND_API.G_RET_STS_ERROR;
2151: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2152: IF PG_DEBUG <> 0 THEN
2153: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::unexp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2154: END IF;
2147: IF PG_DEBUG <> 0 THEN
2148: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2149: END IF;
2150: x_return_status := FND_API.G_RET_STS_ERROR;
2151: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2152: IF PG_DEBUG <> 0 THEN
2153: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::unexp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2154: END IF;
2155: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2151: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2152: IF PG_DEBUG <> 0 THEN
2153: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::unexp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2154: END IF;
2155: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2156: WHEN OTHERS THEN
2157: IF PG_DEBUG <> 0 THEN
2158: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::other error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2159: END IF;
2156: WHEN OTHERS THEN
2157: IF PG_DEBUG <> 0 THEN
2158: oe_debug_pub.add('populate_req_interface: ' || 'POPULATE_REQ_INTERFACE::other error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
2159: END IF;
2160: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2161: END populate_req_interface;
2162:
2163:
2164:
2557:
2558: l_comp_exists Varchar2(1);
2559:
2560: begin
2561: x_return_status := FND_API.G_RET_STS_SUCCESS;
2562: lStmtNumber := 10;
2563: g_pg_level := 3;
2564: IF PG_DEBUG <> 0 THEN
2565: oe_debug_pub.add(lpad(' ',g_pg_level)||' ',1);
2700: g_pg_level := g_pg_level - 3;
2701:
2702: exception
2703:
2704: when FND_API.G_EXC_UNEXPECTED_ERROR then
2705: IF PG_DEBUG <> 0 THEN
2706: oe_debug_pub.add('Create_Purchasing_Doc: ' || 'Create_purchasing_doc::unexp error::'||lStmtNumber||sqlerrm,1);
2707: END IF;
2708: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2704: when FND_API.G_EXC_UNEXPECTED_ERROR then
2705: IF PG_DEBUG <> 0 THEN
2706: oe_debug_pub.add('Create_Purchasing_Doc: ' || 'Create_purchasing_doc::unexp error::'||lStmtNumber||sqlerrm,1);
2707: END IF;
2708: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2709: CTO_MSG_PUB.Count_And_Get
2710: (p_msg_count => x_msg_count
2711: ,p_msg_data => x_msg_data
2712: );
2710: (p_msg_count => x_msg_count
2711: ,p_msg_data => x_msg_data
2712: );
2713:
2714: when FND_API.G_EXC_ERROR then
2715: IF PG_DEBUG <> 0 THEN
2716: oe_debug_pub.add('Create_Purchasing_Doc: ' || 'Create_purchasing_doc::exp error::'||lStmtNumber||sqlerrm,1);
2717: END IF;
2718: x_return_status := FND_API.G_RET_STS_ERROR;
2714: when FND_API.G_EXC_ERROR then
2715: IF PG_DEBUG <> 0 THEN
2716: oe_debug_pub.add('Create_Purchasing_Doc: ' || 'Create_purchasing_doc::exp error::'||lStmtNumber||sqlerrm,1);
2717: END IF;
2718: x_return_status := FND_API.G_RET_STS_ERROR;
2719: CTO_MSG_PUB.Count_And_Get
2720: (p_msg_count => x_msg_count
2721: ,p_msg_data => x_msg_data);
2722:
2723: when others then
2724: IF PG_DEBUG <> 0 THEN
2725: oe_debug_pub.add('Create_Purchasing_Doc: ' || 'Create_purchasing_doc::others::'||lStmtNumber||sqlerrm,1);
2726: END IF;
2727: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2728: CTO_MSG_PUB.Count_And_Get
2729: (p_msg_count => x_msg_count
2730: ,p_msg_data => x_msg_data
2731: );
2813: l_rolled_price Number;
2814: begin
2815:
2816: g_pg_level := g_pg_level + 3;
2817: x_return_status := FND_API.G_RET_STS_SUCCESS;
2818: lStmtNumber := 10;
2819:
2820: x_rolled_price := 0;
2821: If PG_DEBUG <> 0 Then
2897: END IF;
2898: g_pg_level := g_pg_level - 3;
2899: exception
2900:
2901: when FND_API.G_EXC_UNEXPECTED_ERROR then
2902: IF PG_DEBUG <> 0 THEN
2903: oe_debug_pub.add('Rollup_list_price: ' || 'Rollup_list_price::unexp error::'||lStmtNumber||sqlerrm,1);
2904: END IF;
2905: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2901: when FND_API.G_EXC_UNEXPECTED_ERROR then
2902: IF PG_DEBUG <> 0 THEN
2903: oe_debug_pub.add('Rollup_list_price: ' || 'Rollup_list_price::unexp error::'||lStmtNumber||sqlerrm,1);
2904: END IF;
2905: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2906: CTO_MSG_PUB.Count_And_Get
2907: (p_msg_count => x_msg_count
2908: ,p_msg_data => x_msg_data
2909: );
2908: ,p_msg_data => x_msg_data
2909: );
2910: g_pg_level := g_pg_level - 3;
2911:
2912: when FND_API.G_EXC_ERROR then
2913: IF PG_DEBUG <> 0 THEN
2914: oe_debug_pub.add('Rollup_list_price: ' || 'Rollup_list_price::exp error::'||lStmtNumber||sqlerrm,1);
2915: END IF;
2916: x_return_status := FND_API.G_RET_STS_ERROR;
2912: when FND_API.G_EXC_ERROR then
2913: IF PG_DEBUG <> 0 THEN
2914: oe_debug_pub.add('Rollup_list_price: ' || 'Rollup_list_price::exp error::'||lStmtNumber||sqlerrm,1);
2915: END IF;
2916: x_return_status := FND_API.G_RET_STS_ERROR;
2917: CTO_MSG_PUB.Count_And_Get
2918: (p_msg_count => x_msg_count
2919: ,p_msg_data => x_msg_data);
2920: g_pg_level := g_pg_level - 3;
2922: when others then
2923: IF PG_DEBUG <> 0 THEN
2924: oe_debug_pub.add('Rollup_list_price: ' || 'Rollup_list_price::others::'||lStmtNumber||sqlerrm,1);
2925: END IF;
2926: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2927: CTO_MSG_PUB.Count_And_Get
2928: (p_msg_count => x_msg_count
2929: ,p_msg_data => x_msg_data
2930: );
2989: l_po_valid_org Number;
2990: l_buy_found Varchar(1);
2991: l_config_creation Number;
2992: begin
2993: x_return_status := FND_API.G_RET_STS_SUCCESS;
2994: l_assgn_set_id := to_number(FND_PROFILE.VALUE('MRP_DEFAULT_ASSIGNMENT_SET'));
2995: lStmtNumber := 10;
2996:
2997: g_pg_level := g_pg_level + 3;
3024: x_return_status => x_return_status,
3025: x_msg_count => x_msg_count,
3026: x_msg_data => x_msg_data);
3027:
3028: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3029: IF PG_DEBUG <> 0 THEN
3030: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: Expected Error in Get_all_item_asl.',1);
3031: END IF;
3032: raise FND_API.G_EXC_ERROR;
3028: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3029: IF PG_DEBUG <> 0 THEN
3030: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: Expected Error in Get_all_item_asl.',1);
3031: END IF;
3032: raise FND_API.G_EXC_ERROR;
3033:
3034: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3035: IF PG_DEBUG <> 0 THEN
3036: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: UnExpected Error in Get_all_item_asl.',1);
3030: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: Expected Error in Get_all_item_asl.',1);
3031: END IF;
3032: raise FND_API.G_EXC_ERROR;
3033:
3034: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3035: IF PG_DEBUG <> 0 THEN
3036: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: UnExpected Error in Get_all_item_asl.',1);
3037: END IF;
3038: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3034: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3035: IF PG_DEBUG <> 0 THEN
3036: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: UnExpected Error in Get_all_item_asl.',1);
3037: END IF;
3038: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3039:
3040: END IF;
3041:
3042: lStmtNumber := 40;
3063: x_msg_count => x_msg_count,
3064: x_msg_data => x_msg_data);
3065:
3066:
3067: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3068: IF PG_DEBUG <> 0 THEN
3069: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: Expected Error in Get_all_item_asl.',1);
3070: END IF;
3071: raise FND_API.G_EXC_ERROR;
3067: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3068: IF PG_DEBUG <> 0 THEN
3069: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: Expected Error in Get_all_item_asl.',1);
3070: END IF;
3071: raise FND_API.G_EXC_ERROR;
3072:
3073: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3074: IF PG_DEBUG <> 0 THEN
3075: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: UnExpected Error in Get_all_item_asl.',1);
3069: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: Expected Error in Get_all_item_asl.',1);
3070: END IF;
3071: raise FND_API.G_EXC_ERROR;
3072:
3073: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3074: IF PG_DEBUG <> 0 THEN
3075: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: UnExpected Error in Get_all_item_asl.',1);
3076: END IF;
3077: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3073: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3074: IF PG_DEBUG <> 0 THEN
3075: oe_debug_pub.add(lpad(' ',g_pg_level)||'ROLLUP_PURCHASE_PRICE: UnExpected Error in Get_all_item_asl.',1);
3076: END IF;
3077: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3078:
3079: END IF;
3080:
3081:
3179: x_return_status => x_return_status,
3180: x_msg_count => x_msg_count,
3181: x_msg_data => x_msg_data);
3182:
3183: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3184: IF PG_DEBUG <> 0 THEN
3185: oe_debug_pub.add(lpad(' ',g_pg_level)
3186: ||'ROLLUP_PURCHASE_PRICE: Expected Error in Blanket_Document_sourcing.',1);
3187: END IF;
3184: IF PG_DEBUG <> 0 THEN
3185: oe_debug_pub.add(lpad(' ',g_pg_level)
3186: ||'ROLLUP_PURCHASE_PRICE: Expected Error in Blanket_Document_sourcing.',1);
3187: END IF;
3188: raise FND_API.G_EXC_ERROR;
3189:
3190: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3191: IF PG_DEBUG <> 0 THEN
3192: oe_debug_pub.add(lpad(' ',g_pg_level)
3186: ||'ROLLUP_PURCHASE_PRICE: Expected Error in Blanket_Document_sourcing.',1);
3187: END IF;
3188: raise FND_API.G_EXC_ERROR;
3189:
3190: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3191: IF PG_DEBUG <> 0 THEN
3192: oe_debug_pub.add(lpad(' ',g_pg_level)
3193: ||'ROLLUP_PURCHASE_PRICE: UnExpected Error in blanket_document_sourcing.',1);
3194: END IF;
3191: IF PG_DEBUG <> 0 THEN
3192: oe_debug_pub.add(lpad(' ',g_pg_level)
3193: ||'ROLLUP_PURCHASE_PRICE: UnExpected Error in blanket_document_sourcing.',1);
3194: END IF;
3195: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3196:
3197: END IF;
3198:
3199: lStmtNumber := 100;
3252: x_msg_count => x_msg_count,
3253: x_msg_data => x_msg_data);
3254:
3255:
3256: IF( x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
3257: IF PG_DEBUG <> 0 THEN
3258: oe_debug_pub.add(lpad(' ',g_pg_level)
3259: ||'success status false for po_autosource_sv.blanket_document_sourcing...',1);
3260:
3399: oe_debug_pub.add(lpad(' ',g_pg_level) || 'ROLLUP_PURCHASE_PRICE: ' || '****************************',1);
3400: oe_debug_pub.add(lpad(' ',g_pg_level) || 'ROLLUP_PURCHASE_PRICE: END ROLLUP BLANKETS FOR ' || to_char(p_config_item_id),1);
3401: end if;
3402:
3403: x_return_status := FND_API.G_RET_STS_SUCCESS;
3404: g_pg_level := g_pg_level - 3;
3405:
3406: exception
3407:
3404: g_pg_level := g_pg_level - 3;
3405:
3406: exception
3407:
3408: when FND_API.G_EXC_UNEXPECTED_ERROR then
3409: IF PG_DEBUG <> 0 THEN
3410: oe_debug_pub.add('Rollup_purchase_price: ' || 'Rollup_purchase_price::unexp error::'||lStmtNumber||sqlerrm,1);
3411: END IF;
3412: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3408: when FND_API.G_EXC_UNEXPECTED_ERROR then
3409: IF PG_DEBUG <> 0 THEN
3410: oe_debug_pub.add('Rollup_purchase_price: ' || 'Rollup_purchase_price::unexp error::'||lStmtNumber||sqlerrm,1);
3411: END IF;
3412: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3413: CTO_MSG_PUB.Count_And_Get
3414: (p_msg_count => x_msg_count
3415: ,p_msg_data => x_msg_data
3416: );
3414: (p_msg_count => x_msg_count
3415: ,p_msg_data => x_msg_data
3416: );
3417:
3418: when FND_API.G_EXC_ERROR then
3419: IF PG_DEBUG <> 0 THEN
3420: oe_debug_pub.add('Rollup_purchase_price: ' || 'Rollup_purchase_price::exp error::'||lStmtNumber||sqlerrm,1);
3421: END IF;
3422: x_return_status := FND_API.G_RET_STS_ERROR;
3418: when FND_API.G_EXC_ERROR then
3419: IF PG_DEBUG <> 0 THEN
3420: oe_debug_pub.add('Rollup_purchase_price: ' || 'Rollup_purchase_price::exp error::'||lStmtNumber||sqlerrm,1);
3421: END IF;
3422: x_return_status := FND_API.G_RET_STS_ERROR;
3423: CTO_MSG_PUB.Count_And_Get
3424: (p_msg_count => x_msg_count
3425: ,p_msg_data => x_msg_data);
3426:
3427: when others then
3428: IF PG_DEBUG <> 0 THEN
3429: oe_debug_pub.add('Rollup_purchase_price: ' || 'Rollup_purchase_price::others::'||lStmtNumber||sqlerrm,1);
3430: END IF;
3431: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3432: CTO_MSG_PUB.Count_And_Get
3433: (p_msg_count => x_msg_count
3434: ,p_msg_data => x_msg_data
3435: );
4326:
4327: BEGIN
4328:
4329: -- set the return status.
4330: x_return_status := FND_API.G_RET_STS_SUCCESS ;
4331:
4332: -- Set the return code to success
4333: retcode := 0;
4334:
4641: x_return_status => x_return_status,
4642: x_msg_count => x_msg_count,
4643: x_msg_data => x_msg_data);
4644:
4645: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
4646: RETCODE := 1;
4647: IF PG_DEBUG <> 0 THEN
4648: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'Expected Error in Create_purchasing_doc.',1);
4649: END IF;
4650: err_counter := err_counter + 1;
4651: erroredItems(err_counter).config_item_id := ll_inventory_item_id;
4652: ROLLBACK TO pp_rollup;
4653:
4654: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4655: IF PG_DEBUG <> 0 THEN
4656: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'UnExpected Error in Create_purchasing_doc.',1);
4657: END IF;
4658: ROLLBACK TO pp_rollup;
4655: IF PG_DEBUG <> 0 THEN
4656: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'UnExpected Error in Create_purchasing_doc.',1);
4657: END IF;
4658: ROLLBACK TO pp_rollup;
4659: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4660: ELSE
4661: IF PG_DEBUG <> 0 THEN
4662: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'Successfully processed.',1);
4663: END IF;
4763: x_return_status => x_return_status,
4764: x_msg_count => x_msg_count,
4765: x_msg_data => x_msg_data);
4766:
4767: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
4768: IF PG_DEBUG <> 0 THEN
4769: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'Expected Error in Submit_pdoi_conc_prog.',1);
4770: END IF;
4771: raise FND_API.G_EXC_ERROR;
4767: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
4768: IF PG_DEBUG <> 0 THEN
4769: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'Expected Error in Submit_pdoi_conc_prog.',1);
4770: END IF;
4771: raise FND_API.G_EXC_ERROR;
4772:
4773: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4774: IF PG_DEBUG <> 0 THEN
4775: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'UnExpected Error in Submit_pdoi_conc_prog.',1);
4769: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'Expected Error in Submit_pdoi_conc_prog.',1);
4770: END IF;
4771: raise FND_API.G_EXC_ERROR;
4772:
4773: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4774: IF PG_DEBUG <> 0 THEN
4775: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'UnExpected Error in Submit_pdoi_conc_prog.',1);
4776: END IF;
4777: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4773: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4774: IF PG_DEBUG <> 0 THEN
4775: oe_debug_pub.add('Create_purchase_doc_batch: ' || 'UnExpected Error in Submit_pdoi_conc_prog.',1);
4776: END IF;
4777: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4778: END IF;
4779:
4780:
4781: IF RETCODE = 1 THEN
4795: COMMIT;
4796:
4797: EXCEPTION
4798:
4799: when FND_API.G_EXC_UNEXPECTED_ERROR then
4800: IF PG_DEBUG <> 0 THEN
4801: oe_debug_pub.add('Create_purchase_doc_batch:: unexp error::'||l_stmt_num||sqlerrm,1);
4802: END IF;
4803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4799: when FND_API.G_EXC_UNEXPECTED_ERROR then
4800: IF PG_DEBUG <> 0 THEN
4801: oe_debug_pub.add('Create_purchase_doc_batch:: unexp error::'||l_stmt_num||sqlerrm,1);
4802: END IF;
4803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4804: CTO_MSG_PUB.Count_And_Get
4805: (p_msg_count => x_msg_count
4806: ,p_msg_data => x_msg_data
4807: );
4807: );
4808: RETCODE := 2 ;
4809: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
4810:
4811: when FND_API.G_EXC_ERROR then
4812: IF PG_DEBUG <> 0 THEN
4813: oe_debug_pub.add('Create_purchase_doc_batch::exp error::'||l_stmt_num||sqlerrm,1);
4814: END IF;
4815: x_return_status := FND_API.G_RET_STS_ERROR;
4811: when FND_API.G_EXC_ERROR then
4812: IF PG_DEBUG <> 0 THEN
4813: oe_debug_pub.add('Create_purchase_doc_batch::exp error::'||l_stmt_num||sqlerrm,1);
4814: END IF;
4815: x_return_status := FND_API.G_RET_STS_ERROR;
4816: CTO_MSG_PUB.Count_And_Get
4817: (p_msg_count => x_msg_count
4818: ,p_msg_data => x_msg_data);
4819: RETCODE := 2 ;
4822: when others then
4823: IF PG_DEBUG <> 0 THEN
4824: oe_debug_pub.add('Create_purchase_doc_batch::others::'||l_stmt_num||sqlerrm,1);
4825: END IF;
4826: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4827: CTO_MSG_PUB.Count_And_Get
4828: (p_msg_count => x_msg_count
4829: ,p_msg_data => x_msg_data
4830: );
5049: x_return_status => x_return_status,
5050: x_msg_count => x_msg_count,
5051: x_msg_data => x_msg_data);
5052:
5053: if x_return_status = FND_API.G_RET_STS_ERROR then
5054: IF PG_DEBUG <> 0 THEN
5055: oe_debug_pub.add('Create_Purchasing_Doc: '
5056: || ' Expected error in Rollup_list_procedure',1);
5057: END IF;
5054: IF PG_DEBUG <> 0 THEN
5055: oe_debug_pub.add('Create_Purchasing_Doc: '
5056: || ' Expected error in Rollup_list_procedure',1);
5057: END IF;
5058: raise FND_API.G_EXC_ERROR;
5059: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
5060: IF PG_DEBUG <> 0 THEN
5061: oe_debug_pub.add('Create_Purchasing_Doc: '
5062: || ' Unexpected error in rollup_list_price ',1);
5055: oe_debug_pub.add('Create_Purchasing_Doc: '
5056: || ' Expected error in Rollup_list_procedure',1);
5057: END IF;
5058: raise FND_API.G_EXC_ERROR;
5059: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
5060: IF PG_DEBUG <> 0 THEN
5061: oe_debug_pub.add('Create_Purchasing_Doc: '
5062: || ' Unexpected error in rollup_list_price ',1);
5063: END IF;
5060: IF PG_DEBUG <> 0 THEN
5061: oe_debug_pub.add('Create_Purchasing_Doc: '
5062: || ' Unexpected error in rollup_list_price ',1);
5063: END IF;
5064: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5065: end if;
5066: End if; /* l_list_price is null or p_overwrite_list_price = 'Y' */
5067:
5068: -- added by Renga Kannan on 10/21/03
5127: x_return_status => x_return_status,
5128: x_msg_count => x_msg_count,
5129: x_msg_data => x_msg_data);
5130:
5131: if x_return_status = FND_API.G_RET_STS_ERROR then
5132: IF PG_DEBUG <> 0 THEN
5133: oe_debug_pub.add('Create_Purchasing_Doc: '
5134: || ' Expected error in Rollup_purchase_price procedure',1);
5135: END IF;
5132: IF PG_DEBUG <> 0 THEN
5133: oe_debug_pub.add('Create_Purchasing_Doc: '
5134: || ' Expected error in Rollup_purchase_price procedure',1);
5135: END IF;
5136: raise FND_API.G_EXC_ERROR;
5137: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
5138: IF PG_DEBUG <> 0 THEN
5139: oe_debug_pub.add('Create_Purchasing_Doc: '
5140: || ' Unexpected error in rollup_purchase_price procedure',1);
5133: oe_debug_pub.add('Create_Purchasing_Doc: '
5134: || ' Expected error in Rollup_purchase_price procedure',1);
5135: END IF;
5136: raise FND_API.G_EXC_ERROR;
5137: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
5138: IF PG_DEBUG <> 0 THEN
5139: oe_debug_pub.add('Create_Purchasing_Doc: '
5140: || ' Unexpected error in rollup_purchase_price procedure',1);
5141: EnD IF;
5138: IF PG_DEBUG <> 0 THEN
5139: oe_debug_pub.add('Create_Purchasing_Doc: '
5140: || ' Unexpected error in rollup_purchase_price procedure',1);
5141: EnD IF;
5142: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5143: end if;
5144:
5145: g_pg_level := g_pg_level - 3;
5146:
5145: g_pg_level := g_pg_level - 3;
5146:
5147: exception
5148:
5149: when FND_API.G_EXC_UNEXPECTED_ERROR then
5150: IF PG_DEBUG <> 0 THEN
5151: oe_debug_pub.add('PROCESS_PURCHASE_PRICE:: unexp error::'||lStmtNumber||sqlerrm,1);
5152: END IF;
5153: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5149: when FND_API.G_EXC_UNEXPECTED_ERROR then
5150: IF PG_DEBUG <> 0 THEN
5151: oe_debug_pub.add('PROCESS_PURCHASE_PRICE:: unexp error::'||lStmtNumber||sqlerrm,1);
5152: END IF;
5153: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5154: CTO_MSG_PUB.Count_And_Get
5155: (p_msg_count => x_msg_count
5156: ,p_msg_data => x_msg_data
5157: );
5156: ,p_msg_data => x_msg_data
5157: );
5158: g_pg_level := g_pg_level - 3;
5159:
5160: when FND_API.G_EXC_ERROR then
5161: IF PG_DEBUG <> 0 THEN
5162: oe_debug_pub.add('PROCESS_PURCHASE_PRICE::exp error::'||lStmtNumber||sqlerrm,1);
5163: END IF;
5164: x_return_status := FND_API.G_RET_STS_ERROR;
5160: when FND_API.G_EXC_ERROR then
5161: IF PG_DEBUG <> 0 THEN
5162: oe_debug_pub.add('PROCESS_PURCHASE_PRICE::exp error::'||lStmtNumber||sqlerrm,1);
5163: END IF;
5164: x_return_status := FND_API.G_RET_STS_ERROR;
5165: CTO_MSG_PUB.Count_And_Get
5166: (p_msg_count => x_msg_count
5167: ,p_msg_data => x_msg_data);
5168: g_pg_level := g_pg_level - 3;
5170: when others then
5171: IF PG_DEBUG <> 0 THEN
5172: oe_debug_pub.add('PROCESS_PURCHASE_PRICE::others::'||lStmtNumber||sqlerrm,1);
5173: END IF;
5174: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5175: CTO_MSG_PUB.Count_And_Get
5176: (p_msg_count => x_msg_count
5177: ,p_msg_data => x_msg_data
5178: );
5189: sql_stmt VARCHAR2(5000);
5190: drive_mark NUMBER := 0;
5191: l_organization_id Number;
5192: BEGIN
5193: x_return_status := FND_API.G_RET_STS_SUCCESS;
5194: l_organization_id := p_organization_id;
5195:
5196: -- rkaza. ireq project. 05/06/2005.
5197: -- Do not select lines that are in INTERNAL_REQ_REQUESTED status.
5399:
5400: EXCEPTION
5401: WHEN OTHERS THEN
5402: oe_debug_pub.add('load_lines_into_bcolt: ' || 'others excpn::'||sqlerrm,1);
5403: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
5404:
5405:
5406: END load_lines_into_bcolt;
5407:
5410: p_status NUMBER,
5411: x_return_status OUT NOCOPY VARCHAR2) IS
5412: BEGIN
5413:
5414: x_return_status := FND_API.G_RET_STS_SUCCESS ;
5415:
5416: update bom_cto_order_lines_temp
5417: set status = p_status
5418: where line_id = p_line_id;
5419:
5420: EXCEPTION
5421: WHEN OTHERS THEN
5422: oe_debug_pub.add('update_bcolt_line_status: ' || 'others excpn::'||sqlerrm,1);
5423: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
5424:
5425: END update_bcolt_line_status;
5426:
5427:
5457:
5458: BEGIN
5459:
5460:
5461: x_return_status := FND_API.G_RET_STS_SUCCESS;
5462:
5463: IF p_interface_source_line_id IS NOT NULL THEN
5464: --line id is available only for top level configurations
5465:
5582: , x_msg_count => l_msg_count
5583:
5584: );
5585:
5586: IF l_return_status = FND_API.G_RET_STS_SUCCESS then
5587: --i.e.charge account id is
5588: x_charge_account_id := GMF_transaction_accounts_PUB.g_gmf_accts_tab_CTO(1).target_ccid;
5589:
5590: IF x_charge_account_id IS NULL THEN
5605: END IF;
5606:
5607:
5608: ELSE
5609: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5610: END IF;
5611:
5612: EXCEPTION
5613:
5610: END IF;
5611:
5612: EXCEPTION
5613:
5614: WHEN FND_API.G_EXC_ERROR THEN
5615: IF PG_DEBUG <> 0 THEN
5616: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5617: END IF;
5618: x_return_status := FND_API.G_RET_STS_ERROR;
5614: WHEN FND_API.G_EXC_ERROR THEN
5615: IF PG_DEBUG <> 0 THEN
5616: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5617: END IF;
5618: x_return_status := FND_API.G_RET_STS_ERROR;
5619: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5620: IF PG_DEBUG <> 0 THEN
5621: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::unexp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5622: END IF;
5615: IF PG_DEBUG <> 0 THEN
5616: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5617: END IF;
5618: x_return_status := FND_API.G_RET_STS_ERROR;
5619: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5620: IF PG_DEBUG <> 0 THEN
5621: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::unexp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5622: END IF;
5623: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5619: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5620: IF PG_DEBUG <> 0 THEN
5621: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::unexp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5622: END IF;
5623: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5624: WHEN OTHERS THEN
5625: IF PG_DEBUG <> 0 THEN
5626: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::others error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5627: END IF;
5624: WHEN OTHERS THEN
5625: IF PG_DEBUG <> 0 THEN
5626: oe_debug_pub.add('Get_opm_charge_account: ' || 'Get_opm_charge_account::others error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
5627: END IF;
5628: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
5629:
5630: END Get_opm_charge_account;
5631:
5632: