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_ROWID IN OUT VARCHAR2 REQUIRED
17: -- P_ATTRIBUTE_ASSOCIATION_ID IN NUMBER 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_ROWID IN OUT VARCHAR2 REQUIRED
17: -- P_ATTRIBUTE_ASSOCIATION_ID IN NUMBER REQUIRED
18: -- P_APPLICATION_ID IN NUMBER REQUIRED
19: -- P_FLEXFIELD_NAME IN VARCHAR2(40) REQUIRED
39:
40:
41: PROCEDURE INSERT_ROW(
42: P_API_VERSION IN NUMBER,
43: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
44: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
45: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
46: P_ROWID IN OUT NOCOPY VARCHAR2,
47: P_ATTRIBUTE_ASSOCIATION_ID IN OUT NOCOPY NUMBER,
40:
41: PROCEDURE INSERT_ROW(
42: P_API_VERSION IN NUMBER,
43: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
44: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
45: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
46: P_ROWID IN OUT NOCOPY VARCHAR2,
47: P_ATTRIBUTE_ASSOCIATION_ID IN OUT NOCOPY NUMBER,
48: P_APPLICATION_ID NUMBER,
41: PROCEDURE INSERT_ROW(
42: P_API_VERSION IN NUMBER,
43: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
44: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
45: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
46: P_ROWID IN OUT NOCOPY VARCHAR2,
47: P_ATTRIBUTE_ASSOCIATION_ID IN OUT NOCOPY NUMBER,
48: P_APPLICATION_ID NUMBER,
49: P_FLEXFIELD_NAME VARCHAR2,
72: -- Standard Start of API savepoint
73: SAVEPOINT apiname_apitype;
74:
75: -- Standard call to check for call compatibility.
76: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
77: RAISE fnd_api.g_exc_unexpected_error;
78: END IF;
79:
80: -- Initialize message list if p_init_msg_list is set to TRUE.
73: SAVEPOINT apiname_apitype;
74:
75: -- Standard call to check for call compatibility.
76: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
77: RAISE fnd_api.g_exc_unexpected_error;
78: END IF;
79:
80: -- Initialize message list if p_init_msg_list is set to TRUE.
81: IF fnd_api.to_boolean(p_init_msg_list) THEN
77: RAISE fnd_api.g_exc_unexpected_error;
78: END IF;
79:
80: -- Initialize message list if p_init_msg_list is set to TRUE.
81: IF fnd_api.to_boolean(p_init_msg_list) THEN
82: fnd_msg_pub.initialize;
83: END IF;
84:
85: -- Initialize API return status to success
82: fnd_msg_pub.initialize;
83: END IF;
84:
85: -- Initialize API return status to success
86: x_return_status := fnd_api.g_ret_sts_success;
87:
88: -- API body
89:
90: INSERT INTO MTL_EAM_ASSET_ATTR_GROUPS(
126: CLOSE C;
127:
128: -- End of API body.
129: -- Standard check of p_commit.
130: IF fnd_api.to_boolean(p_commit) THEN
131: COMMIT WORK;
132: END IF;
133:
134: -- Standard call to get message count and if count is 1, get message info.
133:
134: -- Standard call to get message count and if count is 1, get message info.
135: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
136: EXCEPTION
137: WHEN fnd_api.g_exc_error THEN
138: ROLLBACK TO apiname_apitype;
139: x_return_status := fnd_api.g_ret_sts_error;
140: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
141: WHEN fnd_api.g_exc_unexpected_error THEN
135: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
136: EXCEPTION
137: WHEN fnd_api.g_exc_error THEN
138: ROLLBACK TO apiname_apitype;
139: x_return_status := fnd_api.g_ret_sts_error;
140: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
141: WHEN fnd_api.g_exc_unexpected_error THEN
142: ROLLBACK TO apiname_apitype;
143: x_return_status := fnd_api.g_ret_sts_unexp_error;
137: WHEN fnd_api.g_exc_error THEN
138: ROLLBACK TO apiname_apitype;
139: x_return_status := fnd_api.g_ret_sts_error;
140: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
141: WHEN fnd_api.g_exc_unexpected_error THEN
142: ROLLBACK TO apiname_apitype;
143: x_return_status := fnd_api.g_ret_sts_unexp_error;
144: fnd_msg_pub.count_and_get(
145: p_count => x_msg_count
139: x_return_status := fnd_api.g_ret_sts_error;
140: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
141: WHEN fnd_api.g_exc_unexpected_error THEN
142: ROLLBACK TO apiname_apitype;
143: x_return_status := fnd_api.g_ret_sts_unexp_error;
144: fnd_msg_pub.count_and_get(
145: p_count => x_msg_count
146: ,p_data => x_msg_data);
147: WHEN OTHERS THEN
145: p_count => x_msg_count
146: ,p_data => x_msg_data);
147: WHEN OTHERS THEN
148: ROLLBACK TO apiname_apitype;
149: x_return_status := fnd_api.g_ret_sts_unexp_error;
150:
151: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
152: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
153: END IF;
157: END Insert_Row;
158:
159: PROCEDURE LOCK_ROW(
160: P_API_VERSION IN NUMBER,
161: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
162: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
163: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
164: P_ROWID VARCHAR2,
165: P_ATTRIBUTE_ASSOCIATION_ID IN OUT NOCOPY NUMBER,
158:
159: PROCEDURE LOCK_ROW(
160: P_API_VERSION IN NUMBER,
161: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
162: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
163: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
164: P_ROWID VARCHAR2,
165: P_ATTRIBUTE_ASSOCIATION_ID IN OUT NOCOPY NUMBER,
166: P_APPLICATION_ID NUMBER,
159: PROCEDURE LOCK_ROW(
160: P_API_VERSION IN NUMBER,
161: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
162: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
163: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
164: P_ROWID VARCHAR2,
165: P_ATTRIBUTE_ASSOCIATION_ID IN OUT NOCOPY NUMBER,
166: P_APPLICATION_ID NUMBER,
167: P_FLEXFIELD_NAME VARCHAR2,
189: -- Standard Start of API savepoint
190: SAVEPOINT apiname_apitype;
191:
192: -- Standard call to check for call compatibility.
193: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
194: RAISE fnd_api.g_exc_unexpected_error;
195: END IF;
196:
197: -- Initialize message list if p_init_msg_list is set to TRUE.
190: SAVEPOINT apiname_apitype;
191:
192: -- Standard call to check for call compatibility.
193: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
194: RAISE fnd_api.g_exc_unexpected_error;
195: END IF;
196:
197: -- Initialize message list if p_init_msg_list is set to TRUE.
198: IF fnd_api.to_boolean(p_init_msg_list) THEN
194: RAISE fnd_api.g_exc_unexpected_error;
195: END IF;
196:
197: -- Initialize message list if p_init_msg_list is set to TRUE.
198: IF fnd_api.to_boolean(p_init_msg_list) THEN
199: fnd_msg_pub.initialize;
200: END IF;
201:
202: -- Initialize API return status to success
199: fnd_msg_pub.initialize;
200: END IF;
201:
202: -- Initialize API return status to success
203: x_return_status := fnd_api.g_ret_sts_success;
204:
205: -- API body
206:
207: OPEN C;
227: end if;
228:
229: -- End of API body.
230: -- Standard check of p_commit.
231: IF fnd_api.to_boolean(p_commit) THEN
232: COMMIT WORK;
233: END IF;
234:
235: -- Standard call to get message count and if count is 1, get message info.
234:
235: -- Standard call to get message count and if count is 1, get message info.
236: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
237: EXCEPTION
238: WHEN fnd_api.g_exc_error THEN
239: ROLLBACK TO apiname_apitype;
240: x_return_status := fnd_api.g_ret_sts_error;
241: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
242: WHEN fnd_api.g_exc_unexpected_error THEN
236: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
237: EXCEPTION
238: WHEN fnd_api.g_exc_error THEN
239: ROLLBACK TO apiname_apitype;
240: x_return_status := fnd_api.g_ret_sts_error;
241: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
242: WHEN fnd_api.g_exc_unexpected_error THEN
243: ROLLBACK TO apiname_apitype;
244: x_return_status := fnd_api.g_ret_sts_unexp_error;
238: WHEN fnd_api.g_exc_error THEN
239: ROLLBACK TO apiname_apitype;
240: x_return_status := fnd_api.g_ret_sts_error;
241: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
242: WHEN fnd_api.g_exc_unexpected_error THEN
243: ROLLBACK TO apiname_apitype;
244: x_return_status := fnd_api.g_ret_sts_unexp_error;
245: fnd_msg_pub.count_and_get(
246: p_count => x_msg_count
240: x_return_status := fnd_api.g_ret_sts_error;
241: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
242: WHEN fnd_api.g_exc_unexpected_error THEN
243: ROLLBACK TO apiname_apitype;
244: x_return_status := fnd_api.g_ret_sts_unexp_error;
245: fnd_msg_pub.count_and_get(
246: p_count => x_msg_count
247: ,p_data => x_msg_data);
248: WHEN OTHERS THEN
246: p_count => x_msg_count
247: ,p_data => x_msg_data);
248: WHEN OTHERS THEN
249: ROLLBACK TO apiname_apitype;
250: x_return_status := fnd_api.g_ret_sts_unexp_error;
251:
252: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
253: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
254: END IF;
258: END Lock_Row;
259:
260: PROCEDURE UPDATE_ROW(
261: P_API_VERSION IN NUMBER,
262: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
263: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
264: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
265: P_ROWID VARCHAR2,
266: P_ENABLED_FLAG VARCHAR2,
259:
260: PROCEDURE UPDATE_ROW(
261: P_API_VERSION IN NUMBER,
262: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
263: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
264: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
265: P_ROWID VARCHAR2,
266: P_ENABLED_FLAG VARCHAR2,
267: P_LAST_UPDATE_DATE DATE,
260: PROCEDURE UPDATE_ROW(
261: P_API_VERSION IN NUMBER,
262: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
263: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
264: P_VALIDATION_LEVEL IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
265: P_ROWID VARCHAR2,
266: P_ENABLED_FLAG VARCHAR2,
267: P_LAST_UPDATE_DATE DATE,
268: P_LAST_UPDATED_BY NUMBER,
278: -- Standard Start of API savepoint
279: SAVEPOINT apiname_apitype;
280:
281: -- Standard call to check for call compatibility.
282: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
283: RAISE fnd_api.g_exc_unexpected_error;
284: END IF;
285:
286: -- Initialize message list if p_init_msg_list is set to TRUE.
279: SAVEPOINT apiname_apitype;
280:
281: -- Standard call to check for call compatibility.
282: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
283: RAISE fnd_api.g_exc_unexpected_error;
284: END IF;
285:
286: -- Initialize message list if p_init_msg_list is set to TRUE.
287: IF fnd_api.to_boolean(p_init_msg_list) THEN
283: RAISE fnd_api.g_exc_unexpected_error;
284: END IF;
285:
286: -- Initialize message list if p_init_msg_list is set to TRUE.
287: IF fnd_api.to_boolean(p_init_msg_list) THEN
288: fnd_msg_pub.initialize;
289: END IF;
290:
291: -- Initialize API return status to success
288: fnd_msg_pub.initialize;
289: END IF;
290:
291: -- Initialize API return status to success
292: x_return_status := fnd_api.g_ret_sts_success;
293:
294: -- API body
295:
296: UPDATE MTL_EAM_ASSET_ATTR_GROUPS
306: end if;
307:
308: -- End of API body.
309: -- Standard check of p_commit.
310: IF fnd_api.to_boolean(p_commit) THEN
311: COMMIT WORK;
312: END IF;
313:
314: -- Standard call to get message count and if count is 1, get message info.
313:
314: -- Standard call to get message count and if count is 1, get message info.
315: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
316: EXCEPTION
317: WHEN fnd_api.g_exc_error THEN
318: ROLLBACK TO apiname_apitype;
319: x_return_status := fnd_api.g_ret_sts_error;
320: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
321: WHEN fnd_api.g_exc_unexpected_error THEN
315: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
316: EXCEPTION
317: WHEN fnd_api.g_exc_error THEN
318: ROLLBACK TO apiname_apitype;
319: x_return_status := fnd_api.g_ret_sts_error;
320: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
321: WHEN fnd_api.g_exc_unexpected_error THEN
322: ROLLBACK TO apiname_apitype;
323: x_return_status := fnd_api.g_ret_sts_unexp_error;
317: WHEN fnd_api.g_exc_error THEN
318: ROLLBACK TO apiname_apitype;
319: x_return_status := fnd_api.g_ret_sts_error;
320: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
321: WHEN fnd_api.g_exc_unexpected_error THEN
322: ROLLBACK TO apiname_apitype;
323: x_return_status := fnd_api.g_ret_sts_unexp_error;
324: fnd_msg_pub.count_and_get(
325: p_count => x_msg_count
319: x_return_status := fnd_api.g_ret_sts_error;
320: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
321: WHEN fnd_api.g_exc_unexpected_error THEN
322: ROLLBACK TO apiname_apitype;
323: x_return_status := fnd_api.g_ret_sts_unexp_error;
324: fnd_msg_pub.count_and_get(
325: p_count => x_msg_count
326: ,p_data => x_msg_data);
327: WHEN OTHERS THEN
325: p_count => x_msg_count
326: ,p_data => x_msg_data);
327: WHEN OTHERS THEN
328: ROLLBACK TO apiname_apitype;
329: x_return_status := fnd_api.g_ret_sts_unexp_error;
330:
331: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
332: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
333: END IF;