23:
24:
25: procedure Create_process(
26: p_api_version_number in number,
27: p_init_msg_list in varchar2 := FND_API.G_FALSE,
28: p_commit in varchar2 := FND_API.G_FALSE,
29: p_validation_level in number :=FND_API.G_VALID_LEVEL_FULL,
30: x_return_status OUT NOCOPY varchar2,
31: x_msg_count OUT NOCOPY number,
24:
25: procedure Create_process(
26: p_api_version_number in number,
27: p_init_msg_list in varchar2 := FND_API.G_FALSE,
28: p_commit in varchar2 := FND_API.G_FALSE,
29: p_validation_level in number :=FND_API.G_VALID_LEVEL_FULL,
30: x_return_status OUT NOCOPY varchar2,
31: x_msg_count OUT NOCOPY number,
32: x_msg_data OUT NOCOPY varchar2,
25: procedure Create_process(
26: p_api_version_number in number,
27: p_init_msg_list in varchar2 := FND_API.G_FALSE,
28: p_commit in varchar2 := FND_API.G_FALSE,
29: p_validation_level in number :=FND_API.G_VALID_LEVEL_FULL,
30: x_return_status OUT NOCOPY varchar2,
31: x_msg_count OUT NOCOPY number,
32: x_msg_data OUT NOCOPY varchar2,
33: p_process_tbl IN process_tbl_type := g_miss_process_tbl
39: l_object_version_number NUMBER := 1;
40: l_PROCESS_ID NUMBER;
41: begin
42: SAVEPOINT CREATE_Process;
43: x_return_status := FND_API.G_RET_STS_SUCCESS;
44: FOR i IN p_process_tbl.FIRST .. p_process_tbl.LAST LOOP
45:
46: Create_Process_rec(p_api_version_number,
47: p_init_msg_list,
51: x_msg_count,
52: x_msg_data,
53: p_process_tbl(i),
54: l_PROCESS_ID );
55: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
56: RAISE FND_API.G_EXC_ERROR;
57: END IF;
58:
59: END LOOP;
52: x_msg_data,
53: p_process_tbl(i),
54: l_PROCESS_ID );
55: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
56: RAISE FND_API.G_EXC_ERROR;
57: END IF;
58:
59: END LOOP;
60: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
66: );
67: EXCEPTION
68:
69: WHEN AMW_Utility_PVT.resource_locked THEN
70: x_return_status := FND_API.g_ret_sts_error;
71: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
72:
73: WHEN FND_API.G_EXC_ERROR THEN
74: ROLLBACK TO CREATE_Process;
69: WHEN AMW_Utility_PVT.resource_locked THEN
70: x_return_status := FND_API.g_ret_sts_error;
71: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
72:
73: WHEN FND_API.G_EXC_ERROR THEN
74: ROLLBACK TO CREATE_Process;
75: x_return_status := FND_API.G_RET_STS_ERROR;
76: -- Standard call to get message count and if count=1, get the message
77: FND_MSG_PUB.Count_And_Get (
71: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
72:
73: WHEN FND_API.G_EXC_ERROR THEN
74: ROLLBACK TO CREATE_Process;
75: x_return_status := FND_API.G_RET_STS_ERROR;
76: -- Standard call to get message count and if count=1, get the message
77: FND_MSG_PUB.Count_And_Get (
78: p_encoded => FND_API.G_FALSE,
79: p_count => x_msg_count,
74: ROLLBACK TO CREATE_Process;
75: x_return_status := FND_API.G_RET_STS_ERROR;
76: -- Standard call to get message count and if count=1, get the message
77: FND_MSG_PUB.Count_And_Get (
78: p_encoded => FND_API.G_FALSE,
79: p_count => x_msg_count,
80: p_data => x_msg_data
81: );
82:
79: p_count => x_msg_count,
80: p_data => x_msg_data
81: );
82:
83: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
84: ROLLBACK TO CREATE_Process;
85: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
86: -- Standard call to get message count and if count=1, get the message
87: FND_MSG_PUB.Count_And_Get (
81: );
82:
83: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
84: ROLLBACK TO CREATE_Process;
85: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
86: -- Standard call to get message count and if count=1, get the message
87: FND_MSG_PUB.Count_And_Get (
88: p_encoded => FND_API.G_FALSE,
89: p_count => x_msg_count,
84: ROLLBACK TO CREATE_Process;
85: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
86: -- Standard call to get message count and if count=1, get the message
87: FND_MSG_PUB.Count_And_Get (
88: p_encoded => FND_API.G_FALSE,
89: p_count => x_msg_count,
90: p_data => x_msg_data
91: );
92:
91: );
92:
93: WHEN OTHERS THEN
94: ROLLBACK TO CREATE_Process;
95: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
96: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
97: THEN
98: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
99: END IF;
98: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
99: END IF;
100: -- Standard call to get message count and if count=1, get the message
101: FND_MSG_PUB.Count_And_Get (
102: p_encoded => FND_API.G_FALSE,
103: p_count => x_msg_count,
104: p_data => x_msg_data
105: );
106: End Create_Process;
107:
108:
109: procedure update_process(
110: p_api_version_number in number,
111: p_init_msg_list in varchar2 := FND_API.G_FALSE,
112: p_commit in varchar2 := FND_API.G_FALSE,
113: p_validation_level in number :=FND_API.G_VALID_LEVEL_FULL,
114: x_return_status OUT NOCOPY varchar2,
115: x_msg_count OUT NOCOPY number,
108:
109: procedure update_process(
110: p_api_version_number in number,
111: p_init_msg_list in varchar2 := FND_API.G_FALSE,
112: p_commit in varchar2 := FND_API.G_FALSE,
113: p_validation_level in number :=FND_API.G_VALID_LEVEL_FULL,
114: x_return_status OUT NOCOPY varchar2,
115: x_msg_count OUT NOCOPY number,
116: x_msg_data OUT NOCOPY varchar2,
109: procedure update_process(
110: p_api_version_number in number,
111: p_init_msg_list in varchar2 := FND_API.G_FALSE,
112: p_commit in varchar2 := FND_API.G_FALSE,
113: p_validation_level in number :=FND_API.G_VALID_LEVEL_FULL,
114: x_return_status OUT NOCOPY varchar2,
115: x_msg_count OUT NOCOPY number,
116: x_msg_data OUT NOCOPY varchar2,
117: p_process_tbl IN process_tbl_type := g_miss_process_tbl
124: l_PROCESS_ID NUMBER;
125:
126: begin
127: SAVEPOINT update_Process;
128: x_return_status := FND_API.G_RET_STS_SUCCESS;
129: FOR i IN p_process_tbl.FIRST .. p_process_tbl.LAST LOOP
130:
131: Update_Process_rec(p_api_version_number,
132: p_init_msg_list,
136: x_msg_count,
137: x_msg_data,
138: p_process_tbl(i),
139: l_object_version_number );
140: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
141: RAISE FND_API.G_EXC_ERROR;
142: END IF;
143:
144: END LOOP;
137: x_msg_data,
138: p_process_tbl(i),
139: l_object_version_number );
140: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
141: RAISE FND_API.G_EXC_ERROR;
142: END IF;
143:
144: END LOOP;
145: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
151: );
152: EXCEPTION
153:
154: WHEN AMW_Utility_PVT.resource_locked THEN
155: x_return_status := FND_API.g_ret_sts_error;
156: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
157:
158: WHEN FND_API.G_EXC_ERROR THEN
159: ROLLBACK TO update_Process;
154: WHEN AMW_Utility_PVT.resource_locked THEN
155: x_return_status := FND_API.g_ret_sts_error;
156: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
157:
158: WHEN FND_API.G_EXC_ERROR THEN
159: ROLLBACK TO update_Process;
160: x_return_status := FND_API.G_RET_STS_ERROR;
161: -- Standard call to get message count and if count=1, get the message
162: FND_MSG_PUB.Count_And_Get (
156: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
157:
158: WHEN FND_API.G_EXC_ERROR THEN
159: ROLLBACK TO update_Process;
160: x_return_status := FND_API.G_RET_STS_ERROR;
161: -- Standard call to get message count and if count=1, get the message
162: FND_MSG_PUB.Count_And_Get (
163: p_encoded => FND_API.G_FALSE,
164: p_count => x_msg_count,
159: ROLLBACK TO update_Process;
160: x_return_status := FND_API.G_RET_STS_ERROR;
161: -- Standard call to get message count and if count=1, get the message
162: FND_MSG_PUB.Count_And_Get (
163: p_encoded => FND_API.G_FALSE,
164: p_count => x_msg_count,
165: p_data => x_msg_data
166: );
167:
164: p_count => x_msg_count,
165: p_data => x_msg_data
166: );
167:
168: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
169: ROLLBACK TO update_Process;
170: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
171: -- Standard call to get message count and if count=1, get the message
172: FND_MSG_PUB.Count_And_Get (
166: );
167:
168: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
169: ROLLBACK TO update_Process;
170: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
171: -- Standard call to get message count and if count=1, get the message
172: FND_MSG_PUB.Count_And_Get (
173: p_encoded => FND_API.G_FALSE,
174: p_count => x_msg_count,
169: ROLLBACK TO update_Process;
170: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
171: -- Standard call to get message count and if count=1, get the message
172: FND_MSG_PUB.Count_And_Get (
173: p_encoded => FND_API.G_FALSE,
174: p_count => x_msg_count,
175: p_data => x_msg_data
176: );
177:
176: );
177:
178: WHEN OTHERS THEN
179: ROLLBACK TO update_Process;
180: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
181: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
182: THEN
183: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
184: END IF;
183: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
184: END IF;
185: -- Standard call to get message count and if count=1, get the message
186: FND_MSG_PUB.Count_And_Get (
187: p_encoded => FND_API.G_FALSE,
188: p_count => x_msg_count,
189: p_data => x_msg_data
190: );
191: End update_Process;
194:
195: -- Hint: Primary key needs to be returned.
196: PROCEDURE Create_Process_rec(
197: p_api_version_number IN NUMBER,
198: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
199: p_commit IN VARCHAR2 := FND_API.G_FALSE,
200: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
201:
202: x_return_status OUT NOCOPY VARCHAR2,
195: -- Hint: Primary key needs to be returned.
196: PROCEDURE Create_Process_rec(
197: p_api_version_number IN NUMBER,
198: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
199: p_commit IN VARCHAR2 := FND_API.G_FALSE,
200: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
201:
202: x_return_status OUT NOCOPY VARCHAR2,
203: x_msg_count OUT NOCOPY NUMBER,
196: PROCEDURE Create_Process_rec(
197: p_api_version_number IN NUMBER,
198: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
199: p_commit IN VARCHAR2 := FND_API.G_FALSE,
200: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
201:
202: x_return_status OUT NOCOPY VARCHAR2,
203: x_msg_count OUT NOCOPY NUMBER,
204: x_msg_data OUT NOCOPY VARCHAR2,
230: -- Standard Start of API savepoint
231: SAVEPOINT CREATE_Process_PVT;
232:
233: -- Standard call to check for call compatibility.
234: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
235: p_api_version_number,
236: l_api_name,
237: G_PKG_NAME)
238: THEN
235: p_api_version_number,
236: l_api_name,
237: G_PKG_NAME)
238: THEN
239: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
240: END IF;
241:
242: -- Initialize message list if p_init_msg_list is set to TRUE.
243: IF FND_API.to_Boolean( p_init_msg_list )
239: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
240: END IF;
241:
242: -- Initialize message list if p_init_msg_list is set to TRUE.
243: IF FND_API.to_Boolean( p_init_msg_list )
244: THEN
245: FND_MSG_PUB.initialize;
246: END IF;
247:
249: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
250:
251:
252: -- Initialize API return status to SUCCESS
253: x_return_status := FND_API.G_RET_STS_SUCCESS;
254:
255: -- Local variable initialization
256:
257: IF p_process_rec.PROCESS_ID IS NULL OR p_process_rec.PROCESS_ID = FND_API.g_miss_num THEN
253: x_return_status := FND_API.G_RET_STS_SUCCESS;
254:
255: -- Local variable initialization
256:
257: IF p_process_rec.PROCESS_ID IS NULL OR p_process_rec.PROCESS_ID = FND_API.g_miss_num THEN
258: LOOP
259: l_dummy := NULL;
260: OPEN c_id;
261: FETCH c_id INTO l_PROCESS_ID;
274:
275: IF FND_GLOBAL.User_Id IS NULL
276: THEN
277: AMW_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
278: RAISE FND_API.G_EXC_ERROR;
279: END IF;
280: /*
281: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL)
282: THEN
277: AMW_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
278: RAISE FND_API.G_EXC_ERROR;
279: END IF;
280: /*
281: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL)
282: THEN
283: -- Debug message
284: AMW_UTILITY_PVT.debug_message('Private API: Validate_Process');
285:
285:
286: -- Invoke validation procedures
287: Validate_process(
288: p_api_version_number => 1.0,
289: p_init_msg_list => FND_API.G_FALSE,
290: p_validation_level => p_validation_level,
291: p_process_rec => p_process_rec,
292: x_return_status => x_return_status,
293: x_msg_count => x_msg_count,
293: x_msg_count => x_msg_count,
294: x_msg_data => x_msg_data);
295: END IF;
296:
297: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
298: RAISE FND_API.G_EXC_ERROR;
299: END IF;
300: */
301:
294: x_msg_data => x_msg_data);
295: END IF;
296:
297: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
298: RAISE FND_API.G_EXC_ERROR;
299: END IF;
300: */
301:
302: -- Debug Message
345: px_process_rev_id => l_process_id,
346: ---px_process_rev_id => p_process_rec.process_rev_id,
347: px_process_id => l_process_id);
348:
349: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
350: RAISE FND_API.G_EXC_ERROR;
351: END IF;
352: --
353: -- End of API body
346: ---px_process_rev_id => p_process_rec.process_rev_id,
347: px_process_id => l_process_id);
348:
349: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
350: RAISE FND_API.G_EXC_ERROR;
351: END IF;
352: --
353: -- End of API body
354: --
353: -- End of API body
354: --
355:
356: -- Standard check for p_commit
357: IF FND_API.to_Boolean( p_commit )
358: THEN
359: COMMIT WORK;
360: END IF;
361:
370: );
371: EXCEPTION
372:
373: WHEN AMW_Utility_PVT.resource_locked THEN
374: x_return_status := FND_API.g_ret_sts_error;
375: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
376:
377: WHEN FND_API.G_EXC_ERROR THEN
378: ROLLBACK TO CREATE_Process_PVT;
373: WHEN AMW_Utility_PVT.resource_locked THEN
374: x_return_status := FND_API.g_ret_sts_error;
375: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
376:
377: WHEN FND_API.G_EXC_ERROR THEN
378: ROLLBACK TO CREATE_Process_PVT;
379: x_return_status := FND_API.G_RET_STS_ERROR;
380: -- Standard call to get message count and if count=1, get the message
381: FND_MSG_PUB.Count_And_Get (
375: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
376:
377: WHEN FND_API.G_EXC_ERROR THEN
378: ROLLBACK TO CREATE_Process_PVT;
379: x_return_status := FND_API.G_RET_STS_ERROR;
380: -- Standard call to get message count and if count=1, get the message
381: FND_MSG_PUB.Count_And_Get (
382: p_encoded => FND_API.G_FALSE,
383: p_count => x_msg_count,
378: ROLLBACK TO CREATE_Process_PVT;
379: x_return_status := FND_API.G_RET_STS_ERROR;
380: -- Standard call to get message count and if count=1, get the message
381: FND_MSG_PUB.Count_And_Get (
382: p_encoded => FND_API.G_FALSE,
383: p_count => x_msg_count,
384: p_data => x_msg_data
385: );
386:
383: p_count => x_msg_count,
384: p_data => x_msg_data
385: );
386:
387: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
388: ROLLBACK TO CREATE_Process_PVT;
389: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
390: -- Standard call to get message count and if count=1, get the message
391: FND_MSG_PUB.Count_And_Get (
385: );
386:
387: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
388: ROLLBACK TO CREATE_Process_PVT;
389: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
390: -- Standard call to get message count and if count=1, get the message
391: FND_MSG_PUB.Count_And_Get (
392: p_encoded => FND_API.G_FALSE,
393: p_count => x_msg_count,
388: ROLLBACK TO CREATE_Process_PVT;
389: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
390: -- Standard call to get message count and if count=1, get the message
391: FND_MSG_PUB.Count_And_Get (
392: p_encoded => FND_API.G_FALSE,
393: p_count => x_msg_count,
394: p_data => x_msg_data
395: );
396:
395: );
396:
397: WHEN OTHERS THEN
398: ROLLBACK TO CREATE_Process_PVT;
399: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
400: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
401: THEN
402: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
403: END IF;
402: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
403: END IF;
404: -- Standard call to get message count and if count=1, get the message
405: FND_MSG_PUB.Count_And_Get (
406: p_encoded => FND_API.G_FALSE,
407: p_count => x_msg_count,
408: p_data => x_msg_data
409: );
410: End Create_Process_rec;
411:
412:
413: PROCEDURE Update_Process_rec(
414: p_api_version_number IN NUMBER,
415: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
416: p_commit IN VARCHAR2 := FND_API.G_FALSE,
417: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
418:
419: x_return_status OUT NOCOPY VARCHAR2,
412:
413: PROCEDURE Update_Process_rec(
414: p_api_version_number IN NUMBER,
415: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
416: p_commit IN VARCHAR2 := FND_API.G_FALSE,
417: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
418:
419: x_return_status OUT NOCOPY VARCHAR2,
420: x_msg_count OUT NOCOPY NUMBER,
413: PROCEDURE Update_Process_rec(
414: p_api_version_number IN NUMBER,
415: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
416: p_commit IN VARCHAR2 := FND_API.G_FALSE,
417: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
418:
419: x_return_status OUT NOCOPY VARCHAR2,
420: x_msg_count OUT NOCOPY NUMBER,
421: x_msg_data OUT NOCOPY VARCHAR2,
444: -- Standard Start of API savepoint
445: SAVEPOINT UPDATE_Process_PVT;
446:
447: -- Standard call to check for call compatibility.
448: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
449: p_api_version_number,
450: l_api_name,
451: G_PKG_NAME)
452: THEN
449: p_api_version_number,
450: l_api_name,
451: G_PKG_NAME)
452: THEN
453: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
454: END IF;
455:
456: -- Initialize message list if p_init_msg_list is set to TRUE.
457: IF FND_API.to_Boolean( p_init_msg_list )
453: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
454: END IF;
455:
456: -- Initialize message list if p_init_msg_list is set to TRUE.
457: IF FND_API.to_Boolean( p_init_msg_list )
458: THEN
459: FND_MSG_PUB.initialize;
460: END IF;
461:
463: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
464:
465:
466: -- Initialize API return status to SUCCESS
467: x_return_status := FND_API.G_RET_STS_SUCCESS;
468:
469: -- Debug Message
470: AMW_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
471:
477: If ( c_get_Process%NOTFOUND) THEN
478: AMW_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
479: p_token_name => 'INFO',
480: p_token_value => 'Process') ;
481: RAISE FND_API.G_EXC_ERROR;
482: END IF;
483: -- Debug Message
484: AMW_UTILITY_PVT.debug_message('Private API: - Close Cursor');
485: CLOSE c_get_Process;
486: */
487:
488:
489: If (l_tar_process_rec.object_version_number is NULL or
490: l_tar_process_rec.object_version_number = FND_API.G_MISS_NUM ) Then
491: AMW_Utility_PVT.Error_Message(p_message_name => 'API_VERSION_MISSING',
492: p_token_name => 'COLUMN',
493: p_token_value => 'Last_Update_Date') ;
494: raise FND_API.G_EXC_ERROR;
490: l_tar_process_rec.object_version_number = FND_API.G_MISS_NUM ) Then
491: AMW_Utility_PVT.Error_Message(p_message_name => 'API_VERSION_MISSING',
492: p_token_name => 'COLUMN',
493: p_token_value => 'Last_Update_Date') ;
494: raise FND_API.G_EXC_ERROR;
495: End if;
496: -- Check Whether record has been changed by someone else
497: If (l_tar_process_rec.object_version_number <> p_process_rec.object_version_number) Then
498: AMW_Utility_PVT.Error_Message(p_message_name => 'API_RECORD_CHANGED',
497: If (l_tar_process_rec.object_version_number <> p_process_rec.object_version_number) Then
498: AMW_Utility_PVT.Error_Message(p_message_name => 'API_RECORD_CHANGED',
499: p_token_name => 'INFO',
500: p_token_value => 'Process') ;
501: raise FND_API.G_EXC_ERROR;
502: End if;
503: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL)
504: THEN
505: -- Debug message
499: p_token_name => 'INFO',
500: p_token_value => 'Process') ;
501: raise FND_API.G_EXC_ERROR;
502: End if;
503: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL)
504: THEN
505: -- Debug message
506: AMW_UTILITY_PVT.debug_message('Private API: Validate_Process');
507:
507:
508: -- Invoke validation procedures
509: Validate_process(
510: p_api_version_number => 1.0,
511: p_init_msg_list => FND_API.G_FALSE,
512: p_validation_level => p_validation_level,
513: p_process_rec => p_process_rec,
514: x_return_status => x_return_status,
515: x_msg_count => x_msg_count,
515: x_msg_count => x_msg_count,
516: x_msg_data => x_msg_data);
517: END IF;
518:
519: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
520: RAISE FND_API.G_EXC_ERROR;
521: END IF;
522:
523:
516: x_msg_data => x_msg_data);
517: END IF;
518:
519: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
520: RAISE FND_API.G_EXC_ERROR;
521: END IF;
522:
523:
524: -- Debug Message
570: -- End of API body.
571: --
572:
573: -- Standard check for p_commit
574: IF FND_API.to_Boolean( p_commit )
575: THEN
576: COMMIT WORK;
577: END IF;
578:
587: );
588: EXCEPTION
589:
590: WHEN AMW_Utility_PVT.resource_locked THEN
591: x_return_status := FND_API.g_ret_sts_error;
592: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
593:
594: WHEN FND_API.G_EXC_ERROR THEN
595: ROLLBACK TO UPDATE_Process_PVT;
590: WHEN AMW_Utility_PVT.resource_locked THEN
591: x_return_status := FND_API.g_ret_sts_error;
592: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
593:
594: WHEN FND_API.G_EXC_ERROR THEN
595: ROLLBACK TO UPDATE_Process_PVT;
596: x_return_status := FND_API.G_RET_STS_ERROR;
597: -- Standard call to get message count and if count=1, get the message
598: FND_MSG_PUB.Count_And_Get (
592: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
593:
594: WHEN FND_API.G_EXC_ERROR THEN
595: ROLLBACK TO UPDATE_Process_PVT;
596: x_return_status := FND_API.G_RET_STS_ERROR;
597: -- Standard call to get message count and if count=1, get the message
598: FND_MSG_PUB.Count_And_Get (
599: p_encoded => FND_API.G_FALSE,
600: p_count => x_msg_count,
595: ROLLBACK TO UPDATE_Process_PVT;
596: x_return_status := FND_API.G_RET_STS_ERROR;
597: -- Standard call to get message count and if count=1, get the message
598: FND_MSG_PUB.Count_And_Get (
599: p_encoded => FND_API.G_FALSE,
600: p_count => x_msg_count,
601: p_data => x_msg_data
602: );
603:
600: p_count => x_msg_count,
601: p_data => x_msg_data
602: );
603:
604: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
605: ROLLBACK TO UPDATE_Process_PVT;
606: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
607: -- Standard call to get message count and if count=1, get the message
608: FND_MSG_PUB.Count_And_Get (
602: );
603:
604: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
605: ROLLBACK TO UPDATE_Process_PVT;
606: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
607: -- Standard call to get message count and if count=1, get the message
608: FND_MSG_PUB.Count_And_Get (
609: p_encoded => FND_API.G_FALSE,
610: p_count => x_msg_count,
605: ROLLBACK TO UPDATE_Process_PVT;
606: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
607: -- Standard call to get message count and if count=1, get the message
608: FND_MSG_PUB.Count_And_Get (
609: p_encoded => FND_API.G_FALSE,
610: p_count => x_msg_count,
611: p_data => x_msg_data
612: );
613:
612: );
613:
614: WHEN OTHERS THEN
615: ROLLBACK TO UPDATE_Process_PVT;
616: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
617: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
618: THEN
619: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
620: END IF;
619: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
620: END IF;
621: -- Standard call to get message count and if count=1, get the message
622: FND_MSG_PUB.Count_And_Get (
623: p_encoded => FND_API.G_FALSE,
624: p_count => x_msg_count,
625: p_data => x_msg_data
626: );
627: End Update_Process_rec;
628:
629:
630: PROCEDURE Delete_Process(
631: p_api_version_number IN NUMBER,
632: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
633: p_commit IN VARCHAR2 := FND_API.G_FALSE,
634: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
635: x_return_status OUT NOCOPY VARCHAR2,
636: x_msg_count OUT NOCOPY NUMBER,
629:
630: PROCEDURE Delete_Process(
631: p_api_version_number IN NUMBER,
632: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
633: p_commit IN VARCHAR2 := FND_API.G_FALSE,
634: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
635: x_return_status OUT NOCOPY VARCHAR2,
636: x_msg_count OUT NOCOPY NUMBER,
637: x_msg_data OUT NOCOPY VARCHAR2,
630: PROCEDURE Delete_Process(
631: p_api_version_number IN NUMBER,
632: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
633: p_commit IN VARCHAR2 := FND_API.G_FALSE,
634: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
635: x_return_status OUT NOCOPY VARCHAR2,
636: x_msg_count OUT NOCOPY NUMBER,
637: x_msg_data OUT NOCOPY VARCHAR2,
638: p_process_rev_id IN NUMBER,
648: -- Standard Start of API savepoint
649: SAVEPOINT DELETE_Process_PVT;
650:
651: -- Standard call to check for call compatibility.
652: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
653: p_api_version_number,
654: l_api_name,
655: G_PKG_NAME)
656: THEN
653: p_api_version_number,
654: l_api_name,
655: G_PKG_NAME)
656: THEN
657: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
658: END IF;
659:
660: -- Initialize message list if p_init_msg_list is set to TRUE.
661: IF FND_API.to_Boolean( p_init_msg_list )
657: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
658: END IF;
659:
660: -- Initialize message list if p_init_msg_list is set to TRUE.
661: IF FND_API.to_Boolean( p_init_msg_list )
662: THEN
663: FND_MSG_PUB.initialize;
664: END IF;
665:
667: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
668:
669:
670: -- Initialize API return status to SUCCESS
671: x_return_status := FND_API.G_RET_STS_SUCCESS;
672:
673: --
674: -- Api body
675: --
683: -- End of API body
684: --
685:
686: -- Standard check for p_commit
687: IF FND_API.to_Boolean( p_commit )
688: THEN
689: COMMIT WORK;
690: END IF;
691:
700: );
701: EXCEPTION
702:
703: WHEN AMW_Utility_PVT.resource_locked THEN
704: x_return_status := FND_API.g_ret_sts_error;
705: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
706:
707: WHEN FND_API.G_EXC_ERROR THEN
708: ROLLBACK TO DELETE_Process_PVT;
703: WHEN AMW_Utility_PVT.resource_locked THEN
704: x_return_status := FND_API.g_ret_sts_error;
705: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
706:
707: WHEN FND_API.G_EXC_ERROR THEN
708: ROLLBACK TO DELETE_Process_PVT;
709: x_return_status := FND_API.G_RET_STS_ERROR;
710: -- Standard call to get message count and if count=1, get the message
711: FND_MSG_PUB.Count_And_Get (
705: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
706:
707: WHEN FND_API.G_EXC_ERROR THEN
708: ROLLBACK TO DELETE_Process_PVT;
709: x_return_status := FND_API.G_RET_STS_ERROR;
710: -- Standard call to get message count and if count=1, get the message
711: FND_MSG_PUB.Count_And_Get (
712: p_encoded => FND_API.G_FALSE,
713: p_count => x_msg_count,
708: ROLLBACK TO DELETE_Process_PVT;
709: x_return_status := FND_API.G_RET_STS_ERROR;
710: -- Standard call to get message count and if count=1, get the message
711: FND_MSG_PUB.Count_And_Get (
712: p_encoded => FND_API.G_FALSE,
713: p_count => x_msg_count,
714: p_data => x_msg_data
715: );
716:
713: p_count => x_msg_count,
714: p_data => x_msg_data
715: );
716:
717: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
718: ROLLBACK TO DELETE_Process_PVT;
719: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
720: -- Standard call to get message count and if count=1, get the message
721: FND_MSG_PUB.Count_And_Get (
715: );
716:
717: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
718: ROLLBACK TO DELETE_Process_PVT;
719: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
720: -- Standard call to get message count and if count=1, get the message
721: FND_MSG_PUB.Count_And_Get (
722: p_encoded => FND_API.G_FALSE,
723: p_count => x_msg_count,
718: ROLLBACK TO DELETE_Process_PVT;
719: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
720: -- Standard call to get message count and if count=1, get the message
721: FND_MSG_PUB.Count_And_Get (
722: p_encoded => FND_API.G_FALSE,
723: p_count => x_msg_count,
724: p_data => x_msg_data
725: );
726:
725: );
726:
727: WHEN OTHERS THEN
728: ROLLBACK TO DELETE_Process_PVT;
729: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
730: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
731: THEN
732: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
733: END IF;
732: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
733: END IF;
734: -- Standard call to get message count and if count=1, get the message
735: FND_MSG_PUB.Count_And_Get (
736: p_encoded => FND_API.G_FALSE,
737: p_count => x_msg_count,
738: p_data => x_msg_data
739: );
740: End Delete_Process;
743:
744: -- Hint: Primary key needs to be returned.
745: PROCEDURE Lock_Process(
746: p_api_version_number IN NUMBER,
747: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
748:
749: x_return_status OUT NOCOPY VARCHAR2,
750: x_msg_count OUT NOCOPY NUMBER,
751: x_msg_data OUT NOCOPY VARCHAR2,
772: -- Debug Message
773: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
774:
775: -- Initialize message list if p_init_msg_list is set to TRUE.
776: IF FND_API.to_Boolean( p_init_msg_list )
777: THEN
778: FND_MSG_PUB.initialize;
779: END IF;
780:
778: FND_MSG_PUB.initialize;
779: END IF;
780:
781: -- Standard call to check for call compatibility.
782: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
783: p_api_version_number,
784: l_api_name,
785: G_PKG_NAME)
786: THEN
783: p_api_version_number,
784: l_api_name,
785: G_PKG_NAME)
786: THEN
787: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
788: END IF;
789:
790:
791: -- Initialize API return status to SUCCESS
788: END IF;
789:
790:
791: -- Initialize API return status to SUCCESS
792: x_return_status := FND_API.G_RET_STS_SUCCESS;
793:
794:
795: ------------------------ lock -------------------------
796:
804: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
805: FND_MESSAGE.set_name('AMW', 'AMW_API_RECORD_NOT_FOUND');
806: FND_MSG_PUB.add;
807: END IF;
808: RAISE FND_API.g_exc_error;
809: END IF;
810:
811: CLOSE c_Process;
812:
811: CLOSE c_Process;
812:
813: -------------------- finish --------------------------
814: FND_MSG_PUB.count_and_get(
815: p_encoded => FND_API.g_false,
816: p_count => x_msg_count,
817: p_data => x_msg_data);
818: AMW_Utility_PVT.debug_message(l_full_name ||': end');
819: EXCEPTION
818: AMW_Utility_PVT.debug_message(l_full_name ||': end');
819: EXCEPTION
820:
821: WHEN AMW_Utility_PVT.resource_locked THEN
822: x_return_status := FND_API.g_ret_sts_error;
823: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
824:
825: WHEN FND_API.G_EXC_ERROR THEN
826: ROLLBACK TO LOCK_Process_PVT;
821: WHEN AMW_Utility_PVT.resource_locked THEN
822: x_return_status := FND_API.g_ret_sts_error;
823: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
824:
825: WHEN FND_API.G_EXC_ERROR THEN
826: ROLLBACK TO LOCK_Process_PVT;
827: x_return_status := FND_API.G_RET_STS_ERROR;
828: -- Standard call to get message count and if count=1, get the message
829: FND_MSG_PUB.Count_And_Get (
823: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
824:
825: WHEN FND_API.G_EXC_ERROR THEN
826: ROLLBACK TO LOCK_Process_PVT;
827: x_return_status := FND_API.G_RET_STS_ERROR;
828: -- Standard call to get message count and if count=1, get the message
829: FND_MSG_PUB.Count_And_Get (
830: p_encoded => FND_API.G_FALSE,
831: p_count => x_msg_count,
826: ROLLBACK TO LOCK_Process_PVT;
827: x_return_status := FND_API.G_RET_STS_ERROR;
828: -- Standard call to get message count and if count=1, get the message
829: FND_MSG_PUB.Count_And_Get (
830: p_encoded => FND_API.G_FALSE,
831: p_count => x_msg_count,
832: p_data => x_msg_data
833: );
834:
831: p_count => x_msg_count,
832: p_data => x_msg_data
833: );
834:
835: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
836: ROLLBACK TO LOCK_Process_PVT;
837: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
838: -- Standard call to get message count and if count=1, get the message
839: FND_MSG_PUB.Count_And_Get (
833: );
834:
835: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
836: ROLLBACK TO LOCK_Process_PVT;
837: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
838: -- Standard call to get message count and if count=1, get the message
839: FND_MSG_PUB.Count_And_Get (
840: p_encoded => FND_API.G_FALSE,
841: p_count => x_msg_count,
836: ROLLBACK TO LOCK_Process_PVT;
837: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
838: -- Standard call to get message count and if count=1, get the message
839: FND_MSG_PUB.Count_And_Get (
840: p_encoded => FND_API.G_FALSE,
841: p_count => x_msg_count,
842: p_data => x_msg_data
843: );
844:
843: );
844:
845: WHEN OTHERS THEN
846: ROLLBACK TO LOCK_Process_PVT;
847: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
848: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
849: THEN
850: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
851: END IF;
850: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
851: END IF;
852: -- Standard call to get message count and if count=1, get the message
853: FND_MSG_PUB.Count_And_Get (
854: p_encoded => FND_API.G_FALSE,
855: p_count => x_msg_count,
856: p_data => x_msg_data
857: );
858: End Lock_Process;
865: IS
866: l_valid_flag VARCHAR2(1);
867:
868: BEGIN
869: x_return_status := FND_API.g_ret_sts_success;
870: IF p_validation_mode = JTF_PLSQL_API.g_create THEN
871: l_valid_flag := AMW_Utility_PVT.check_uniqueness(
872: 'AMW_PROCESS',
873: 'PROCESS_ID = ''' || p_process_rec.PROCESS_ID ||''''
879: ''' AND PROCESS_ID <> ' || p_process_rec.PROCESS_ID
880: );
881: END IF;
882:
883: IF l_valid_flag = FND_API.g_false THEN
884: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_PROCESS_ID_DUPLICATE');
885: x_return_status := FND_API.g_ret_sts_error;
886: RETURN;
887: END IF;
881: END IF;
882:
883: IF l_valid_flag = FND_API.g_false THEN
884: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_PROCESS_ID_DUPLICATE');
885: x_return_status := FND_API.g_ret_sts_error;
886: RETURN;
887: END IF;
888:
889: END check_process_uk_items;
894: x_return_status OUT NOCOPY VARCHAR2
895: )
896: IS
897: BEGIN
898: x_return_status := FND_API.g_ret_sts_success;
899:
900: IF p_validation_mode = JTF_PLSQL_API.g_create THEN
901:
902:
899:
900: IF p_validation_mode = JTF_PLSQL_API.g_create THEN
901:
902:
903: IF p_process_rec.last_update_date = FND_API.g_miss_date OR p_process_rec.last_update_date IS NULL THEN
904: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_last_update_date');
905: x_return_status := FND_API.g_ret_sts_error;
906: RETURN;
907: END IF;
901:
902:
903: IF p_process_rec.last_update_date = FND_API.g_miss_date OR p_process_rec.last_update_date IS NULL THEN
904: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_last_update_date');
905: x_return_status := FND_API.g_ret_sts_error;
906: RETURN;
907: END IF;
908:
909:
906: RETURN;
907: END IF;
908:
909:
910: IF p_process_rec.last_updated_by = FND_API.g_miss_num OR p_process_rec.last_updated_by IS NULL THEN
911: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_last_updated_by');
912: x_return_status := FND_API.g_ret_sts_error;
913: RETURN;
914: END IF;
908:
909:
910: IF p_process_rec.last_updated_by = FND_API.g_miss_num OR p_process_rec.last_updated_by IS NULL THEN
911: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_last_updated_by');
912: x_return_status := FND_API.g_ret_sts_error;
913: RETURN;
914: END IF;
915:
916:
913: RETURN;
914: END IF;
915:
916:
917: IF p_process_rec.creation_date = FND_API.g_miss_date OR p_process_rec.creation_date IS NULL THEN
918: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_creation_date');
919: x_return_status := FND_API.g_ret_sts_error;
920: RETURN;
921: END IF;
915:
916:
917: IF p_process_rec.creation_date = FND_API.g_miss_date OR p_process_rec.creation_date IS NULL THEN
918: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_creation_date');
919: x_return_status := FND_API.g_ret_sts_error;
920: RETURN;
921: END IF;
922:
923:
920: RETURN;
921: END IF;
922:
923:
924: IF p_process_rec.created_by = FND_API.g_miss_num OR p_process_rec.created_by IS NULL THEN
925: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_created_by');
926: x_return_status := FND_API.g_ret_sts_error;
927: RETURN;
928: END IF;
922:
923:
924: IF p_process_rec.created_by = FND_API.g_miss_num OR p_process_rec.created_by IS NULL THEN
925: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_created_by');
926: x_return_status := FND_API.g_ret_sts_error;
927: RETURN;
928: END IF;
929:
930:
927: RETURN;
928: END IF;
929:
930:
931: IF p_process_rec.item_type = FND_API.g_miss_char OR p_process_rec.item_type IS NULL THEN
932: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_item_type');
933: x_return_status := FND_API.g_ret_sts_error;
934: RETURN;
935: END IF;
929:
930:
931: IF p_process_rec.item_type = FND_API.g_miss_char OR p_process_rec.item_type IS NULL THEN
932: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_item_type');
933: x_return_status := FND_API.g_ret_sts_error;
934: RETURN;
935: END IF;
936:
937:
934: RETURN;
935: END IF;
936:
937:
938: IF p_process_rec.name = FND_API.g_miss_char OR p_process_rec.name IS NULL THEN
939: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_name');
940: x_return_status := FND_API.g_ret_sts_error;
941: RETURN;
942: END IF;
936:
937:
938: IF p_process_rec.name = FND_API.g_miss_char OR p_process_rec.name IS NULL THEN
939: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_name');
940: x_return_status := FND_API.g_ret_sts_error;
941: RETURN;
942: END IF;
943:
944:
941: RETURN;
942: END IF;
943:
944:
945: IF p_process_rec.process_id = FND_API.g_miss_num OR p_process_rec.process_id IS NULL THEN
946: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_process_id');
947: x_return_status := FND_API.g_ret_sts_error;
948: RETURN;
949: END IF;
943:
944:
945: IF p_process_rec.process_id = FND_API.g_miss_num OR p_process_rec.process_id IS NULL THEN
946: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_process_id');
947: x_return_status := FND_API.g_ret_sts_error;
948: RETURN;
949: END IF;
950: ELSE
951:
951:
952:
953: IF p_process_rec.last_update_date IS NULL THEN
954: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_last_update_date');
955: x_return_status := FND_API.g_ret_sts_error;
956: RETURN;
957: END IF;
958:
959:
958:
959:
960: IF p_process_rec.last_updated_by IS NULL THEN
961: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_last_updated_by');
962: x_return_status := FND_API.g_ret_sts_error;
963: RETURN;
964: END IF;
965:
966:
965:
966:
967: IF p_process_rec.creation_date IS NULL THEN
968: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_creation_date');
969: x_return_status := FND_API.g_ret_sts_error;
970: RETURN;
971: END IF;
972:
973:
972:
973:
974: IF p_process_rec.created_by IS NULL THEN
975: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_created_by');
976: x_return_status := FND_API.g_ret_sts_error;
977: RETURN;
978: END IF;
979:
980:
979:
980:
981: IF p_process_rec.item_type IS NULL THEN
982: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_item_type');
983: x_return_status := FND_API.g_ret_sts_error;
984: RETURN;
985: END IF;
986:
987:
986:
987:
988: IF p_process_rec.name IS NULL THEN
989: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_name');
990: x_return_status := FND_API.g_ret_sts_error;
991: RETURN;
992: END IF;
993:
994:
993:
994:
995: IF p_process_rec.process_id IS NULL THEN
996: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_process_NO_process_id');
997: x_return_status := FND_API.g_ret_sts_error;
998: RETURN;
999: END IF;
1000: END IF;
1001:
1006: x_return_status OUT NOCOPY VARCHAR2
1007: )
1008: IS
1009: BEGIN
1010: x_return_status := FND_API.g_ret_sts_success;
1011:
1012: -- Enter custom code here
1013:
1014: END check_process_FK_items;
1018: x_return_status OUT NOCOPY VARCHAR2
1019: )
1020: IS
1021: BEGIN
1022: x_return_status := FND_API.g_ret_sts_success;
1023:
1024: -- Enter custom code here
1025:
1026: END check_process_Lookup_items;
1038: check_process_uk_items(
1039: p_process_rec => p_process_rec,
1040: p_validation_mode => p_validation_mode,
1041: x_return_status => x_return_status);
1042: IF x_return_status <> FND_API.g_ret_sts_success THEN
1043: RETURN;
1044: END IF;
1045:
1046: -- Check Items Required/NOT NULL API calls
1048: check_process_req_items(
1049: p_process_rec => p_process_rec,
1050: p_validation_mode => p_validation_mode,
1051: x_return_status => x_return_status);
1052: IF x_return_status <> FND_API.g_ret_sts_success THEN
1053: RETURN;
1054: END IF;
1055: -- Check Items Foreign Keys API calls
1056:
1056:
1057: check_process_FK_items(
1058: p_process_rec => p_process_rec,
1059: x_return_status => x_return_status);
1060: IF x_return_status <> FND_API.g_ret_sts_success THEN
1061: RETURN;
1062: END IF;
1063: -- Check Items Lookups
1064:
1064:
1065: check_process_Lookup_items(
1066: p_process_rec => p_process_rec,
1067: x_return_status => x_return_status);
1068: IF x_return_status <> FND_API.g_ret_sts_success THEN
1069: RETURN;
1070: END IF;
1071:
1072: END Check_process_Items;
1096: FETCH c_complete INTO l_process_rec;
1097: CLOSE c_complete;
1098:
1099: -- last_update_date
1100: IF p_process_rec.last_update_date = FND_API.g_miss_date THEN
1101: x_complete_rec.last_update_date := l_process_rec.last_update_date;
1102: END IF;
1103:
1104: -- last_updated_by
1101: x_complete_rec.last_update_date := l_process_rec.last_update_date;
1102: END IF;
1103:
1104: -- last_updated_by
1105: IF p_process_rec.last_updated_by = FND_API.g_miss_num THEN
1106: x_complete_rec.last_updated_by := l_process_rec.last_updated_by;
1107: END IF;
1108:
1109: -- creation_date
1106: x_complete_rec.last_updated_by := l_process_rec.last_updated_by;
1107: END IF;
1108:
1109: -- creation_date
1110: IF p_process_rec.creation_date = FND_API.g_miss_date THEN
1111: x_complete_rec.creation_date := l_process_rec.creation_date;
1112: END IF;
1113:
1114: -- created_by
1111: x_complete_rec.creation_date := l_process_rec.creation_date;
1112: END IF;
1113:
1114: -- created_by
1115: IF p_process_rec.created_by = FND_API.g_miss_num THEN
1116: x_complete_rec.created_by := l_process_rec.created_by;
1117: END IF;
1118:
1119: -- last_update_login
1116: x_complete_rec.created_by := l_process_rec.created_by;
1117: END IF;
1118:
1119: -- last_update_login
1120: IF p_process_rec.last_update_login = FND_API.g_miss_num THEN
1121: x_complete_rec.last_update_login := l_process_rec.last_update_login;
1122: END IF;
1123:
1124: -- item_type
1121: x_complete_rec.last_update_login := l_process_rec.last_update_login;
1122: END IF;
1123:
1124: -- item_type
1125: IF p_process_rec.item_type = FND_API.g_miss_char THEN
1126: x_complete_rec.item_type := l_process_rec.item_type;
1127: END IF;
1128:
1129: -- name
1126: x_complete_rec.item_type := l_process_rec.item_type;
1127: END IF;
1128:
1129: -- name
1130: IF p_process_rec.name = FND_API.g_miss_char THEN
1131: x_complete_rec.name := l_process_rec.name;
1132: END IF;
1133:
1134: -- created_from
1131: x_complete_rec.name := l_process_rec.name;
1132: END IF;
1133:
1134: -- created_from
1135: IF p_process_rec.created_from = FND_API.g_miss_char THEN
1136: x_complete_rec.created_from := l_process_rec.created_from;
1137: END IF;
1138:
1139: -- request_id
1136: x_complete_rec.created_from := l_process_rec.created_from;
1137: END IF;
1138:
1139: -- request_id
1140: IF p_process_rec.request_id = FND_API.g_miss_num THEN
1141: x_complete_rec.request_id := l_process_rec.request_id;
1142: END IF;
1143:
1144: -- program_application_id
1141: x_complete_rec.request_id := l_process_rec.request_id;
1142: END IF;
1143:
1144: -- program_application_id
1145: IF p_process_rec.program_application_id = FND_API.g_miss_num THEN
1146: x_complete_rec.program_application_id := l_process_rec.program_application_id;
1147: END IF;
1148:
1149: -- program_id
1146: x_complete_rec.program_application_id := l_process_rec.program_application_id;
1147: END IF;
1148:
1149: -- program_id
1150: IF p_process_rec.program_id = FND_API.g_miss_num THEN
1151: x_complete_rec.program_id := l_process_rec.program_id;
1152: END IF;
1153:
1154: -- program_update_date
1151: x_complete_rec.program_id := l_process_rec.program_id;
1152: END IF;
1153:
1154: -- program_update_date
1155: IF p_process_rec.program_update_date = FND_API.g_miss_date THEN
1156: x_complete_rec.program_update_date := l_process_rec.program_update_date;
1157: END IF;
1158:
1159: -- attribute_category
1156: x_complete_rec.program_update_date := l_process_rec.program_update_date;
1157: END IF;
1158:
1159: -- attribute_category
1160: IF p_process_rec.attribute_category = FND_API.g_miss_char THEN
1161: x_complete_rec.attribute_category := l_process_rec.attribute_category;
1162: END IF;
1163:
1164: -- attribute1
1161: x_complete_rec.attribute_category := l_process_rec.attribute_category;
1162: END IF;
1163:
1164: -- attribute1
1165: IF p_process_rec.attribute1 = FND_API.g_miss_char THEN
1166: x_complete_rec.attribute1 := l_process_rec.attribute1;
1167: END IF;
1168:
1169: -- attribute2
1166: x_complete_rec.attribute1 := l_process_rec.attribute1;
1167: END IF;
1168:
1169: -- attribute2
1170: IF p_process_rec.attribute2 = FND_API.g_miss_char THEN
1171: x_complete_rec.attribute2 := l_process_rec.attribute2;
1172: END IF;
1173:
1174: -- attribute3
1171: x_complete_rec.attribute2 := l_process_rec.attribute2;
1172: END IF;
1173:
1174: -- attribute3
1175: IF p_process_rec.attribute3 = FND_API.g_miss_char THEN
1176: x_complete_rec.attribute3 := l_process_rec.attribute3;
1177: END IF;
1178:
1179: -- attribute4
1176: x_complete_rec.attribute3 := l_process_rec.attribute3;
1177: END IF;
1178:
1179: -- attribute4
1180: IF p_process_rec.attribute4 = FND_API.g_miss_char THEN
1181: x_complete_rec.attribute4 := l_process_rec.attribute4;
1182: END IF;
1183:
1184: -- attribute5
1181: x_complete_rec.attribute4 := l_process_rec.attribute4;
1182: END IF;
1183:
1184: -- attribute5
1185: IF p_process_rec.attribute5 = FND_API.g_miss_char THEN
1186: x_complete_rec.attribute5 := l_process_rec.attribute5;
1187: END IF;
1188:
1189: -- attribute6
1186: x_complete_rec.attribute5 := l_process_rec.attribute5;
1187: END IF;
1188:
1189: -- attribute6
1190: IF p_process_rec.attribute6 = FND_API.g_miss_char THEN
1191: x_complete_rec.attribute6 := l_process_rec.attribute6;
1192: END IF;
1193:
1194: -- attribute7
1191: x_complete_rec.attribute6 := l_process_rec.attribute6;
1192: END IF;
1193:
1194: -- attribute7
1195: IF p_process_rec.attribute7 = FND_API.g_miss_char THEN
1196: x_complete_rec.attribute7 := l_process_rec.attribute7;
1197: END IF;
1198:
1199: -- attribute8
1196: x_complete_rec.attribute7 := l_process_rec.attribute7;
1197: END IF;
1198:
1199: -- attribute8
1200: IF p_process_rec.attribute8 = FND_API.g_miss_char THEN
1201: x_complete_rec.attribute8 := l_process_rec.attribute8;
1202: END IF;
1203:
1204: -- attribute9
1201: x_complete_rec.attribute8 := l_process_rec.attribute8;
1202: END IF;
1203:
1204: -- attribute9
1205: IF p_process_rec.attribute9 = FND_API.g_miss_char THEN
1206: x_complete_rec.attribute9 := l_process_rec.attribute9;
1207: END IF;
1208:
1209: -- attribute10
1206: x_complete_rec.attribute9 := l_process_rec.attribute9;
1207: END IF;
1208:
1209: -- attribute10
1210: IF p_process_rec.attribute10 = FND_API.g_miss_char THEN
1211: x_complete_rec.attribute10 := l_process_rec.attribute10;
1212: END IF;
1213:
1214: -- attribute11
1211: x_complete_rec.attribute10 := l_process_rec.attribute10;
1212: END IF;
1213:
1214: -- attribute11
1215: IF p_process_rec.attribute11 = FND_API.g_miss_char THEN
1216: x_complete_rec.attribute11 := l_process_rec.attribute11;
1217: END IF;
1218:
1219: -- attribute12
1216: x_complete_rec.attribute11 := l_process_rec.attribute11;
1217: END IF;
1218:
1219: -- attribute12
1220: IF p_process_rec.attribute12 = FND_API.g_miss_char THEN
1221: x_complete_rec.attribute12 := l_process_rec.attribute12;
1222: END IF;
1223:
1224: -- attribute13
1221: x_complete_rec.attribute12 := l_process_rec.attribute12;
1222: END IF;
1223:
1224: -- attribute13
1225: IF p_process_rec.attribute13 = FND_API.g_miss_char THEN
1226: x_complete_rec.attribute13 := l_process_rec.attribute13;
1227: END IF;
1228:
1229: -- attribute14
1226: x_complete_rec.attribute13 := l_process_rec.attribute13;
1227: END IF;
1228:
1229: -- attribute14
1230: IF p_process_rec.attribute14 = FND_API.g_miss_char THEN
1231: x_complete_rec.attribute14 := l_process_rec.attribute14;
1232: END IF;
1233:
1234: -- attribute15
1231: x_complete_rec.attribute14 := l_process_rec.attribute14;
1232: END IF;
1233:
1234: -- attribute15
1235: IF p_process_rec.attribute15 = FND_API.g_miss_char THEN
1236: x_complete_rec.attribute15 := l_process_rec.attribute15;
1237: END IF;
1238:
1239: -- security_group_id
1236: x_complete_rec.attribute15 := l_process_rec.attribute15;
1237: END IF;
1238:
1239: -- security_group_id
1240: IF p_process_rec.security_group_id = FND_API.g_miss_num THEN
1241: x_complete_rec.security_group_id := l_process_rec.security_group_id;
1242: END IF;
1243:
1244: -- object_version_number
1241: x_complete_rec.security_group_id := l_process_rec.security_group_id;
1242: END IF;
1243:
1244: -- object_version_number
1245: IF p_process_rec.object_version_number = FND_API.g_miss_num THEN
1246: x_complete_rec.object_version_number := l_process_rec.object_version_number;
1247: END IF;
1248:
1249: -- process_id
1246: x_complete_rec.object_version_number := l_process_rec.object_version_number;
1247: END IF;
1248:
1249: -- process_id
1250: IF p_process_rec.process_id = FND_API.g_miss_num THEN
1251: x_complete_rec.process_id := l_process_rec.process_id;
1252: END IF;
1253: -- Note: Developers need to modify the procedure
1254: -- to handle any business specific requirements.
1254: -- to handle any business specific requirements.
1255: END Complete_process_Rec;
1256: PROCEDURE Validate_process(
1257: p_api_version_number IN NUMBER,
1258: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1259: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1260: p_process_rec IN process_rec_type,
1261: x_return_status OUT NOCOPY VARCHAR2,
1262: x_msg_count OUT NOCOPY NUMBER,
1255: END Complete_process_Rec;
1256: PROCEDURE Validate_process(
1257: p_api_version_number IN NUMBER,
1258: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1259: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1260: p_process_rec IN process_rec_type,
1261: x_return_status OUT NOCOPY VARCHAR2,
1262: x_msg_count OUT NOCOPY NUMBER,
1263: x_msg_data OUT NOCOPY VARCHAR2
1272: -- Standard Start of API savepoint
1273: SAVEPOINT VALIDATE_Process_;
1274:
1275: -- Standard call to check for call compatibility.
1276: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
1277: p_api_version_number,
1278: l_api_name,
1279: G_PKG_NAME)
1280: THEN
1277: p_api_version_number,
1278: l_api_name,
1279: G_PKG_NAME)
1280: THEN
1281: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1282: END IF;
1283:
1284: -- Initialize message list if p_init_msg_list is set to TRUE.
1285: IF FND_API.to_Boolean( p_init_msg_list )
1281: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1282: END IF;
1283:
1284: -- Initialize message list if p_init_msg_list is set to TRUE.
1285: IF FND_API.to_Boolean( p_init_msg_list )
1286: THEN
1287: FND_MSG_PUB.initialize;
1288: END IF;
1289: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1292: p_validation_mode => JTF_PLSQL_API.g_update,
1293: x_return_status => x_return_status
1294: );
1295:
1296: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1297: RAISE FND_API.G_EXC_ERROR;
1298: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1299: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1300: END IF;
1293: x_return_status => x_return_status
1294: );
1295:
1296: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1297: RAISE FND_API.G_EXC_ERROR;
1298: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1299: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1300: END IF;
1301: END IF;
1294: );
1295:
1296: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1297: RAISE FND_API.G_EXC_ERROR;
1298: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1299: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1300: END IF;
1301: END IF;
1302:
1295:
1296: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1297: RAISE FND_API.G_EXC_ERROR;
1298: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1299: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1300: END IF;
1301: END IF;
1302:
1303: Complete_process_Rec(
1307:
1308: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1309: Validate_process_Rec(
1310: p_api_version_number => 1.0,
1311: p_init_msg_list => FND_API.G_FALSE,
1312: x_return_status => x_return_status,
1313: x_msg_count => x_msg_count,
1314: x_msg_data => x_msg_data,
1315: p_process_rec => l_process_rec);
1313: x_msg_count => x_msg_count,
1314: x_msg_data => x_msg_data,
1315: p_process_rec => l_process_rec);
1316:
1317: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1318: RAISE FND_API.G_EXC_ERROR;
1319: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1320: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1321: END IF;
1314: x_msg_data => x_msg_data,
1315: p_process_rec => l_process_rec);
1316:
1317: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1318: RAISE FND_API.G_EXC_ERROR;
1319: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1320: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1321: END IF;
1322: END IF;
1315: p_process_rec => l_process_rec);
1316:
1317: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1318: RAISE FND_API.G_EXC_ERROR;
1319: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1320: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1321: END IF;
1322: END IF;
1323:
1316:
1317: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1318: RAISE FND_API.G_EXC_ERROR;
1319: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1320: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1321: END IF;
1322: END IF;
1323:
1324:
1326: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
1327:
1328:
1329: -- Initialize API return status to SUCCESS
1330: x_return_status := FND_API.G_RET_STS_SUCCESS;
1331:
1332:
1333: -- Debug Message
1334: AMW_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
1340: );
1341: EXCEPTION
1342:
1343: WHEN AMW_Utility_PVT.resource_locked THEN
1344: x_return_status := FND_API.g_ret_sts_error;
1345: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1346:
1347: WHEN FND_API.G_EXC_ERROR THEN
1348: ROLLBACK TO VALIDATE_Process_;
1343: WHEN AMW_Utility_PVT.resource_locked THEN
1344: x_return_status := FND_API.g_ret_sts_error;
1345: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1346:
1347: WHEN FND_API.G_EXC_ERROR THEN
1348: ROLLBACK TO VALIDATE_Process_;
1349: x_return_status := FND_API.G_RET_STS_ERROR;
1350: -- Standard call to get message count and if count=1, get the message
1351: FND_MSG_PUB.Count_And_Get (
1345: AMW_Utility_PVT.Error_Message(p_message_name => 'AMW_API_RESOURCE_LOCKED');
1346:
1347: WHEN FND_API.G_EXC_ERROR THEN
1348: ROLLBACK TO VALIDATE_Process_;
1349: x_return_status := FND_API.G_RET_STS_ERROR;
1350: -- Standard call to get message count and if count=1, get the message
1351: FND_MSG_PUB.Count_And_Get (
1352: p_encoded => FND_API.G_FALSE,
1353: p_count => x_msg_count,
1348: ROLLBACK TO VALIDATE_Process_;
1349: x_return_status := FND_API.G_RET_STS_ERROR;
1350: -- Standard call to get message count and if count=1, get the message
1351: FND_MSG_PUB.Count_And_Get (
1352: p_encoded => FND_API.G_FALSE,
1353: p_count => x_msg_count,
1354: p_data => x_msg_data
1355: );
1356:
1353: p_count => x_msg_count,
1354: p_data => x_msg_data
1355: );
1356:
1357: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1358: ROLLBACK TO VALIDATE_Process_;
1359: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1360: -- Standard call to get message count and if count=1, get the message
1361: FND_MSG_PUB.Count_And_Get (
1355: );
1356:
1357: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1358: ROLLBACK TO VALIDATE_Process_;
1359: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1360: -- Standard call to get message count and if count=1, get the message
1361: FND_MSG_PUB.Count_And_Get (
1362: p_encoded => FND_API.G_FALSE,
1363: p_count => x_msg_count,
1358: ROLLBACK TO VALIDATE_Process_;
1359: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1360: -- Standard call to get message count and if count=1, get the message
1361: FND_MSG_PUB.Count_And_Get (
1362: p_encoded => FND_API.G_FALSE,
1363: p_count => x_msg_count,
1364: p_data => x_msg_data
1365: );
1366:
1365: );
1366:
1367: WHEN OTHERS THEN
1368: ROLLBACK TO VALIDATE_Process_;
1369: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1370: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1371: THEN
1372: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1373: END IF;
1372: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1373: END IF;
1374: -- Standard call to get message count and if count=1, get the message
1375: FND_MSG_PUB.Count_And_Get (
1376: p_encoded => FND_API.G_FALSE,
1377: p_count => x_msg_count,
1378: p_data => x_msg_data
1379: );
1380: End Validate_Process;
1381:
1382:
1383: PROCEDURE Validate_process_rec(
1384: p_api_version_number IN NUMBER,
1385: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1386: x_return_status OUT NOCOPY VARCHAR2,
1387: x_msg_count OUT NOCOPY NUMBER,
1388: x_msg_data OUT NOCOPY VARCHAR2,
1389: p_process_rec IN process_rec_type
1390: )
1391: IS
1392: BEGIN
1393: -- Initialize message list if p_init_msg_list is set to TRUE.
1394: IF FND_API.to_Boolean( p_init_msg_list )
1395: THEN
1396: FND_MSG_PUB.initialize;
1397: END IF;
1398:
1396: FND_MSG_PUB.initialize;
1397: END IF;
1398:
1399: -- Initialize API return status to SUCCESS
1400: x_return_status := FND_API.G_RET_STS_SUCCESS;
1401:
1402: -- Hint: Validate data
1403: -- If data not valid
1404: -- THEN
1401:
1402: -- Hint: Validate data
1403: -- If data not valid
1404: -- THEN
1405: -- x_return_status := FND_API.G_RET_STS_ERROR;
1406:
1407: -- Debug Message
1408: AMW_UTILITY_PVT.debug_message('Private API: Validate_dm_model_rec');
1409: -- Standard call to get message count and if count is 1, get message info.