14: p_control_id IN NUMBER := NULL,
15: p_process_organization_id IN NUMBER := NULL,
16: p_association_mode IN VARCHAR2 := 'ASSOCIATE',
17: p_object IN VARCHAR2 := 'RISK',
18: p_commit IN VARCHAR2 := fnd_api.g_false,
19: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
20: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
21: p_api_version_number IN NUMBER,
22: x_return_status OUT NOCOPY VARCHAR2,
15: p_process_organization_id IN NUMBER := NULL,
16: p_association_mode IN VARCHAR2 := 'ASSOCIATE',
17: p_object IN VARCHAR2 := 'RISK',
18: p_commit IN VARCHAR2 := fnd_api.g_false,
19: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
20: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
21: p_api_version_number IN NUMBER,
22: x_return_status OUT NOCOPY VARCHAR2,
23: x_msg_count OUT NOCOPY NUMBER,
16: p_association_mode IN VARCHAR2 := 'ASSOCIATE',
17: p_object IN VARCHAR2 := 'RISK',
18: p_commit IN VARCHAR2 := fnd_api.g_false,
19: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
20: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
21: p_api_version_number IN NUMBER,
22: x_return_status OUT NOCOPY VARCHAR2,
23: x_msg_count OUT NOCOPY NUMBER,
24: x_msg_data OUT NOCOPY VARCHAR2 ) IS
48:
49:
50: BEGIN
51: SAVEPOINT get_process_hierarchy_pvt;
52: x_return_status := fnd_api.g_ret_sts_success;
53: IF NOT fnd_api.compatible_api_call (l_api_version_number,
54: p_api_version_number,
55: l_api_name,
56: g_pkg_name
49:
50: BEGIN
51: SAVEPOINT get_process_hierarchy_pvt;
52: x_return_status := fnd_api.g_ret_sts_success;
53: IF NOT fnd_api.compatible_api_call (l_api_version_number,
54: p_api_version_number,
55: l_api_name,
56: g_pkg_name
57: ) THEN
54: p_api_version_number,
55: l_api_name,
56: g_pkg_name
57: ) THEN
58: RAISE fnd_api.g_exc_unexpected_error;
59: END IF;
60: -- Initialize message list if p_init_msg_list is set to TRUE.
61: IF fnd_api.to_boolean (p_init_msg_list) THEN
62: fnd_msg_pub.initialize;
57: ) THEN
58: RAISE fnd_api.g_exc_unexpected_error;
59: END IF;
60: -- Initialize message list if p_init_msg_list is set to TRUE.
61: IF fnd_api.to_boolean (p_init_msg_list) THEN
62: fnd_msg_pub.initialize;
63: END IF;
64: -- Debug Message
65: amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
63: END IF;
64: -- Debug Message
65: amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'start');
66: -- Initialize API return status to SUCCESS
67: x_return_status := fnd_api.g_ret_sts_success;
68:
69: IF fnd_global.user_id IS NULL THEN
70: amw_utility_pvt.error_message(p_message_name => 'USER_PROFILE_MISSING');
71: RAISE fnd_api.g_exc_error;
67: x_return_status := fnd_api.g_ret_sts_success;
68:
69: IF fnd_global.user_id IS NULL THEN
70: amw_utility_pvt.error_message(p_message_name => 'USER_PROFILE_MISSING');
71: RAISE fnd_api.g_exc_error;
72: END IF;
73:
74: IF ( (p_object = 'RISK_ORG') OR (p_object = 'CONTROL_ORG') ) THEN
75: select organization_id
350: END IF;
351: END IF;
352:
353:
354: IF x_return_status <> fnd_api.g_ret_sts_success THEN
355: RAISE fnd_api.g_exc_error;
356: END IF;
357: -- Standard check for p_commit
358: IF fnd_api.to_boolean (p_commit) THEN
351: END IF;
352:
353:
354: IF x_return_status <> fnd_api.g_ret_sts_success THEN
355: RAISE fnd_api.g_exc_error;
356: END IF;
357: -- Standard check for p_commit
358: IF fnd_api.to_boolean (p_commit) THEN
359: COMMIT WORK;
354: IF x_return_status <> fnd_api.g_ret_sts_success THEN
355: RAISE fnd_api.g_exc_error;
356: END IF;
357: -- Standard check for p_commit
358: IF fnd_api.to_boolean (p_commit) THEN
359: COMMIT WORK;
360: END IF;
361: --Debug Message
362: amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'end');
362: amw_utility_pvt.debug_message ('Private API: ' || l_api_name || 'end');
363: -- Standard call to get message count and if count is 1, get message info.
364: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
365: EXCEPTION
366: WHEN fnd_api.g_exc_error THEN
367: ROLLBACK TO get_process_hierarchy_pvt;
368: x_return_status := fnd_api.g_ret_sts_error;
369: -- Standard call to get message count and if count=1, get the message
370: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
364: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
365: EXCEPTION
366: WHEN fnd_api.g_exc_error THEN
367: ROLLBACK TO get_process_hierarchy_pvt;
368: x_return_status := fnd_api.g_ret_sts_error;
369: -- Standard call to get message count and if count=1, get the message
370: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
371: p_count => x_msg_count,
372: p_data => x_msg_data
366: WHEN fnd_api.g_exc_error THEN
367: ROLLBACK TO get_process_hierarchy_pvt;
368: x_return_status := fnd_api.g_ret_sts_error;
369: -- Standard call to get message count and if count=1, get the message
370: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
371: p_count => x_msg_count,
372: p_data => x_msg_data
373: );
374: WHEN fnd_api.g_exc_unexpected_error THEN
370: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
371: p_count => x_msg_count,
372: p_data => x_msg_data
373: );
374: WHEN fnd_api.g_exc_unexpected_error THEN
375: ROLLBACK TO get_process_hierarchy_pvt;
376: x_return_status := fnd_api.g_ret_sts_unexp_error;
377: -- Standard call to get message count and if count=1, get the message
378: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
372: p_data => x_msg_data
373: );
374: WHEN fnd_api.g_exc_unexpected_error THEN
375: ROLLBACK TO get_process_hierarchy_pvt;
376: x_return_status := fnd_api.g_ret_sts_unexp_error;
377: -- Standard call to get message count and if count=1, get the message
378: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
379: p_count => x_msg_count,
380: p_data => x_msg_data
374: WHEN fnd_api.g_exc_unexpected_error THEN
375: ROLLBACK TO get_process_hierarchy_pvt;
376: x_return_status := fnd_api.g_ret_sts_unexp_error;
377: -- Standard call to get message count and if count=1, get the message
378: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
379: p_count => x_msg_count,
380: p_data => x_msg_data
381: );
382: WHEN OTHERS THEN
380: p_data => x_msg_data
381: );
382: WHEN OTHERS THEN
383: ROLLBACK TO get_process_hierarchy_pvt;
384: x_return_status := fnd_api.g_ret_sts_unexp_error;
385: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
386: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
387: END IF;
388: -- Standard call to get message count and if count=1, get the message
385: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
386: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
387: END IF;
388: -- Standard call to get message count and if count=1, get the message
389: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
390: p_count => x_msg_count,
391: p_data => x_msg_data
392: );
393: END assoc_post_txn;