[Home] [Help]
PACKAGE BODY: APPS.ASO_IBY_FINANCE_CALLBACK
Source
1 PACKAGE BODY aso_iby_finance_callback AS
2 /* $Header: asopibyb.pls 120.1 2005/06/29 12:36:47 appldev ship $ */
3 -- Start of Comments
4 -- Package name : ASO_IBY_FINANCE_CALLBACK
5 -- Purpose :
6 -- History :
7 -- NOTE :
8 -- End of Comments
9
10 g_pkg_name CONSTANT VARCHAR2 (30) := 'ASO_IBY_FINANCE_CALLBACK';
11 g_file_name CONSTANT VARCHAR2 (12) := 'asopibyb.pls';
12 g_login_id NUMBER := fnd_global.conc_login_id;
13
14 PROCEDURE update_status (
15 p_api_version IN NUMBER,
16 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
17 p_commit IN VARCHAR2 := fnd_api.g_false,
18 p_validation_level IN NUMBER := fnd_api.g_miss_num,
19 p_tangible_id IN NUMBER,
20 p_credit_app_id IN NUMBER,
21 p_new_status_category IN VARCHAR2,
22 p_new_status IN VARCHAR2,
23 p_last_update_date IN DATE := fnd_api.g_miss_date,
24 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
25 x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
26 x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
27 ) IS
28 l_api_version NUMBER := 1.0;
29 l_api_name VARCHAR2 (50) := 'Update_Status';
30 BEGIN
31 -- Standard Start of API savepoint
32 SAVEPOINT update_status_pub;
33
34 -- Standard call to check for call compatibility.
35 IF NOT fnd_api.compatible_api_call (
36 l_api_version,
37 p_api_version,
38 l_api_name,
39 g_pkg_name
40 )
41 THEN
42 RAISE fnd_api.g_exc_unexpected_error;
43 END IF;
44
45 -- Initialize message list if p_init_msg_list is set to TRUE.
46 IF fnd_api.to_boolean (
47 p_init_msg_list
48 )
49 THEN
50 fnd_msg_pub.initialize;
51 END IF;
52
53 -- Initialize API return status to SUCCESS
54 x_return_status := fnd_api.g_ret_sts_success;
55 --
56 -- API body
57 --
58
59 -- initialize G_Debug_Flag
60 ASO_DEBUG_PUB.G_Debug_Flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
61
62 aso_iby_financing_pvt.update_status (
63 p_api_version => p_api_version,
64 p_init_msg_list => p_init_msg_list,
65 p_commit => p_commit,
66 p_validation_level => p_validation_level,
67 p_tangible_id => p_tangible_id,
68 p_credit_app_id => p_credit_app_id,
69 p_new_status_category => p_new_status_category,
70 p_new_status => p_new_status,
71 p_last_update_date => p_last_update_date,
72 x_return_status => x_return_status,
73 x_msg_count => x_msg_count,
74 x_msg_data => x_msg_data
75 );
76 IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
77 aso_debug_pub.ADD (
78 'Update_Status: after Update_Status return_status: '|| x_return_status,
79 1,
80 'Y'
81 );
82 END IF;
83
84 IF (x_return_status = fnd_api.g_ret_sts_unexp_error)
85 THEN
86 RAISE fnd_api.g_exc_unexpected_error;
87 ELSIF (x_return_status = fnd_api.g_ret_sts_error)
88 THEN
89 RAISE fnd_api.g_exc_error;
90 END IF;
91
92 --
93 -- End of API body.
94 --
95
96 -- Standard check for p_commit
97 IF fnd_api.to_boolean (
98 p_commit
99 )
100 THEN
101 COMMIT WORK;
102 END IF;
103
104 -- Debug Message
105 aso_utility_pvt.debug_message (
106 fnd_msg_pub.g_msg_lvl_debug_low,
107 'Public API: ' || l_api_name || 'end'
108 );
109 -- Standard call to get message count and if count is 1, get message info.
110 fnd_msg_pub.count_and_get (
111 p_count => x_msg_count,
112 p_data => x_msg_data
113 );
114 EXCEPTION
115 WHEN fnd_api.g_exc_error
116 THEN
117 aso_utility_pvt.handle_exceptions (
118 p_api_name => l_api_name,
119 p_pkg_name => g_pkg_name,
120 p_exception_level => fnd_msg_pub.g_msg_lvl_error,
121 p_package_type => aso_utility_pvt.g_pub,
122 x_msg_count => x_msg_count,
123 x_msg_data => x_msg_data,
124 x_return_status => x_return_status
125 );
126 WHEN fnd_api.g_exc_unexpected_error
127 THEN
128 aso_utility_pvt.handle_exceptions (
129 p_api_name => l_api_name,
130 p_pkg_name => g_pkg_name,
131 p_exception_level => fnd_msg_pub.g_msg_lvl_unexp_error,
132 p_package_type => aso_utility_pvt.g_pub,
133 x_msg_count => x_msg_count,
134 x_msg_data => x_msg_data,
135 x_return_status => x_return_status
136 );
137 WHEN OTHERS
138 THEN
139 aso_utility_pvt.handle_exceptions (
140 p_api_name => l_api_name,
141 p_pkg_name => g_pkg_name,
142 p_exception_level => aso_utility_pvt.g_exc_others,
143 p_package_type => aso_utility_pvt.g_pub,
144 x_msg_count => x_msg_count,
145 x_msg_data => x_msg_data,
146 x_return_status => x_return_status
147 );
148 END update_status;
149 END aso_iby_finance_callback;