DBA Data[Home] [Help]

APPS.AMW_RISK_TYPE_PVT dependencies on AMW_RISK_TYPE

Line 1: PACKAGE BODY AMW_risk_type_PVT AS

1: PACKAGE BODY AMW_risk_type_PVT AS
2: /* $Header: amwvmrtb.pls 120.0 2005/05/31 21:25:10 appldev noship $ */
3: -- ===============================================================
4: -- Start of Comments
5: -- Package name

Line 6: -- AMW_RISK_TYPE_PVT

2: /* $Header: amwvmrtb.pls 120.0 2005/05/31 21:25:10 appldev noship $ */
3: -- ===============================================================
4: -- Start of Comments
5: -- Package name
6: -- AMW_RISK_TYPE_PVT
7: -- End of Comments
8: -- ===============================================================
9: g_pkg_name CONSTANT VARCHAR2 (30) := 'AMW_RISK_TYPE_PVT';
10: g_file_name CONSTANT VARCHAR2 (12) := 'amwvrtpb.pls';

Line 9: g_pkg_name CONSTANT VARCHAR2 (30) := 'AMW_RISK_TYPE_PVT';

5: -- Package name
6: -- AMW_RISK_TYPE_PVT
7: -- End of Comments
8: -- ===============================================================
9: g_pkg_name CONSTANT VARCHAR2 (30) := 'AMW_RISK_TYPE_PVT';
10: g_file_name CONSTANT VARCHAR2 (12) := 'amwvrtpb.pls';
11: g_user_id NUMBER := fnd_global.user_id;
12: g_login_id NUMBER := fnd_global.conc_login_id;
13: --------------------- BEGIN: Declaring internal Procedures ----------------------

Line 70: (select count(*) from amw_risk_type

66: --- for risk association to a process, we are passed risk_id and process_id
67: --- foll. cursor traverses the process hierarchy tree to get all parent processes
68: --- for this process_id
69: CURSOR C1 is
70: (select count(*) from amw_risk_type
71: where risk_rev_id = p_risk_rev_id
72: and risk_type_code = p_risk_type_code);
73:
74: BEGIN

Line 76: SAVEPOINT amw_risk_type_pvt;

72: and risk_type_code = p_risk_type_code);
73:
74: BEGIN
75:
76: SAVEPOINT amw_risk_type_pvt;
77: x_return_status := fnd_api.g_ret_sts_success;
78: -- Standard call to check for call compatibility.
79: IF NOT fnd_api.compatible_api_call (l_api_version_number,
80: p_api_version_number,

Line 109: delete from amw_risk_type

105: IF (p_select_flag = 'N') then
106: OPEN C1;
107: FETCH C1 into l_risk_type_row_count;
108: IF (l_risk_type_row_count = 1) then
109: delete from amw_risk_type
110: where risk_rev_id = p_risk_rev_id
111: and risk_type_code = p_risk_type_code;
112: END IF;
113: CLOSE C1;

Line 122: select amw_risk_type_s.nextval into l_risk_type_id from dual;

118: OPEN C1;
119: FETCH C1 into l_risk_type_row_count;
120:
121: IF (l_risk_type_row_count = 0) then
122: select amw_risk_type_s.nextval into l_risk_type_id from dual;
123: l_creation_date := SYSDATE;
124: l_created_by := FND_GLOBAL.USER_ID;
125: l_last_update_date := SYSDATE;
126: l_last_updated_by := FND_GLOBAL.USER_ID;

Line 129: insert into amw_risk_type (risk_type_id,

125: l_last_update_date := SYSDATE;
126: l_last_updated_by := FND_GLOBAL.USER_ID;
127: l_last_update_login := FND_GLOBAL.USER_ID;
128:
129: insert into amw_risk_type (risk_type_id,
130: risk_rev_id,
131: risk_type_code,
132: creation_date,
133: created_by,

Line 169: ROLLBACK TO amw_risk_type_pvt;

165: -- Standard call to get message count and if count is 1, get message info.
166: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
167: EXCEPTION
168: WHEN fnd_api.g_exc_error THEN
169: ROLLBACK TO amw_risk_type_pvt;
170: x_return_status := fnd_api.g_ret_sts_error;
171: -- Standard call to get message count and if count=1, get the message
172: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
173: p_count => x_msg_count,

Line 177: ROLLBACK TO amw_risk_type_pvt;

173: p_count => x_msg_count,
174: p_data => x_msg_data
175: );
176: WHEN fnd_api.g_exc_unexpected_error THEN
177: ROLLBACK TO amw_risk_type_pvt;
178: x_return_status := fnd_api.g_ret_sts_unexp_error;
179: -- Standard call to get message count and if count=1, get the message
180: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
181: p_count => x_msg_count,

Line 185: ROLLBACK TO amw_risk_type_pvt;

181: p_count => x_msg_count,
182: p_data => x_msg_data
183: );
184: WHEN OTHERS THEN
185: ROLLBACK TO amw_risk_type_pvt;
186: x_return_status := fnd_api.g_ret_sts_unexp_error;
187: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
188: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
189: END IF;

Line 218: SAVEPOINT amw_risk_type_revise;

214: ) IS
215: l_api_name CONSTANT VARCHAR2 (30) := 'Revise_Risk_Type';
216: l_api_version_number CONSTANT NUMBER := 1.0;
217: BEGIN
218: SAVEPOINT amw_risk_type_revise;
219: -- Standard call to check for call compatibility.
220: IF NOT fnd_api.compatible_api_call (l_api_version_number,
221: p_api_version_number,
222: l_api_name,

Line 243: insert into AMW_RISK_TYPE (

239: END IF;
240:
241: -- carry over Risk Type Associations when Revising the Risk
242: IF p_old_risk_rev_id is not null AND p_risk_rev_id is not null THEN
243: insert into AMW_RISK_TYPE (
244: risk_type_id
245: ,risk_rev_id
246: ,risk_type_code
247: ,creation_date

Line 255: amw_risk_type_s.nextval

251: ,last_update_login
252: ,object_version_number
253: )
254: select
255: amw_risk_type_s.nextval
256: ,p_risk_rev_id
257: ,old.RISK_TYPE_CODE
258: ,sysdate
259: ,FND_GLOBAL.USER_ID

Line 264: from AMW_RISK_TYPE old

260: ,sysdate
261: ,FND_GLOBAL.USER_ID
262: ,FND_GLOBAL.USER_ID
263: ,1
264: from AMW_RISK_TYPE old
265: where old.RISK_REV_ID = p_old_risk_rev_id;
266: END IF;
267:
268: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 281: ROLLBACK TO amw_risk_type_revise;

277: -- Standard call to get message count and if count is 1, get message info.
278: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
279: EXCEPTION
280: WHEN fnd_api.g_exc_error THEN
281: ROLLBACK TO amw_risk_type_revise;
282: x_return_status := fnd_api.g_ret_sts_error;
283: -- Standard call to get message count and if count=1, get the message
284: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
285: p_count => x_msg_count,

Line 289: ROLLBACK TO amw_risk_type_revise;

285: p_count => x_msg_count,
286: p_data => x_msg_data
287: );
288: WHEN fnd_api.g_exc_unexpected_error THEN
289: ROLLBACK TO amw_risk_type_revise;
290: x_return_status := fnd_api.g_ret_sts_unexp_error;
291: -- Standard call to get message count and if count=1, get the message
292: fnd_msg_pub.count_and_get (p_encoded => fnd_api.g_false,
293: p_count => x_msg_count,

Line 297: ROLLBACK TO amw_risk_type_revise;

293: p_count => x_msg_count,
294: p_data => x_msg_data
295: );
296: WHEN OTHERS THEN
297: ROLLBACK TO amw_risk_type_revise;
298: x_return_status := fnd_api.g_ret_sts_unexp_error;
299: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
300: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
301: END IF;

Line 311: END amw_risk_type_pvt;

307:
308: END Revise_Risk_Type;
309:
310:
311: END amw_risk_type_pvt;