10: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
11:
12: PROCEDURE Create_Ps_Posting(
13: p_api_version_number IN NUMBER,
14: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
15: p_commit IN VARCHAR2 := FND_API.G_FALSE,
16: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
17:
18: x_return_status OUT NOCOPY VARCHAR2,
11:
12: PROCEDURE Create_Ps_Posting(
13: p_api_version_number IN NUMBER,
14: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
15: p_commit IN VARCHAR2 := FND_API.G_FALSE,
16: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
17:
18: x_return_status OUT NOCOPY VARCHAR2,
19: x_msg_count OUT NOCOPY NUMBER,
12: PROCEDURE Create_Ps_Posting(
13: p_api_version_number IN NUMBER,
14: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
15: p_commit IN VARCHAR2 := FND_API.G_FALSE,
16: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
17:
18: x_return_status OUT NOCOPY VARCHAR2,
19: x_msg_count OUT NOCOPY NUMBER,
20: x_msg_data OUT NOCOPY VARCHAR2,
27: l_api_name CONSTANT VARCHAR2(30) := 'Create_Ps_Posting';
28: l_api_version_number CONSTANT NUMBER := 1.0;
29: l_return_status_full VARCHAR2(1);
30: l_object_version_number NUMBER := 1;
31: l_org_id NUMBER := FND_API.G_MISS_NUM;
32: l_posting_id NUMBER;
33: l_dummy NUMBER;
34: l_tempchar VARCHAR2(1);
35:
46: -- Standard Start of API savepoint
47: SAVEPOINT CREATE_Ps_Posting_PVT;
48:
49: -- Standard call to check for call compatibility.
50: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
51: p_api_version_number,
52: l_api_name,
53: G_PKG_NAME)
54: THEN
51: p_api_version_number,
52: l_api_name,
53: G_PKG_NAME)
54: THEN
55: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
56: END IF;
57:
58: -- Initialize message list if p_init_msg_list is set to TRUE.
59: IF FND_API.to_Boolean( p_init_msg_list )
55: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
56: END IF;
57:
58: -- Initialize message list if p_init_msg_list is set to TRUE.
59: IF FND_API.to_Boolean( p_init_msg_list )
60: THEN
61: FND_MSG_PUB.initialize;
62: END IF;
63:
68: END IF;
69:
70:
71: -- Initialize API return status to SUCCESS
72: x_return_status := FND_API.G_RET_STS_SUCCESS;
73:
74: -- Local variable initialization
75:
76: IF p_ps_posting_rec.POSTING_ID IS NULL OR p_ps_posting_rec.POSTING_ID = FND_API.g_miss_num THEN
72: x_return_status := FND_API.G_RET_STS_SUCCESS;
73:
74: -- Local variable initialization
75:
76: IF p_ps_posting_rec.POSTING_ID IS NULL OR p_ps_posting_rec.POSTING_ID = FND_API.g_miss_num THEN
77: LOOP
78: l_dummy := NULL;
79: OPEN c_id;
80: FETCH c_id INTO l_posting_id;
93:
94: IF FND_GLOBAL.User_Id IS NULL
95: THEN
96: AMS_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
97: RAISE FND_API.G_EXC_ERROR;
98: END IF;
99:
100: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL)
101: THEN
96: AMS_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
97: RAISE FND_API.G_EXC_ERROR;
98: END IF;
99:
100: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL)
101: THEN
102: -- Debug message
103: IF (AMS_DEBUG_HIGH_ON) THEN
104: AMS_UTILITY_PVT.debug_message('Private API: Calling Validate_Ps_Posting');
106:
107: -- Invoke validation procedures
108: Validate_ps_posting(
109: p_api_version_number => 1.0,
110: p_init_msg_list => FND_API.G_FALSE,
111: p_validation_level => p_validation_level,
112: p_ps_posting_rec => p_ps_posting_rec,
113: x_return_status => x_return_status,
114: x_msg_count => x_msg_count,
114: x_msg_count => x_msg_count,
115: x_msg_data => x_msg_data);
116: END IF;
117:
118: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
119: RAISE FND_API.G_EXC_ERROR;
120: END IF;
121:
122: -- Debug Message
115: x_msg_data => x_msg_data);
116: END IF;
117:
118: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
119: RAISE FND_API.G_EXC_ERROR;
120: END IF;
121:
122: -- Debug Message
123: IF (AMS_DEBUG_HIGH_ON) THEN
140: THEN
141: FND_MESSAGE.set_name('AMS','AMS_POST_NAME_NOT_UNIQUE');
142: FND_MSG_PUB.add;
143: END IF;
144: RAISE FND_API.g_exc_error;
145: END IF;
146:
147:
148: -- Invoke table handler(AMS_IBA_PS_POSTINGS_B_PKG.Insert_Row)
178: p_attribute13 => p_ps_posting_rec.attribute13,
179: p_attribute14 => p_ps_posting_rec.attribute14,
180: p_attribute15 => p_ps_posting_rec.attribute15);
181:
182: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
183: RAISE FND_API.G_EXC_ERROR;
184: END IF;
185: --
186: -- End of API body
179: p_attribute14 => p_ps_posting_rec.attribute14,
180: p_attribute15 => p_ps_posting_rec.attribute15);
181:
182: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
183: RAISE FND_API.G_EXC_ERROR;
184: END IF;
185: --
186: -- End of API body
187: --
187: --
188: x_posting_id := l_posting_id;
189:
190: -- Standard check for p_commit
191: IF FND_API.to_Boolean( p_commit )
192: THEN
193: COMMIT WORK;
194: END IF;
195:
206: );
207: EXCEPTION
208:
209: WHEN AMS_Utility_PVT.resource_locked THEN
210: x_return_status := FND_API.g_ret_sts_error;
211: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
212:
213: WHEN FND_API.G_EXC_ERROR THEN
214: ROLLBACK TO CREATE_Ps_Posting_PVT;
209: WHEN AMS_Utility_PVT.resource_locked THEN
210: x_return_status := FND_API.g_ret_sts_error;
211: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
212:
213: WHEN FND_API.G_EXC_ERROR THEN
214: ROLLBACK TO CREATE_Ps_Posting_PVT;
215: x_return_status := FND_API.G_RET_STS_ERROR;
216: -- Standard call to get message count and if count=1, get the message
217: FND_MSG_PUB.Count_And_Get (
211: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
212:
213: WHEN FND_API.G_EXC_ERROR THEN
214: ROLLBACK TO CREATE_Ps_Posting_PVT;
215: x_return_status := FND_API.G_RET_STS_ERROR;
216: -- Standard call to get message count and if count=1, get the message
217: FND_MSG_PUB.Count_And_Get (
218: p_encoded => FND_API.G_FALSE,
219: p_count => x_msg_count,
214: ROLLBACK TO CREATE_Ps_Posting_PVT;
215: x_return_status := FND_API.G_RET_STS_ERROR;
216: -- Standard call to get message count and if count=1, get the message
217: FND_MSG_PUB.Count_And_Get (
218: p_encoded => FND_API.G_FALSE,
219: p_count => x_msg_count,
220: p_data => x_msg_data
221: );
222:
219: p_count => x_msg_count,
220: p_data => x_msg_data
221: );
222:
223: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
224: ROLLBACK TO CREATE_Ps_Posting_PVT;
225: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
226: -- Standard call to get message count and if count=1, get the message
227: FND_MSG_PUB.Count_And_Get (
221: );
222:
223: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
224: ROLLBACK TO CREATE_Ps_Posting_PVT;
225: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
226: -- Standard call to get message count and if count=1, get the message
227: FND_MSG_PUB.Count_And_Get (
228: p_encoded => FND_API.G_FALSE,
229: p_count => x_msg_count,
224: ROLLBACK TO CREATE_Ps_Posting_PVT;
225: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
226: -- Standard call to get message count and if count=1, get the message
227: FND_MSG_PUB.Count_And_Get (
228: p_encoded => FND_API.G_FALSE,
229: p_count => x_msg_count,
230: p_data => x_msg_data
231: );
232:
231: );
232:
233: WHEN OTHERS THEN
234: ROLLBACK TO CREATE_Ps_Posting_PVT;
235: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
236: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
237: THEN
238: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
239: END IF;
238: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
239: END IF;
240: -- Standard call to get message count and if count=1, get the message
241: FND_MSG_PUB.Count_And_Get (
242: p_encoded => FND_API.G_FALSE,
243: p_count => x_msg_count,
244: p_data => x_msg_data
245: );
246: End Create_Ps_Posting;
247:
248:
249: PROCEDURE Update_Ps_Posting(
250: p_api_version_number IN NUMBER,
251: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
252: p_commit IN VARCHAR2 := FND_API.G_FALSE,
253: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
254: x_return_status OUT NOCOPY VARCHAR2,
255: x_msg_count OUT NOCOPY NUMBER,
248:
249: PROCEDURE Update_Ps_Posting(
250: p_api_version_number IN NUMBER,
251: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
252: p_commit IN VARCHAR2 := FND_API.G_FALSE,
253: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
254: x_return_status OUT NOCOPY VARCHAR2,
255: x_msg_count OUT NOCOPY NUMBER,
256: x_msg_data OUT NOCOPY VARCHAR2,
249: PROCEDURE Update_Ps_Posting(
250: p_api_version_number IN NUMBER,
251: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
252: p_commit IN VARCHAR2 := FND_API.G_FALSE,
253: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
254: x_return_status OUT NOCOPY VARCHAR2,
255: x_msg_count OUT NOCOPY NUMBER,
256: x_msg_data OUT NOCOPY VARCHAR2,
257: p_ps_posting_rec IN ps_posting_rec_type,
272: -- Standard Start of API savepoint
273: SAVEPOINT UPDATE_Ps_Posting_PVT;
274:
275: -- Standard call to check for call compatibility.
276: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
277: p_api_version_number,
278: l_api_name,
279: G_PKG_NAME)
280: THEN
277: p_api_version_number,
278: l_api_name,
279: G_PKG_NAME)
280: THEN
281: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
282: END IF;
283:
284: -- Initialize message list if p_init_msg_list is set to TRUE.
285: IF FND_API.to_Boolean( p_init_msg_list )
281: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
282: END IF;
283:
284: -- Initialize message list if p_init_msg_list is set to TRUE.
285: IF FND_API.to_Boolean( p_init_msg_list )
286: THEN
287: FND_MSG_PUB.initialize;
288: END IF;
289:
293: END IF;
294:
295:
296: -- Initialize API return status to SUCCESS
297: x_return_status := FND_API.G_RET_STS_SUCCESS;
298:
299: -- Debug Message
300: IF (AMS_DEBUG_HIGH_ON) THEN
301: AMS_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
308: If ( c_object_version%NOTFOUND) THEN
309: AMS_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
310: p_token_name => 'INFO',
311: p_token_value => 'Ps_Posting') ;
312: RAISE FND_API.G_EXC_ERROR;
313: END IF;
314: -- Debug Message
315: IF (AMS_DEBUG_HIGH_ON) THEN
316: AMS_UTILITY_PVT.debug_message('Private API: - Close Cursor');
318: CLOSE c_object_version;
319:
320:
321: IF (p_ps_posting_rec.object_version_number is NULL or
322: p_ps_posting_rec.object_version_number = FND_API.G_MISS_NUM ) THEN
323: AMS_Utility_PVT.Error_Message(p_message_name => 'API_VERSION_MISSING',
324: p_token_name => 'COLUMN',
325: p_token_value => 'object_version_number') ;
326: raise FND_API.G_EXC_ERROR;
322: p_ps_posting_rec.object_version_number = FND_API.G_MISS_NUM ) THEN
323: AMS_Utility_PVT.Error_Message(p_message_name => 'API_VERSION_MISSING',
324: p_token_name => 'COLUMN',
325: p_token_value => 'object_version_number') ;
326: raise FND_API.G_EXC_ERROR;
327: END IF;
328:
329: -- Check Whether record has been changed by someone else
330: IF (p_ps_posting_rec.object_version_number <> l_object_version) THEN
330: IF (p_ps_posting_rec.object_version_number <> l_object_version) THEN
331: AMS_Utility_PVT.Error_Message(p_message_name => 'API_RECORD_CHANGED',
332: p_token_name => 'INFO',
333: p_token_value => 'Ps_Posting') ;
334: raise FND_API.G_EXC_ERROR;
335: END IF;
336:
337: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
338: -- Debug message
333: p_token_value => 'Ps_Posting') ;
334: raise FND_API.G_EXC_ERROR;
335: END IF;
336:
337: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
338: -- Debug message
339: IF (AMS_DEBUG_HIGH_ON) THEN
340: AMS_UTILITY_PVT.debug_message('Private API: Validate_Ps_Posting');
341: END IF;
342:
343: -- Invoke validation procedures
344: Validate_ps_posting(
345: p_api_version_number => 1.0,
346: p_init_msg_list => FND_API.G_FALSE,
347: p_validation_level => p_validation_level,
348: p_ps_posting_rec => p_ps_posting_rec,
349: x_return_status => x_return_status,
350: x_msg_count => x_msg_count,
350: x_msg_count => x_msg_count,
351: x_msg_data => x_msg_data);
352: END IF;
353:
354: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
355: RAISE FND_API.G_EXC_ERROR;
356: END IF;
357:
358: -- Debug Message
351: x_msg_data => x_msg_data);
352: END IF;
353:
354: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
355: RAISE FND_API.G_EXC_ERROR;
356: END IF;
357:
358: -- Debug Message
359: IF (AMS_DEBUG_HIGH_ON) THEN
365: last_updated_by = FND_GLOBAL.user_id,
366: last_update_date = SYSDATE,
367: last_update_login = FND_GLOBAL.conc_login_id,
368: object_version_number = p_ps_posting_rec.object_version_number+1,
369: max_no_contents = DECODE( p_ps_posting_rec.max_no_contents, FND_API.g_miss_num, max_no_contents, p_ps_posting_rec.max_no_contents),
370: posting_type = DECODE( p_ps_posting_rec.posting_type, FND_API.g_miss_char, posting_type, p_ps_posting_rec.posting_type),
371: content_type = DECODE( p_ps_posting_rec.content_type, FND_API.g_miss_char, content_type, p_ps_posting_rec.content_type),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
366: last_update_date = SYSDATE,
367: last_update_login = FND_GLOBAL.conc_login_id,
368: object_version_number = p_ps_posting_rec.object_version_number+1,
369: max_no_contents = DECODE( p_ps_posting_rec.max_no_contents, FND_API.g_miss_num, max_no_contents, p_ps_posting_rec.max_no_contents),
370: posting_type = DECODE( p_ps_posting_rec.posting_type, FND_API.g_miss_char, posting_type, p_ps_posting_rec.posting_type),
371: content_type = DECODE( p_ps_posting_rec.content_type, FND_API.g_miss_char, content_type, p_ps_posting_rec.content_type),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
367: last_update_login = FND_GLOBAL.conc_login_id,
368: object_version_number = p_ps_posting_rec.object_version_number+1,
369: max_no_contents = DECODE( p_ps_posting_rec.max_no_contents, FND_API.g_miss_num, max_no_contents, p_ps_posting_rec.max_no_contents),
370: posting_type = DECODE( p_ps_posting_rec.posting_type, FND_API.g_miss_char, posting_type, p_ps_posting_rec.posting_type),
371: content_type = DECODE( p_ps_posting_rec.content_type, FND_API.g_miss_char, content_type, p_ps_posting_rec.content_type),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
368: object_version_number = p_ps_posting_rec.object_version_number+1,
369: max_no_contents = DECODE( p_ps_posting_rec.max_no_contents, FND_API.g_miss_num, max_no_contents, p_ps_posting_rec.max_no_contents),
370: posting_type = DECODE( p_ps_posting_rec.posting_type, FND_API.g_miss_char, posting_type, p_ps_posting_rec.posting_type),
371: content_type = DECODE( p_ps_posting_rec.content_type, FND_API.g_miss_char, content_type, p_ps_posting_rec.content_type),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
369: max_no_contents = DECODE( p_ps_posting_rec.max_no_contents, FND_API.g_miss_num, max_no_contents, p_ps_posting_rec.max_no_contents),
370: posting_type = DECODE( p_ps_posting_rec.posting_type, FND_API.g_miss_char, posting_type, p_ps_posting_rec.posting_type),
371: content_type = DECODE( p_ps_posting_rec.content_type, FND_API.g_miss_char, content_type, p_ps_posting_rec.content_type),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
370: posting_type = DECODE( p_ps_posting_rec.posting_type, FND_API.g_miss_char, posting_type, p_ps_posting_rec.posting_type),
371: content_type = DECODE( p_ps_posting_rec.content_type, FND_API.g_miss_char, content_type, p_ps_posting_rec.content_type),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
371: content_type = DECODE( p_ps_posting_rec.content_type, FND_API.g_miss_char, content_type, p_ps_posting_rec.content_type),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
372: default_content_id = DECODE( p_ps_posting_rec.default_content_id, FND_API.g_miss_num, default_content_id, p_ps_posting_rec.default_content_id),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
373: status_code = DECODE( p_ps_posting_rec.status_code, FND_API.g_miss_char, status_code, p_ps_posting_rec.status_code),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
374: attribute_category = DECODE( p_ps_posting_rec.attribute_category, FND_API.g_miss_char, attribute_category, p_ps_posting_rec.attribute_category),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
375: attribute1 = DECODE( p_ps_posting_rec.attribute1, FND_API.g_miss_char, attribute1, p_ps_posting_rec.attribute1),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
376: attribute2 = DECODE( p_ps_posting_rec.attribute2, FND_API.g_miss_char, attribute2, p_ps_posting_rec.attribute2),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
377: attribute3 = DECODE( p_ps_posting_rec.attribute3, FND_API.g_miss_char, attribute3, p_ps_posting_rec.attribute3),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
378: attribute4 = DECODE( p_ps_posting_rec.attribute4, FND_API.g_miss_char, attribute4, p_ps_posting_rec.attribute4),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
379: attribute5 = DECODE( p_ps_posting_rec.attribute5, FND_API.g_miss_char, attribute5, p_ps_posting_rec.attribute5),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
387: attribute13 = DECODE( p_ps_posting_rec.attribute13, FND_API.g_miss_char, attribute13, p_ps_posting_rec.attribute13),
380: attribute6 = DECODE( p_ps_posting_rec.attribute6, FND_API.g_miss_char, attribute6, p_ps_posting_rec.attribute6),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
387: attribute13 = DECODE( p_ps_posting_rec.attribute13, FND_API.g_miss_char, attribute13, p_ps_posting_rec.attribute13),
388: attribute14 = DECODE( p_ps_posting_rec.attribute14, FND_API.g_miss_char, attribute14, p_ps_posting_rec.attribute14),
381: attribute7 = DECODE( p_ps_posting_rec.attribute7, FND_API.g_miss_char, attribute7, p_ps_posting_rec.attribute7),
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
387: attribute13 = DECODE( p_ps_posting_rec.attribute13, FND_API.g_miss_char, attribute13, p_ps_posting_rec.attribute13),
388: attribute14 = DECODE( p_ps_posting_rec.attribute14, FND_API.g_miss_char, attribute14, p_ps_posting_rec.attribute14),
389: attribute15 = DECODE( p_ps_posting_rec.attribute15, FND_API.g_miss_char, attribute15, p_ps_posting_rec.attribute15)
382: attribute8 = DECODE( p_ps_posting_rec.attribute8, FND_API.g_miss_char, attribute8, p_ps_posting_rec.attribute8),
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
387: attribute13 = DECODE( p_ps_posting_rec.attribute13, FND_API.g_miss_char, attribute13, p_ps_posting_rec.attribute13),
388: attribute14 = DECODE( p_ps_posting_rec.attribute14, FND_API.g_miss_char, attribute14, p_ps_posting_rec.attribute14),
389: attribute15 = DECODE( p_ps_posting_rec.attribute15, FND_API.g_miss_char, attribute15, p_ps_posting_rec.attribute15)
390:
383: attribute9 = DECODE( p_ps_posting_rec.attribute9, FND_API.g_miss_char, attribute9, p_ps_posting_rec.attribute9),
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
387: attribute13 = DECODE( p_ps_posting_rec.attribute13, FND_API.g_miss_char, attribute13, p_ps_posting_rec.attribute13),
388: attribute14 = DECODE( p_ps_posting_rec.attribute14, FND_API.g_miss_char, attribute14, p_ps_posting_rec.attribute14),
389: attribute15 = DECODE( p_ps_posting_rec.attribute15, FND_API.g_miss_char, attribute15, p_ps_posting_rec.attribute15)
390:
391: WHERE posting_id = p_ps_posting_rec.posting_id
384: attribute10 = DECODE( p_ps_posting_rec.attribute10, FND_API.g_miss_char, attribute10, p_ps_posting_rec.attribute10),
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
387: attribute13 = DECODE( p_ps_posting_rec.attribute13, FND_API.g_miss_char, attribute13, p_ps_posting_rec.attribute13),
388: attribute14 = DECODE( p_ps_posting_rec.attribute14, FND_API.g_miss_char, attribute14, p_ps_posting_rec.attribute14),
389: attribute15 = DECODE( p_ps_posting_rec.attribute15, FND_API.g_miss_char, attribute15, p_ps_posting_rec.attribute15)
390:
391: WHERE posting_id = p_ps_posting_rec.posting_id
392: AND object_version_number = p_ps_posting_rec.object_version_number;
385: attribute11 = DECODE( p_ps_posting_rec.attribute11, FND_API.g_miss_char, attribute11, p_ps_posting_rec.attribute11),
386: attribute12 = DECODE( p_ps_posting_rec.attribute12, FND_API.g_miss_char, attribute12, p_ps_posting_rec.attribute12),
387: attribute13 = DECODE( p_ps_posting_rec.attribute13, FND_API.g_miss_char, attribute13, p_ps_posting_rec.attribute13),
388: attribute14 = DECODE( p_ps_posting_rec.attribute14, FND_API.g_miss_char, attribute14, p_ps_posting_rec.attribute14),
389: attribute15 = DECODE( p_ps_posting_rec.attribute15, FND_API.g_miss_char, attribute15, p_ps_posting_rec.attribute15)
390:
391: WHERE posting_id = p_ps_posting_rec.posting_id
392: AND object_version_number = p_ps_posting_rec.object_version_number;
393:
395: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
396: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
397: FND_MSG_PUB.add;
398: END IF;
399: RAISE FND_API.g_exc_error;
400: END IF;
401:
402: IF (AMS_DEBUG_HIGH_ON) THEN
403: AMS_UTILITY_PVT.debug_message('Private API: Updated B');
420: THEN
421: FND_MESSAGE.set_name('AMS','AMS_POST_NAME_NOT_UNIQUE');
422: FND_MSG_PUB.add;
423: END IF;
424: RAISE FND_API.g_exc_error;
425: END IF;
426:
427: UPDATE AMS_IBA_PS_POSTINGS_TL SET
428: posting_name = decode( p_ps_posting_rec.posting_name, FND_API.G_MISS_CHAR, posting_name, p_ps_posting_rec.posting_name),
424: RAISE FND_API.g_exc_error;
425: END IF;
426:
427: UPDATE AMS_IBA_PS_POSTINGS_TL SET
428: posting_name = decode( p_ps_posting_rec.posting_name, FND_API.G_MISS_CHAR, posting_name, p_ps_posting_rec.posting_name),
429: display_name = decode( p_ps_posting_rec.display_name, FND_API.G_MISS_CHAR, display_name, p_ps_posting_rec.display_name),
430: posting_description = decode( p_ps_posting_rec.posting_description, FND_API.G_MISS_CHAR, posting_description, p_ps_posting_rec.posting_description),
431: last_update_date = SYSDATE,
432: last_updated_by = FND_GLOBAL.user_id,
425: END IF;
426:
427: UPDATE AMS_IBA_PS_POSTINGS_TL SET
428: posting_name = decode( p_ps_posting_rec.posting_name, FND_API.G_MISS_CHAR, posting_name, p_ps_posting_rec.posting_name),
429: display_name = decode( p_ps_posting_rec.display_name, FND_API.G_MISS_CHAR, display_name, p_ps_posting_rec.display_name),
430: posting_description = decode( p_ps_posting_rec.posting_description, FND_API.G_MISS_CHAR, posting_description, p_ps_posting_rec.posting_description),
431: last_update_date = SYSDATE,
432: last_updated_by = FND_GLOBAL.user_id,
433: last_update_login = FND_GLOBAL.conc_login_id,
426:
427: UPDATE AMS_IBA_PS_POSTINGS_TL SET
428: posting_name = decode( p_ps_posting_rec.posting_name, FND_API.G_MISS_CHAR, posting_name, p_ps_posting_rec.posting_name),
429: display_name = decode( p_ps_posting_rec.display_name, FND_API.G_MISS_CHAR, display_name, p_ps_posting_rec.display_name),
430: posting_description = decode( p_ps_posting_rec.posting_description, FND_API.G_MISS_CHAR, posting_description, p_ps_posting_rec.posting_description),
431: last_update_date = SYSDATE,
432: last_updated_by = FND_GLOBAL.user_id,
433: last_update_login = FND_GLOBAL.conc_login_id,
434: source_lang = USERENV('LANG')
439: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
440: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
441: FND_MSG_PUB.add;
442: END IF;
443: RAISE FND_API.g_exc_error;
444: END IF;
445:
446: IF (AMS_DEBUG_HIGH_ON) THEN
447: AMS_UTILITY_PVT.debug_message('Private API: Updated TL');
447: AMS_UTILITY_PVT.debug_message('Private API: Updated TL');
448: END IF;
449:
450: -- Standard check for p_commit
451: IF FND_API.to_Boolean( p_commit )
452: THEN
453: COMMIT WORK;
454: END IF;
455:
465:
466: EXCEPTION
467:
468: WHEN AMS_Utility_PVT.resource_locked THEN
469: x_return_status := FND_API.g_ret_sts_error;
470: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
471:
472: WHEN FND_API.G_EXC_ERROR THEN
473: ROLLBACK TO UPDATE_Ps_Posting_PVT;
468: WHEN AMS_Utility_PVT.resource_locked THEN
469: x_return_status := FND_API.g_ret_sts_error;
470: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
471:
472: WHEN FND_API.G_EXC_ERROR THEN
473: ROLLBACK TO UPDATE_Ps_Posting_PVT;
474: x_return_status := FND_API.G_RET_STS_ERROR;
475: -- Standard call to get message count and if count=1, get the message
476: FND_MSG_PUB.Count_And_Get (
470: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
471:
472: WHEN FND_API.G_EXC_ERROR THEN
473: ROLLBACK TO UPDATE_Ps_Posting_PVT;
474: x_return_status := FND_API.G_RET_STS_ERROR;
475: -- Standard call to get message count and if count=1, get the message
476: FND_MSG_PUB.Count_And_Get (
477: p_encoded => FND_API.G_FALSE,
478: p_count => x_msg_count,
473: ROLLBACK TO UPDATE_Ps_Posting_PVT;
474: x_return_status := FND_API.G_RET_STS_ERROR;
475: -- Standard call to get message count and if count=1, get the message
476: FND_MSG_PUB.Count_And_Get (
477: p_encoded => FND_API.G_FALSE,
478: p_count => x_msg_count,
479: p_data => x_msg_data
480: );
481:
478: p_count => x_msg_count,
479: p_data => x_msg_data
480: );
481:
482: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
483: ROLLBACK TO UPDATE_Ps_Posting_PVT;
484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
485: -- Standard call to get message count and if count=1, get the message
486: FND_MSG_PUB.Count_And_Get (
480: );
481:
482: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
483: ROLLBACK TO UPDATE_Ps_Posting_PVT;
484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
485: -- Standard call to get message count and if count=1, get the message
486: FND_MSG_PUB.Count_And_Get (
487: p_encoded => FND_API.G_FALSE,
488: p_count => x_msg_count,
483: ROLLBACK TO UPDATE_Ps_Posting_PVT;
484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
485: -- Standard call to get message count and if count=1, get the message
486: FND_MSG_PUB.Count_And_Get (
487: p_encoded => FND_API.G_FALSE,
488: p_count => x_msg_count,
489: p_data => x_msg_data
490: );
491:
490: );
491:
492: WHEN OTHERS THEN
493: ROLLBACK TO UPDATE_Ps_Posting_PVT;
494: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
495: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
496: THEN
497: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
498: END IF;
497: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
498: END IF;
499: -- Standard call to get message count and if count=1, get the message
500: FND_MSG_PUB.Count_And_Get (
501: p_encoded => FND_API.G_FALSE,
502: p_count => x_msg_count,
503: p_data => x_msg_data
504: );
505: End Update_Ps_Posting;
506:
507:
508: PROCEDURE Delete_Ps_Posting(
509: p_api_version_number IN NUMBER,
510: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
511: p_commit IN VARCHAR2 := FND_API.G_FALSE,
512: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
513: x_return_status OUT NOCOPY VARCHAR2,
514: x_msg_count OUT NOCOPY NUMBER,
507:
508: PROCEDURE Delete_Ps_Posting(
509: p_api_version_number IN NUMBER,
510: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
511: p_commit IN VARCHAR2 := FND_API.G_FALSE,
512: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
513: x_return_status OUT NOCOPY VARCHAR2,
514: x_msg_count OUT NOCOPY NUMBER,
515: x_msg_data OUT NOCOPY VARCHAR2,
508: PROCEDURE Delete_Ps_Posting(
509: p_api_version_number IN NUMBER,
510: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
511: p_commit IN VARCHAR2 := FND_API.G_FALSE,
512: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
513: x_return_status OUT NOCOPY VARCHAR2,
514: x_msg_count OUT NOCOPY NUMBER,
515: x_msg_data OUT NOCOPY VARCHAR2,
516: p_posting_id IN NUMBER,
544: -- Standard Start of API savepoint
545: SAVEPOINT DELETE_Ps_Posting_PVT;
546:
547: -- Standard call to check for call compatibility.
548: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
549: p_api_version_number,
550: l_api_name,
551: G_PKG_NAME)
552: THEN
549: p_api_version_number,
550: l_api_name,
551: G_PKG_NAME)
552: THEN
553: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
554: END IF;
555:
556: -- Initialize message list if p_init_msg_list is set to TRUE.
557: IF FND_API.to_Boolean( p_init_msg_list )
553: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
554: END IF;
555:
556: -- Initialize message list if p_init_msg_list is set to TRUE.
557: IF FND_API.to_Boolean( p_init_msg_list )
558: THEN
559: FND_MSG_PUB.initialize;
560: END IF;
561:
565: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
566: END IF;
567:
568: -- Initialize API return status to SUCCESS
569: x_return_status := FND_API.G_RET_STS_SUCCESS;
570:
571: --
572: -- Api body
573: --
589: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
590: FND_MESSAGE.set_name('AMS','AMS_API_RECORD_NOT_FOUND');
591: FND_MSG_PUB.add;
592: END IF;
593: RAISE FND_API.g_exc_error;
594: END IF;
595:
596: DELETE FROM AMS_IBA_PS_POSTINGS_TL
597: WHERE posting_id = p_posting_id;
596: DELETE FROM AMS_IBA_PS_POSTINGS_TL
597: WHERE posting_id = p_posting_id;
598:
599: IF (SQL%NOTFOUND) THEN
600: RAISE FND_API.g_exc_error;
601: END IF;
602:
603: FOR c_rulegroup_id_rec IN c_rulegroup_id(p_posting_id) LOOP
604: l_rulegroup_id := c_rulegroup_id_rec.rulegroup_id;
624: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
625: FND_MESSAGE.set_name('AMS','AMS_API_VERS_DONT_MATCH');
626: FND_MSG_PUB.add;
627: END IF;
628: RAISE FND_API.g_exc_error;
629: END IF;
630: ELSE -- IS USED
631: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
632: FND_MESSAGE.set_name('AMS','AMS_POSTING_IN_USE');
631: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
632: FND_MESSAGE.set_name('AMS','AMS_POSTING_IN_USE');
633: FND_MSG_PUB.add;
634: END IF;
635: RAISE FND_API.g_exc_error;
636: END IF;
637:
638: -- End of API body
639: --
638: -- End of API body
639: --
640:
641: -- Standard check for p_commit
642: IF FND_API.to_Boolean( p_commit )
643: THEN
644: COMMIT;
645: END IF;
646:
658: );
659: EXCEPTION
660:
661: WHEN AMS_Utility_PVT.resource_locked THEN
662: x_return_status := FND_API.g_ret_sts_error;
663: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
664:
665: WHEN FND_API.G_EXC_ERROR THEN
666: ROLLBACK TO DELETE_Ps_Posting_PVT;
661: WHEN AMS_Utility_PVT.resource_locked THEN
662: x_return_status := FND_API.g_ret_sts_error;
663: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
664:
665: WHEN FND_API.G_EXC_ERROR THEN
666: ROLLBACK TO DELETE_Ps_Posting_PVT;
667: x_return_status := FND_API.G_RET_STS_ERROR;
668: -- Standard call to get message count and if count=1, get the message
669: FND_MSG_PUB.Count_And_Get (
663: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
664:
665: WHEN FND_API.G_EXC_ERROR THEN
666: ROLLBACK TO DELETE_Ps_Posting_PVT;
667: x_return_status := FND_API.G_RET_STS_ERROR;
668: -- Standard call to get message count and if count=1, get the message
669: FND_MSG_PUB.Count_And_Get (
670: p_encoded => FND_API.G_FALSE,
671: p_count => x_msg_count,
666: ROLLBACK TO DELETE_Ps_Posting_PVT;
667: x_return_status := FND_API.G_RET_STS_ERROR;
668: -- Standard call to get message count and if count=1, get the message
669: FND_MSG_PUB.Count_And_Get (
670: p_encoded => FND_API.G_FALSE,
671: p_count => x_msg_count,
672: p_data => x_msg_data
673: );
674:
671: p_count => x_msg_count,
672: p_data => x_msg_data
673: );
674:
675: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
676: ROLLBACK TO DELETE_Ps_Posting_PVT;
677: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
678: -- Standard call to get message count and if count=1, get the message
679: FND_MSG_PUB.Count_And_Get (
673: );
674:
675: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
676: ROLLBACK TO DELETE_Ps_Posting_PVT;
677: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
678: -- Standard call to get message count and if count=1, get the message
679: FND_MSG_PUB.Count_And_Get (
680: p_encoded => FND_API.G_FALSE,
681: p_count => x_msg_count,
676: ROLLBACK TO DELETE_Ps_Posting_PVT;
677: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
678: -- Standard call to get message count and if count=1, get the message
679: FND_MSG_PUB.Count_And_Get (
680: p_encoded => FND_API.G_FALSE,
681: p_count => x_msg_count,
682: p_data => x_msg_data
683: );
684:
683: );
684:
685: WHEN OTHERS THEN
686: ROLLBACK TO DELETE_Ps_Posting_PVT;
687: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
688: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
689: THEN
690: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
691: END IF;
690: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
691: END IF;
692: -- Standard call to get message count and if count=1, get the message
693: FND_MSG_PUB.Count_And_Get (
694: p_encoded => FND_API.G_FALSE,
695: p_count => x_msg_count,
696: p_data => x_msg_data
697: );
698: End Delete_Ps_Posting;
701:
702: -- Hint: Primary key needs to be returned.
703: PROCEDURE Lock_Ps_Posting(
704: p_api_version_number IN NUMBER,
705: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
706:
707: x_return_status OUT NOCOPY VARCHAR2,
708: x_msg_count OUT NOCOPY NUMBER,
709: x_msg_data OUT NOCOPY VARCHAR2,
733: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
734: END IF;
735:
736: -- Initialize message list if p_init_msg_list is set to TRUE.
737: IF FND_API.to_Boolean( p_init_msg_list )
738: THEN
739: FND_MSG_PUB.initialize;
740: END IF;
741:
739: FND_MSG_PUB.initialize;
740: END IF;
741:
742: -- Standard call to check for call compatibility.
743: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
744: p_api_version_number,
745: l_api_name,
746: G_PKG_NAME)
747: THEN
744: p_api_version_number,
745: l_api_name,
746: G_PKG_NAME)
747: THEN
748: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
749: END IF;
750:
751:
752: -- Initialize API return status to SUCCESS
749: END IF;
750:
751:
752: -- Initialize API return status to SUCCESS
753: x_return_status := FND_API.G_RET_STS_SUCCESS;
754:
755:
756: ------------------------ lock -------------------------
757:
767: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
768: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
769: FND_MSG_PUB.add;
770: END IF;
771: RAISE FND_API.g_exc_error;
772: END IF;
773:
774: CLOSE c_Ps_Posting;
775:
774: CLOSE c_Ps_Posting;
775:
776: -------------------- finish --------------------------
777: FND_MSG_PUB.count_and_get(
778: p_encoded => FND_API.g_false,
779: p_count => x_msg_count,
780: p_data => x_msg_data);
781: IF (AMS_DEBUG_HIGH_ON) THEN
782:
784: END IF;
785: EXCEPTION
786:
787: WHEN AMS_Utility_PVT.resource_locked THEN
788: x_return_status := FND_API.g_ret_sts_error;
789: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
790:
791: WHEN FND_API.G_EXC_ERROR THEN
792: ROLLBACK TO LOCK_Ps_Posting_PVT;
787: WHEN AMS_Utility_PVT.resource_locked THEN
788: x_return_status := FND_API.g_ret_sts_error;
789: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
790:
791: WHEN FND_API.G_EXC_ERROR THEN
792: ROLLBACK TO LOCK_Ps_Posting_PVT;
793: x_return_status := FND_API.G_RET_STS_ERROR;
794: -- Standard call to get message count and if count=1, get the message
795: FND_MSG_PUB.Count_And_Get (
789: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
790:
791: WHEN FND_API.G_EXC_ERROR THEN
792: ROLLBACK TO LOCK_Ps_Posting_PVT;
793: x_return_status := FND_API.G_RET_STS_ERROR;
794: -- Standard call to get message count and if count=1, get the message
795: FND_MSG_PUB.Count_And_Get (
796: p_encoded => FND_API.G_FALSE,
797: p_count => x_msg_count,
792: ROLLBACK TO LOCK_Ps_Posting_PVT;
793: x_return_status := FND_API.G_RET_STS_ERROR;
794: -- Standard call to get message count and if count=1, get the message
795: FND_MSG_PUB.Count_And_Get (
796: p_encoded => FND_API.G_FALSE,
797: p_count => x_msg_count,
798: p_data => x_msg_data
799: );
800:
797: p_count => x_msg_count,
798: p_data => x_msg_data
799: );
800:
801: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
802: ROLLBACK TO LOCK_Ps_Posting_PVT;
803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
804: -- Standard call to get message count and if count=1, get the message
805: FND_MSG_PUB.Count_And_Get (
799: );
800:
801: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
802: ROLLBACK TO LOCK_Ps_Posting_PVT;
803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
804: -- Standard call to get message count and if count=1, get the message
805: FND_MSG_PUB.Count_And_Get (
806: p_encoded => FND_API.G_FALSE,
807: p_count => x_msg_count,
802: ROLLBACK TO LOCK_Ps_Posting_PVT;
803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
804: -- Standard call to get message count and if count=1, get the message
805: FND_MSG_PUB.Count_And_Get (
806: p_encoded => FND_API.G_FALSE,
807: p_count => x_msg_count,
808: p_data => x_msg_data
809: );
810:
809: );
810:
811: WHEN OTHERS THEN
812: ROLLBACK TO LOCK_Ps_Posting_PVT;
813: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
814: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
815: THEN
816: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
817: END IF;
816: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
817: END IF;
818: -- Standard call to get message count and if count=1, get the message
819: FND_MSG_PUB.Count_And_Get (
820: p_encoded => FND_API.G_FALSE,
821: p_count => x_msg_count,
822: p_data => x_msg_data
823: );
824: End Lock_Ps_Posting;
843: FETCH c_complete INTO l_ps_posting_rec;
844: CLOSE c_complete;
845:
846: -- created_by
847: IF p_ps_posting_rec.created_by = FND_API.g_miss_num THEN
848: x_complete_rec.created_by := l_ps_posting_rec.created_by;
849: END IF;
850:
851: -- creation_date
848: x_complete_rec.created_by := l_ps_posting_rec.created_by;
849: END IF;
850:
851: -- creation_date
852: IF p_ps_posting_rec.creation_date = FND_API.g_miss_date THEN
853: x_complete_rec.creation_date := l_ps_posting_rec.creation_date;
854: END IF;
855:
856: -- last_updated_by
853: x_complete_rec.creation_date := l_ps_posting_rec.creation_date;
854: END IF;
855:
856: -- last_updated_by
857: IF p_ps_posting_rec.last_updated_by = FND_API.g_miss_num THEN
858: x_complete_rec.last_updated_by := l_ps_posting_rec.last_updated_by;
859: END IF;
860:
861: -- last_update_date
858: x_complete_rec.last_updated_by := l_ps_posting_rec.last_updated_by;
859: END IF;
860:
861: -- last_update_date
862: IF p_ps_posting_rec.last_update_date = FND_API.g_miss_date THEN
863: x_complete_rec.last_update_date := l_ps_posting_rec.last_update_date;
864: END IF;
865:
866: -- last_update_login
863: x_complete_rec.last_update_date := l_ps_posting_rec.last_update_date;
864: END IF;
865:
866: -- last_update_login
867: IF p_ps_posting_rec.last_update_login = FND_API.g_miss_num THEN
868: x_complete_rec.last_update_login := l_ps_posting_rec.last_update_login;
869: END IF;
870:
871: -- object_version_number
868: x_complete_rec.last_update_login := l_ps_posting_rec.last_update_login;
869: END IF;
870:
871: -- object_version_number
872: IF p_ps_posting_rec.object_version_number = FND_API.g_miss_num THEN
873: x_complete_rec.object_version_number := l_ps_posting_rec.object_version_number;
874: END IF;
875:
876: -- posting_id
873: x_complete_rec.object_version_number := l_ps_posting_rec.object_version_number;
874: END IF;
875:
876: -- posting_id
877: IF p_ps_posting_rec.posting_id = FND_API.g_miss_num THEN
878: x_complete_rec.posting_id := l_ps_posting_rec.posting_id;
879: END IF;
880:
881: -- max_no_contents
878: x_complete_rec.posting_id := l_ps_posting_rec.posting_id;
879: END IF;
880:
881: -- max_no_contents
882: IF p_ps_posting_rec.max_no_contents = FND_API.g_miss_num THEN
883: x_complete_rec.max_no_contents := l_ps_posting_rec.max_no_contents;
884: END IF;
885:
886: -- posting_type
883: x_complete_rec.max_no_contents := l_ps_posting_rec.max_no_contents;
884: END IF;
885:
886: -- posting_type
887: IF p_ps_posting_rec.posting_type = FND_API.g_miss_char THEN
888: x_complete_rec.posting_type := l_ps_posting_rec.posting_type;
889: END IF;
890:
891: -- content_type
888: x_complete_rec.posting_type := l_ps_posting_rec.posting_type;
889: END IF;
890:
891: -- content_type
892: IF p_ps_posting_rec.content_type = FND_API.g_miss_char THEN
893: x_complete_rec.content_type := l_ps_posting_rec.content_type;
894: END IF;
895:
896: -- default_content_id
893: x_complete_rec.content_type := l_ps_posting_rec.content_type;
894: END IF;
895:
896: -- default_content_id
897: IF p_ps_posting_rec.default_content_id = FND_API.g_miss_num THEN
898: x_complete_rec.default_content_id := l_ps_posting_rec.default_content_id;
899: END IF;
900:
901: -- status_code
898: x_complete_rec.default_content_id := l_ps_posting_rec.default_content_id;
899: END IF;
900:
901: -- status_code
902: IF p_ps_posting_rec.status_code = FND_API.g_miss_char THEN
903: x_complete_rec.status_code := l_ps_posting_rec.status_code;
904: END IF;
905: -- Note: Developers need to modify the procedure
906: -- to handle any business specific requirements.
907: END Complete_ps_posting_Rec;
908:
909: PROCEDURE Validate_ps_posting(
910: p_api_version_number IN NUMBER,
911: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
912: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
913: p_ps_posting_rec IN ps_posting_rec_type,
914: x_return_status OUT NOCOPY VARCHAR2,
915: x_msg_count OUT NOCOPY NUMBER,
908:
909: PROCEDURE Validate_ps_posting(
910: p_api_version_number IN NUMBER,
911: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
912: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
913: p_ps_posting_rec IN ps_posting_rec_type,
914: x_return_status OUT NOCOPY VARCHAR2,
915: x_msg_count OUT NOCOPY NUMBER,
916: x_msg_data OUT NOCOPY VARCHAR2
933:
934: END IF;
935:
936: -- Standard call to check for call compatibility.
937: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
938: p_api_version_number,
939: l_api_name,
940: G_PKG_NAME)
941: THEN
938: p_api_version_number,
939: l_api_name,
940: G_PKG_NAME)
941: THEN
942: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
943: END IF;
944:
945: -- Initialize message list if p_init_msg_list is set to TRUE.
946: IF FND_API.to_Boolean( p_init_msg_list )
942: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
943: END IF;
944:
945: -- Initialize message list if p_init_msg_list is set to TRUE.
946: IF FND_API.to_Boolean( p_init_msg_list )
947: THEN
948: FND_MSG_PUB.initialize;
949: END IF;
950:
956: p_validation_mode => JTF_PLSQL_API.g_create,
957: x_return_status => x_return_status
958: );
959:
960: IF x_return_status = FND_API.g_ret_sts_unexp_error THEN
961: RAISE FND_API.g_exc_unexpected_error;
962: ELSIF x_return_status = FND_API.g_ret_sts_error THEN
963: RAISE FND_API.g_exc_error;
964: END IF;
957: x_return_status => x_return_status
958: );
959:
960: IF x_return_status = FND_API.g_ret_sts_unexp_error THEN
961: RAISE FND_API.g_exc_unexpected_error;
962: ELSIF x_return_status = FND_API.g_ret_sts_error THEN
963: RAISE FND_API.g_exc_error;
964: END IF;
965: END IF;
958: );
959:
960: IF x_return_status = FND_API.g_ret_sts_unexp_error THEN
961: RAISE FND_API.g_exc_unexpected_error;
962: ELSIF x_return_status = FND_API.g_ret_sts_error THEN
963: RAISE FND_API.g_exc_error;
964: END IF;
965: END IF;
966:
959:
960: IF x_return_status = FND_API.g_ret_sts_unexp_error THEN
961: RAISE FND_API.g_exc_unexpected_error;
962: ELSIF x_return_status = FND_API.g_ret_sts_error THEN
963: RAISE FND_API.g_exc_error;
964: END IF;
965: END IF;
966:
967: IF (AMS_DEBUG_HIGH_ON) THEN
970:
971: -------------------- finish --------------------------
972: FND_MSG_PUB.count_and_get
973: (
974: p_encoded => FND_API.g_false,
975: p_count => x_msg_count,
976: p_data => x_msg_data
977: );
978:
978:
979: EXCEPTION
980:
981: WHEN AMS_Utility_PVT.resource_locked THEN
982: x_return_status := FND_API.g_ret_sts_error;
983: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
984:
985: WHEN FND_API.G_EXC_ERROR THEN
986: ROLLBACK TO VALIDATE_Ps_Posting_;
981: WHEN AMS_Utility_PVT.resource_locked THEN
982: x_return_status := FND_API.g_ret_sts_error;
983: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
984:
985: WHEN FND_API.G_EXC_ERROR THEN
986: ROLLBACK TO VALIDATE_Ps_Posting_;
987: x_return_status := FND_API.G_RET_STS_ERROR;
988: -- Standard call to get message count and if count=1, get the message
989: FND_MSG_PUB.Count_And_Get (
983: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
984:
985: WHEN FND_API.G_EXC_ERROR THEN
986: ROLLBACK TO VALIDATE_Ps_Posting_;
987: x_return_status := FND_API.G_RET_STS_ERROR;
988: -- Standard call to get message count and if count=1, get the message
989: FND_MSG_PUB.Count_And_Get (
990: p_encoded => FND_API.G_FALSE,
991: p_count => x_msg_count,
986: ROLLBACK TO VALIDATE_Ps_Posting_;
987: x_return_status := FND_API.G_RET_STS_ERROR;
988: -- Standard call to get message count and if count=1, get the message
989: FND_MSG_PUB.Count_And_Get (
990: p_encoded => FND_API.G_FALSE,
991: p_count => x_msg_count,
992: p_data => x_msg_data
993: );
994:
991: p_count => x_msg_count,
992: p_data => x_msg_data
993: );
994:
995: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
996: ROLLBACK TO VALIDATE_Ps_Posting_;
997: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
998: -- Standard call to get message count and if count=1, get the message
999: FND_MSG_PUB.Count_And_Get (
993: );
994:
995: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
996: ROLLBACK TO VALIDATE_Ps_Posting_;
997: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
998: -- Standard call to get message count and if count=1, get the message
999: FND_MSG_PUB.Count_And_Get (
1000: p_encoded => FND_API.G_FALSE,
1001: p_count => x_msg_count,
996: ROLLBACK TO VALIDATE_Ps_Posting_;
997: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
998: -- Standard call to get message count and if count=1, get the message
999: FND_MSG_PUB.Count_And_Get (
1000: p_encoded => FND_API.G_FALSE,
1001: p_count => x_msg_count,
1002: p_data => x_msg_data
1003: );
1004:
1003: );
1004:
1005: WHEN OTHERS THEN
1006: ROLLBACK TO VALIDATE_Ps_Posting_;
1007: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1008: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1009: THEN
1010: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1011: END IF;
1010: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1011: END IF;
1012: -- Standard call to get message count and if count=1, get the message
1013: FND_MSG_PUB.Count_And_Get (
1014: p_encoded => FND_API.G_FALSE,
1015: p_count => x_msg_count,
1016: p_data => x_msg_data
1017: );
1018: End Validate_Ps_Posting;
1018: End Validate_Ps_Posting;
1019:
1020: PROCEDURE Validate_ps_posting_rec(
1021: p_api_version_number IN NUMBER,
1022: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1023: x_return_status OUT NOCOPY VARCHAR2,
1024: x_msg_count OUT NOCOPY NUMBER,
1025: x_msg_data OUT NOCOPY VARCHAR2,
1026: p_ps_posting_rec IN ps_posting_rec_type
1027: )
1028: IS
1029: BEGIN
1030: -- Initialize message list if p_init_msg_list is set to TRUE.
1031: IF FND_API.to_Boolean( p_init_msg_list )
1032: THEN
1033: FND_MSG_PUB.initialize;
1034: END IF;
1035:
1033: FND_MSG_PUB.initialize;
1034: END IF;
1035:
1036: -- Initialize API return status to SUCCESS
1037: x_return_status := FND_API.G_RET_STS_SUCCESS;
1038:
1039: -- Hint: Validate data
1040: -- If data not valid
1041: -- THEN
1038:
1039: -- Hint: Validate data
1040: -- If data not valid
1041: -- THEN
1042: -- x_return_status := FND_API.G_RET_STS_ERROR;
1043:
1044: -- Debug Message
1045: IF (AMS_DEBUG_HIGH_ON) THEN
1046:
1076:
1077: AMS_Utility_PVT.debug_message(l_full_name || ': start');
1078: END IF;
1079:
1080: x_return_status := FND_API.g_ret_sts_success;
1081:
1082: -- check required items
1083: IF (AMS_DEBUG_HIGH_ON) THEN
1084:
1090: p_ps_posting_rec => p_ps_posting_rec,
1091: x_return_status => x_return_status
1092: );
1093:
1094: IF x_return_status <> FND_API.g_ret_sts_success THEN
1095: RETURN;
1096: END IF;
1097:
1098: -- check foreign key items
1113: AMS_Utility_PVT.debug_message(l_full_name || ': done with checking items');
1114:
1115: END IF;
1116:
1117: IF x_return_status <> FND_API.g_ret_sts_success THEN
1118: RETURN;
1119: END IF;
1120:
1121: END Check_ps_posting_Items;
1138: l_api_name CONSTANT VARCHAR2(30) := 'check_ps_posting_req_items';
1139: l_full_name CONSTANT VARCHAR2(60) := g_pkg_name || '.' || l_api_name;
1140: BEGIN
1141:
1142: x_return_status := FND_API.g_ret_sts_success;
1143:
1144: END check_ps_posting_req_items;
1145:
1146:
1160: l_api_name CONSTANT VARCHAR2(30) := 'check_ps_posting_fk_items';
1161: l_full_name CONSTANT VARCHAR2(60) := g_pkg_name || '.' || l_api_name;
1162: BEGIN
1163:
1164: x_return_status := FND_API.g_ret_sts_success;
1165:
1166: END check_ps_posting_fk_items;
1167:
1168: END AMS_Ps_Posting_PVT;