24: -- Operating unit ID that will be used to retrieve OU-specific invoice
25: -- numbering options
26: --OUT:
27: --x_return_status:
28: -- FND_API.g_ret_sts_success -- if the procedure completed successfully
29: -- FND_API.g_ret_sts_unexp_error -- if an unexpected error occurred
30: --x_msg_data:
31: -- Error message text in case of exception/error
32: --x_buying_company_identifier:
25: -- numbering options
26: --OUT:
27: --x_return_status:
28: -- FND_API.g_ret_sts_success -- if the procedure completed successfully
29: -- FND_API.g_ret_sts_unexp_error -- if an unexpected error occurred
30: --x_msg_data:
31: -- Error message text in case of exception/error
32: --x_buying_company_identifier:
33: -- Self-bill buying company identifier from the Purchasing Options of the
54: BEGIN
55: l_progress := '010';
56:
57: -- Standard call to check for call compatibility
58: IF NOT FND_API.compatible_api_call(l_api_version,
59: p_api_version,
60: l_api_name,
61: g_pkg_name) THEN
62: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
58: IF NOT FND_API.compatible_api_call(l_api_version,
59: p_api_version,
60: l_api_name,
61: g_pkg_name) THEN
62: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
63: END IF;
64:
65: x_return_status:= FND_API.g_ret_sts_success;
66: l_progress := '020';
61: g_pkg_name) THEN
62: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
63: END IF;
64:
65: x_return_status:= FND_API.g_ret_sts_success;
66: l_progress := '020';
67:
68: -- Call the private get_invoice_numbering_options
69: PO_AP_INTEGRATION_PVT.get_invoice_numbering_options(
75: x_gapless_inv_num_flag => x_gapless_inv_num_flag
76: );
77:
78: EXCEPTION
79: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
80: x_gapless_inv_num_flag := 'N';
81: x_buying_company_identifier := NULL;
82: x_return_status := FND_API.g_ret_sts_unexp_error;
83: x_msg_data := FND_MSG_PUB.GET(p_msg_index => FND_MSG_PUB.G_LAST,
78: EXCEPTION
79: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
80: x_gapless_inv_num_flag := 'N';
81: x_buying_company_identifier := NULL;
82: x_return_status := FND_API.g_ret_sts_unexp_error;
83: x_msg_data := FND_MSG_PUB.GET(p_msg_index => FND_MSG_PUB.G_LAST,
84: p_encoded => 'F');
85: WHEN OTHERS THEN
86: x_gapless_inv_num_flag := 'N';
84: p_encoded => 'F');
85: WHEN OTHERS THEN
86: x_gapless_inv_num_flag := 'N';
87: x_buying_company_identifier := NULL;
88: x_return_status := FND_API.g_ret_sts_unexp_error;
89: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
90: FND_MSG_PUB.add_exc_msg (p_pkg_name => g_pkg_name,
91: p_procedure_name => l_api_name,
92: p_error_text => SUBSTRB(SQLERRM, 1, 200)