22: -- ARGUMENTS
23: -- IN:
24: -- p_init_msg_list Initialize message stack if it is set to
25: -- p_organization_id Organization ID.
26: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
27: -- OUT:
28: -- x_org_cust_obj Logical organization customer record.
29: -- x_return_status Return status after the call. The status can
30: -- be fnd_api.g_ret_sts_success (success),
26: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
27: -- OUT:
28: -- x_org_cust_obj Logical organization customer record.
29: -- x_return_status Return status after the call. The status can
30: -- be fnd_api.g_ret_sts_success (success),
31: -- fnd_api.g_ret_sts_error (error),
32: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
33: -- x_msg_count Number of messages in message stack.
34: -- x_msg_data Message text if x_msg_count is 1.
27: -- OUT:
28: -- x_org_cust_obj Logical organization customer record.
29: -- x_return_status Return status after the call. The status can
30: -- be fnd_api.g_ret_sts_success (success),
31: -- fnd_api.g_ret_sts_error (error),
32: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
33: -- x_msg_count Number of messages in message stack.
34: -- x_msg_data Message text if x_msg_count is 1.
35: --
28: -- x_org_cust_obj Logical organization customer record.
29: -- x_return_status Return status after the call. The status can
30: -- be fnd_api.g_ret_sts_success (success),
31: -- fnd_api.g_ret_sts_error (error),
32: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
33: -- x_msg_count Number of messages in message stack.
34: -- x_msg_data Message text if x_msg_count is 1.
35: --
36: -- NOTES
61:
62:
63:
64: PROCEDURE get_org_cust_bo(
65: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
66: p_organization_id IN NUMBER,
67: p_action_type IN VARCHAR2 := NULL,
68: x_org_cust_obj OUT NOCOPY HZ_ORG_CUST_BO,
69: x_return_status OUT NOCOPY VARCHAR2,
73: l_debug_prefix VARCHAR2(30) := '';
74:
75: begin
76: -- initialize API return status to success.
77: x_return_status := FND_API.G_RET_STS_SUCCESS;
78:
79: -- Initialize message list if p_init_msg_list is set to TRUE
80: IF FND_API.to_Boolean(p_init_msg_list) THEN
81: FND_MSG_PUB.initialize;
76: -- initialize API return status to success.
77: x_return_status := FND_API.G_RET_STS_SUCCESS;
78:
79: -- Initialize message list if p_init_msg_list is set to TRUE
80: IF FND_API.to_Boolean(p_init_msg_list) THEN
81: FND_MSG_PUB.initialize;
82: END IF;
83:
84:
91:
92: x_org_cust_obj := HZ_ORG_CUST_BO(p_action_type, NULL, NULL);
93:
94: HZ_EXTRACT_ORGANIZATION_BO_PVT.get_organization_bo(
95: p_init_msg_list => fnd_api.g_false,
96: p_organization_id => p_organization_id,
97: p_action_type => p_action_type,
98: x_organization_obj => x_org_cust_obj.organization_obj,
99: x_return_status => x_return_status,
99: x_return_status => x_return_status,
100: x_msg_count => x_msg_count,
101: x_msg_data => x_msg_data);
102:
103: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
104: RAISE FND_API.G_EXC_ERROR;
105: END IF;
106:
107:
100: x_msg_count => x_msg_count,
101: x_msg_data => x_msg_data);
102:
103: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
104: RAISE FND_API.G_EXC_ERROR;
105: END IF;
106:
107:
108: HZ_EXTRACT_CUST_ACCT_BO_PVT.get_cust_acct_bos(
105: END IF;
106:
107:
108: HZ_EXTRACT_CUST_ACCT_BO_PVT.get_cust_acct_bos(
109: p_init_msg_list => fnd_api.g_false,
110: p_parent_id => p_organization_id,
111: p_cust_acct_id => NULL,
112: p_action_type => p_action_type,
113: x_cust_acct_objs => x_org_cust_obj.account_objs,
114: x_return_status => x_return_status,
115: x_msg_count => x_msg_count,
116: x_msg_data => x_msg_data);
117:
118: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
119: RAISE FND_API.G_EXC_ERROR;
120: END IF;
121:
122:
115: x_msg_count => x_msg_count,
116: x_msg_data => x_msg_data);
117:
118: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
119: RAISE FND_API.G_EXC_ERROR;
120: END IF;
121:
122:
123: -- Debug info.
137:
138:
139: EXCEPTION
140:
141: WHEN fnd_api.g_exc_error THEN
142: x_return_status := fnd_api.g_ret_sts_error;
143:
144: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
145: p_count => x_msg_count,
138:
139: EXCEPTION
140:
141: WHEN fnd_api.g_exc_error THEN
142: x_return_status := fnd_api.g_ret_sts_error;
143:
144: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
145: p_count => x_msg_count,
146: p_data => x_msg_data);
140:
141: WHEN fnd_api.g_exc_error THEN
142: x_return_status := fnd_api.g_ret_sts_error;
143:
144: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
145: p_count => x_msg_count,
146: p_data => x_msg_data);
147:
148: -- Debug info.
156: hz_utility_v2pub.debug(p_message=>'get_org_cust_bo (-)',
157: p_prefix=>l_debug_prefix,
158: p_msg_level=>fnd_log.level_procedure);
159: END IF;
160: WHEN fnd_api.g_exc_unexpected_error THEN
161: x_return_status := fnd_api.g_ret_sts_unexp_error;
162:
163: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
164: p_count => x_msg_count,
157: p_prefix=>l_debug_prefix,
158: p_msg_level=>fnd_log.level_procedure);
159: END IF;
160: WHEN fnd_api.g_exc_unexpected_error THEN
161: x_return_status := fnd_api.g_ret_sts_unexp_error;
162:
163: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
164: p_count => x_msg_count,
165: p_data => x_msg_data);
159: END IF;
160: WHEN fnd_api.g_exc_unexpected_error THEN
161: x_return_status := fnd_api.g_ret_sts_unexp_error;
162:
163: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
164: p_count => x_msg_count,
165: p_data => x_msg_data);
166:
167: -- Debug info.
176: p_prefix=>l_debug_prefix,
177: p_msg_level=>fnd_log.level_procedure);
178: END IF;
179: WHEN OTHERS THEN
180: x_return_status := fnd_api.g_ret_sts_unexp_error;
181:
182: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
183: fnd_message.set_token('ERROR' ,SQLERRM);
184: fnd_msg_pub.add;
182: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
183: fnd_message.set_token('ERROR' ,SQLERRM);
184: fnd_msg_pub.add;
185:
186: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
187: p_count => x_msg_count,
188: p_data => x_msg_data);
189:
190: -- Debug info.
237: -- ARGUMENTS
238: -- IN:
239: -- p_init_msg_list Initialize message stack if it is set to
240: -- p_event_id BES Event identifier.
241: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
242: -- OUT:
243: -- x_org_cust_objs One or more created logical organization customer.
244: -- x_return_status Return status after the call. The status can
245: -- be fnd_api.g_ret_sts_success (success),
241: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
242: -- OUT:
243: -- x_org_cust_objs One or more created logical organization customer.
244: -- x_return_status Return status after the call. The status can
245: -- be fnd_api.g_ret_sts_success (success),
246: -- fnd_api.g_ret_sts_error (error),
247: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
248: -- x_msg_count Number of messages in message stack.
249: -- x_msg_data Message text if x_msg_count is 1.
242: -- OUT:
243: -- x_org_cust_objs One or more created logical organization customer.
244: -- x_return_status Return status after the call. The status can
245: -- be fnd_api.g_ret_sts_success (success),
246: -- fnd_api.g_ret_sts_error (error),
247: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
248: -- x_msg_count Number of messages in message stack.
249: -- x_msg_data Message text if x_msg_count is 1.
250: --
243: -- x_org_cust_objs One or more created logical organization customer.
244: -- x_return_status Return status after the call. The status can
245: -- be fnd_api.g_ret_sts_success (success),
246: -- fnd_api.g_ret_sts_error (error),
247: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
248: -- x_msg_count Number of messages in message stack.
249: -- x_msg_data Message text if x_msg_count is 1.
250: --
251: -- NOTES
271: */
272:
273:
274: PROCEDURE get_org_custs_created(
275: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
276: p_event_id IN NUMBER,
277: x_org_cust_objs OUT NOCOPY HZ_ORG_CUST_BO_TBL,
278: x_return_status OUT NOCOPY VARCHAR2,
279: x_msg_count OUT NOCOPY NUMBER,
287:
288: begin
289:
290: -- initialize API return status to success.
291: x_return_status := FND_API.G_RET_STS_SUCCESS;
292:
293: -- Initialize message list if p_init_msg_list is set to TRUE
294: IF FND_API.to_Boolean(p_init_msg_list) THEN
295: FND_MSG_PUB.initialize;
290: -- initialize API return status to success.
291: x_return_status := FND_API.G_RET_STS_SUCCESS;
292:
293: -- Initialize message list if p_init_msg_list is set to TRUE
294: IF FND_API.to_Boolean(p_init_msg_list) THEN
295: FND_MSG_PUB.initialize;
296: END IF;
297:
298:
304: END IF;
305:
306:
307: HZ_EXTRACT_BO_UTIL_PVT.get_bo_root_ids(
308: p_init_msg_list => fnd_api.g_false,
309: p_event_id => p_event_id,
310: x_obj_root_ids => l_obj_root_ids,
311: x_return_status => x_return_status,
312: x_msg_count => x_msg_count,
311: x_return_status => x_return_status,
312: x_msg_count => x_msg_count,
313: x_msg_data => x_msg_data);
314:
315: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
316: RAISE FND_API.G_EXC_ERROR;
317: END IF;
318:
319: l_child_operation_flag:= get_org_operation_type(p_event_id);
312: x_msg_count => x_msg_count,
313: x_msg_data => x_msg_data);
314:
315: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
316: RAISE FND_API.G_EXC_ERROR;
317: END IF;
318:
319: l_child_operation_flag:= get_org_operation_type(p_event_id);
320:
334: for i in 1..l_obj_root_ids.count loop
335:
336: x_org_cust_objs.extend;
337: /* get_org_cust_bo(
338: p_init_msg_list => fnd_api.g_false,
339: p_organization_id => l_obj_root_ids(i),
340: p_action_type => 'CREATED',
341: x_org_cust_obj => x_org_cust_objs(i),
342: x_return_status => x_return_status,
342: x_return_status => x_return_status,
343: x_msg_count => x_msg_count,
344: x_msg_data => x_msg_data);
345:
346: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
347: RAISE FND_API.G_EXC_ERROR;
348: END IF;
349: */
350:
343: x_msg_count => x_msg_count,
344: x_msg_data => x_msg_data);
345:
346: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
347: RAISE FND_API.G_EXC_ERROR;
348: END IF;
349: */
350:
351: x_org_cust_objs(i) := HZ_ORG_CUST_BO('UNCHANGED', NULL, NULL);
350:
351: x_org_cust_objs(i) := HZ_ORG_CUST_BO('UNCHANGED', NULL, NULL);
352:
353: HZ_EXTRACT_ORGANIZATION_BO_PVT.get_organization_bo(
354: p_init_msg_list => fnd_api.g_false,
355: p_organization_id => l_obj_root_ids(i),
356: p_action_type => l_action_type,
357: x_organization_obj => x_org_cust_objs(i).organization_obj,
358: x_return_status => x_return_status,
358: x_return_status => x_return_status,
359: x_msg_count => x_msg_count,
360: x_msg_data => x_msg_data);
361:
362: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
363: RAISE FND_API.G_EXC_ERROR;
364: END IF;
365:
366: if L_CHILD_OPERATION_FLAG = 'U'
359: x_msg_count => x_msg_count,
360: x_msg_data => x_msg_data);
361:
362: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
363: RAISE FND_API.G_EXC_ERROR;
364: END IF;
365:
366: if L_CHILD_OPERATION_FLAG = 'U'
367: then
372:
373: end if;
374:
375: HZ_EXTRACT_CUST_ACCT_BO_PVT.get_cust_acct_bos(
376: p_init_msg_list => fnd_api.g_false,
377: p_parent_id => l_obj_root_ids(i),
378: p_cust_acct_id => NULL,
379: p_action_type => 'CREATED',
380: x_cust_acct_objs => x_org_cust_objs(i).account_objs,
381: x_return_status => x_return_status,
382: x_msg_count => x_msg_count,
383: x_msg_data => x_msg_data);
384:
385: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
386: RAISE FND_API.G_EXC_ERROR;
387: END IF;
388: if L_CHILD_OPERATION_FLAG = 'I'
389: then
382: x_msg_count => x_msg_count,
383: x_msg_data => x_msg_data);
384:
385: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
386: RAISE FND_API.G_EXC_ERROR;
387: END IF;
388: if L_CHILD_OPERATION_FLAG = 'I'
389: then
390: x_org_cust_objs(i).action_type := 'CREATED';
411:
412:
413: EXCEPTION
414:
415: WHEN fnd_api.g_exc_error THEN
416: x_return_status := fnd_api.g_ret_sts_error;
417:
418: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
419: p_count => x_msg_count,
412:
413: EXCEPTION
414:
415: WHEN fnd_api.g_exc_error THEN
416: x_return_status := fnd_api.g_ret_sts_error;
417:
418: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
419: p_count => x_msg_count,
420: p_data => x_msg_data);
414:
415: WHEN fnd_api.g_exc_error THEN
416: x_return_status := fnd_api.g_ret_sts_error;
417:
418: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
419: p_count => x_msg_count,
420: p_data => x_msg_data);
421:
422: -- Debug info.
430: hz_utility_v2pub.debug(p_message=>'get_org_cust_created(-)',
431: p_prefix=>l_debug_prefix,
432: p_msg_level=>fnd_log.level_procedure);
433: END IF;
434: WHEN fnd_api.g_exc_unexpected_error THEN
435: x_return_status := fnd_api.g_ret_sts_unexp_error;
436:
437: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
438: p_count => x_msg_count,
431: p_prefix=>l_debug_prefix,
432: p_msg_level=>fnd_log.level_procedure);
433: END IF;
434: WHEN fnd_api.g_exc_unexpected_error THEN
435: x_return_status := fnd_api.g_ret_sts_unexp_error;
436:
437: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
438: p_count => x_msg_count,
439: p_data => x_msg_data);
433: END IF;
434: WHEN fnd_api.g_exc_unexpected_error THEN
435: x_return_status := fnd_api.g_ret_sts_unexp_error;
436:
437: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
438: p_count => x_msg_count,
439: p_data => x_msg_data);
440:
441: -- Debug info.
450: p_prefix=>l_debug_prefix,
451: p_msg_level=>fnd_log.level_procedure);
452: END IF;
453: WHEN OTHERS THEN
454: x_return_status := fnd_api.g_ret_sts_unexp_error;
455:
456: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
457: fnd_message.set_token('ERROR' ,SQLERRM);
458: fnd_msg_pub.add;
456: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
457: fnd_message.set_token('ERROR' ,SQLERRM);
458: fnd_msg_pub.add;
459:
460: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
461: p_count => x_msg_count,
462: p_data => x_msg_data);
463:
464: -- Debug info.
493: -- ARGUMENTS
494: -- IN:
495: -- p_init_msg_list Initialize message stack if it is set to
496: -- p_event_id BES Event identifier.
497: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
498: -- OUT:
499: -- x_org_cust_objs One or more updated logical org customer.
500: -- x_return_status Return status after the call. The status can
501: -- be fnd_api.g_ret_sts_success (success),
497: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
498: -- OUT:
499: -- x_org_cust_objs One or more updated logical org customer.
500: -- x_return_status Return status after the call. The status can
501: -- be fnd_api.g_ret_sts_success (success),
502: -- fnd_api.g_ret_sts_error (error),
503: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
504: -- x_msg_count Number of messages in message stack.
505: -- x_msg_data Message text if x_msg_count is 1.
498: -- OUT:
499: -- x_org_cust_objs One or more updated logical org customer.
500: -- x_return_status Return status after the call. The status can
501: -- be fnd_api.g_ret_sts_success (success),
502: -- fnd_api.g_ret_sts_error (error),
503: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
504: -- x_msg_count Number of messages in message stack.
505: -- x_msg_data Message text if x_msg_count is 1.
506: --
499: -- x_org_cust_objs One or more updated logical org customer.
500: -- x_return_status Return status after the call. The status can
501: -- be fnd_api.g_ret_sts_success (success),
502: -- fnd_api.g_ret_sts_error (error),
503: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
504: -- x_msg_count Number of messages in message stack.
505: -- x_msg_data Message text if x_msg_count is 1.
506: --
507: -- NOTES
523: and returns them to the caller.
524: */
525:
526: PROCEDURE get_org_custs_updated(
527: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
528: p_event_id IN NUMBER,
529: x_org_cust_objs OUT NOCOPY HZ_ORG_CUST_BO_TBL,
530: x_return_status OUT NOCOPY VARCHAR2,
531: x_msg_count OUT NOCOPY NUMBER,
537:
538: begin
539:
540: -- initialize API return status to success.
541: x_return_status := FND_API.G_RET_STS_SUCCESS;
542:
543: -- Initialize message list if p_init_msg_list is set to TRUE
544: IF FND_API.to_Boolean(p_init_msg_list) THEN
545: FND_MSG_PUB.initialize;
540: -- initialize API return status to success.
541: x_return_status := FND_API.G_RET_STS_SUCCESS;
542:
543: -- Initialize message list if p_init_msg_list is set to TRUE
544: IF FND_API.to_Boolean(p_init_msg_list) THEN
545: FND_MSG_PUB.initialize;
546: END IF;
547:
548:
554: END IF;
555:
556:
557: HZ_EXTRACT_BO_UTIL_PVT.get_bo_root_ids(
558: p_init_msg_list => fnd_api.g_false,
559: p_event_id => p_event_id,
560: x_obj_root_ids => l_obj_root_ids,
561: x_return_status => x_return_status,
562: x_msg_count => x_msg_count,
561: x_return_status => x_return_status,
562: x_msg_count => x_msg_count,
563: x_msg_data => x_msg_data);
564:
565: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
566: RAISE FND_API.G_EXC_ERROR;
567: END IF;
568:
569:
562: x_msg_count => x_msg_count,
563: x_msg_data => x_msg_data);
564:
565: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
566: RAISE FND_API.G_EXC_ERROR;
567: END IF;
568:
569:
570:
572:
573: for i in 1..l_obj_root_ids.count loop
574: x_org_cust_objs.extend;
575: get_org_cust_updated(
576: p_init_msg_list => fnd_api.g_false,
577: p_event_id => p_event_id,
578: p_org_cust_id => l_obj_root_ids(i),
579: x_org_cust_obj => x_org_cust_objs(i),
580: x_return_status => x_return_status,
601:
602:
603: EXCEPTION
604:
605: WHEN fnd_api.g_exc_error THEN
606: x_return_status := fnd_api.g_ret_sts_error;
607:
608: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
609: p_count => x_msg_count,
602:
603: EXCEPTION
604:
605: WHEN fnd_api.g_exc_error THEN
606: x_return_status := fnd_api.g_ret_sts_error;
607:
608: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
609: p_count => x_msg_count,
610: p_data => x_msg_data);
604:
605: WHEN fnd_api.g_exc_error THEN
606: x_return_status := fnd_api.g_ret_sts_error;
607:
608: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
609: p_count => x_msg_count,
610: p_data => x_msg_data);
611:
612: -- Debug info.
620: hz_utility_v2pub.debug(p_message=>'get_org_custs_updated(-)',
621: p_prefix=>l_debug_prefix,
622: p_msg_level=>fnd_log.level_procedure);
623: END IF;
624: WHEN fnd_api.g_exc_unexpected_error THEN
625: x_return_status := fnd_api.g_ret_sts_unexp_error;
626:
627: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
628: p_count => x_msg_count,
621: p_prefix=>l_debug_prefix,
622: p_msg_level=>fnd_log.level_procedure);
623: END IF;
624: WHEN fnd_api.g_exc_unexpected_error THEN
625: x_return_status := fnd_api.g_ret_sts_unexp_error;
626:
627: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
628: p_count => x_msg_count,
629: p_data => x_msg_data);
623: END IF;
624: WHEN fnd_api.g_exc_unexpected_error THEN
625: x_return_status := fnd_api.g_ret_sts_unexp_error;
626:
627: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
628: p_count => x_msg_count,
629: p_data => x_msg_data);
630:
631: -- Debug info.
640: p_prefix=>l_debug_prefix,
641: p_msg_level=>fnd_log.level_procedure);
642: END IF;
643: WHEN OTHERS THEN
644: x_return_status := fnd_api.g_ret_sts_unexp_error;
645:
646: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
647: fnd_message.set_token('ERROR' ,SQLERRM);
648: fnd_msg_pub.add;
646: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
647: fnd_message.set_token('ERROR' ,SQLERRM);
648: fnd_msg_pub.add;
649:
650: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
651: p_count => x_msg_count,
652: p_data => x_msg_data);
653:
654: -- Debug info.
930: l_creation_date date;
931:
932: begin
933: -- initialize API return status to success.
934: x_return_status := FND_API.G_RET_STS_SUCCESS;
935:
936: open c2;
937: fetch c2 into l_child_event_id, l_creation_date;
938: close c2;
993:
994: EXCEPTION
995:
996:
997: WHEN fnd_api.g_exc_unexpected_error THEN
998: x_return_status := fnd_api.g_ret_sts_unexp_error;
999:
1000:
1001: WHEN OTHERS THEN
994: EXCEPTION
995:
996:
997: WHEN fnd_api.g_exc_unexpected_error THEN
998: x_return_status := fnd_api.g_ret_sts_unexp_error;
999:
1000:
1001: WHEN OTHERS THEN
1002: x_return_status := fnd_api.g_ret_sts_unexp_error;
998: x_return_status := fnd_api.g_ret_sts_unexp_error;
999:
1000:
1001: WHEN OTHERS THEN
1002: x_return_status := fnd_api.g_ret_sts_unexp_error;
1003:
1004: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1005: fnd_message.set_token('ERROR' ,SQLERRM);
1006: fnd_msg_pub.add;
1021: -- IN:
1022: -- p_init_msg_list Initialize message stack if it is set to
1023: -- p_event_id BES Event identifier.
1024: -- p_org_cust_id Organization customer identifier.
1025: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1026: -- OUT:
1027: -- x_org_cust_obj One updated logical organization.
1028: -- x_return_status Return status after the call. The status can
1029: -- be fnd_api.g_ret_sts_success (success),
1025: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1026: -- OUT:
1027: -- x_org_cust_obj One updated logical organization.
1028: -- x_return_status Return status after the call. The status can
1029: -- be fnd_api.g_ret_sts_success (success),
1030: -- fnd_api.g_ret_sts_error (error),
1031: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1032: -- x_msg_count Number of messages in message stack.
1033: -- x_msg_data Message text if x_msg_count is 1.
1026: -- OUT:
1027: -- x_org_cust_obj One updated logical organization.
1028: -- x_return_status Return status after the call. The status can
1029: -- be fnd_api.g_ret_sts_success (success),
1030: -- fnd_api.g_ret_sts_error (error),
1031: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1032: -- x_msg_count Number of messages in message stack.
1033: -- x_msg_data Message text if x_msg_count is 1.
1034: --
1027: -- x_org_cust_obj One updated logical organization.
1028: -- x_return_status Return status after the call. The status can
1029: -- be fnd_api.g_ret_sts_success (success),
1030: -- fnd_api.g_ret_sts_error (error),
1031: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1032: -- x_msg_count Number of messages in message stack.
1033: -- x_msg_data Message text if x_msg_count is 1.
1034: --
1035: -- NOTES
1040: --
1041:
1042:
1043: PROCEDURE get_org_cust_updated(
1044: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1045: p_event_id IN NUMBER,
1046: p_org_cust_id IN NUMBER,
1047: x_org_cust_obj OUT NOCOPY HZ_ORG_CUST_BO,
1048: x_return_status OUT NOCOPY VARCHAR2,
1054: l_org_cust_obj HZ_ORG_CUST_BO;
1055: begin
1056:
1057: -- initialize API return status to success.
1058: x_return_status := FND_API.G_RET_STS_SUCCESS;
1059:
1060: -- Initialize message list if p_init_msg_list is set to TRUE
1061: IF FND_API.to_Boolean(p_init_msg_list) THEN
1062: FND_MSG_PUB.initialize;
1057: -- initialize API return status to success.
1058: x_return_status := FND_API.G_RET_STS_SUCCESS;
1059:
1060: -- Initialize message list if p_init_msg_list is set to TRUE
1061: IF FND_API.to_Boolean(p_init_msg_list) THEN
1062: FND_MSG_PUB.initialize;
1063: END IF;
1064:
1065:
1074: HZ_EXTRACT_BO_UTIL_PVT.validate_event_id(p_event_id => p_event_id,
1075: p_party_id => p_org_cust_id,
1076: x_return_status => x_return_status);
1077:
1078: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1079: RAISE FND_API.G_EXC_ERROR;
1080: END IF;
1081: */
1082: -- Set action type to 'UNCHANGED' by default
1075: p_party_id => p_org_cust_id,
1076: x_return_status => x_return_status);
1077:
1078: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1079: RAISE FND_API.G_EXC_ERROR;
1080: END IF;
1081: */
1082: -- Set action type to 'UNCHANGED' by default
1083:
1081: */
1082: -- Set action type to 'UNCHANGED' by default
1083:
1084: get_org_cust_bo(
1085: p_init_msg_list => fnd_api.g_false,
1086: p_organization_id => p_org_cust_id,
1087: p_action_type => 'UNCHANGED',
1088: x_org_cust_obj => x_org_cust_obj,
1089: x_return_status => x_return_status,
1120:
1121:
1122: EXCEPTION
1123:
1124: WHEN fnd_api.g_exc_error THEN
1125: x_return_status := fnd_api.g_ret_sts_error;
1126:
1127: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1128: p_count => x_msg_count,
1121:
1122: EXCEPTION
1123:
1124: WHEN fnd_api.g_exc_error THEN
1125: x_return_status := fnd_api.g_ret_sts_error;
1126:
1127: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1128: p_count => x_msg_count,
1129: p_data => x_msg_data);
1123:
1124: WHEN fnd_api.g_exc_error THEN
1125: x_return_status := fnd_api.g_ret_sts_error;
1126:
1127: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1128: p_count => x_msg_count,
1129: p_data => x_msg_data);
1130:
1131: -- Debug info.
1139: hz_utility_v2pub.debug(p_message=>'get_org_cust_updated(-)',
1140: p_prefix=>l_debug_prefix,
1141: p_msg_level=>fnd_log.level_procedure);
1142: END IF;
1143: WHEN fnd_api.g_exc_unexpected_error THEN
1144: x_return_status := fnd_api.g_ret_sts_unexp_error;
1145:
1146: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1147: p_count => x_msg_count,
1140: p_prefix=>l_debug_prefix,
1141: p_msg_level=>fnd_log.level_procedure);
1142: END IF;
1143: WHEN fnd_api.g_exc_unexpected_error THEN
1144: x_return_status := fnd_api.g_ret_sts_unexp_error;
1145:
1146: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1147: p_count => x_msg_count,
1148: p_data => x_msg_data);
1142: END IF;
1143: WHEN fnd_api.g_exc_unexpected_error THEN
1144: x_return_status := fnd_api.g_ret_sts_unexp_error;
1145:
1146: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1147: p_count => x_msg_count,
1148: p_data => x_msg_data);
1149:
1150: -- Debug info.
1159: p_prefix=>l_debug_prefix,
1160: p_msg_level=>fnd_log.level_procedure);
1161: END IF;
1162: WHEN OTHERS THEN
1163: x_return_status := fnd_api.g_ret_sts_unexp_error;
1164:
1165: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1166: fnd_message.set_token('ERROR' ,SQLERRM);
1167: fnd_msg_pub.add;
1165: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1166: fnd_message.set_token('ERROR' ,SQLERRM);
1167: fnd_msg_pub.add;
1168:
1169: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1170: p_count => x_msg_count,
1171: p_data => x_msg_data);
1172:
1173: -- Debug info.
1197: -- ARGUMENTS
1198: -- IN:
1199: -- p_init_msg_list Initialize message stack if it is set to
1200: -- p_organization_id Organization ID.
1201: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1202: -- OUT:
1203: -- x_org_cust_v2_obj Logical organization customer record.
1204: -- x_return_status Return status after the call. The status can
1205: -- be fnd_api.g_ret_sts_success (success),
1201: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1202: -- OUT:
1203: -- x_org_cust_v2_obj Logical organization customer record.
1204: -- x_return_status Return status after the call. The status can
1205: -- be fnd_api.g_ret_sts_success (success),
1206: -- fnd_api.g_ret_sts_error (error),
1207: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1208: -- x_msg_count Number of messages in message stack.
1209: -- x_msg_data Message text if x_msg_count is 1.
1202: -- OUT:
1203: -- x_org_cust_v2_obj Logical organization customer record.
1204: -- x_return_status Return status after the call. The status can
1205: -- be fnd_api.g_ret_sts_success (success),
1206: -- fnd_api.g_ret_sts_error (error),
1207: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1208: -- x_msg_count Number of messages in message stack.
1209: -- x_msg_data Message text if x_msg_count is 1.
1210: --
1203: -- x_org_cust_v2_obj Logical organization customer record.
1204: -- x_return_status Return status after the call. The status can
1205: -- be fnd_api.g_ret_sts_success (success),
1206: -- fnd_api.g_ret_sts_error (error),
1207: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1208: -- x_msg_count Number of messages in message stack.
1209: -- x_msg_data Message text if x_msg_count is 1.
1210: --
1211: -- NOTES
1236:
1237:
1238:
1239: PROCEDURE get_org_cust_v2_bo(
1240: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1241: p_organization_id IN NUMBER,
1242: p_action_type IN VARCHAR2 := NULL,
1243: x_org_cust_v2_obj OUT NOCOPY HZ_ORG_CUST_V2_BO,
1244: x_return_status OUT NOCOPY VARCHAR2,
1248: l_debug_prefix VARCHAR2(30) := '';
1249:
1250: begin
1251: -- initialize API return status to success.
1252: x_return_status := FND_API.G_RET_STS_SUCCESS;
1253:
1254: -- Initialize message list if p_init_msg_list is set to TRUE
1255: IF FND_API.to_Boolean(p_init_msg_list) THEN
1256: FND_MSG_PUB.initialize;
1251: -- initialize API return status to success.
1252: x_return_status := FND_API.G_RET_STS_SUCCESS;
1253:
1254: -- Initialize message list if p_init_msg_list is set to TRUE
1255: IF FND_API.to_Boolean(p_init_msg_list) THEN
1256: FND_MSG_PUB.initialize;
1257: END IF;
1258:
1259:
1266:
1267: x_org_cust_v2_obj := HZ_ORG_CUST_V2_BO(p_action_type, NULL, NULL);
1268:
1269: HZ_EXTRACT_ORGANIZATION_BO_PVT.get_organization_bo(
1270: p_init_msg_list => fnd_api.g_false,
1271: p_organization_id => p_organization_id,
1272: p_action_type => p_action_type,
1273: x_organization_obj => x_org_cust_v2_obj.organization_obj,
1274: x_return_status => x_return_status,
1274: x_return_status => x_return_status,
1275: x_msg_count => x_msg_count,
1276: x_msg_data => x_msg_data);
1277:
1278: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1279: RAISE FND_API.G_EXC_ERROR;
1280: END IF;
1281:
1282:
1275: x_msg_count => x_msg_count,
1276: x_msg_data => x_msg_data);
1277:
1278: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1279: RAISE FND_API.G_EXC_ERROR;
1280: END IF;
1281:
1282:
1283: HZ_EXTRACT_CUST_ACCT_BO_PVT.get_cust_acct_v2_bos(
1280: END IF;
1281:
1282:
1283: HZ_EXTRACT_CUST_ACCT_BO_PVT.get_cust_acct_v2_bos(
1284: p_init_msg_list => fnd_api.g_false,
1285: p_parent_id => p_organization_id,
1286: p_cust_acct_id => NULL,
1287: p_action_type => p_action_type,
1288: x_cust_acct_v2_objs => x_org_cust_v2_obj.account_objs,
1289: x_return_status => x_return_status,
1290: x_msg_count => x_msg_count,
1291: x_msg_data => x_msg_data);
1292:
1293: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1294: RAISE FND_API.G_EXC_ERROR;
1295: END IF;
1296:
1297:
1290: x_msg_count => x_msg_count,
1291: x_msg_data => x_msg_data);
1292:
1293: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1294: RAISE FND_API.G_EXC_ERROR;
1295: END IF;
1296:
1297:
1298: -- Debug info.
1312:
1313:
1314: EXCEPTION
1315:
1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;
1318:
1319: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1320: p_count => x_msg_count,
1313:
1314: EXCEPTION
1315:
1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;
1318:
1319: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1320: p_count => x_msg_count,
1321: p_data => x_msg_data);
1315:
1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;
1318:
1319: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1320: p_count => x_msg_count,
1321: p_data => x_msg_data);
1322:
1323: -- Debug info.
1331: hz_utility_v2pub.debug(p_message=>'get_org_cust_v2_bo (-)',
1332: p_prefix=>l_debug_prefix,
1333: p_msg_level=>fnd_log.level_procedure);
1334: END IF;
1335: WHEN fnd_api.g_exc_unexpected_error THEN
1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337:
1338: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1339: p_count => x_msg_count,
1332: p_prefix=>l_debug_prefix,
1333: p_msg_level=>fnd_log.level_procedure);
1334: END IF;
1335: WHEN fnd_api.g_exc_unexpected_error THEN
1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337:
1338: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1339: p_count => x_msg_count,
1340: p_data => x_msg_data);
1334: END IF;
1335: WHEN fnd_api.g_exc_unexpected_error THEN
1336: x_return_status := fnd_api.g_ret_sts_unexp_error;
1337:
1338: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1339: p_count => x_msg_count,
1340: p_data => x_msg_data);
1341:
1342: -- Debug info.
1351: p_prefix=>l_debug_prefix,
1352: p_msg_level=>fnd_log.level_procedure);
1353: END IF;
1354: WHEN OTHERS THEN
1355: x_return_status := fnd_api.g_ret_sts_unexp_error;
1356:
1357: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1358: fnd_message.set_token('ERROR' ,SQLERRM);
1359: fnd_msg_pub.add;
1357: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1358: fnd_message.set_token('ERROR' ,SQLERRM);
1359: fnd_msg_pub.add;
1360:
1361: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1362: p_count => x_msg_count,
1363: p_data => x_msg_data);
1364:
1365: -- Debug info.
1392: -- ARGUMENTS
1393: -- IN:
1394: -- p_init_msg_list Initialize message stack if it is set to
1395: -- p_event_id BES Event identifier.
1396: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1397: -- OUT:
1398: -- x_org_cust_v2_objs One or more created logical organization customer.
1399: -- x_return_status Return status after the call. The status can
1400: -- be fnd_api.g_ret_sts_success (success),
1396: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1397: -- OUT:
1398: -- x_org_cust_v2_objs One or more created logical organization customer.
1399: -- x_return_status Return status after the call. The status can
1400: -- be fnd_api.g_ret_sts_success (success),
1401: -- fnd_api.g_ret_sts_error (error),
1402: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1403: -- x_msg_count Number of messages in message stack.
1404: -- x_msg_data Message text if x_msg_count is 1.
1397: -- OUT:
1398: -- x_org_cust_v2_objs One or more created logical organization customer.
1399: -- x_return_status Return status after the call. The status can
1400: -- be fnd_api.g_ret_sts_success (success),
1401: -- fnd_api.g_ret_sts_error (error),
1402: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1403: -- x_msg_count Number of messages in message stack.
1404: -- x_msg_data Message text if x_msg_count is 1.
1405: --
1398: -- x_org_cust_v2_objs One or more created logical organization customer.
1399: -- x_return_status Return status after the call. The status can
1400: -- be fnd_api.g_ret_sts_success (success),
1401: -- fnd_api.g_ret_sts_error (error),
1402: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1403: -- x_msg_count Number of messages in message stack.
1404: -- x_msg_data Message text if x_msg_count is 1.
1405: --
1406: -- NOTES
1426: */
1427:
1428:
1429: PROCEDURE get_v2_org_custs_created(
1430: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1431: p_event_id IN NUMBER,
1432: x_org_cust_v2_objs OUT NOCOPY HZ_ORG_CUST_V2_BO_TBL,
1433: x_return_status OUT NOCOPY VARCHAR2,
1434: x_msg_count OUT NOCOPY NUMBER,
1442:
1443: begin
1444:
1445: -- initialize API return status to success.
1446: x_return_status := FND_API.G_RET_STS_SUCCESS;
1447:
1448: -- Initialize message list if p_init_msg_list is set to TRUE
1449: IF FND_API.to_Boolean(p_init_msg_list) THEN
1450: FND_MSG_PUB.initialize;
1445: -- initialize API return status to success.
1446: x_return_status := FND_API.G_RET_STS_SUCCESS;
1447:
1448: -- Initialize message list if p_init_msg_list is set to TRUE
1449: IF FND_API.to_Boolean(p_init_msg_list) THEN
1450: FND_MSG_PUB.initialize;
1451: END IF;
1452:
1453:
1459: END IF;
1460:
1461:
1462: HZ_EXTRACT_BO_UTIL_PVT.get_bo_root_ids(
1463: p_init_msg_list => fnd_api.g_false,
1464: p_event_id => p_event_id,
1465: x_obj_root_ids => l_obj_root_ids,
1466: x_return_status => x_return_status,
1467: x_msg_count => x_msg_count,
1466: x_return_status => x_return_status,
1467: x_msg_count => x_msg_count,
1468: x_msg_data => x_msg_data);
1469:
1470: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1471: RAISE FND_API.G_EXC_ERROR;
1472: END IF;
1473:
1474: l_child_operation_flag:= get_org_operation_type(p_event_id);
1467: x_msg_count => x_msg_count,
1468: x_msg_data => x_msg_data);
1469:
1470: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1471: RAISE FND_API.G_EXC_ERROR;
1472: END IF;
1473:
1474: l_child_operation_flag:= get_org_operation_type(p_event_id);
1475:
1492:
1493: x_org_cust_v2_objs(i) := HZ_ORG_CUST_V2_BO('UNCHANGED', NULL, NULL);
1494:
1495: HZ_EXTRACT_ORGANIZATION_BO_PVT.get_organization_bo(
1496: p_init_msg_list => fnd_api.g_false,
1497: p_organization_id => l_obj_root_ids(i),
1498: p_action_type => l_action_type,
1499: x_organization_obj => x_org_cust_v2_objs(i).organization_obj,
1500: x_return_status => x_return_status,
1500: x_return_status => x_return_status,
1501: x_msg_count => x_msg_count,
1502: x_msg_data => x_msg_data);
1503:
1504: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1505: RAISE FND_API.G_EXC_ERROR;
1506: END IF;
1507:
1508: if L_CHILD_OPERATION_FLAG = 'U'
1501: x_msg_count => x_msg_count,
1502: x_msg_data => x_msg_data);
1503:
1504: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1505: RAISE FND_API.G_EXC_ERROR;
1506: END IF;
1507:
1508: if L_CHILD_OPERATION_FLAG = 'U'
1509: then
1514:
1515: end if;
1516:
1517: HZ_EXTRACT_CUST_ACCT_BO_PVT.get_cust_acct_v2_bos(
1518: p_init_msg_list => fnd_api.g_false,
1519: p_parent_id => l_obj_root_ids(i),
1520: p_cust_acct_id => NULL,
1521: p_action_type => 'CREATED',
1522: x_cust_acct_v2_objs => x_org_cust_v2_objs(i).account_objs,
1523: x_return_status => x_return_status,
1524: x_msg_count => x_msg_count,
1525: x_msg_data => x_msg_data);
1526:
1527: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1528: RAISE FND_API.G_EXC_ERROR;
1529: END IF;
1530: if L_CHILD_OPERATION_FLAG = 'I'
1531: then
1524: x_msg_count => x_msg_count,
1525: x_msg_data => x_msg_data);
1526:
1527: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1528: RAISE FND_API.G_EXC_ERROR;
1529: END IF;
1530: if L_CHILD_OPERATION_FLAG = 'I'
1531: then
1532: x_org_cust_v2_objs(i).action_type := 'CREATED';
1553:
1554:
1555: EXCEPTION
1556:
1557: WHEN fnd_api.g_exc_error THEN
1558: x_return_status := fnd_api.g_ret_sts_error;
1559:
1560: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1561: p_count => x_msg_count,
1554:
1555: EXCEPTION
1556:
1557: WHEN fnd_api.g_exc_error THEN
1558: x_return_status := fnd_api.g_ret_sts_error;
1559:
1560: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1561: p_count => x_msg_count,
1562: p_data => x_msg_data);
1556:
1557: WHEN fnd_api.g_exc_error THEN
1558: x_return_status := fnd_api.g_ret_sts_error;
1559:
1560: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1561: p_count => x_msg_count,
1562: p_data => x_msg_data);
1563:
1564: -- Debug info.
1572: hz_utility_v2pub.debug(p_message=>'get_v2_org_cust_created(-)',
1573: p_prefix=>l_debug_prefix,
1574: p_msg_level=>fnd_log.level_procedure);
1575: END IF;
1576: WHEN fnd_api.g_exc_unexpected_error THEN
1577: x_return_status := fnd_api.g_ret_sts_unexp_error;
1578:
1579: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1580: p_count => x_msg_count,
1573: p_prefix=>l_debug_prefix,
1574: p_msg_level=>fnd_log.level_procedure);
1575: END IF;
1576: WHEN fnd_api.g_exc_unexpected_error THEN
1577: x_return_status := fnd_api.g_ret_sts_unexp_error;
1578:
1579: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1580: p_count => x_msg_count,
1581: p_data => x_msg_data);
1575: END IF;
1576: WHEN fnd_api.g_exc_unexpected_error THEN
1577: x_return_status := fnd_api.g_ret_sts_unexp_error;
1578:
1579: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1580: p_count => x_msg_count,
1581: p_data => x_msg_data);
1582:
1583: -- Debug info.
1592: p_prefix=>l_debug_prefix,
1593: p_msg_level=>fnd_log.level_procedure);
1594: END IF;
1595: WHEN OTHERS THEN
1596: x_return_status := fnd_api.g_ret_sts_unexp_error;
1597:
1598: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1599: fnd_message.set_token('ERROR' ,SQLERRM);
1600: fnd_msg_pub.add;
1598: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1599: fnd_message.set_token('ERROR' ,SQLERRM);
1600: fnd_msg_pub.add;
1601:
1602: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1603: p_count => x_msg_count,
1604: p_data => x_msg_data);
1605:
1606: -- Debug info.
1635: -- ARGUMENTS
1636: -- IN:
1637: -- p_init_msg_list Initialize message stack if it is set to
1638: -- p_event_id BES Event identifier.
1639: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1640: -- OUT:
1641: -- x_org_cust_v2_objs One or more updated logical org customer.
1642: -- x_return_status Return status after the call. The status can
1643: -- be fnd_api.g_ret_sts_success (success),
1639: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
1640: -- OUT:
1641: -- x_org_cust_v2_objs One or more updated logical org customer.
1642: -- x_return_status Return status after the call. The status can
1643: -- be fnd_api.g_ret_sts_success (success),
1644: -- fnd_api.g_ret_sts_error (error),
1645: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1646: -- x_msg_count Number of messages in message stack.
1647: -- x_msg_data Message text if x_msg_count is 1.
1640: -- OUT:
1641: -- x_org_cust_v2_objs One or more updated logical org customer.
1642: -- x_return_status Return status after the call. The status can
1643: -- be fnd_api.g_ret_sts_success (success),
1644: -- fnd_api.g_ret_sts_error (error),
1645: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1646: -- x_msg_count Number of messages in message stack.
1647: -- x_msg_data Message text if x_msg_count is 1.
1648: --
1641: -- x_org_cust_v2_objs One or more updated logical org customer.
1642: -- x_return_status Return status after the call. The status can
1643: -- be fnd_api.g_ret_sts_success (success),
1644: -- fnd_api.g_ret_sts_error (error),
1645: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1646: -- x_msg_count Number of messages in message stack.
1647: -- x_msg_data Message text if x_msg_count is 1.
1648: --
1649: -- NOTES
1665: and returns them to the caller.
1666: */
1667:
1668: PROCEDURE get_v2_org_custs_updated(
1669: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1670: p_event_id IN NUMBER,
1671: x_org_cust_v2_objs OUT NOCOPY HZ_ORG_CUST_V2_BO_TBL,
1672: x_return_status OUT NOCOPY VARCHAR2,
1673: x_msg_count OUT NOCOPY NUMBER,
1679:
1680: begin
1681:
1682: -- initialize API return status to success.
1683: x_return_status := FND_API.G_RET_STS_SUCCESS;
1684:
1685: -- Initialize message list if p_init_msg_list is set to TRUE
1686: IF FND_API.to_Boolean(p_init_msg_list) THEN
1687: FND_MSG_PUB.initialize;
1682: -- initialize API return status to success.
1683: x_return_status := FND_API.G_RET_STS_SUCCESS;
1684:
1685: -- Initialize message list if p_init_msg_list is set to TRUE
1686: IF FND_API.to_Boolean(p_init_msg_list) THEN
1687: FND_MSG_PUB.initialize;
1688: END IF;
1689:
1690:
1696: END IF;
1697:
1698:
1699: HZ_EXTRACT_BO_UTIL_PVT.get_bo_root_ids(
1700: p_init_msg_list => fnd_api.g_false,
1701: p_event_id => p_event_id,
1702: x_obj_root_ids => l_obj_root_ids,
1703: x_return_status => x_return_status,
1704: x_msg_count => x_msg_count,
1703: x_return_status => x_return_status,
1704: x_msg_count => x_msg_count,
1705: x_msg_data => x_msg_data);
1706:
1707: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1708: RAISE FND_API.G_EXC_ERROR;
1709: END IF;
1710:
1711:
1704: x_msg_count => x_msg_count,
1705: x_msg_data => x_msg_data);
1706:
1707: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1708: RAISE FND_API.G_EXC_ERROR;
1709: END IF;
1710:
1711:
1712:
1714:
1715: for i in 1..l_obj_root_ids.count loop
1716: x_org_cust_v2_objs.extend;
1717: get_v2_org_cust_updated(
1718: p_init_msg_list => fnd_api.g_false,
1719: p_event_id => p_event_id,
1720: p_org_cust_id => l_obj_root_ids(i),
1721: x_org_cust_v2_obj => x_org_cust_v2_objs(i),
1722: x_return_status => x_return_status,
1743:
1744:
1745: EXCEPTION
1746:
1747: WHEN fnd_api.g_exc_error THEN
1748: x_return_status := fnd_api.g_ret_sts_error;
1749:
1750: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1751: p_count => x_msg_count,
1744:
1745: EXCEPTION
1746:
1747: WHEN fnd_api.g_exc_error THEN
1748: x_return_status := fnd_api.g_ret_sts_error;
1749:
1750: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1751: p_count => x_msg_count,
1752: p_data => x_msg_data);
1746:
1747: WHEN fnd_api.g_exc_error THEN
1748: x_return_status := fnd_api.g_ret_sts_error;
1749:
1750: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1751: p_count => x_msg_count,
1752: p_data => x_msg_data);
1753:
1754: -- Debug info.
1762: hz_utility_v2pub.debug(p_message=>'get_v2_org_custs_updated(-)',
1763: p_prefix=>l_debug_prefix,
1764: p_msg_level=>fnd_log.level_procedure);
1765: END IF;
1766: WHEN fnd_api.g_exc_unexpected_error THEN
1767: x_return_status := fnd_api.g_ret_sts_unexp_error;
1768:
1769: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1770: p_count => x_msg_count,
1763: p_prefix=>l_debug_prefix,
1764: p_msg_level=>fnd_log.level_procedure);
1765: END IF;
1766: WHEN fnd_api.g_exc_unexpected_error THEN
1767: x_return_status := fnd_api.g_ret_sts_unexp_error;
1768:
1769: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1770: p_count => x_msg_count,
1771: p_data => x_msg_data);
1765: END IF;
1766: WHEN fnd_api.g_exc_unexpected_error THEN
1767: x_return_status := fnd_api.g_ret_sts_unexp_error;
1768:
1769: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1770: p_count => x_msg_count,
1771: p_data => x_msg_data);
1772:
1773: -- Debug info.
1782: p_prefix=>l_debug_prefix,
1783: p_msg_level=>fnd_log.level_procedure);
1784: END IF;
1785: WHEN OTHERS THEN
1786: x_return_status := fnd_api.g_ret_sts_unexp_error;
1787:
1788: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1789: fnd_message.set_token('ERROR' ,SQLERRM);
1790: fnd_msg_pub.add;
1788: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
1789: fnd_message.set_token('ERROR' ,SQLERRM);
1790: fnd_msg_pub.add;
1791:
1792: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1793: p_count => x_msg_count,
1794: p_data => x_msg_data);
1795:
1796: -- Debug info.
2076: l_creation_date date;
2077:
2078: begin
2079: -- initialize API return status to success.
2080: x_return_status := FND_API.G_RET_STS_SUCCESS;
2081:
2082: open c2;
2083: fetch c2 into l_child_event_id, l_creation_date;
2084: close c2;
2139:
2140: EXCEPTION
2141:
2142:
2143: WHEN fnd_api.g_exc_unexpected_error THEN
2144: x_return_status := fnd_api.g_ret_sts_unexp_error;
2145:
2146:
2147: WHEN OTHERS THEN
2140: EXCEPTION
2141:
2142:
2143: WHEN fnd_api.g_exc_unexpected_error THEN
2144: x_return_status := fnd_api.g_ret_sts_unexp_error;
2145:
2146:
2147: WHEN OTHERS THEN
2148: x_return_status := fnd_api.g_ret_sts_unexp_error;
2144: x_return_status := fnd_api.g_ret_sts_unexp_error;
2145:
2146:
2147: WHEN OTHERS THEN
2148: x_return_status := fnd_api.g_ret_sts_unexp_error;
2149:
2150: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
2151: fnd_message.set_token('ERROR' ,SQLERRM);
2152: fnd_msg_pub.add;
2167: -- IN:
2168: -- p_init_msg_list Initialize message stack if it is set to
2169: -- p_event_id BES Event identifier.
2170: -- p_org_cust_id Organization customer identifier.
2171: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
2172: -- OUT:
2173: -- x_org_cust_v2_obj One updated logical organization.
2174: -- x_return_status Return status after the call. The status can
2175: -- be fnd_api.g_ret_sts_success (success),
2171: -- FND_API.G_TRUE. Default is FND_API.G_FALSE.
2172: -- OUT:
2173: -- x_org_cust_v2_obj One updated logical organization.
2174: -- x_return_status Return status after the call. The status can
2175: -- be fnd_api.g_ret_sts_success (success),
2176: -- fnd_api.g_ret_sts_error (error),
2177: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2178: -- x_msg_count Number of messages in message stack.
2179: -- x_msg_data Message text if x_msg_count is 1.
2172: -- OUT:
2173: -- x_org_cust_v2_obj One updated logical organization.
2174: -- x_return_status Return status after the call. The status can
2175: -- be fnd_api.g_ret_sts_success (success),
2176: -- fnd_api.g_ret_sts_error (error),
2177: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2178: -- x_msg_count Number of messages in message stack.
2179: -- x_msg_data Message text if x_msg_count is 1.
2180: --
2173: -- x_org_cust_v2_obj One updated logical organization.
2174: -- x_return_status Return status after the call. The status can
2175: -- be fnd_api.g_ret_sts_success (success),
2176: -- fnd_api.g_ret_sts_error (error),
2177: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2178: -- x_msg_count Number of messages in message stack.
2179: -- x_msg_data Message text if x_msg_count is 1.
2180: --
2181: -- NOTES
2186: --
2187:
2188:
2189: PROCEDURE get_v2_org_cust_updated(
2190: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2191: p_event_id IN NUMBER,
2192: p_org_cust_id IN NUMBER,
2193: x_org_cust_v2_obj OUT NOCOPY HZ_ORG_CUST_V2_BO,
2194: x_return_status OUT NOCOPY VARCHAR2,
2200: l_org_cust_obj HZ_ORG_CUST_V2_BO;
2201: begin
2202:
2203: -- initialize API return status to success.
2204: x_return_status := FND_API.G_RET_STS_SUCCESS;
2205:
2206: -- Initialize message list if p_init_msg_list is set to TRUE
2207: IF FND_API.to_Boolean(p_init_msg_list) THEN
2208: FND_MSG_PUB.initialize;
2203: -- initialize API return status to success.
2204: x_return_status := FND_API.G_RET_STS_SUCCESS;
2205:
2206: -- Initialize message list if p_init_msg_list is set to TRUE
2207: IF FND_API.to_Boolean(p_init_msg_list) THEN
2208: FND_MSG_PUB.initialize;
2209: END IF;
2210:
2211:
2218:
2219: -- Set action type to 'UNCHANGED' by default
2220:
2221: get_org_cust_v2_bo(
2222: p_init_msg_list => fnd_api.g_false,
2223: p_organization_id => p_org_cust_id,
2224: p_action_type => 'UNCHANGED',
2225: x_org_cust_v2_obj => x_org_cust_v2_obj,
2226: x_return_status => x_return_status,
2257:
2258:
2259: EXCEPTION
2260:
2261: WHEN fnd_api.g_exc_error THEN
2262: x_return_status := fnd_api.g_ret_sts_error;
2263:
2264: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2265: p_count => x_msg_count,
2258:
2259: EXCEPTION
2260:
2261: WHEN fnd_api.g_exc_error THEN
2262: x_return_status := fnd_api.g_ret_sts_error;
2263:
2264: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2265: p_count => x_msg_count,
2266: p_data => x_msg_data);
2260:
2261: WHEN fnd_api.g_exc_error THEN
2262: x_return_status := fnd_api.g_ret_sts_error;
2263:
2264: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2265: p_count => x_msg_count,
2266: p_data => x_msg_data);
2267:
2268: -- Debug info.
2276: hz_utility_v2pub.debug(p_message=>'get_v2_org_cust_updated(-)',
2277: p_prefix=>l_debug_prefix,
2278: p_msg_level=>fnd_log.level_procedure);
2279: END IF;
2280: WHEN fnd_api.g_exc_unexpected_error THEN
2281: x_return_status := fnd_api.g_ret_sts_unexp_error;
2282:
2283: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2284: p_count => x_msg_count,
2277: p_prefix=>l_debug_prefix,
2278: p_msg_level=>fnd_log.level_procedure);
2279: END IF;
2280: WHEN fnd_api.g_exc_unexpected_error THEN
2281: x_return_status := fnd_api.g_ret_sts_unexp_error;
2282:
2283: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2284: p_count => x_msg_count,
2285: p_data => x_msg_data);
2279: END IF;
2280: WHEN fnd_api.g_exc_unexpected_error THEN
2281: x_return_status := fnd_api.g_ret_sts_unexp_error;
2282:
2283: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2284: p_count => x_msg_count,
2285: p_data => x_msg_data);
2286:
2287: -- Debug info.
2296: p_prefix=>l_debug_prefix,
2297: p_msg_level=>fnd_log.level_procedure);
2298: END IF;
2299: WHEN OTHERS THEN
2300: x_return_status := fnd_api.g_ret_sts_unexp_error;
2301:
2302: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
2303: fnd_message.set_token('ERROR' ,SQLERRM);
2304: fnd_msg_pub.add;
2302: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
2303: fnd_message.set_token('ERROR' ,SQLERRM);
2304: fnd_msg_pub.add;
2305:
2306: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2307: p_count => x_msg_count,
2308: p_data => x_msg_data);
2309:
2310: -- Debug info.