36: --p_org_id
37: -- The operating unit ID to derive defaulting rules.
38: --OUT:
39: --x_return_status
40: -- FND_API.g_ret_sts_success - if the procedure completed successfully
41: -- FND_API.g_ret_sts_unexp_error - unexpected error occurred
42: --x_trx_reason_code_tbl
43: -- A table of transaction reason codes corresponding to the input tables.
44: --x_error_code_tbl
37: -- The operating unit ID to derive defaulting rules.
38: --OUT:
39: --x_return_status
40: -- FND_API.g_ret_sts_success - if the procedure completed successfully
41: -- FND_API.g_ret_sts_unexp_error - unexpected error occurred
42: --x_trx_reason_code_tbl
43: -- A table of transaction reason codes corresponding to the input tables.
44: --x_error_code_tbl
45: -- A table of error codes corresponding to the input tables. A value of zero
66:
67: BEGIN
68:
69: l_progress := '000';
70: x_return_status := FND_API.g_ret_sts_success;
71:
72:
73: EXCEPTION
74: WHEN FND_API.g_exc_unexpected_error THEN
70: x_return_status := FND_API.g_ret_sts_success;
71:
72:
73: EXCEPTION
74: WHEN FND_API.g_exc_unexpected_error THEN
75: x_return_status := FND_API.g_ret_sts_unexp_error;
76: IF g_debug_unexp THEN
77: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
78: 'Unexpected error from API call');
71:
72:
73: EXCEPTION
74: WHEN FND_API.g_exc_unexpected_error THEN
75: x_return_status := FND_API.g_ret_sts_unexp_error;
76: IF g_debug_unexp THEN
77: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
78: 'Unexpected error from API call');
79: END IF;
77: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
78: 'Unexpected error from API call');
79: END IF;
80: WHEN OTHERS THEN
81: x_return_status := FND_API.g_ret_sts_unexp_error;
82: FND_MSG_PUB.add_exc_msg(p_pkg_name => g_pkg_name,
83: p_procedure_name => l_api_name||'-'||l_progress);
84: IF g_debug_unexp THEN
85: PO_DEBUG.debug_exc(g_module_prefix||l_api_name,l_progress);
112: --p_org_id
113: -- The operating unit ID to derive defaulting rules.
114: --OUT:
115: --x_return_status
116: -- FND_API.g_ret_sts_success - if the procedure completed successfully
117: -- FND_API.g_ret_sts_unexp_error - an error occurred
118: -- FND_API.g_ret_sts_unexp_error - unexpected error occurred
119: --x_trx_reason_code
120: -- The derived transaction reason code.
113: -- The operating unit ID to derive defaulting rules.
114: --OUT:
115: --x_return_status
116: -- FND_API.g_ret_sts_success - if the procedure completed successfully
117: -- FND_API.g_ret_sts_unexp_error - an error occurred
118: -- FND_API.g_ret_sts_unexp_error - unexpected error occurred
119: --x_trx_reason_code
120: -- The derived transaction reason code.
121: --End of Comments
114: --OUT:
115: --x_return_status
116: -- FND_API.g_ret_sts_success - if the procedure completed successfully
117: -- FND_API.g_ret_sts_unexp_error - an error occurred
118: -- FND_API.g_ret_sts_unexp_error - unexpected error occurred
119: --x_trx_reason_code
120: -- The derived transaction reason code.
121: --End of Comments
122: --------------------------------------------------------------------------------
140:
141: BEGIN
142: l_progress := '000';
143:
144: x_return_status := FND_API.g_ret_sts_success;
145:
146:
147: EXCEPTION
148: WHEN FND_API.g_exc_error THEN
144: x_return_status := FND_API.g_ret_sts_success;
145:
146:
147: EXCEPTION
148: WHEN FND_API.g_exc_error THEN
149: x_return_status := FND_API.g_ret_sts_error;
150: IF g_debug_stmt THEN
151: PO_DEBUG.debug_stmt(g_module_prefix||l_api_name,l_progress,
152: 'Expected error from API call');
145:
146:
147: EXCEPTION
148: WHEN FND_API.g_exc_error THEN
149: x_return_status := FND_API.g_ret_sts_error;
150: IF g_debug_stmt THEN
151: PO_DEBUG.debug_stmt(g_module_prefix||l_api_name,l_progress,
152: 'Expected error from API call');
153: END IF;
150: IF g_debug_stmt THEN
151: PO_DEBUG.debug_stmt(g_module_prefix||l_api_name,l_progress,
152: 'Expected error from API call');
153: END IF;
154: WHEN FND_API.g_exc_unexpected_error THEN
155: x_return_status := FND_API.g_ret_sts_unexp_error;
156: IF g_debug_unexp THEN
157: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
158: 'Unexpected error from API call');
151: PO_DEBUG.debug_stmt(g_module_prefix||l_api_name,l_progress,
152: 'Expected error from API call');
153: END IF;
154: WHEN FND_API.g_exc_unexpected_error THEN
155: x_return_status := FND_API.g_ret_sts_unexp_error;
156: IF g_debug_unexp THEN
157: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
158: 'Unexpected error from API call');
159: END IF;
157: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
158: 'Unexpected error from API call');
159: END IF;
160: WHEN OTHERS THEN
161: x_return_status := FND_API.g_ret_sts_unexp_error;
162: FND_MSG_PUB.add_exc_msg(p_pkg_name => g_pkg_name,
163: p_procedure_name => l_api_name||'-'||l_progress);
164: IF g_debug_unexp THEN
165: PO_DEBUG.debug_exc(g_module_prefix||l_api_name,l_progress);
182: -- context. Appends to the API message list upon error.
183: --Parameters:
184: --OUT:
185: --x_return_status
186: -- FND_API.g_ret_sts_success - if the procedure completed successfully
187: -- FND_API.g_ret_sts_unexp_error - unexpected error occurred
188: --x_def_trx_reason_flag
189: -- A flag: 'Y' default transaction reason
190: -- 'N' do not default transaction reason
183: --Parameters:
184: --OUT:
185: --x_return_status
186: -- FND_API.g_ret_sts_success - if the procedure completed successfully
187: -- FND_API.g_ret_sts_unexp_error - unexpected error occurred
188: --x_def_trx_reason_flag
189: -- A flag: 'Y' default transaction reason
190: -- 'N' do not default transaction reason
191: --End of Comments
200: l_progress VARCHAR2(3);
201:
202: BEGIN
203: l_progress := '000';
204: x_return_status := FND_API.g_ret_sts_success;
205:
206: EXCEPTION
207: WHEN FND_API.g_exc_unexpected_error THEN
208: x_return_status := FND_API.g_ret_sts_unexp_error;
203: l_progress := '000';
204: x_return_status := FND_API.g_ret_sts_success;
205:
206: EXCEPTION
207: WHEN FND_API.g_exc_unexpected_error THEN
208: x_return_status := FND_API.g_ret_sts_unexp_error;
209: IF g_debug_unexp THEN
210: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
211: 'Unexpected error from API call');
204: x_return_status := FND_API.g_ret_sts_success;
205:
206: EXCEPTION
207: WHEN FND_API.g_exc_unexpected_error THEN
208: x_return_status := FND_API.g_ret_sts_unexp_error;
209: IF g_debug_unexp THEN
210: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
211: 'Unexpected error from API call');
212: END IF;
210: PO_DEBUG.debug_unexp(g_module_prefix||l_api_name,l_progress,
211: 'Unexpected error from API call');
212: END IF;
213: WHEN OTHERS THEN
214: x_return_status := FND_API.g_ret_sts_unexp_error;
215: FND_MSG_PUB.add_exc_msg(p_pkg_name => g_pkg_name,
216: p_procedure_name => l_api_name||'-'||l_progress);
217: IF g_debug_unexp THEN
218: PO_DEBUG.debug_exc(g_module_prefix||l_api_name,l_progress);