73: RETURN l_inst_pty_id;
74:
75: EXCEPTION
76: WHEN no_data_found THEN
77: fnd_message.set_name('CSI','CSI_INT_INV_INST_PARTY_ID');
78: fnd_message.set_token('INSTANCE_ID',p_instance_id);
79: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code );
80: fnd_msg_pub.add;
81: l_inst_pty_id := -1;
74:
75: EXCEPTION
76: WHEN no_data_found THEN
77: fnd_message.set_name('CSI','CSI_INT_INV_INST_PARTY_ID');
78: fnd_message.set_token('INSTANCE_ID',p_instance_id);
79: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code );
80: fnd_msg_pub.add;
81: l_inst_pty_id := -1;
82: RETURN l_inst_pty_id;
75: EXCEPTION
76: WHEN no_data_found THEN
77: fnd_message.set_name('CSI','CSI_INT_INV_INST_PARTY_ID');
78: fnd_message.set_token('INSTANCE_ID',p_instance_id);
79: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code );
80: fnd_msg_pub.add;
81: l_inst_pty_id := -1;
82: RETURN l_inst_pty_id;
83: WHEN others THEN
80: fnd_msg_pub.add;
81: l_inst_pty_id := -1;
82: RETURN l_inst_pty_id;
83: WHEN others THEN
84: fnd_message.set_name('CSI','CSI_INT_INV_INST_PARTY_ID');
85: fnd_message.set_token('INSTANCE_ID',p_instance_id);
86: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code );
87: fnd_msg_pub.add;
88: l_inst_pty_id := -1;
81: l_inst_pty_id := -1;
82: RETURN l_inst_pty_id;
83: WHEN others THEN
84: fnd_message.set_name('CSI','CSI_INT_INV_INST_PARTY_ID');
85: fnd_message.set_token('INSTANCE_ID',p_instance_id);
86: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code );
87: fnd_msg_pub.add;
88: l_inst_pty_id := -1;
89: RETURN l_inst_pty_id;
82: RETURN l_inst_pty_id;
83: WHEN others THEN
84: fnd_message.set_name('CSI','CSI_INT_INV_INST_PARTY_ID');
85: fnd_message.set_token('INSTANCE_ID',p_instance_id);
86: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code );
87: fnd_msg_pub.add;
88: l_inst_pty_id := -1;
89: RETURN l_inst_pty_id;
90: END get_curr_party;
104: WHERE instance_ou_id = p_instance_ou_id;
105: RETURN l_obj_ver_num;
106: EXCEPTION
107: WHEN no_data_found THEN
108: fnd_message.set_name('CSI','CSI_INT_INV_INST_OU_ID');
109: fnd_message.set_token('INSTANCE_OU_ID',p_instance_ou_id);
110: fnd_msg_pub.add;
111: l_obj_ver_num := -1;
112: RETURN l_obj_ver_num;
105: RETURN l_obj_ver_num;
106: EXCEPTION
107: WHEN no_data_found THEN
108: fnd_message.set_name('CSI','CSI_INT_INV_INST_OU_ID');
109: fnd_message.set_token('INSTANCE_OU_ID',p_instance_ou_id);
110: fnd_msg_pub.add;
111: l_obj_ver_num := -1;
112: RETURN l_obj_ver_num;
113: WHEN others THEN
110: fnd_msg_pub.add;
111: l_obj_ver_num := -1;
112: RETURN l_obj_ver_num;
113: WHEN others THEN
114: fnd_message.set_name('CSI','CSI_INT_INV_INST_OU_ID');
115: fnd_message.set_token('INSTANCE_OU_ID',p_instance_ou_id);
116: fnd_msg_pub.add;
117: l_obj_ver_num := -1;
118: RETURN l_obj_ver_num;
111: l_obj_ver_num := -1;
112: RETURN l_obj_ver_num;
113: WHEN others THEN
114: fnd_message.set_name('CSI','CSI_INT_INV_INST_OU_ID');
115: fnd_message.set_token('INSTANCE_OU_ID',p_instance_ou_id);
116: fnd_msg_pub.add;
117: l_obj_ver_num := -1;
118: RETURN l_obj_ver_num;
119: END get_org_obj_ver_num;
137: RETURN l_obj_ver_num;
138:
139: EXCEPTION
140: WHEN no_data_found THEN
141: fnd_message.set_name('CSI','CSI_INT_INV_II_REL_ID');
142: fnd_message.set_token('RELATIONSHIP_ID',p_relationship_id);
143: fnd_msg_pub.add;
144: l_obj_ver_num := -1;
145: RETURN l_obj_ver_num;
138:
139: EXCEPTION
140: WHEN no_data_found THEN
141: fnd_message.set_name('CSI','CSI_INT_INV_II_REL_ID');
142: fnd_message.set_token('RELATIONSHIP_ID',p_relationship_id);
143: fnd_msg_pub.add;
144: l_obj_ver_num := -1;
145: RETURN l_obj_ver_num;
146: WHEN others THEN
143: fnd_msg_pub.add;
144: l_obj_ver_num := -1;
145: RETURN l_obj_ver_num;
146: WHEN others THEN
147: fnd_message.set_name('CSI','CSI_INT_INV_II_REL_ID');
148: fnd_message.set_token('RELATIONSHIP_ID',p_relationship_id);
149: fnd_msg_pub.add;
150: l_obj_ver_num := -1;
151: RETURN l_obj_ver_num;
144: l_obj_ver_num := -1;
145: RETURN l_obj_ver_num;
146: WHEN others THEN
147: fnd_message.set_name('CSI','CSI_INT_INV_II_REL_ID');
148: fnd_message.set_token('RELATIONSHIP_ID',p_relationship_id);
149: fnd_msg_pub.add;
150: l_obj_ver_num := -1;
151: RETURN l_obj_ver_num;
152: END get_ii_obj_ver_num;
174: (active_end_date > sysdate));
175:
176: EXCEPTION
177: WHEN no_data_found THEN
178: fnd_message.set_name('CSI','CSI_INT_INV_EXT_ATTR_ID');
179: fnd_message.set_token('INSTANCE_ID',p_instance_id);
180: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
181: fnd_msg_pub.add;
182: x_return_status := fnd_api.g_ret_sts_error;
175:
176: EXCEPTION
177: WHEN no_data_found THEN
178: fnd_message.set_name('CSI','CSI_INT_INV_EXT_ATTR_ID');
179: fnd_message.set_token('INSTANCE_ID',p_instance_id);
180: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
181: fnd_msg_pub.add;
182: x_return_status := fnd_api.g_ret_sts_error;
183: WHEN too_many_rows THEN
176: EXCEPTION
177: WHEN no_data_found THEN
178: fnd_message.set_name('CSI','CSI_INT_INV_EXT_ATTR_ID');
179: fnd_message.set_token('INSTANCE_ID',p_instance_id);
180: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
181: fnd_msg_pub.add;
182: x_return_status := fnd_api.g_ret_sts_error;
183: WHEN too_many_rows THEN
184: fnd_message.set_name('CSI','CSI_INT_MANY_ATTR_FOUND');
180: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
181: fnd_msg_pub.add;
182: x_return_status := fnd_api.g_ret_sts_error;
183: WHEN too_many_rows THEN
184: fnd_message.set_name('CSI','CSI_INT_MANY_ATTR_FOUND');
185: fnd_message.set_token('INSTANCE_ID',p_instance_id);
186: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
187: fnd_msg_pub.add;
188: x_return_status := fnd_api.g_ret_sts_error;
181: fnd_msg_pub.add;
182: x_return_status := fnd_api.g_ret_sts_error;
183: WHEN too_many_rows THEN
184: fnd_message.set_name('CSI','CSI_INT_MANY_ATTR_FOUND');
185: fnd_message.set_token('INSTANCE_ID',p_instance_id);
186: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
187: fnd_msg_pub.add;
188: x_return_status := fnd_api.g_ret_sts_error;
189: END get_ext_attribs;
182: x_return_status := fnd_api.g_ret_sts_error;
183: WHEN too_many_rows THEN
184: fnd_message.set_name('CSI','CSI_INT_MANY_ATTR_FOUND');
185: fnd_message.set_token('INSTANCE_ID',p_instance_id);
186: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
187: fnd_msg_pub.add;
188: x_return_status := fnd_api.g_ret_sts_error;
189: END get_ext_attribs;
190:
211: AND ((active_end_date is null ) OR
212: (active_end_date > sysdate));
213: EXCEPTION
214: WHEN no_data_found THEN
215: fnd_message.set_name('CSI','CSI_INT_INV_OU_ID');
216: fnd_message.set_token('INSTANCE_ID',p_instance_id);
217: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
218: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
219: fnd_msg_pub.add;
212: (active_end_date > sysdate));
213: EXCEPTION
214: WHEN no_data_found THEN
215: fnd_message.set_name('CSI','CSI_INT_INV_OU_ID');
216: fnd_message.set_token('INSTANCE_ID',p_instance_id);
217: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
218: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
219: fnd_msg_pub.add;
220: x_return_status := fnd_api.g_ret_sts_error;
213: EXCEPTION
214: WHEN no_data_found THEN
215: fnd_message.set_name('CSI','CSI_INT_INV_OU_ID');
216: fnd_message.set_token('INSTANCE_ID',p_instance_id);
217: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
218: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
219: fnd_msg_pub.add;
220: x_return_status := fnd_api.g_ret_sts_error;
221: WHEN too_many_rows THEN
214: WHEN no_data_found THEN
215: fnd_message.set_name('CSI','CSI_INT_INV_OU_ID');
216: fnd_message.set_token('INSTANCE_ID',p_instance_id);
217: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
218: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
219: fnd_msg_pub.add;
220: x_return_status := fnd_api.g_ret_sts_error;
221: WHEN too_many_rows THEN
222: fnd_message.set_name('CSI','CSI_INT_MANY_OU_FOUND');
218: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
219: fnd_msg_pub.add;
220: x_return_status := fnd_api.g_ret_sts_error;
221: WHEN too_many_rows THEN
222: fnd_message.set_name('CSI','CSI_INT_MANY_OU_FOUND');
223: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_id);
224: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
225: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
226: fnd_msg_pub.add;
219: fnd_msg_pub.add;
220: x_return_status := fnd_api.g_ret_sts_error;
221: WHEN too_many_rows THEN
222: fnd_message.set_name('CSI','CSI_INT_MANY_OU_FOUND');
223: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_id);
224: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
225: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
226: fnd_msg_pub.add;
227: x_return_status := fnd_api.g_ret_sts_error;
220: x_return_status := fnd_api.g_ret_sts_error;
221: WHEN too_many_rows THEN
222: fnd_message.set_name('CSI','CSI_INT_MANY_OU_FOUND');
223: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_id);
224: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
225: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
226: fnd_msg_pub.add;
227: x_return_status := fnd_api.g_ret_sts_error;
228: END get_org_assign;
221: WHEN too_many_rows THEN
222: fnd_message.set_name('CSI','CSI_INT_MANY_OU_FOUND');
223: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_id);
224: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
225: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
226: fnd_msg_pub.add;
227: x_return_status := fnd_api.g_ret_sts_error;
228: END get_org_assign;
229:
250: (active_end_date > sysdate));
251:
252: EXCEPTION
253: WHEN no_data_found THEN
254: fnd_message.set_name('CSI','CSI_INT_INV_ACCT_ID');
255: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
256: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
257: fnd_msg_pub.add;
258: x_return_status := fnd_api.g_ret_sts_error;
251:
252: EXCEPTION
253: WHEN no_data_found THEN
254: fnd_message.set_name('CSI','CSI_INT_INV_ACCT_ID');
255: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
256: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
257: fnd_msg_pub.add;
258: x_return_status := fnd_api.g_ret_sts_error;
259: WHEN too_many_rows THEN
252: EXCEPTION
253: WHEN no_data_found THEN
254: fnd_message.set_name('CSI','CSI_INT_INV_ACCT_ID');
255: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
256: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
257: fnd_msg_pub.add;
258: x_return_status := fnd_api.g_ret_sts_error;
259: WHEN too_many_rows THEN
260: fnd_message.set_name('CSI','CSI_INT_MANY_ACCT_FOUND');
256: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
257: fnd_msg_pub.add;
258: x_return_status := fnd_api.g_ret_sts_error;
259: WHEN too_many_rows THEN
260: fnd_message.set_name('CSI','CSI_INT_MANY_ACCT_FOUND');
261: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
262: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
263: fnd_msg_pub.add;
264: x_return_status := fnd_api.g_ret_sts_error;
257: fnd_msg_pub.add;
258: x_return_status := fnd_api.g_ret_sts_error;
259: WHEN too_many_rows THEN
260: fnd_message.set_name('CSI','CSI_INT_MANY_ACCT_FOUND');
261: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
262: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
263: fnd_msg_pub.add;
264: x_return_status := fnd_api.g_ret_sts_error;
265: END get_party_account;
258: x_return_status := fnd_api.g_ret_sts_error;
259: WHEN too_many_rows THEN
260: fnd_message.set_name('CSI','CSI_INT_MANY_ACCT_FOUND');
261: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
262: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
263: fnd_msg_pub.add;
264: x_return_status := fnd_api.g_ret_sts_error;
265: END get_party_account;
266:
289:
290:
291: EXCEPTION
292: WHEN no_data_found THEN
293: fnd_message.set_name('CSI','CSI_INT_INV_INSTA_PTY_ID');
294: fnd_message.set_token('INSTANCE_ID',p_instance_id);
295: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
296: fnd_msg_pub.add;
297: x_return_status := fnd_api.g_ret_sts_error;
290:
291: EXCEPTION
292: WHEN no_data_found THEN
293: fnd_message.set_name('CSI','CSI_INT_INV_INSTA_PTY_ID');
294: fnd_message.set_token('INSTANCE_ID',p_instance_id);
295: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
296: fnd_msg_pub.add;
297: x_return_status := fnd_api.g_ret_sts_error;
298: WHEN too_many_rows THEN
291: EXCEPTION
292: WHEN no_data_found THEN
293: fnd_message.set_name('CSI','CSI_INT_INV_INSTA_PTY_ID');
294: fnd_message.set_token('INSTANCE_ID',p_instance_id);
295: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
296: fnd_msg_pub.add;
297: x_return_status := fnd_api.g_ret_sts_error;
298: WHEN too_many_rows THEN
299: fnd_message.set_name('CSI','CSI_INT_MANY_INSTA_PTY_FOUND');
295: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
296: fnd_msg_pub.add;
297: x_return_status := fnd_api.g_ret_sts_error;
298: WHEN too_many_rows THEN
299: fnd_message.set_name('CSI','CSI_INT_MANY_INSTA_PTY_FOUND');
300: fnd_message.set_token('INSTANCE_ID',p_instance_id);
301: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
302: fnd_msg_pub.add;
303: x_return_status := fnd_api.g_ret_sts_error;
296: fnd_msg_pub.add;
297: x_return_status := fnd_api.g_ret_sts_error;
298: WHEN too_many_rows THEN
299: fnd_message.set_name('CSI','CSI_INT_MANY_INSTA_PTY_FOUND');
300: fnd_message.set_token('INSTANCE_ID',p_instance_id);
301: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
302: fnd_msg_pub.add;
303: x_return_status := fnd_api.g_ret_sts_error;
304:
297: x_return_status := fnd_api.g_ret_sts_error;
298: WHEN too_many_rows THEN
299: fnd_message.set_name('CSI','CSI_INT_MANY_INSTA_PTY_FOUND');
300: fnd_message.set_token('INSTANCE_ID',p_instance_id);
301: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
302: fnd_msg_pub.add;
303: x_return_status := fnd_api.g_ret_sts_error;
304:
305: END get_instance_party;
328: -- (active_end_date > sysdate));
329:
330: EXCEPTION
331: WHEN no_data_found THEN
332: fnd_message.set_name('CSI','CSI_INT_INV_INST_ID');
333: fnd_message.set_token('INSTANCE_ID',p_instance_id);
334: fnd_msg_pub.add;
335: x_return_status := fnd_api.g_ret_sts_error;
336: END get_instance;
329:
330: EXCEPTION
331: WHEN no_data_found THEN
332: fnd_message.set_name('CSI','CSI_INT_INV_INST_ID');
333: fnd_message.set_token('INSTANCE_ID',p_instance_id);
334: fnd_msg_pub.add;
335: x_return_status := fnd_api.g_ret_sts_error;
336: END get_instance;
337:
352: (active_end_date > sysdate));
353: RETURN l_obj_ver_num;
354: EXCEPTION
355: WHEN no_data_found THEN
356: fnd_message.set_name('CSI','CSI_INT_INV_ATTR_VALUE_ID');
357: fnd_message.set_token('ATTRIBUTE_VALUE_ID',p_attrib_value_id);
358: fnd_msg_pub.add;
359: l_obj_ver_num := -1;
360: RETURN l_obj_ver_num;
353: RETURN l_obj_ver_num;
354: EXCEPTION
355: WHEN no_data_found THEN
356: fnd_message.set_name('CSI','CSI_INT_INV_ATTR_VALUE_ID');
357: fnd_message.set_token('ATTRIBUTE_VALUE_ID',p_attrib_value_id);
358: fnd_msg_pub.add;
359: l_obj_ver_num := -1;
360: RETURN l_obj_ver_num;
361: END get_ext_obj_ver_num;
377: (active_end_date > sysdate));
378: RETURN l_obj_ver_num;
379: EXCEPTION
380: WHEN no_data_found THEN
381: fnd_message.set_name('CSI','CSI_INT_INST_PTY_MISSING');
382: fnd_message.set_token('INSTANCE_PARTY_ID',p_inst_pty_id);
383: fnd_msg_pub.add;
384: l_obj_ver_num := -1;
385: RETURN l_obj_ver_num;
378: RETURN l_obj_ver_num;
379: EXCEPTION
380: WHEN no_data_found THEN
381: fnd_message.set_name('CSI','CSI_INT_INST_PTY_MISSING');
382: fnd_message.set_token('INSTANCE_PARTY_ID',p_inst_pty_id);
383: fnd_msg_pub.add;
384: l_obj_ver_num := -1;
385: RETURN l_obj_ver_num;
386: END get_pty_obj_ver_num;
401: (active_end_date > sysdate));
402: RETURN l_obj_ver_num;
403: EXCEPTION
404: WHEN no_data_found THEN
405: fnd_message.set_name('CSI','CSI_INT_INV_IP_ACCT_ID');
406: fnd_message.set_token('IP_ACCOUNT_ID',p_ip_acct_id);
407: fnd_msg_pub.add;
408: l_obj_ver_num := -1;
409: RETURN l_obj_ver_num;
402: RETURN l_obj_ver_num;
403: EXCEPTION
404: WHEN no_data_found THEN
405: fnd_message.set_name('CSI','CSI_INT_INV_IP_ACCT_ID');
406: fnd_message.set_token('IP_ACCOUNT_ID',p_ip_acct_id);
407: fnd_msg_pub.add;
408: l_obj_ver_num := -1;
409: RETURN l_obj_ver_num;
410: WHEN others THEN
407: fnd_msg_pub.add;
408: l_obj_ver_num := -1;
409: RETURN l_obj_ver_num;
410: WHEN others THEN
411: fnd_message.set_name('CSI','CSI_INT_INV_IP_ACCT_ID');
412: fnd_message.set_token('IP_ACCOUNT_ID',p_ip_acct_id);
413: fnd_msg_pub.add;
414: l_obj_ver_num := -1;
415: RETURN l_obj_ver_num;
408: l_obj_ver_num := -1;
409: RETURN l_obj_ver_num;
410: WHEN others THEN
411: fnd_message.set_name('CSI','CSI_INT_INV_IP_ACCT_ID');
412: fnd_message.set_token('IP_ACCOUNT_ID',p_ip_acct_id);
413: fnd_msg_pub.add;
414: l_obj_ver_num := -1;
415: RETURN l_obj_ver_num;
416: END get_acct_obj_ver_num;
436:
437: EXCEPTION
438:
439: WHEN no_data_found THEN
440: fnd_message.set_name('CSI', 'CSI_DFLT_SUB_TYPE_MISSING');
441: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
442: fnd_msg_pub.add;
443: x_return_status := fnd_api.g_ret_sts_error;
444: WHEN too_many_rows THEN
437: EXCEPTION
438:
439: WHEN no_data_found THEN
440: fnd_message.set_name('CSI', 'CSI_DFLT_SUB_TYPE_MISSING');
441: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
442: fnd_msg_pub.add;
443: x_return_status := fnd_api.g_ret_sts_error;
444: WHEN too_many_rows THEN
445: fnd_message.set_name('CSI', 'CSI_MANY_DFLT_SUB_TYPES');
441: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
442: fnd_msg_pub.add;
443: x_return_status := fnd_api.g_ret_sts_error;
444: WHEN too_many_rows THEN
445: fnd_message.set_name('CSI', 'CSI_MANY_DFLT_SUB_TYPES');
446: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
447: fnd_msg_pub.add;
448: x_return_status := fnd_api.g_ret_sts_error;
449: END get_dflt_sub_type_id;
442: fnd_msg_pub.add;
443: x_return_status := fnd_api.g_ret_sts_error;
444: WHEN too_many_rows THEN
445: fnd_message.set_name('CSI', 'CSI_MANY_DFLT_SUB_TYPES');
446: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
447: fnd_msg_pub.add;
448: x_return_status := fnd_api.g_ret_sts_error;
449: END get_dflt_sub_type_id;
450:
465: WHERE name = l_status_name;
466:
467: EXCEPTION
468: WHEN no_data_found THEN
469: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
470: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
471: fnd_msg_pub.add;
472: x_return_status := fnd_api.g_ret_sts_error;
473: WHEN too_many_rows THEN
466:
467: EXCEPTION
468: WHEN no_data_found THEN
469: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
470: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
471: fnd_msg_pub.add;
472: x_return_status := fnd_api.g_ret_sts_error;
473: WHEN too_many_rows THEN
474: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
470: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
471: fnd_msg_pub.add;
472: x_return_status := fnd_api.g_ret_sts_error;
473: WHEN too_many_rows THEN
474: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
475: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
476: fnd_msg_pub.add;
477: x_return_status := fnd_api.g_ret_sts_error;
478: END get_dflt_inst_status_id;
471: fnd_msg_pub.add;
472: x_return_status := fnd_api.g_ret_sts_error;
473: WHEN too_many_rows THEN
474: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
475: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
476: fnd_msg_pub.add;
477: x_return_status := fnd_api.g_ret_sts_error;
478: END get_dflt_inst_status_id;
479:
496: RETURN l_uom_code;
497:
498: EXCEPTION
499: WHEN no_data_found THEN
500: fnd_message.set_name('CSI','CSI_INT_INV_ITEM_ID');
501: fnd_message.set_token('INVENTORY_ITEM_ID',p_inv_item_id);
502: fnd_message.set_token('INV_ORGANIZATION_ID',p_inv_org_id);
503: fnd_msg_pub.add;
504: l_uom_code := '';
497:
498: EXCEPTION
499: WHEN no_data_found THEN
500: fnd_message.set_name('CSI','CSI_INT_INV_ITEM_ID');
501: fnd_message.set_token('INVENTORY_ITEM_ID',p_inv_item_id);
502: fnd_message.set_token('INV_ORGANIZATION_ID',p_inv_org_id);
503: fnd_msg_pub.add;
504: l_uom_code := '';
505: RETURN l_uom_code;
498: EXCEPTION
499: WHEN no_data_found THEN
500: fnd_message.set_name('CSI','CSI_INT_INV_ITEM_ID');
501: fnd_message.set_token('INVENTORY_ITEM_ID',p_inv_item_id);
502: fnd_message.set_token('INV_ORGANIZATION_ID',p_inv_org_id);
503: fnd_msg_pub.add;
504: l_uom_code := '';
505: RETURN l_uom_code;
506: END get_primay_uom;
873: WHERE c.cust_acct_site_id = u.cust_acct_site_id
874: AND u.site_use_id = p_order_shipment_rec.ib_current_loc_id; -- ship_to_org_id;
875: EXCEPTION
876: WHEN no_data_found THEN
877: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
878: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
879: fnd_msg_pub.add;
880: RAISE fnd_api.g_exc_error;
881: WHEN too_many_rows THEN
874: AND u.site_use_id = p_order_shipment_rec.ib_current_loc_id; -- ship_to_org_id;
875: EXCEPTION
876: WHEN no_data_found THEN
877: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
878: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
879: fnd_msg_pub.add;
880: RAISE fnd_api.g_exc_error;
881: WHEN too_many_rows THEN
882: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
878: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
879: fnd_msg_pub.add;
880: RAISE fnd_api.g_exc_error;
881: WHEN too_many_rows THEN
882: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
883: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
884: fnd_msg_pub.add;
885: RAISE fnd_api.g_exc_error;
886: END ;
879: fnd_msg_pub.add;
880: RAISE fnd_api.g_exc_error;
881: WHEN too_many_rows THEN
882: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
883: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
884: fnd_msg_pub.add;
885: RAISE fnd_api.g_exc_error;
886: END ;
887:
899: WHERE c.cust_acct_site_id = u.cust_acct_site_id
900: AND u.site_use_id = p_order_shipment_rec.ib_install_loc_id; -- ship_to_org_id;
901: Exception
902: When no_data_found then
903: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
904: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_install_loc_id); -- ship_to_org_id);
905: fnd_msg_pub.add;
906: debug('Party_site_id not found');
907: raise fnd_api.g_exc_error;
900: AND u.site_use_id = p_order_shipment_rec.ib_install_loc_id; -- ship_to_org_id;
901: Exception
902: When no_data_found then
903: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
904: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_install_loc_id); -- ship_to_org_id);
905: fnd_msg_pub.add;
906: debug('Party_site_id not found');
907: raise fnd_api.g_exc_error;
908: when too_many_rows then
905: fnd_msg_pub.add;
906: debug('Party_site_id not found');
907: raise fnd_api.g_exc_error;
908: when too_many_rows then
909: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
910: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_install_loc_id); -- ship_to_org_id);
911: fnd_msg_pub.add;
912: debug('Party_site_id not found');
913: raise fnd_api.g_exc_error;
906: debug('Party_site_id not found');
907: raise fnd_api.g_exc_error;
908: when too_many_rows then
909: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
910: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_install_loc_id); -- ship_to_org_id);
911: fnd_msg_pub.add;
912: debug('Party_site_id not found');
913: raise fnd_api.g_exc_error;
914: end ;
1072: WHERE c.cust_acct_site_id = u.cust_acct_site_id
1073: AND u.site_use_id = p_order_shipment_rec.ship_to_org_id;
1074: EXCEPTION
1075: WHEN no_data_found then
1076: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
1077: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1078: fnd_msg_pub.add;
1079: RAISE fnd_api.g_exc_error;
1080: WHEN too_many_rows then
1073: AND u.site_use_id = p_order_shipment_rec.ship_to_org_id;
1074: EXCEPTION
1075: WHEN no_data_found then
1076: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
1077: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1078: fnd_msg_pub.add;
1079: RAISE fnd_api.g_exc_error;
1080: WHEN too_many_rows then
1081: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1077: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1078: fnd_msg_pub.add;
1079: RAISE fnd_api.g_exc_error;
1080: WHEN too_many_rows then
1081: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1082: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1083: fnd_msg_pub.add;
1084: RAISE fnd_api.g_exc_error;
1085: END;
1078: fnd_msg_pub.add;
1079: RAISE fnd_api.g_exc_error;
1080: WHEN too_many_rows then
1081: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1082: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1083: fnd_msg_pub.add;
1084: RAISE fnd_api.g_exc_error;
1085: END;
1086:
1223: END IF;
1224:
1225: EXCEPTION
1226: WHEN no_data_found THEN
1227: fnd_message.set_name('CSI','CSI_INT_INV_CUST_ACCT_ID');
1228: fnd_message.set_token('CUST_ACCOUNT_ID', p_cust_acct_id);
1229: fnd_msg_pub.add;
1230: RAISE fnd_api.g_exc_error;
1231: END;
1224:
1225: EXCEPTION
1226: WHEN no_data_found THEN
1227: fnd_message.set_name('CSI','CSI_INT_INV_CUST_ACCT_ID');
1228: fnd_message.set_token('CUST_ACCOUNT_ID', p_cust_acct_id);
1229: fnd_msg_pub.add;
1230: RAISE fnd_api.g_exc_error;
1231: END;
1232:
1260: RETURN l_ret_status;
1261:
1262: EXCEPTION
1263: WHEN others THEN
1264: fnd_message.set_name('CSI','CSI_INT_INV_INST_PTY_ID');
1265: fnd_message.set_token('INSTANCE_ID', p_instance_id);
1266: fnd_message.set_token('INSTANCE_PARTY_ID', p_inst_party_id);
1267: fnd_message.set_token('RELATIONSHIP_TYPE_CODE', p_inst_party_id);
1268: fnd_msg_pub.add;
1261:
1262: EXCEPTION
1263: WHEN others THEN
1264: fnd_message.set_name('CSI','CSI_INT_INV_INST_PTY_ID');
1265: fnd_message.set_token('INSTANCE_ID', p_instance_id);
1266: fnd_message.set_token('INSTANCE_PARTY_ID', p_inst_party_id);
1267: fnd_message.set_token('RELATIONSHIP_TYPE_CODE', p_inst_party_id);
1268: fnd_msg_pub.add;
1269: RETURN l_ret_status;
1262: EXCEPTION
1263: WHEN others THEN
1264: fnd_message.set_name('CSI','CSI_INT_INV_INST_PTY_ID');
1265: fnd_message.set_token('INSTANCE_ID', p_instance_id);
1266: fnd_message.set_token('INSTANCE_PARTY_ID', p_inst_party_id);
1267: fnd_message.set_token('RELATIONSHIP_TYPE_CODE', p_inst_party_id);
1268: fnd_msg_pub.add;
1269: RETURN l_ret_status;
1270: END validate_inst_party;
1263: WHEN others THEN
1264: fnd_message.set_name('CSI','CSI_INT_INV_INST_PTY_ID');
1265: fnd_message.set_token('INSTANCE_ID', p_instance_id);
1266: fnd_message.set_token('INSTANCE_PARTY_ID', p_inst_party_id);
1267: fnd_message.set_token('RELATIONSHIP_TYPE_CODE', p_inst_party_id);
1268: fnd_msg_pub.add;
1269: RETURN l_ret_status;
1270: END validate_inst_party;
1271:
1284:
1285: RETURN l_inst_id;
1286: EXCEPTION
1287: WHEN no_data_found THEN
1288: fnd_message.set_name('CSI','CSI_INT_INV_ORD_LINE_ID');
1289: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1290: fnd_msg_pub.add;
1291: l_inst_id := -1;
1292: RETURN l_inst_id;
1285: RETURN l_inst_id;
1286: EXCEPTION
1287: WHEN no_data_found THEN
1288: fnd_message.set_name('CSI','CSI_INT_INV_ORD_LINE_ID');
1289: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1290: fnd_msg_pub.add;
1291: l_inst_id := -1;
1292: RETURN l_inst_id;
1293: WHEN others THEN
1290: fnd_msg_pub.add;
1291: l_inst_id := -1;
1292: RETURN l_inst_id;
1293: WHEN others THEN
1294: fnd_message.set_name('CSI','CSI_INT_INV_ORD_LINE_ID');
1295: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1296: fnd_msg_pub.add;
1297: l_inst_id := -1;
1298: RETURN l_inst_id;
1291: l_inst_id := -1;
1292: RETURN l_inst_id;
1293: WHEN others THEN
1294: fnd_message.set_name('CSI','CSI_INT_INV_ORD_LINE_ID');
1295: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1296: fnd_msg_pub.add;
1297: l_inst_id := -1;
1298: RETURN l_inst_id;
1299: END get_instance;
1342: RETURN l_inst_party_id;
1343:
1344: EXCEPTION
1345: WHEN no_data_found THEN
1346: fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
1347: fnd_message.set_token('INSTANCE_ID',p_instance_id);
1348: fnd_msg_pub.add;
1349: l_inst_party_id := -1;
1350: RETURN l_inst_party_id;
1343:
1344: EXCEPTION
1345: WHEN no_data_found THEN
1346: fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
1347: fnd_message.set_token('INSTANCE_ID',p_instance_id);
1348: fnd_msg_pub.add;
1349: l_inst_party_id := -1;
1350: RETURN l_inst_party_id;
1351: -- Added for 3185043
1349: l_inst_party_id := -1;
1350: RETURN l_inst_party_id;
1351: -- Added for 3185043
1352: WHEN too_many_rows THEN
1353: fnd_message.set_name('CSI','CSI_MANY_INST_OWNER_FOUND');
1354: fnd_message.set_token('INSTANCE_ID',p_instance_id);
1355: fnd_msg_pub.add;
1356: l_inst_party_id := -1;
1357: RETURN l_inst_party_id;
1350: RETURN l_inst_party_id;
1351: -- Added for 3185043
1352: WHEN too_many_rows THEN
1353: fnd_message.set_name('CSI','CSI_MANY_INST_OWNER_FOUND');
1354: fnd_message.set_token('INSTANCE_ID',p_instance_id);
1355: fnd_msg_pub.add;
1356: l_inst_party_id := -1;
1357: RETURN l_inst_party_id;
1358: WHEN others THEN
1355: fnd_msg_pub.add;
1356: l_inst_party_id := -1;
1357: RETURN l_inst_party_id;
1358: WHEN others THEN
1359: -- fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
1360: -- fnd_message.set_token('INSTANCE_ID',p_instance_id);
1361: fnd_message.set_name('CSI','CSI_INT_UNEXP_SQL_ERROR');
1362: fnd_message.set_token('SQL_ERROR',SQLERRM);
1363: fnd_msg_pub.add;
1356: l_inst_party_id := -1;
1357: RETURN l_inst_party_id;
1358: WHEN others THEN
1359: -- fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
1360: -- fnd_message.set_token('INSTANCE_ID',p_instance_id);
1361: fnd_message.set_name('CSI','CSI_INT_UNEXP_SQL_ERROR');
1362: fnd_message.set_token('SQL_ERROR',SQLERRM);
1363: fnd_msg_pub.add;
1364: l_inst_party_id := -1;
1357: RETURN l_inst_party_id;
1358: WHEN others THEN
1359: -- fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
1360: -- fnd_message.set_token('INSTANCE_ID',p_instance_id);
1361: fnd_message.set_name('CSI','CSI_INT_UNEXP_SQL_ERROR');
1362: fnd_message.set_token('SQL_ERROR',SQLERRM);
1363: fnd_msg_pub.add;
1364: l_inst_party_id := -1;
1365: RETURN l_inst_party_id;
1358: WHEN others THEN
1359: -- fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
1360: -- fnd_message.set_token('INSTANCE_ID',p_instance_id);
1361: fnd_message.set_name('CSI','CSI_INT_UNEXP_SQL_ERROR');
1362: fnd_message.set_token('SQL_ERROR',SQLERRM);
1363: fnd_msg_pub.add;
1364: l_inst_party_id := -1;
1365: RETURN l_inst_party_id;
1366: END get_instance_party_id;
1382: RETURN l_trx_type_id;
1383:
1384: exception
1385: when others then
1386: fnd_message.set_name('CSI','CSI_INT_INV_TRX_LINE_ID');
1387: fnd_message.set_token('TRX_LINE_ID',p_trx_line_id);
1388: fnd_msg_pub.add;
1389: l_trx_type_id := -1;
1390: RETURN l_trx_type_id;
1383:
1384: exception
1385: when others then
1386: fnd_message.set_name('CSI','CSI_INT_INV_TRX_LINE_ID');
1387: fnd_message.set_token('TRX_LINE_ID',p_trx_line_id);
1388: fnd_msg_pub.add;
1389: l_trx_type_id := -1;
1390: RETURN l_trx_type_id;
1391:
1409: AND source_transaction_table = p_src_table_name;
1410: RETURN l_trx_line_id;
1411: exception
1412: when others then
1413: fnd_message.set_name('CSI','CSI_INT_INV_SRC_TRX_ID');
1414: fnd_message.set_token('SOURCE_TRANSACTION_ID',p_src_trx_id);
1415: fnd_message.set_token('SOURCE_TRANSACTION_TABLE',p_src_table_name);
1416: fnd_msg_pub.add;
1417: l_trx_line_id := -1;
1410: RETURN l_trx_line_id;
1411: exception
1412: when others then
1413: fnd_message.set_name('CSI','CSI_INT_INV_SRC_TRX_ID');
1414: fnd_message.set_token('SOURCE_TRANSACTION_ID',p_src_trx_id);
1415: fnd_message.set_token('SOURCE_TRANSACTION_TABLE',p_src_table_name);
1416: fnd_msg_pub.add;
1417: l_trx_line_id := -1;
1418: RETURN l_trx_line_id;
1411: exception
1412: when others then
1413: fnd_message.set_name('CSI','CSI_INT_INV_SRC_TRX_ID');
1414: fnd_message.set_token('SOURCE_TRANSACTION_ID',p_src_trx_id);
1415: fnd_message.set_token('SOURCE_TRANSACTION_TABLE',p_src_table_name);
1416: fnd_msg_pub.add;
1417: l_trx_line_id := -1;
1418: RETURN l_trx_line_id;
1419: END Get_trx_line_id;
1438: OR (active_end_date >= sysdate));
1439: RETURN l_ip_acct_id;
1440: exception
1441: when others then
1442: fnd_message.set_name('CSI','CSI_INT_OWNER_ACCT_MISSING');
1443: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_party_id);
1444: fnd_msg_pub.add;
1445: l_ip_acct_id := -1;
1446: RETURN l_ip_acct_id;
1439: RETURN l_ip_acct_id;
1440: exception
1441: when others then
1442: fnd_message.set_name('CSI','CSI_INT_OWNER_ACCT_MISSING');
1443: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_party_id);
1444: fnd_msg_pub.add;
1445: l_ip_acct_id := -1;
1446: RETURN l_ip_acct_id;
1447: END get_ip_account_id;
1469: WHERE organization_id = p_organization_id;
1470:
1471: EXCEPTION
1472: WHEN no_data_found THEN
1473: fnd_message.set_name('CSI','CSI_INT_MSTR_ORG_MISSING');
1474: fnd_message.set_token('ORGANIZATION_ID',p_organization_id);
1475: fnd_msg_pub.add;
1476: x_return_status := l_fnd_error;
1477: WHEN others THEN
1470:
1471: EXCEPTION
1472: WHEN no_data_found THEN
1473: fnd_message.set_name('CSI','CSI_INT_MSTR_ORG_MISSING');
1474: fnd_message.set_token('ORGANIZATION_ID',p_organization_id);
1475: fnd_msg_pub.add;
1476: x_return_status := l_fnd_error;
1477: WHEN others THEN
1478: fnd_message.set_name('CSI','CSI_INT_UNEXP_SQL_ERROR');
1474: fnd_message.set_token('ORGANIZATION_ID',p_organization_id);
1475: fnd_msg_pub.add;
1476: x_return_status := l_fnd_error;
1477: WHEN others THEN
1478: fnd_message.set_name('CSI','CSI_INT_UNEXP_SQL_ERROR');
1479: fnd_message.set_token('SQL_ERROR',SQLERRM);
1480: fnd_msg_pub.add;
1481: x_return_status := l_fnd_unexpected;
1482: END get_master_organization;
1475: fnd_msg_pub.add;
1476: x_return_status := l_fnd_error;
1477: WHEN others THEN
1478: fnd_message.set_name('CSI','CSI_INT_UNEXP_SQL_ERROR');
1479: fnd_message.set_token('SQL_ERROR',SQLERRM);
1480: fnd_msg_pub.add;
1481: x_return_status := l_fnd_unexpected;
1482: END get_master_organization;
1483:
1499: */
1500: x_int_party_id := csi_datastructures_pub.g_install_param_rec.internal_party_id;
1501:
1502: IF x_int_party_id IS NULL THEN
1503: fnd_message.set_name('CSI','CSI_INT_INT_PTY_ID_MISSING');
1504: fnd_msg_pub.add;
1505: x_return_status := fnd_api.g_ret_sts_error;
1506: ELSE
1507: x_return_status := fnd_api.g_ret_sts_success;
1508: END IF;
1509:
1510: exception
1511: when others then
1512: fnd_message.set_name('CSI','CSI_INT_INT_PTY_ID_MISSING');
1513: fnd_msg_pub.add;
1514: x_return_status := fnd_api.g_ret_sts_error;
1515: END get_int_party;
1516:
1541:
1542: RETURN l_serial_code;
1543: exception
1544: when others then
1545: fnd_message.set_name('CSI','CSI_INT_ITEM_ID_MISSING');
1546: fnd_message.set_token('INVENTORY_ITEM_ID',p_inv_item_id);
1547: fnd_message.set_token('INV_ORGANIZATION_ID',p_inv_org_id);
1548: fnd_msg_pub.add;
1549: l_serial_code := -1;
1542: RETURN l_serial_code;
1543: exception
1544: when others then
1545: fnd_message.set_name('CSI','CSI_INT_ITEM_ID_MISSING');
1546: fnd_message.set_token('INVENTORY_ITEM_ID',p_inv_item_id);
1547: fnd_message.set_token('INV_ORGANIZATION_ID',p_inv_org_id);
1548: fnd_msg_pub.add;
1549: l_serial_code := -1;
1550: RETURN l_serial_code;
1543: exception
1544: when others then
1545: fnd_message.set_name('CSI','CSI_INT_ITEM_ID_MISSING');
1546: fnd_message.set_token('INVENTORY_ITEM_ID',p_inv_item_id);
1547: fnd_message.set_token('INV_ORGANIZATION_ID',p_inv_org_id);
1548: fnd_msg_pub.add;
1549: l_serial_code := -1;
1550: RETURN l_serial_code;
1551: END get_serial_contl_code;
1661: WHERE hzcsu.site_use_id = l_order_line_rec.ship_to_org_id
1662: AND hzcas.cust_acct_site_id = hzcsu.cust_acct_site_id;
1663: EXCEPTION
1664: WHEN no_data_found THEN
1665: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
1666: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1667: fnd_msg_pub.add;
1668: RAISE fnd_api.g_exc_error;
1669: WHEN too_many_rows THEN
1662: AND hzcas.cust_acct_site_id = hzcsu.cust_acct_site_id;
1663: EXCEPTION
1664: WHEN no_data_found THEN
1665: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
1666: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1667: fnd_msg_pub.add;
1668: RAISE fnd_api.g_exc_error;
1669: WHEN too_many_rows THEN
1670: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1666: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1667: fnd_msg_pub.add;
1668: RAISE fnd_api.g_exc_error;
1669: WHEN too_many_rows THEN
1670: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1671: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1672: fnd_msg_pub.add;
1673: RAISE fnd_api.g_exc_error;
1674: END;
1667: fnd_msg_pub.add;
1668: RAISE fnd_api.g_exc_error;
1669: WHEN too_many_rows THEN
1670: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1671: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1672: fnd_msg_pub.add;
1673: RAISE fnd_api.g_exc_error;
1674: END;
1675:
1693: IF l_partner_rec.IB_OWNER = 'END_CUSTOMER'
1694: THEN
1695: l_order_line_rec.ib_owner := 'END_CUSTOMER';
1696: IF l_partner_rec.END_CUSTOMER_ID is null Then
1697: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1698: fnd_msg_pub.add;
1699: raise fnd_api.g_exc_error;
1700: ELSE
1701: l_order_line_rec.end_customer_id := l_partner_rec.end_customer_id;
1714: IF l_order_line_rec.ib_install_loc = 'END_CUSTOMER'
1715: THEN
1716: IF l_partner_rec.end_customer_site_use_id is null
1717: THEN
1718: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1719: fnd_msg_pub.add;
1720: raise fnd_api.g_exc_error;
1721: ELSE
1722: l_order_line_rec.ib_install_loc_id := l_partner_rec.end_customer_site_use_id;
1724: ELSIF l_order_line_rec.ib_install_loc = 'SHIP_TO'
1725: THEN
1726: IF l_order_line_rec.ship_to_org_id is null
1727: THEN
1728: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1729: fnd_msg_pub.add;
1730: raise fnd_api.g_exc_error;
1731: ELSE
1732: l_order_line_rec.ib_install_loc_id := l_order_line_rec.ship_to_org_id;
1734: ELSIF l_order_line_rec.ib_install_loc = 'SOLD_TO'
1735: THEN
1736: IF l_partner_rec.SOLD_TO_SITE_USE_ID is null -- 3412544 l_order_line_rec.sold_to_org_id is null
1737: THEN
1738: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1739: fnd_msg_pub.add;
1740: raise fnd_api.g_exc_error;
1741: ELSE
1742: l_order_line_rec.ib_install_loc_id := l_partner_rec.SOLD_TO_SITE_USE_ID; -- 3412544 l_order_line_rec.sold_to_org_id;
1744: ELSIF l_order_line_rec.ib_install_loc = 'DELIVER_TO'
1745: THEN
1746: IF l_order_line_rec.deliver_to_org_id is null
1747: THEN
1748: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1749: fnd_msg_pub.add;
1750: raise fnd_api.g_exc_error;
1751: ELSE
1752: l_order_line_rec.ib_install_loc_id := l_order_line_rec.deliver_to_org_id;
1754: ELSIF l_order_line_rec.ib_install_loc = 'BILL_TO'
1755: THEN
1756: IF l_order_line_rec.invoice_to_org_id is null
1757: THEN
1758: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1759: fnd_msg_pub.add;
1760: raise fnd_api.g_exc_error;
1761: ELSE
1762: l_order_line_rec.ib_install_loc_id := l_order_line_rec.invoice_to_org_id;
1775: IF l_order_line_rec.ib_current_loc = 'END_CUSTOMER'
1776: THEN
1777: IF l_partner_rec.end_customer_site_use_id is null
1778: THEN
1779: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1780: fnd_msg_pub.add;
1781: raise fnd_api.g_exc_error;
1782: ELSE
1783: l_order_line_rec.ib_current_loc_id := l_partner_rec.end_customer_site_use_id;
1785: ELSIF l_order_line_rec.ib_current_loc = 'SHIP_TO'
1786: THEN
1787: IF l_order_line_rec.ship_to_org_id is null
1788: THEN
1789: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1790: fnd_msg_pub.add;
1791: raise fnd_api.g_exc_error;
1792: ELSE
1793: l_order_line_rec.ib_current_loc_id := l_order_line_rec.ship_to_org_id;
1795: ELSIF l_order_line_rec.ib_current_loc = 'SOLD_TO'
1796: THEN
1797: IF l_partner_rec.SOLD_TO_SITE_USE_ID is null -- 3412544 l_order_line_rec.sold_to_org_id is null
1798: THEN
1799: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1800: fnd_msg_pub.add;
1801: raise fnd_api.g_exc_error;
1802: ELSE
1803: l_order_line_rec.ib_current_loc_id := l_partner_rec.SOLD_TO_SITE_USE_ID; -- 3412544 l_order_line_rec.sold_to_org_id;
1805: ELSIF l_order_line_rec.ib_current_loc = 'DELIVER_TO'
1806: THEN
1807: IF l_order_line_rec.deliver_to_org_id is null
1808: THEN
1809: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1810: fnd_msg_pub.add;
1811: raise fnd_api.g_exc_error;
1812: ELSE
1813: l_order_line_rec.ib_current_loc_id := l_order_line_rec.deliver_to_org_id;
1815: ELSIF l_order_line_rec.ib_current_loc = 'BILL_TO'
1816: THEN
1817: IF l_order_line_rec.invoice_to_org_id is null
1818: THEN
1819: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1820: fnd_msg_pub.add;
1821: raise fnd_api.g_exc_error;
1822: ELSE
1823: l_order_line_rec.ib_current_loc_id := l_order_line_rec.invoice_to_org_id;
1860: EXCEPTION
1861: WHEN fnd_api.g_exc_error THEN
1862: x_return_status := fnd_api.g_ret_sts_error;
1863: WHEN others THEN
1864: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
1865: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);
1866: fnd_msg_pub.add;
1867: x_return_status := fnd_api.g_ret_sts_error;
1868:
1861: WHEN fnd_api.g_exc_error THEN
1862: x_return_status := fnd_api.g_ret_sts_error;
1863: WHEN others THEN
1864: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
1865: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);
1866: fnd_msg_pub.add;
1867: x_return_status := fnd_api.g_ret_sts_error;
1868:
1869: END get_order_line_dtls;
1893: x_return_status := fnd_api.g_ret_sts_success;
1894: WHEN too_many_rows THEN
1895: x_return_status := fnd_api.g_ret_sts_success;
1896: WHEN others THEN
1897: fnd_message.set_name('CSI','CSI_INT_SPL_ORD_LINE_MISSING');
1898: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1899: fnd_msg_pub.add;
1900: x_return_status := fnd_api.g_ret_sts_error;
1901: END get_split_order_line;
1894: WHEN too_many_rows THEN
1895: x_return_status := fnd_api.g_ret_sts_success;
1896: WHEN others THEN
1897: fnd_message.set_name('CSI','CSI_INT_SPL_ORD_LINE_MISSING');
1898: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1899: fnd_msg_pub.add;
1900: x_return_status := fnd_api.g_ret_sts_error;
1901: END get_split_order_line;
1902:
1938: AND transaction_type_id = p_trx_type_id;
1939:
1940: EXCEPTION
1941: WHEN others THEN
1942: fnd_message.set_name('CSI','CSI_INT_SUB_TYPE_REC_MISSING');
1943: fnd_message.set_token('SUB_TYPE_ID', p_sub_type_id);
1944: fnd_message.set_token('TRANSACTION_TYPE_ID', p_trx_type_id);
1945: fnd_msg_pub.add;
1946: x_return_status := fnd_api.g_ret_sts_error;
1939:
1940: EXCEPTION
1941: WHEN others THEN
1942: fnd_message.set_name('CSI','CSI_INT_SUB_TYPE_REC_MISSING');
1943: fnd_message.set_token('SUB_TYPE_ID', p_sub_type_id);
1944: fnd_message.set_token('TRANSACTION_TYPE_ID', p_trx_type_id);
1945: fnd_msg_pub.add;
1946: x_return_status := fnd_api.g_ret_sts_error;
1947: END get_sub_type_rec;
1940: EXCEPTION
1941: WHEN others THEN
1942: fnd_message.set_name('CSI','CSI_INT_SUB_TYPE_REC_MISSING');
1943: fnd_message.set_token('SUB_TYPE_ID', p_sub_type_id);
1944: fnd_message.set_token('TRANSACTION_TYPE_ID', p_trx_type_id);
1945: fnd_msg_pub.add;
1946: x_return_status := fnd_api.g_ret_sts_error;
1947: END get_sub_type_rec;
1948:
1970: (active_end_date > sysdate));
1971:
1972: exception
1973: when others then
1974: fnd_message.set_name('CSI','CSI_INT_INV_II_REL_ID');
1975: fnd_message.set_token('RELATIONSHIP_ID', p_ii_relationship_id);
1976: fnd_msg_pub.add;
1977: x_return_status := fnd_api.g_ret_sts_error;
1978: END get_inst_relation;
1971:
1972: exception
1973: when others then
1974: fnd_message.set_name('CSI','CSI_INT_INV_II_REL_ID');
1975: fnd_message.set_token('RELATIONSHIP_ID', p_ii_relationship_id);
1976: fnd_msg_pub.add;
1977: x_return_status := fnd_api.g_ret_sts_error;
1978: END get_inst_relation;
1979:
2040: and inventory_item_id = p_order_item_id
2041: and model_remnant_flag = 'Y';
2042: EXCEPTION
2043: WHEN no_data_found THEN
2044: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2045: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2046: fnd_msg_pub.add;
2047: l_ordered_quantity := 0;
2048: WHEN others THEN
2041: and model_remnant_flag = 'Y';
2042: EXCEPTION
2043: WHEN no_data_found THEN
2044: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2045: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2046: fnd_msg_pub.add;
2047: l_ordered_quantity := 0;
2048: WHEN others THEN
2049: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2045: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2046: fnd_msg_pub.add;
2047: l_ordered_quantity := 0;
2048: WHEN others THEN
2049: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2050: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2051: fnd_msg_pub.add;
2052: l_ordered_quantity := 0;
2053: END ;
2046: fnd_msg_pub.add;
2047: l_ordered_quantity := 0;
2048: WHEN others THEN
2049: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2050: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2051: fnd_msg_pub.add;
2052: l_ordered_quantity := 0;
2053: END ;
2054: ELSE
2063: WHERE line_id = p_link_to_line_id;
2064:
2065: EXCEPTION
2066: WHEN no_data_found THEN
2067: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2068: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2069: fnd_msg_pub.add;
2070: l_ordered_quantity := 0;
2071: WHEN others THEN
2064:
2065: EXCEPTION
2066: WHEN no_data_found THEN
2067: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2068: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2069: fnd_msg_pub.add;
2070: l_ordered_quantity := 0;
2071: WHEN others THEN
2072: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2068: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2069: fnd_msg_pub.add;
2070: l_ordered_quantity := 0;
2071: WHEN others THEN
2072: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2073: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2074: fnd_msg_pub.add;
2075: l_ordered_quantity := 0;
2076: END ;
2069: fnd_msg_pub.add;
2070: l_ordered_quantity := 0;
2071: WHEN others THEN
2072: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2073: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2074: fnd_msg_pub.add;
2075: l_ordered_quantity := 0;
2076: END ;
2077:
2093: debug('IB Trackable '||l_ib_trackable_flag);
2094:
2095: Exception
2096: WHEN no_data_found THEN
2097: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2098: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2099: fnd_msg_pub.add;
2100: l_ordered_quantity := 0;
2101: End;
2094:
2095: Exception
2096: WHEN no_data_found THEN
2097: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2098: fnd_message.set_token('LINE_ID',p_link_to_line_id);
2099: fnd_msg_pub.add;
2100: l_ordered_quantity := 0;
2101: End;
2102:
2165:
2166: exception
2167: when no_data_found then --fix for bug5045398--
2168: debug('Passed link_to_line_id '||x_link_to_line_id||' does not exists in oe order lines');
2169: fnd_message.set_name('CSI','CSI_OE_LINK_TO_LINE_ID_INVALID');
2170: fnd_message.set_token('OE_LINK_TO_LINE_ID', x_link_to_line_id);
2171: fnd_msg_pub.add;
2172: x_return_status := fnd_api.g_ret_sts_error;
2173: l_found := TRUE;
2166: exception
2167: when no_data_found then --fix for bug5045398--
2168: debug('Passed link_to_line_id '||x_link_to_line_id||' does not exists in oe order lines');
2169: fnd_message.set_name('CSI','CSI_OE_LINK_TO_LINE_ID_INVALID');
2170: fnd_message.set_token('OE_LINK_TO_LINE_ID', x_link_to_line_id);
2171: fnd_msg_pub.add;
2172: x_return_status := fnd_api.g_ret_sts_error;
2173: l_found := TRUE;
2174: --end of fix--
2173: l_found := TRUE;
2174: --end of fix--
2175: end;
2176: WHEN others THEN
2177: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2178: fnd_message.set_token('LINE_ID',x_link_to_line_id);
2179: fnd_msg_pub.add;
2180: END ;
2181:
2174: --end of fix--
2175: end;
2176: WHEN others THEN
2177: fnd_message.set_name('CSI','CSI_INT_MOD_INST_MISSING');
2178: fnd_message.set_token('LINE_ID',x_link_to_line_id);
2179: fnd_msg_pub.add;
2180: END ;
2181:
2182: END LOOP; --end of while loop
3512:
3513: EXCEPTION
3514: WHEN no_data_found THEN
3515: x_return_status := fnd_api.g_ret_sts_error;
3516: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
3517: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);
3518: fnd_msg_pub.add;
3519: END get_source_trx_dtls;
3520:
3513: EXCEPTION
3514: WHEN no_data_found THEN
3515: x_return_status := fnd_api.g_ret_sts_error;
3516: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
3517: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);
3518: fnd_msg_pub.add;
3519: END get_source_trx_dtls;
3520:
3521: PROCEDURE split_txn_dtls_with_qty( --Included the API for bug 4354267
4820: WHERE subject_id = l_old_instance_id
4821: AND object_id = l_parent_instance_id;
4822: EXCEPTION
4823: WHEN NO_DATA_FOUND THEN
4824: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4825: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4826: fnd_msg_pub.add;
4827: debug('Item being replaced belongs to a different configuration.');
4828: RAISE fnd_api.g_exc_error;
4821: AND object_id = l_parent_instance_id;
4822: EXCEPTION
4823: WHEN NO_DATA_FOUND THEN
4824: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4825: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4826: fnd_msg_pub.add;
4827: debug('Item being replaced belongs to a different configuration.');
4828: RAISE fnd_api.g_exc_error;
4829: WHEN OTHERS THEN
4826: fnd_msg_pub.add;
4827: debug('Item being replaced belongs to a different configuration.');
4828: RAISE fnd_api.g_exc_error;
4829: WHEN OTHERS THEN
4830: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4831: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4832: fnd_msg_pub.add;
4833: debug('Item being replaced belongs to a different configuration.');
4834: RAISE fnd_api.g_exc_error;
4827: debug('Item being replaced belongs to a different configuration.');
4828: RAISE fnd_api.g_exc_error;
4829: WHEN OTHERS THEN
4830: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4831: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4832: fnd_msg_pub.add;
4833: debug('Item being replaced belongs to a different configuration.');
4834: RAISE fnd_api.g_exc_error;
4835: END;
4841: FROM csi_item_instances
4842: WHERE instance_id = l_old_instance_id;
4843: EXCEPTION
4844: WHEN OTHERS THEN
4845: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4846: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4847: fnd_msg_pub.add;
4848: debug('Item being replaced belongs to a different configuration.');
4849: RAISE fnd_api.g_exc_error;
4842: WHERE instance_id = l_old_instance_id;
4843: EXCEPTION
4844: WHEN OTHERS THEN
4845: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4846: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4847: fnd_msg_pub.add;
4848: debug('Item being replaced belongs to a different configuration.');
4849: RAISE fnd_api.g_exc_error;
4850: END;
4867: END LOOP;
4868:
4869: debug('l_item_status = '||l_item_status);
4870: IF l_item_status is null THEN
4871: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4872: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4873: fnd_msg_pub.add;
4874: debug('Item is in INVENTORY and relationship is Active');
4875: RAISE fnd_api.g_exc_error;
4868:
4869: debug('l_item_status = '||l_item_status);
4870: IF l_item_status is null THEN
4871: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4872: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4873: fnd_msg_pub.add;
4874: debug('Item is in INVENTORY and relationship is Active');
4875: RAISE fnd_api.g_exc_error;
4876: ELSE
4964: FETCH check_instance_status into l_valid_instance_no;
4965:
4966: IF check_instance_status%notfound THEN
4967: close check_instance_status;
4968: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4969: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
4970: fnd_msg_pub.add;
4971: debug('Check instance status - The item being replaced is no longer valid.');
4972: RAISE fnd_api.g_exc_error;
4965:
4966: IF check_instance_status%notfound THEN
4967: close check_instance_status;
4968: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4969: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
4970: fnd_msg_pub.add;
4971: debug('Check instance status - The item being replaced is no longer valid.');
4972: RAISE fnd_api.g_exc_error;
4973: ELSE
4993:
4994: l_upd_ii := l_upd_ii + 1;
4995: EXCEPTION
4996: WHEN NO_DATA_FOUND THEN
4997: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4998: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
4999: fnd_msg_pub.add;
5000: debug('No data found - Item being replaced is no longer valid.');
5001: RAISE fnd_api.g_exc_error;
4994: l_upd_ii := l_upd_ii + 1;
4995: EXCEPTION
4996: WHEN NO_DATA_FOUND THEN
4997: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4998: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
4999: fnd_msg_pub.add;
5000: debug('No data found - Item being replaced is no longer valid.');
5001: RAISE fnd_api.g_exc_error;
5002: WHEN OTHERS THEN
4999: fnd_msg_pub.add;
5000: debug('No data found - Item being replaced is no longer valid.');
5001: RAISE fnd_api.g_exc_error;
5002: WHEN OTHERS THEN
5003: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5004: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5005: fnd_msg_pub.add;
5006: debug('Others - Item being replaced is no longer valid');
5007: RAISE fnd_api.g_exc_error;
5000: debug('No data found - Item being replaced is no longer valid.');
5001: RAISE fnd_api.g_exc_error;
5002: WHEN OTHERS THEN
5003: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5004: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5005: fnd_msg_pub.add;
5006: debug('Others - Item being replaced is no longer valid');
5007: RAISE fnd_api.g_exc_error;
5008: END;
5082: END LOOP;
5083: END IF;
5084: EXCEPTION
5085: WHEN NO_DATA_FOUND THEN
5086: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5087: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5088: fnd_msg_pub.add;
5089: debug('No data found - Item being replaced is no longer valid.');
5090: RAISE fnd_api.g_exc_error;
5083: END IF;
5084: EXCEPTION
5085: WHEN NO_DATA_FOUND THEN
5086: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5087: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5088: fnd_msg_pub.add;
5089: debug('No data found - Item being replaced is no longer valid.');
5090: RAISE fnd_api.g_exc_error;
5091: WHEN OTHERS THEN
5088: fnd_msg_pub.add;
5089: debug('No data found - Item being replaced is no longer valid.');
5090: RAISE fnd_api.g_exc_error;
5091: WHEN OTHERS THEN
5092: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5093: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5094: fnd_msg_pub.add;
5095: debug('Others - Item being replaced is no longer valid');
5096: RAISE fnd_api.g_exc_error;
5089: debug('No data found - Item being replaced is no longer valid.');
5090: RAISE fnd_api.g_exc_error;
5091: WHEN OTHERS THEN
5092: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5093: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5094: fnd_msg_pub.add;
5095: debug('Others - Item being replaced is no longer valid');
5096: RAISE fnd_api.g_exc_error;
5097: END;
5174: OR
5175: sysdate < nvl(active_end_date, sysdate +1) );
5176: EXCEPTION
5177: WHEN no_data_found THEN
5178: fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
5179: fnd_message.set_token('INSTANCE_ID',l_instance_id);
5180: fnd_msg_pub.add;
5181: raise fnd_api.g_exc_error;
5182: END;
5175: sysdate < nvl(active_end_date, sysdate +1) );
5176: EXCEPTION
5177: WHEN no_data_found THEN
5178: fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
5179: fnd_message.set_token('INSTANCE_ID',l_instance_id);
5180: fnd_msg_pub.add;
5181: raise fnd_api.g_exc_error;
5182: END;
5183:
5536: AND directional_flag = 'F';
5537:
5538: EXCEPTION
5539: WHEN no_data_found THEN
5540: fnd_message.set_name('CSI','CSI_INT_CUST_ROLEID_MISSING');
5541: fnd_message.set_token('CUST_ACCOUNT_ROLE_ID',p_cust_acct_role_id);
5542: fnd_msg_pub.add;
5543: x_return_status := fnd_api.g_ret_sts_error ;
5544: END derive_party_id;
5537:
5538: EXCEPTION
5539: WHEN no_data_found THEN
5540: fnd_message.set_name('CSI','CSI_INT_CUST_ROLEID_MISSING');
5541: fnd_message.set_token('CUST_ACCOUNT_ROLE_ID',p_cust_acct_role_id);
5542: fnd_msg_pub.add;
5543: x_return_status := fnd_api.g_ret_sts_error ;
5544: END derive_party_id;
5545:
5923: WHERE transaction_id = p_mtl_txn_id;
5924:
5925: EXCEPTION
5926: WHEN no_data_found THEN
5927: fnd_message.set_name('CSI','CSI_NO_INVENTORY_RECORDS');
5928: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_txn_id);
5929: fnd_msg_pub.add;
5930: RAISE fnd_api.g_exc_error;
5931:
5924:
5925: EXCEPTION
5926: WHEN no_data_found THEN
5927: fnd_message.set_name('CSI','CSI_NO_INVENTORY_RECORDS');
5928: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_txn_id);
5929: fnd_msg_pub.add;
5930: RAISE fnd_api.g_exc_error;
5931:
5932: END;
5962: AND organization_id = l_item_control_rec.organization_id;
5963:
5964: EXCEPTION
5965: WHEN no_data_found THEN
5966: fnd_message.set_name('CSI', 'CSI_INT_ITEM_ID_MISSING');
5967: fnd_message.set_token('INVENTORY_ITEM_ID', l_item_control_rec.inventory_item_id);
5968: fnd_message.set_token('INV_ORGANZATION_ID', l_item_control_rec.organization_id);
5969: fnd_msg_pub.add;
5970: RAISE fnd_api.g_exc_error;
5963:
5964: EXCEPTION
5965: WHEN no_data_found THEN
5966: fnd_message.set_name('CSI', 'CSI_INT_ITEM_ID_MISSING');
5967: fnd_message.set_token('INVENTORY_ITEM_ID', l_item_control_rec.inventory_item_id);
5968: fnd_message.set_token('INV_ORGANZATION_ID', l_item_control_rec.organization_id);
5969: fnd_msg_pub.add;
5970: RAISE fnd_api.g_exc_error;
5971: END;
5964: EXCEPTION
5965: WHEN no_data_found THEN
5966: fnd_message.set_name('CSI', 'CSI_INT_ITEM_ID_MISSING');
5967: fnd_message.set_token('INVENTORY_ITEM_ID', l_item_control_rec.inventory_item_id);
5968: fnd_message.set_token('INV_ORGANZATION_ID', l_item_control_rec.organization_id);
5969: fnd_msg_pub.add;
5970: RAISE fnd_api.g_exc_error;
5971: END;
5972:
6182: From csi_t_transaction_lines tl, csi_t_txn_line_details tld
6183: Where tld.transaction_line_id = tl.transaction_line_id
6184: And tld.txn_line_detail_id = l_orig_oe_tld;
6185: Exception when others Then
6186: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
6187: fnd_message.set_token('MESSAGE', substr(sqlerrm, 1, 240));
6188: fnd_msg_pub.add;
6189: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6190: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
6183: Where tld.transaction_line_id = tl.transaction_line_id
6184: And tld.txn_line_detail_id = l_orig_oe_tld;
6185: Exception when others Then
6186: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
6187: fnd_message.set_token('MESSAGE', substr(sqlerrm, 1, 240));
6188: fnd_msg_pub.add;
6189: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6190: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
6191: End;
6558:
6559: /* do a quick check to see if the shipping has not violated the
6560: quantity raito while splitting the instance */
6561: IF l_instance_tbl(l_ind).quantity > p_quantity_ratio THEN
6562: fnd_message.set_name('CSI','CSI_INT_CHILD_RATIO_INVALID');
6563: fnd_message.set_token('CHILD_QTY',l_instance_tbl(l_ind).quantity);
6564: fnd_message.set_token('RATIO', p_quantity_ratio);
6565: fnd_msg_pub.add;
6566: debug ('The instance qty generated by the shipment interface '||
6559: /* do a quick check to see if the shipping has not violated the
6560: quantity raito while splitting the instance */
6561: IF l_instance_tbl(l_ind).quantity > p_quantity_ratio THEN
6562: fnd_message.set_name('CSI','CSI_INT_CHILD_RATIO_INVALID');
6563: fnd_message.set_token('CHILD_QTY',l_instance_tbl(l_ind).quantity);
6564: fnd_message.set_token('RATIO', p_quantity_ratio);
6565: fnd_msg_pub.add;
6566: debug ('The instance qty generated by the shipment interface '||
6567: l_instance_tbl(l_ind).quantity||' is greater than the MODEL/CHILD ratio '||
6560: quantity raito while splitting the instance */
6561: IF l_instance_tbl(l_ind).quantity > p_quantity_ratio THEN
6562: fnd_message.set_name('CSI','CSI_INT_CHILD_RATIO_INVALID');
6563: fnd_message.set_token('CHILD_QTY',l_instance_tbl(l_ind).quantity);
6564: fnd_message.set_token('RATIO', p_quantity_ratio);
6565: fnd_msg_pub.add;
6566: debug ('The instance qty generated by the shipment interface '||
6567: l_instance_tbl(l_ind).quantity||' is greater than the MODEL/CHILD ratio '||
6568: p_quantity_ratio);