7: -- Pre-reqs : None.
8: -- Parameters :
9: -- IN P_API_VERSION IN NUMBER REQUIRED
10: -- P_INIT_MSG_LIST IN VARCHAR2 OPTIONAL
11: -- DEFAULT = FND_API.G_FALSE
12: -- P_COMMIT IN VARCHAR2 OPTIONAL
13: -- DEFAULT = FND_API.G_FALSE
14: -- P_VALIDATION_LEVEL IN NUMBER OPTIONAL
15: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL
9: -- IN P_API_VERSION IN NUMBER REQUIRED
10: -- P_INIT_MSG_LIST IN VARCHAR2 OPTIONAL
11: -- DEFAULT = FND_API.G_FALSE
12: -- P_COMMIT IN VARCHAR2 OPTIONAL
13: -- DEFAULT = FND_API.G_FALSE
14: -- P_VALIDATION_LEVEL IN NUMBER OPTIONAL
15: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL
16: -- P_DEPT_ID IN NUMBER REQUIRED
17: -- P_LAST_UPDATE_DATE IN DATE REQUIRED
11: -- DEFAULT = FND_API.G_FALSE
12: -- P_COMMIT IN VARCHAR2 OPTIONAL
13: -- DEFAULT = FND_API.G_FALSE
14: -- P_VALIDATION_LEVEL IN NUMBER OPTIONAL
15: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL
16: -- P_DEPT_ID IN NUMBER REQUIRED
17: -- P_LAST_UPDATE_DATE IN DATE REQUIRED
18: -- P_LAST_UPDATED_BY IN NUMBER REQUIRED
19: -- P_CREATION_DATE IN DATE REQUIRED
33: g_pkg_name CONSTANT VARCHAR2(30):= 'EAM_DEPT_APPROVERS_PVT';
34:
35: PROCEDURE INSERT_ROW(
36: P_API_VERSION IN NUMBER,
37: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
38: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
39: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
40: P_ROWID IN OUT NOCOPY VARCHAR2,
41: P_DEPT_ID NUMBER,
34:
35: PROCEDURE INSERT_ROW(
36: P_API_VERSION IN NUMBER,
37: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
38: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
39: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
40: P_ROWID IN OUT NOCOPY VARCHAR2,
41: P_DEPT_ID NUMBER,
42: P_ORGANIZATION_ID NUMBER,
35: PROCEDURE INSERT_ROW(
36: P_API_VERSION IN NUMBER,
37: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
38: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
39: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
40: P_ROWID IN OUT NOCOPY VARCHAR2,
41: P_DEPT_ID NUMBER,
42: P_ORGANIZATION_ID NUMBER,
43: P_LAST_UPDATE_DATE DATE,
64: -- Standard Start of API savepoint
65: SAVEPOINT apiname_apitype;
66:
67: -- Standard call to check for call compatibility.
68: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
69: RAISE fnd_api.g_exc_unexpected_error;
70: END IF;
71:
72: -- Initialize message list if p_init_msg_list is set to TRUE.
65: SAVEPOINT apiname_apitype;
66:
67: -- Standard call to check for call compatibility.
68: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
69: RAISE fnd_api.g_exc_unexpected_error;
70: END IF;
71:
72: -- Initialize message list if p_init_msg_list is set to TRUE.
73: IF fnd_api.to_boolean(p_init_msg_list) THEN
69: RAISE fnd_api.g_exc_unexpected_error;
70: END IF;
71:
72: -- Initialize message list if p_init_msg_list is set to TRUE.
73: IF fnd_api.to_boolean(p_init_msg_list) THEN
74: fnd_msg_pub.initialize;
75: END IF;
76:
77: -- Initialize API return status to success
74: fnd_msg_pub.initialize;
75: END IF;
76:
77: -- Initialize API return status to success
78: x_return_status := fnd_api.g_ret_sts_success;
79:
80: -- API body
81: INSERT INTO BOM_EAM_DEPT_APPROVERS(
82: DEPT_ID,
119: CLOSE C;
120:
121: -- End of API body.
122: -- Standard check of p_commit.
123: IF fnd_api.to_boolean(p_commit) THEN
124: COMMIT WORK;
125: END IF;
126:
127: -- Standard call to get message count and if count is 1, get message info.
126:
127: -- Standard call to get message count and if count is 1, get message info.
128: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
129: EXCEPTION
130: WHEN fnd_api.g_exc_error THEN
131: ROLLBACK TO apiname_apitype;
132: x_return_status := fnd_api.g_ret_sts_error;
133: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
134: WHEN fnd_api.g_exc_unexpected_error THEN
128: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
129: EXCEPTION
130: WHEN fnd_api.g_exc_error THEN
131: ROLLBACK TO apiname_apitype;
132: x_return_status := fnd_api.g_ret_sts_error;
133: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
134: WHEN fnd_api.g_exc_unexpected_error THEN
135: ROLLBACK TO apiname_apitype;
136: x_return_status := fnd_api.g_ret_sts_unexp_error;
130: WHEN fnd_api.g_exc_error THEN
131: ROLLBACK TO apiname_apitype;
132: x_return_status := fnd_api.g_ret_sts_error;
133: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
134: WHEN fnd_api.g_exc_unexpected_error THEN
135: ROLLBACK TO apiname_apitype;
136: x_return_status := fnd_api.g_ret_sts_unexp_error;
137: fnd_msg_pub.count_and_get(
138: p_count => x_msg_count
132: x_return_status := fnd_api.g_ret_sts_error;
133: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
134: WHEN fnd_api.g_exc_unexpected_error THEN
135: ROLLBACK TO apiname_apitype;
136: x_return_status := fnd_api.g_ret_sts_unexp_error;
137: fnd_msg_pub.count_and_get(
138: p_count => x_msg_count
139: ,p_data => x_msg_data);
140: WHEN OTHERS THEN
138: p_count => x_msg_count
139: ,p_data => x_msg_data);
140: WHEN OTHERS THEN
141: ROLLBACK TO apiname_apitype;
142: x_return_status := fnd_api.g_ret_sts_unexp_error;
143:
144: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
145: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
146: END IF;
150:
151:
152: PROCEDURE LOCK_ROW(
153: P_API_VERSION IN NUMBER,
154: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
155: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
156: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
157: P_ROWID IN OUT NOCOPY VARCHAR2,
158: P_DEPT_ID NUMBER,
151:
152: PROCEDURE LOCK_ROW(
153: P_API_VERSION IN NUMBER,
154: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
155: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
156: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
157: P_ROWID IN OUT NOCOPY VARCHAR2,
158: P_DEPT_ID NUMBER,
159: P_ORGANIZATION_ID NUMBER,
152: PROCEDURE LOCK_ROW(
153: P_API_VERSION IN NUMBER,
154: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
155: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
156: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
157: P_ROWID IN OUT NOCOPY VARCHAR2,
158: P_DEPT_ID NUMBER,
159: P_ORGANIZATION_ID NUMBER,
160: P_LAST_UPDATE_DATE DATE,
183: -- Standard Start of API savepoint
184: SAVEPOINT apiname_apitype;
185:
186: -- Standard call to check for call compatibility.
187: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
188: RAISE fnd_api.g_exc_unexpected_error;
189: END IF;
190:
191: -- Initialize message list if p_init_msg_list is set to TRUE.
184: SAVEPOINT apiname_apitype;
185:
186: -- Standard call to check for call compatibility.
187: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
188: RAISE fnd_api.g_exc_unexpected_error;
189: END IF;
190:
191: -- Initialize message list if p_init_msg_list is set to TRUE.
192: IF fnd_api.to_boolean(p_init_msg_list) THEN
188: RAISE fnd_api.g_exc_unexpected_error;
189: END IF;
190:
191: -- Initialize message list if p_init_msg_list is set to TRUE.
192: IF fnd_api.to_boolean(p_init_msg_list) THEN
193: fnd_msg_pub.initialize;
194: END IF;
195:
196: -- Initialize API return status to success
193: fnd_msg_pub.initialize;
194: END IF;
195:
196: -- Initialize API return status to success
197: x_return_status := fnd_api.g_ret_sts_success;
198:
199: -- API body
200:
201: OPEN C;
219: end if;
220:
221: -- End of API body.
222: -- Standard check of p_commit.
223: IF fnd_api.to_boolean(p_commit) THEN
224: COMMIT WORK;
225: END IF;
226:
227: -- Standard call to get message count and if count is 1, get message info.
226:
227: -- Standard call to get message count and if count is 1, get message info.
228: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
229: EXCEPTION
230: WHEN fnd_api.g_exc_error THEN
231: ROLLBACK TO apiname_apitype;
232: x_return_status := fnd_api.g_ret_sts_error;
233: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
234: WHEN fnd_api.g_exc_unexpected_error THEN
228: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
229: EXCEPTION
230: WHEN fnd_api.g_exc_error THEN
231: ROLLBACK TO apiname_apitype;
232: x_return_status := fnd_api.g_ret_sts_error;
233: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
234: WHEN fnd_api.g_exc_unexpected_error THEN
235: ROLLBACK TO apiname_apitype;
236: x_return_status := fnd_api.g_ret_sts_unexp_error;
230: WHEN fnd_api.g_exc_error THEN
231: ROLLBACK TO apiname_apitype;
232: x_return_status := fnd_api.g_ret_sts_error;
233: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
234: WHEN fnd_api.g_exc_unexpected_error THEN
235: ROLLBACK TO apiname_apitype;
236: x_return_status := fnd_api.g_ret_sts_unexp_error;
237: fnd_msg_pub.count_and_get(
238: p_count => x_msg_count
232: x_return_status := fnd_api.g_ret_sts_error;
233: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
234: WHEN fnd_api.g_exc_unexpected_error THEN
235: ROLLBACK TO apiname_apitype;
236: x_return_status := fnd_api.g_ret_sts_unexp_error;
237: fnd_msg_pub.count_and_get(
238: p_count => x_msg_count
239: ,p_data => x_msg_data);
240: WHEN OTHERS THEN
238: p_count => x_msg_count
239: ,p_data => x_msg_data);
240: WHEN OTHERS THEN
241: ROLLBACK TO apiname_apitype;
242: x_return_status := fnd_api.g_ret_sts_unexp_error;
243:
244: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
245: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
246: END IF;
252:
253: PROCEDURE UPDATE_ROW
254: (
255: P_API_VERSION IN NUMBER,
256: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
257: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
258: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
259: P_ROWID IN OUT NOCOPY VARCHAR2,
260: P_DEPT_ID NUMBER,
253: PROCEDURE UPDATE_ROW
254: (
255: P_API_VERSION IN NUMBER,
256: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
257: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
258: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
259: P_ROWID IN OUT NOCOPY VARCHAR2,
260: P_DEPT_ID NUMBER,
261: P_ORGANIZATION_ID NUMBER,
254: (
255: P_API_VERSION IN NUMBER,
256: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
257: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
258: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
259: P_ROWID IN OUT NOCOPY VARCHAR2,
260: P_DEPT_ID NUMBER,
261: P_ORGANIZATION_ID NUMBER,
262: P_LAST_UPDATE_DATE DATE,
279: -- Standard Start of API savepoint
280: SAVEPOINT apiname_apitype;
281:
282: -- Standard call to check for call compatibility.
283: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
284: RAISE fnd_api.g_exc_unexpected_error;
285: END IF;
286:
287: -- Initialize message list if p_init_msg_list is set to TRUE.
280: SAVEPOINT apiname_apitype;
281:
282: -- Standard call to check for call compatibility.
283: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
284: RAISE fnd_api.g_exc_unexpected_error;
285: END IF;
286:
287: -- Initialize message list if p_init_msg_list is set to TRUE.
288: IF fnd_api.to_boolean(p_init_msg_list) THEN
284: RAISE fnd_api.g_exc_unexpected_error;
285: END IF;
286:
287: -- Initialize message list if p_init_msg_list is set to TRUE.
288: IF fnd_api.to_boolean(p_init_msg_list) THEN
289: fnd_msg_pub.initialize;
290: END IF;
291:
292: -- Initialize API return status to success
289: fnd_msg_pub.initialize;
290: END IF;
291:
292: -- Initialize API return status to success
293: x_return_status := fnd_api.g_ret_sts_success;
294:
295: -- API body
296:
297: UPDATE BOM_EAM_DEPT_APPROVERS
313: end if;
314:
315: -- End of API body.
316: -- Standard check of p_commit.
317: IF fnd_api.to_boolean(p_commit) THEN
318: COMMIT WORK;
319: END IF;
320:
321: -- Standard call to get message count and if count is 1, get message info.
320:
321: -- Standard call to get message count and if count is 1, get message info.
322: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
323: EXCEPTION
324: WHEN fnd_api.g_exc_error THEN
325: ROLLBACK TO apiname_apitype;
326: x_return_status := fnd_api.g_ret_sts_error;
327: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
328: WHEN fnd_api.g_exc_unexpected_error THEN
322: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
323: EXCEPTION
324: WHEN fnd_api.g_exc_error THEN
325: ROLLBACK TO apiname_apitype;
326: x_return_status := fnd_api.g_ret_sts_error;
327: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
328: WHEN fnd_api.g_exc_unexpected_error THEN
329: ROLLBACK TO apiname_apitype;
330: x_return_status := fnd_api.g_ret_sts_unexp_error;
324: WHEN fnd_api.g_exc_error THEN
325: ROLLBACK TO apiname_apitype;
326: x_return_status := fnd_api.g_ret_sts_error;
327: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
328: WHEN fnd_api.g_exc_unexpected_error THEN
329: ROLLBACK TO apiname_apitype;
330: x_return_status := fnd_api.g_ret_sts_unexp_error;
331: fnd_msg_pub.count_and_get(
332: p_count => x_msg_count
326: x_return_status := fnd_api.g_ret_sts_error;
327: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
328: WHEN fnd_api.g_exc_unexpected_error THEN
329: ROLLBACK TO apiname_apitype;
330: x_return_status := fnd_api.g_ret_sts_unexp_error;
331: fnd_msg_pub.count_and_get(
332: p_count => x_msg_count
333: ,p_data => x_msg_data);
334: WHEN OTHERS THEN
332: p_count => x_msg_count
333: ,p_data => x_msg_data);
334: WHEN OTHERS THEN
335: ROLLBACK TO apiname_apitype;
336: x_return_status := fnd_api.g_ret_sts_unexp_error;
337:
338: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
339: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
340: END IF;