25: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amspdlfb.pls';
26:
27: PROCEDURE Lock_Dmlift(
28: p_api_version IN NUMBER,
29: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
30: x_return_status OUT VARCHAR2,
31: x_msg_count OUT NUMBER,
32: x_msg_data OUT VARCHAR2,
33:
39: L_API_VERSION_NUMBER CONSTANT NUMBER := 1.0;
40: l_pvt_Lift_rec AMS_DMLift_PVT.Lift_rec_type;
41: BEGIN
42: -- Standard call to check for call compatibility.
43: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
44: p_api_version,
45: l_api_name,
46: G_PKG_NAME)
47: THEN
44: p_api_version,
45: l_api_name,
46: G_PKG_NAME)
47: THEN
48: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
49: END IF;
50:
51: -- Initialize message list if p_init_msg_list is set to TRUE.
52: IF FND_API.to_Boolean( p_init_msg_list )
48: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
49: END IF;
50:
51: -- Initialize message list if p_init_msg_list is set to TRUE.
52: IF FND_API.to_Boolean( p_init_msg_list )
53: THEN
54: FND_MSG_PUB.initialize;
55: END IF;
56:
58: AMS_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
59:
60:
61: -- Initialize API return status to SUCCESS
62: x_return_status := FND_API.G_RET_STS_SUCCESS;
63:
64: --
65: -- API body
66: --
67: -- Calling Private package: Create_Lift
68: -- Hint: Primary key needs to be returned
69: AMS_DMLift_PVT.Lock_Dmlift(
70: p_api_version => 1.0,
71: p_init_msg_list => FND_API.G_FALSE,
72: x_return_status => x_return_status,
73: x_msg_count => x_msg_count,
74: x_msg_data => x_msg_data,
75: p_lift_id => p_lift_id,
76: p_object_version => p_object_version);
77:
78:
79: -- Check return status from the above procedure call
80: IF x_return_status = FND_API.G_RET_STS_ERROR then
81: RAISE FND_API.G_EXC_ERROR;
82: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
83: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
84: END IF;
77:
78:
79: -- Check return status from the above procedure call
80: IF x_return_status = FND_API.G_RET_STS_ERROR then
81: RAISE FND_API.G_EXC_ERROR;
82: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
83: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
84: END IF;
85: --
78:
79: -- Check return status from the above procedure call
80: IF x_return_status = FND_API.G_RET_STS_ERROR then
81: RAISE FND_API.G_EXC_ERROR;
82: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
83: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
84: END IF;
85: --
86: -- End of API body.
79: -- Check return status from the above procedure call
80: IF x_return_status = FND_API.G_RET_STS_ERROR then
81: RAISE FND_API.G_EXC_ERROR;
82: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
83: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
84: END IF;
85: --
86: -- End of API body.
87: --
91:
92: EXCEPTION
93:
94: WHEN AMS_Utility_PVT.resource_locked THEN
95: x_return_status := FND_API.g_ret_sts_error;
96: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
97: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
98: FND_MSG_PUB.add;
99: END IF;
97: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
98: FND_MSG_PUB.add;
99: END IF;
100:
101: WHEN FND_API.G_EXC_ERROR THEN
102: ROLLBACK TO LOCK_Dmlift_PUB;
103: x_return_status := FND_API.G_RET_STS_ERROR;
104: -- Standard call to get message count and if count=1, get the message
105: FND_MSG_PUB.Count_And_Get (
99: END IF;
100:
101: WHEN FND_API.G_EXC_ERROR THEN
102: ROLLBACK TO LOCK_Dmlift_PUB;
103: x_return_status := FND_API.G_RET_STS_ERROR;
104: -- Standard call to get message count and if count=1, get the message
105: FND_MSG_PUB.Count_And_Get (
106: p_encoded => FND_API.G_FALSE,
107: p_count => x_msg_count,
102: ROLLBACK TO LOCK_Dmlift_PUB;
103: x_return_status := FND_API.G_RET_STS_ERROR;
104: -- Standard call to get message count and if count=1, get the message
105: FND_MSG_PUB.Count_And_Get (
106: p_encoded => FND_API.G_FALSE,
107: p_count => x_msg_count,
108: p_data => x_msg_data
109: );
110:
107: p_count => x_msg_count,
108: p_data => x_msg_data
109: );
110:
111: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
112: ROLLBACK TO LOCK_Dmlift_PUB;
113: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
114: -- Standard call to get message count and if count=1, get the message
115: FND_MSG_PUB.Count_And_Get (
109: );
110:
111: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
112: ROLLBACK TO LOCK_Dmlift_PUB;
113: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
114: -- Standard call to get message count and if count=1, get the message
115: FND_MSG_PUB.Count_And_Get (
116: p_encoded => FND_API.G_FALSE,
117: p_count => x_msg_count,
112: ROLLBACK TO LOCK_Dmlift_PUB;
113: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
114: -- Standard call to get message count and if count=1, get the message
115: FND_MSG_PUB.Count_And_Get (
116: p_encoded => FND_API.G_FALSE,
117: p_count => x_msg_count,
118: p_data => x_msg_data
119: );
120:
119: );
120:
121: WHEN OTHERS THEN
122: ROLLBACK TO LOCK_Dmlift_PUB;
123: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
124: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
125: THEN
126: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
127: END IF;
126: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
127: END IF;
128: -- Standard call to get message count and if count=1, get the message
129: FND_MSG_PUB.Count_And_Get (
130: p_encoded => FND_API.G_FALSE,
131: p_count => x_msg_count,
132: p_data => x_msg_data
133: );
134: End Lock_Dmlift;
135:
136:
137: PROCEDURE Create_Lift(
138: p_api_version IN NUMBER,
139: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
140: p_commit IN VARCHAR2 := FND_API.G_FALSE,
141:
142: x_return_status OUT VARCHAR2,
143: x_msg_count OUT NUMBER,
136:
137: PROCEDURE Create_Lift(
138: p_api_version IN NUMBER,
139: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
140: p_commit IN VARCHAR2 := FND_API.G_FALSE,
141:
142: x_return_status OUT VARCHAR2,
143: x_msg_count OUT NUMBER,
144: x_msg_data OUT VARCHAR2,
155: -- Standard Start of API savepoint
156: SAVEPOINT Create_Lift_PUB;
157:
158: -- Standard call to check for call compatibility.
159: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
160: p_api_version,
161: l_api_name,
162: G_PKG_NAME)
163: THEN
160: p_api_version,
161: l_api_name,
162: G_PKG_NAME)
163: THEN
164: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
165: END IF;
166:
167: -- Initialize message list if p_init_msg_list is set to TRUE.
168: IF FND_API.to_Boolean( p_init_msg_list )
164: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
165: END IF;
166:
167: -- Initialize message list if p_init_msg_list is set to TRUE.
168: IF FND_API.to_Boolean( p_init_msg_list )
169: THEN
170: FND_MSG_PUB.initialize;
171: END IF;
172:
174: AMS_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
175:
176:
177: -- Initialize API return status to SUCCESS
178: x_return_status := FND_API.G_RET_STS_SUCCESS;
179:
180: --
181: -- API body
182: --
197: -- Calling Private package: Create_Lift
198: -- Hint: Primary key needs to be returned
199: AMS_DMLift_PVT.Create_Lift(
200: p_api_version => 1.0,
201: p_init_msg_list => FND_API.G_FALSE,
202: p_commit => FND_API.G_FALSE,
203: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
204: x_return_status => x_return_status,
205: x_msg_count => x_msg_count,
198: -- Hint: Primary key needs to be returned
199: AMS_DMLift_PVT.Create_Lift(
200: p_api_version => 1.0,
201: p_init_msg_list => FND_API.G_FALSE,
202: p_commit => FND_API.G_FALSE,
203: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
204: x_return_status => x_return_status,
205: x_msg_count => x_msg_count,
206: x_msg_data => x_msg_data,
199: AMS_DMLift_PVT.Create_Lift(
200: p_api_version => 1.0,
201: p_init_msg_list => FND_API.G_FALSE,
202: p_commit => FND_API.G_FALSE,
203: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
204: x_return_status => x_return_status,
205: x_msg_count => x_msg_count,
206: x_msg_data => x_msg_data,
207: p_lift_rec => l_pvt_lift_rec,
208: x_lift_id => x_lift_id);
209:
210:
211: -- Check return status from the above procedure call
212: IF x_return_status = FND_API.G_RET_STS_ERROR then
213: RAISE FND_API.G_EXC_ERROR;
214: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
215: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
216: END IF;
209:
210:
211: -- Check return status from the above procedure call
212: IF x_return_status = FND_API.G_RET_STS_ERROR then
213: RAISE FND_API.G_EXC_ERROR;
214: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
215: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
216: END IF;
217: --
210:
211: -- Check return status from the above procedure call
212: IF x_return_status = FND_API.G_RET_STS_ERROR then
213: RAISE FND_API.G_EXC_ERROR;
214: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
215: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
216: END IF;
217: --
218: -- End of API body.
211: -- Check return status from the above procedure call
212: IF x_return_status = FND_API.G_RET_STS_ERROR then
213: RAISE FND_API.G_EXC_ERROR;
214: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
215: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
216: END IF;
217: --
218: -- End of API body.
219: --
218: -- End of API body.
219: --
220:
221: -- Standard check for p_commit
222: IF FND_API.to_Boolean( p_commit )
223: THEN
224: COMMIT WORK;
225: END IF;
226:
235: );
236: EXCEPTION
237:
238: WHEN AMS_Utility_PVT.resource_locked THEN
239: x_return_status := FND_API.g_ret_sts_error;
240: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
241: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
242: FND_MSG_PUB.add;
243: END IF;
241: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
242: FND_MSG_PUB.add;
243: END IF;
244:
245: WHEN FND_API.G_EXC_ERROR THEN
246: ROLLBACK TO Create_Lift_PUB;
247: x_return_status := FND_API.G_RET_STS_ERROR;
248: -- Standard call to get message count and if count=1, get the message
249: FND_MSG_PUB.Count_And_Get (
243: END IF;
244:
245: WHEN FND_API.G_EXC_ERROR THEN
246: ROLLBACK TO Create_Lift_PUB;
247: x_return_status := FND_API.G_RET_STS_ERROR;
248: -- Standard call to get message count and if count=1, get the message
249: FND_MSG_PUB.Count_And_Get (
250: p_encoded => FND_API.G_FALSE,
251: p_count => x_msg_count,
246: ROLLBACK TO Create_Lift_PUB;
247: x_return_status := FND_API.G_RET_STS_ERROR;
248: -- Standard call to get message count and if count=1, get the message
249: FND_MSG_PUB.Count_And_Get (
250: p_encoded => FND_API.G_FALSE,
251: p_count => x_msg_count,
252: p_data => x_msg_data
253: );
254:
251: p_count => x_msg_count,
252: p_data => x_msg_data
253: );
254:
255: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
256: ROLLBACK TO Create_Lift_PUB;
257: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
258: -- Standard call to get message count and if count=1, get the message
259: FND_MSG_PUB.Count_And_Get (
253: );
254:
255: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
256: ROLLBACK TO Create_Lift_PUB;
257: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
258: -- Standard call to get message count and if count=1, get the message
259: FND_MSG_PUB.Count_And_Get (
260: p_encoded => FND_API.G_FALSE,
261: p_count => x_msg_count,
256: ROLLBACK TO Create_Lift_PUB;
257: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
258: -- Standard call to get message count and if count=1, get the message
259: FND_MSG_PUB.Count_And_Get (
260: p_encoded => FND_API.G_FALSE,
261: p_count => x_msg_count,
262: p_data => x_msg_data
263: );
264:
263: );
264:
265: WHEN OTHERS THEN
266: ROLLBACK TO Create_Lift_PUB;
267: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
268: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
269: THEN
270: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
271: END IF;
270: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
271: END IF;
272: -- Standard call to get message count and if count=1, get the message
273: FND_MSG_PUB.Count_And_Get (
274: p_encoded => FND_API.G_FALSE,
275: p_count => x_msg_count,
276: p_data => x_msg_data
277: );
278: End Create_Lift;
279:
280:
281: PROCEDURE Update_Lift(
282: p_api_version IN NUMBER,
283: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
284: p_commit IN VARCHAR2 := FND_API.G_FALSE,
285:
286: x_return_status OUT VARCHAR2,
287: x_msg_count OUT NUMBER,
280:
281: PROCEDURE Update_Lift(
282: p_api_version IN NUMBER,
283: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
284: p_commit IN VARCHAR2 := FND_API.G_FALSE,
285:
286: x_return_status OUT VARCHAR2,
287: x_msg_count OUT NUMBER,
288: x_msg_data OUT VARCHAR2,
300: -- Standard Start of API savepoint
301: SAVEPOINT Update_Lift_PUB;
302:
303: -- Standard call to check for call compatibility.
304: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
305: p_api_version,
306: l_api_name,
307: G_PKG_NAME)
308: THEN
305: p_api_version,
306: l_api_name,
307: G_PKG_NAME)
308: THEN
309: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
310: END IF;
311:
312: -- Initialize message list if p_init_msg_list is set to TRUE.
313: IF FND_API.to_Boolean( p_init_msg_list )
309: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
310: END IF;
311:
312: -- Initialize message list if p_init_msg_list is set to TRUE.
313: IF FND_API.to_Boolean( p_init_msg_list )
314: THEN
315: FND_MSG_PUB.initialize;
316: END IF;
317:
319: AMS_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
320:
321:
322: -- Initialize API return status to SUCCESS
323: x_return_status := FND_API.G_RET_STS_SUCCESS;
324:
325: --
326: -- API body
327: --
326: -- API body
327: --
328: AMS_DMLift_PVT.Update_Lift(
329: p_api_version => 1.0,
330: p_init_msg_list => FND_API.G_FALSE,
331: p_commit => p_commit,
332: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
333: x_return_status => x_return_status,
334: x_msg_count => x_msg_count,
328: AMS_DMLift_PVT.Update_Lift(
329: p_api_version => 1.0,
330: p_init_msg_list => FND_API.G_FALSE,
331: p_commit => p_commit,
332: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
333: x_return_status => x_return_status,
334: x_msg_count => x_msg_count,
335: x_msg_data => x_msg_data,
336: p_lift_rec => l_pvt_lift_rec,
337: x_object_version_number => l_object_version_number );
338:
339:
340: -- Check return status from the above procedure call
341: IF x_return_status = FND_API.G_RET_STS_ERROR then
342: RAISE FND_API.G_EXC_ERROR;
343: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
344: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
345: END IF;
338:
339:
340: -- Check return status from the above procedure call
341: IF x_return_status = FND_API.G_RET_STS_ERROR then
342: RAISE FND_API.G_EXC_ERROR;
343: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
344: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
345: END IF;
346: --
339:
340: -- Check return status from the above procedure call
341: IF x_return_status = FND_API.G_RET_STS_ERROR then
342: RAISE FND_API.G_EXC_ERROR;
343: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
344: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
345: END IF;
346: --
347: -- End of API body
340: -- Check return status from the above procedure call
341: IF x_return_status = FND_API.G_RET_STS_ERROR then
342: RAISE FND_API.G_EXC_ERROR;
343: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
344: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
345: END IF;
346: --
347: -- End of API body
348: --
347: -- End of API body
348: --
349:
350: -- Standard check for p_commit
351: IF FND_API.to_Boolean( p_commit )
352: THEN
353: COMMIT WORK;
354: END IF;
355:
364: );
365: EXCEPTION
366:
367: WHEN AMS_Utility_PVT.resource_locked THEN
368: x_return_status := FND_API.g_ret_sts_error;
369: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
370: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
371: FND_MSG_PUB.add;
372: END IF;
370: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
371: FND_MSG_PUB.add;
372: END IF;
373:
374: WHEN FND_API.G_EXC_ERROR THEN
375: ROLLBACK TO Update_Lift_PUB;
376: x_return_status := FND_API.G_RET_STS_ERROR;
377: -- Standard call to get message count and if count=1, get the message
378: FND_MSG_PUB.Count_And_Get (
372: END IF;
373:
374: WHEN FND_API.G_EXC_ERROR THEN
375: ROLLBACK TO Update_Lift_PUB;
376: x_return_status := FND_API.G_RET_STS_ERROR;
377: -- Standard call to get message count and if count=1, get the message
378: FND_MSG_PUB.Count_And_Get (
379: p_encoded => FND_API.G_FALSE,
380: p_count => x_msg_count,
375: ROLLBACK TO Update_Lift_PUB;
376: x_return_status := FND_API.G_RET_STS_ERROR;
377: -- Standard call to get message count and if count=1, get the message
378: FND_MSG_PUB.Count_And_Get (
379: p_encoded => FND_API.G_FALSE,
380: p_count => x_msg_count,
381: p_data => x_msg_data
382: );
383:
380: p_count => x_msg_count,
381: p_data => x_msg_data
382: );
383:
384: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
385: ROLLBACK TO Update_Lift_PUB;
386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: -- Standard call to get message count and if count=1, get the message
388: FND_MSG_PUB.Count_And_Get (
382: );
383:
384: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
385: ROLLBACK TO Update_Lift_PUB;
386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: -- Standard call to get message count and if count=1, get the message
388: FND_MSG_PUB.Count_And_Get (
389: p_encoded => FND_API.G_FALSE,
390: p_count => x_msg_count,
385: ROLLBACK TO Update_Lift_PUB;
386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: -- Standard call to get message count and if count=1, get the message
388: FND_MSG_PUB.Count_And_Get (
389: p_encoded => FND_API.G_FALSE,
390: p_count => x_msg_count,
391: p_data => x_msg_data
392: );
393:
392: );
393:
394: WHEN OTHERS THEN
395: ROLLBACK TO Update_Lift_PUB;
396: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
397: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
398: THEN
399: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
400: END IF;
399: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
400: END IF;
401: -- Standard call to get message count and if count=1, get the message
402: FND_MSG_PUB.Count_And_Get (
403: p_encoded => FND_API.G_FALSE,
404: p_count => x_msg_count,
405: p_data => x_msg_data
406: );
407: End Update_Lift;
408:
409:
410: PROCEDURE Delete_Lift(
411: p_api_version IN NUMBER,
412: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
413: p_commit IN VARCHAR2 := FND_API.G_FALSE,
414: x_return_status OUT VARCHAR2,
415: x_msg_count OUT NUMBER,
416: x_msg_data OUT VARCHAR2,
409:
410: PROCEDURE Delete_Lift(
411: p_api_version IN NUMBER,
412: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
413: p_commit IN VARCHAR2 := FND_API.G_FALSE,
414: x_return_status OUT VARCHAR2,
415: x_msg_count OUT NUMBER,
416: x_msg_data OUT VARCHAR2,
417: p_lift_id IN NUMBER,
428: -- Standard Start of API savepoint
429: SAVEPOINT Delete_Lift_PUB;
430:
431: -- Standard call to check for call compatibility.
432: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
433: p_api_version,
434: l_api_name,
435: G_PKG_NAME)
436: THEN
433: p_api_version,
434: l_api_name,
435: G_PKG_NAME)
436: THEN
437: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
438: END IF;
439:
440: -- Initialize message list if p_init_msg_list is set to TRUE.
441: IF FND_API.to_Boolean( p_init_msg_list )
437: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
438: END IF;
439:
440: -- Initialize message list if p_init_msg_list is set to TRUE.
441: IF FND_API.to_Boolean( p_init_msg_list )
442: THEN
443: FND_MSG_PUB.initialize;
444: END IF;
445:
447: AMS_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
448:
449:
450: -- Initialize API return status to SUCCESS
451: x_return_status := FND_API.G_RET_STS_SUCCESS;
452:
453: --
454: -- API body
455: --
454: -- API body
455: --
456: AMS_DMLift_PVT.Delete_Lift(
457: p_api_version => 1.0,
458: p_init_msg_list => FND_API.G_FALSE,
459: p_commit => p_commit,
460: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
461: x_return_status => x_return_status,
462: x_msg_count => x_msg_count,
456: AMS_DMLift_PVT.Delete_Lift(
457: p_api_version => 1.0,
458: p_init_msg_list => FND_API.G_FALSE,
459: p_commit => p_commit,
460: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
461: x_return_status => x_return_status,
462: x_msg_count => x_msg_count,
463: x_msg_data => x_msg_data,
464: p_lift_id => l_lift_id,
465: p_object_version_number => l_object_version_number );
466:
467:
468: -- Check return status from the above procedure call
469: IF x_return_status = FND_API.G_RET_STS_ERROR then
470: RAISE FND_API.G_EXC_ERROR;
471: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
472: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
473: END IF;
466:
467:
468: -- Check return status from the above procedure call
469: IF x_return_status = FND_API.G_RET_STS_ERROR then
470: RAISE FND_API.G_EXC_ERROR;
471: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
472: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
473: END IF;
474: --
467:
468: -- Check return status from the above procedure call
469: IF x_return_status = FND_API.G_RET_STS_ERROR then
470: RAISE FND_API.G_EXC_ERROR;
471: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
472: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
473: END IF;
474: --
475: -- End of API body
468: -- Check return status from the above procedure call
469: IF x_return_status = FND_API.G_RET_STS_ERROR then
470: RAISE FND_API.G_EXC_ERROR;
471: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
472: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
473: END IF;
474: --
475: -- End of API body
476: --
475: -- End of API body
476: --
477:
478: -- Standard check for p_commit
479: IF FND_API.to_Boolean( p_commit )
480: THEN
481: COMMIT WORK;
482: END IF;
483:
492: );
493: EXCEPTION
494:
495: WHEN AMS_Utility_PVT.resource_locked THEN
496: x_return_status := FND_API.g_ret_sts_error;
497: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
498: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
499: FND_MSG_PUB.add;
500: END IF;
498: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
499: FND_MSG_PUB.add;
500: END IF;
501:
502: WHEN FND_API.G_EXC_ERROR THEN
503: ROLLBACK TO Delete_Lift_PUB;
504: x_return_status := FND_API.G_RET_STS_ERROR;
505: -- Standard call to get message count and if count=1, get the message
506: FND_MSG_PUB.Count_And_Get (
500: END IF;
501:
502: WHEN FND_API.G_EXC_ERROR THEN
503: ROLLBACK TO Delete_Lift_PUB;
504: x_return_status := FND_API.G_RET_STS_ERROR;
505: -- Standard call to get message count and if count=1, get the message
506: FND_MSG_PUB.Count_And_Get (
507: p_encoded => FND_API.G_FALSE,
508: p_count => x_msg_count,
503: ROLLBACK TO Delete_Lift_PUB;
504: x_return_status := FND_API.G_RET_STS_ERROR;
505: -- Standard call to get message count and if count=1, get the message
506: FND_MSG_PUB.Count_And_Get (
507: p_encoded => FND_API.G_FALSE,
508: p_count => x_msg_count,
509: p_data => x_msg_data
510: );
511:
508: p_count => x_msg_count,
509: p_data => x_msg_data
510: );
511:
512: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
513: ROLLBACK TO Delete_Lift_PUB;
514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
515: -- Standard call to get message count and if count=1, get the message
516: FND_MSG_PUB.Count_And_Get (
510: );
511:
512: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
513: ROLLBACK TO Delete_Lift_PUB;
514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
515: -- Standard call to get message count and if count=1, get the message
516: FND_MSG_PUB.Count_And_Get (
517: p_encoded => FND_API.G_FALSE,
518: p_count => x_msg_count,
513: ROLLBACK TO Delete_Lift_PUB;
514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
515: -- Standard call to get message count and if count=1, get the message
516: FND_MSG_PUB.Count_And_Get (
517: p_encoded => FND_API.G_FALSE,
518: p_count => x_msg_count,
519: p_data => x_msg_data
520: );
521:
520: );
521:
522: WHEN OTHERS THEN
523: ROLLBACK TO Delete_Lift_PUB;
524: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
525: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
526: THEN
527: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
528: END IF;
527: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
528: END IF;
529: -- Standard call to get message count and if count=1, get the message
530: FND_MSG_PUB.Count_And_Get (
531: p_encoded => FND_API.G_FALSE,
532: p_count => x_msg_count,
533: p_data => x_msg_data
534: );
535: End Delete_Lift;
574: WHERE lift_id = p_lift_id)
575: ;
576: BEGIN
577: -- Initialize return status
578: x_return_status := FND_API.g_ret_sts_success;
579:
580: -- Construct the record for the private API
581: l_lift_rec.model_id := p_model_id;
582: l_lift_rec.quantile := p_quantile;
592:
593: -- validate input
594: AMS_DMLift_PVT.validate_lift (
595: p_api_version => 1.0,
596: p_init_msg_list => FND_API.g_true,
597: p_validation_level => FND_API.g_valid_level_full,
598: p_validation_mode => JTF_PLSQL_API.G_UPDATE,
599: p_lift_rec => l_lift_rec,
600: x_return_status => x_return_status,
593: -- validate input
594: AMS_DMLift_PVT.validate_lift (
595: p_api_version => 1.0,
596: p_init_msg_list => FND_API.g_true,
597: p_validation_level => FND_API.g_valid_level_full,
598: p_validation_mode => JTF_PLSQL_API.G_UPDATE,
599: p_lift_rec => l_lift_rec,
600: x_return_status => x_return_status,
601: x_msg_count => l_msg_count,
601: x_msg_count => l_msg_count,
602: x_msg_data => l_msg_data
603: );
604: -- Check return status from the above procedure call
605: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
606: RAISE FND_API.G_EXC_ERROR;
607: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
608: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
609: END IF;
602: x_msg_data => l_msg_data
603: );
604: -- Check return status from the above procedure call
605: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
606: RAISE FND_API.G_EXC_ERROR;
607: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
608: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
609: END IF;
610:
603: );
604: -- Check return status from the above procedure call
605: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
606: RAISE FND_API.G_EXC_ERROR;
607: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
608: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
609: END IF;
610:
611: -- get unique id
604: -- Check return status from the above procedure call
605: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
606: RAISE FND_API.G_EXC_ERROR;
607: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
608: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
609: END IF;
610:
611: -- get unique id
612: LOOP
646: p_TARGET_CONFIDENCE => p_target_confidence,
647: p_NON_TARGET_CONFIDENCE => p_non_target_confidence
648: );
649: EXCEPTION
650: WHEN FND_API.G_EXC_ERROR THEN
651: x_return_status := FND_API.G_RET_STS_ERROR;
652: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
653: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
654: WHEN OTHERS THEN
647: p_NON_TARGET_CONFIDENCE => p_non_target_confidence
648: );
649: EXCEPTION
650: WHEN FND_API.G_EXC_ERROR THEN
651: x_return_status := FND_API.G_RET_STS_ERROR;
652: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
653: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
654: WHEN OTHERS THEN
655: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
648: );
649: EXCEPTION
650: WHEN FND_API.G_EXC_ERROR THEN
651: x_return_status := FND_API.G_RET_STS_ERROR;
652: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
653: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
654: WHEN OTHERS THEN
655: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
656: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
649: EXCEPTION
650: WHEN FND_API.G_EXC_ERROR THEN
651: x_return_status := FND_API.G_RET_STS_ERROR;
652: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
653: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
654: WHEN OTHERS THEN
655: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
656: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
657: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
651: x_return_status := FND_API.G_RET_STS_ERROR;
652: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
653: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
654: WHEN OTHERS THEN
655: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
656: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
657: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
658: END IF;
659: END;