13: --
14: -- Input Parameters
15: -- p_api_version
16: -- API version number (current version is 1.0)
17: -- p_init_msg_list (optional, default FND_API.G_FALSE)
18: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
19: -- if set to FND_API.G_TRUE
20: -- initialize error message list
21: -- if set to FND_API.G_FALSE - not initialize error
14: -- Input Parameters
15: -- p_api_version
16: -- API version number (current version is 1.0)
17: -- p_init_msg_list (optional, default FND_API.G_FALSE)
18: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
19: -- if set to FND_API.G_TRUE
20: -- initialize error message list
21: -- if set to FND_API.G_FALSE - not initialize error
22: -- message list
15: -- p_api_version
16: -- API version number (current version is 1.0)
17: -- p_init_msg_list (optional, default FND_API.G_FALSE)
18: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
19: -- if set to FND_API.G_TRUE
20: -- initialize error message list
21: -- if set to FND_API.G_FALSE - not initialize error
22: -- message list
23: -- p_commit (optional, default FND_API.G_FALSE)
17: -- p_init_msg_list (optional, default FND_API.G_FALSE)
18: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
19: -- if set to FND_API.G_TRUE
20: -- initialize error message list
21: -- if set to FND_API.G_FALSE - not initialize error
22: -- message list
23: -- p_commit (optional, default FND_API.G_FALSE)
24: -- whether or not to commit the changes to database
25: --
19: -- if set to FND_API.G_TRUE
20: -- initialize error message list
21: -- if set to FND_API.G_FALSE - not initialize error
22: -- message list
23: -- p_commit (optional, default FND_API.G_FALSE)
24: -- whether or not to commit the changes to database
25: --
26: -- p_VENDOR_ID -- Vendor Id
27: -- P_VENDOR -- Service Provider
33:
34: PROCEDURE Insert_Row
35: (
36: p_api_version IN NUMBER ,
37: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
38: p_commit IN VARCHAR2 := fnd_api.g_false ,
39: x_return_status OUT NOCOPY VARCHAR2 ,
40: x_msg_count OUT NOCOPY NUMBER ,
41: x_msg_data OUT NOCOPY VARCHAR2 ,
34: PROCEDURE Insert_Row
35: (
36: p_api_version IN NUMBER ,
37: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
38: p_commit IN VARCHAR2 := fnd_api.g_false ,
39: x_return_status OUT NOCOPY VARCHAR2 ,
40: x_msg_count OUT NOCOPY NUMBER ,
41: x_msg_data OUT NOCOPY VARCHAR2 ,
42: p_VENDOR_ID IN NUMBER,
54: -- Standard Start of API savepoint
55: SAVEPOINT WSH_ITM_ERROR_PKG;
56:
57: -- Standard call to check for call compatibility.
58: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
59: p_api_version ,
60: l_api_name ,
61: G_PKG_NAME )
62: THEN
61: G_PKG_NAME )
62: THEN
63: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
64: FND_MSG_PUB.ADD;
65: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
66: END IF;
67:
68: -- Initialize message list if p_init_msg_list is set to TRUE.
69: IF FND_API.to_Boolean( p_init_msg_list ) THEN
65: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
66: END IF;
67:
68: -- Initialize message list if p_init_msg_list is set to TRUE.
69: IF FND_API.to_Boolean( p_init_msg_list ) THEN
70: FND_MSG_PUB.initialize;
71: END IF;
72:
73: -- Initialize API return status to success
70: FND_MSG_PUB.initialize;
71: END IF;
72:
73: -- Initialize API return status to success
74: x_return_status := FND_API.G_RET_STS_SUCCESS;
75:
76: insert into wsh_itm_response_rules
77: (VENDOR_ID,
78: ERROR_TYPE,
98:
99: IF SQL%NOTFOUND THEN
100: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
101: FND_MSG_PUB.ADD;
102: x_return_status := FND_API.G_RET_STS_ERROR;
103: RAISE FND_API.G_EXC_ERROR ;
104: END IF;
105:
106: x_return_status := fnd_api.g_ret_sts_success;
99: IF SQL%NOTFOUND THEN
100: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
101: FND_MSG_PUB.ADD;
102: x_return_status := FND_API.G_RET_STS_ERROR;
103: RAISE FND_API.G_EXC_ERROR ;
104: END IF;
105:
106: x_return_status := fnd_api.g_ret_sts_success;
107:
102: x_return_status := FND_API.G_RET_STS_ERROR;
103: RAISE FND_API.G_EXC_ERROR ;
104: END IF;
105:
106: x_return_status := fnd_api.g_ret_sts_success;
107:
108: SELECT rowid
109: INTO x_rowid
110: FROM wsh_itm_response_rules
116:
117: -- End of API body
118: -- Standard check of p_commit.
119:
120: IF FND_API.To_Boolean( p_commit ) THEN
121: COMMIT WORK;
122: END IF;
123:
124: -- Standard call to get message count and if count is 1,
129: p_data => x_msg_data
130: );
131:
132: EXCEPTION
133: WHEN FND_API.G_EXC_ERROR THEN
134: ROLLBACK TO WSH_ITM_ERROR_PKG;
135: x_return_status := FND_API.G_RET_STS_ERROR;
136: FND_MSG_PUB.Count_And_Get
137: ( p_count => x_msg_count,
131:
132: EXCEPTION
133: WHEN FND_API.G_EXC_ERROR THEN
134: ROLLBACK TO WSH_ITM_ERROR_PKG;
135: x_return_status := FND_API.G_RET_STS_ERROR;
136: FND_MSG_PUB.Count_And_Get
137: ( p_count => x_msg_count,
138: p_data => x_msg_data
139: );
136: FND_MSG_PUB.Count_And_Get
137: ( p_count => x_msg_count,
138: p_data => x_msg_data
139: );
140: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
141: ROLLBACK TO WSH_ITM_ERROR_PKG;
142: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
143: FND_MSG_PUB.Count_And_Get
144: ( p_count => x_msg_count,
138: p_data => x_msg_data
139: );
140: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
141: ROLLBACK TO WSH_ITM_ERROR_PKG;
142: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
143: FND_MSG_PUB.Count_And_Get
144: ( p_count => x_msg_count,
145: p_data => x_msg_data
146: );
145: p_data => x_msg_data
146: );
147: WHEN OTHERS THEN
148: ROLLBACK TO WSH_ITM_ERROR_PKG;
149: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
150: IF FND_MSG_PUB.Check_Msg_Level
151: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
152: THEN
153: FND_MSG_PUB.Add_Exc_Msg
171: --
172: -- Input Parameters
173: -- p_api_version
174: -- API version number (current version is 1.0)
175: -- p_init_msg_list (optional, default FND_API.G_FALSE)
176: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
177: -- if set to FND_API.G_TRUE
178: -- initialize error message list
179: -- if set to FND_API.G_FALSE - not initialize error
172: -- Input Parameters
173: -- p_api_version
174: -- API version number (current version is 1.0)
175: -- p_init_msg_list (optional, default FND_API.G_FALSE)
176: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
177: -- if set to FND_API.G_TRUE
178: -- initialize error message list
179: -- if set to FND_API.G_FALSE - not initialize error
180: -- message list
173: -- p_api_version
174: -- API version number (current version is 1.0)
175: -- p_init_msg_list (optional, default FND_API.G_FALSE)
176: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
177: -- if set to FND_API.G_TRUE
178: -- initialize error message list
179: -- if set to FND_API.G_FALSE - not initialize error
180: -- message list
181: -- p_commit (optional, default FND_API.G_FALSE)
175: -- p_init_msg_list (optional, default FND_API.G_FALSE)
176: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
177: -- if set to FND_API.G_TRUE
178: -- initialize error message list
179: -- if set to FND_API.G_FALSE - not initialize error
180: -- message list
181: -- p_commit (optional, default FND_API.G_FALSE)
182: -- whether or not to commit the changes to database
183: --
177: -- if set to FND_API.G_TRUE
178: -- initialize error message list
179: -- if set to FND_API.G_FALSE - not initialize error
180: -- message list
181: -- p_commit (optional, default FND_API.G_FALSE)
182: -- whether or not to commit the changes to database
183: --
184: -- Input parameters for clear cross users informations
185: -- p_VENDOR_ID -- Vendor Id
191: --
192: -- Output Parameters
193: -- x_return_status
194: -- if the process succeeds, the value is
195: -- fnd_api.g_ret_sts_success;
196: -- if there is an expected error, the value is
197: -- fnd_api.g_ret_sts_error;
198: -- if there is an unexpected error, the value is
199: -- fnd_api.g_ret_sts_unexp_error;
193: -- x_return_status
194: -- if the process succeeds, the value is
195: -- fnd_api.g_ret_sts_success;
196: -- if there is an expected error, the value is
197: -- fnd_api.g_ret_sts_error;
198: -- if there is an unexpected error, the value is
199: -- fnd_api.g_ret_sts_unexp_error;
200: -- x_msg_count
201: -- if there is one or more errors, the number of error messages
195: -- fnd_api.g_ret_sts_success;
196: -- if there is an expected error, the value is
197: -- fnd_api.g_ret_sts_error;
198: -- if there is an unexpected error, the value is
199: -- fnd_api.g_ret_sts_unexp_error;
200: -- x_msg_count
201: -- if there is one or more errors, the number of error messages
202: -- in the buffer
203: -- x_msg_data
201: -- if there is one or more errors, the number of error messages
202: -- in the buffer
203: -- x_msg_data
204: -- if there is one and only one error, the error message
205: -- (See fnd_api package for more details about the above output parameters)
206:
207: --*/
208: PROCEDURE Update_Row
209: (
207: --*/
208: PROCEDURE Update_Row
209: (
210: p_api_version IN NUMBER ,
211: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
212: p_commit IN VARCHAR2 := fnd_api.g_false ,
213: x_return_status OUT NOCOPY VARCHAR2 ,
214: x_msg_count OUT NOCOPY NUMBER ,
215: x_msg_data OUT NOCOPY VARCHAR2 ,
208: PROCEDURE Update_Row
209: (
210: p_api_version IN NUMBER ,
211: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
212: p_commit IN VARCHAR2 := fnd_api.g_false ,
213: x_return_status OUT NOCOPY VARCHAR2 ,
214: x_msg_count OUT NOCOPY NUMBER ,
215: x_msg_data OUT NOCOPY VARCHAR2 ,
216: p_VENDOR_ID IN NUMBER,
229: -- Standard Start of API savepoint
230: SAVEPOINT WSH_ITM_ERROR_PKG;
231:
232: -- Standard call to check for call compatibility.
233: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
234: p_api_version ,
235: l_api_name ,
236: G_PKG_NAME )
237: THEN
236: G_PKG_NAME )
237: THEN
238: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
239: FND_MSG_PUB.ADD;
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: END IF;
242:
243: -- Initialize message list if p_init_msg_list is set to TRUE.
244: IF FND_API.to_Boolean( p_init_msg_list ) THEN
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: END IF;
242:
243: -- Initialize message list if p_init_msg_list is set to TRUE.
244: IF FND_API.to_Boolean( p_init_msg_list ) THEN
245: FND_MSG_PUB.initialize;
246: END IF;
247:
248: -- Initialize API return status to success
245: FND_MSG_PUB.initialize;
246: END IF;
247:
248: -- Initialize API return status to success
249: x_return_status := FND_API.G_RET_STS_SUCCESS;
250:
251: -- Update a row into wsh_itm_users entity with all detail information
252: -- for the given cc seq id
253:
264:
265: IF SQL%NOTFOUND THEN
266: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
267: FND_MSG_PUB.ADD;
268: x_return_status := FND_API.G_RET_STS_ERROR;
269: RAISE FND_API.G_EXC_ERROR ;
270: END IF;
271:
272: x_return_status := fnd_api.g_ret_sts_success;
265: IF SQL%NOTFOUND THEN
266: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
267: FND_MSG_PUB.ADD;
268: x_return_status := FND_API.G_RET_STS_ERROR;
269: RAISE FND_API.G_EXC_ERROR ;
270: END IF;
271:
272: x_return_status := fnd_api.g_ret_sts_success;
273:
268: x_return_status := FND_API.G_RET_STS_ERROR;
269: RAISE FND_API.G_EXC_ERROR ;
270: END IF;
271:
272: x_return_status := fnd_api.g_ret_sts_success;
273:
274: -- End of API body
275: -- Standard check of p_commit.
276:
273:
274: -- End of API body
275: -- Standard check of p_commit.
276:
277: IF FND_API.To_Boolean( p_commit ) THEN
278: COMMIT WORK;
279: END IF;
280:
281: -- Standard call to get message count and if count is 1,
285: p_data => x_msg_data
286: );
287:
288: EXCEPTION
289: WHEN FND_API.G_EXC_ERROR THEN
290: ROLLBACK TO WSH_ITM_ERROR_PKG;
291: x_return_status := FND_API.G_RET_STS_ERROR;
292: FND_MSG_PUB.Count_And_Get
293: ( p_count => x_msg_count,
287:
288: EXCEPTION
289: WHEN FND_API.G_EXC_ERROR THEN
290: ROLLBACK TO WSH_ITM_ERROR_PKG;
291: x_return_status := FND_API.G_RET_STS_ERROR;
292: FND_MSG_PUB.Count_And_Get
293: ( p_count => x_msg_count,
294: p_data => x_msg_data
295: );
292: FND_MSG_PUB.Count_And_Get
293: ( p_count => x_msg_count,
294: p_data => x_msg_data
295: );
296: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
297: ROLLBACK TO WSH_ITM_ERROR_PKG;
298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
299: FND_MSG_PUB.Count_And_Get
300: ( p_count => x_msg_count,
294: p_data => x_msg_data
295: );
296: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
297: ROLLBACK TO WSH_ITM_ERROR_PKG;
298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
299: FND_MSG_PUB.Count_And_Get
300: ( p_count => x_msg_count,
301: p_data => x_msg_data
302: );
327: --
328: -- Input Parameters
329: -- p_api_version
330: -- API version number (current version is 1.0)
331: -- p_init_msg_list (optional, default FND_API.G_FALSE)
332: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
333: -- if set to FND_API.G_TRUE
334: -- initialize error message list
335: -- if set to FND_API.G_FALSE - not initialize error
328: -- Input Parameters
329: -- p_api_version
330: -- API version number (current version is 1.0)
331: -- p_init_msg_list (optional, default FND_API.G_FALSE)
332: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
333: -- if set to FND_API.G_TRUE
334: -- initialize error message list
335: -- if set to FND_API.G_FALSE - not initialize error
336: -- message list
329: -- p_api_version
330: -- API version number (current version is 1.0)
331: -- p_init_msg_list (optional, default FND_API.G_FALSE)
332: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
333: -- if set to FND_API.G_TRUE
334: -- initialize error message list
335: -- if set to FND_API.G_FALSE - not initialize error
336: -- message list
337: -- p_commit (optional, default FND_API.G_FALSE)
331: -- p_init_msg_list (optional, default FND_API.G_FALSE)
332: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
333: -- if set to FND_API.G_TRUE
334: -- initialize error message list
335: -- if set to FND_API.G_FALSE - not initialize error
336: -- message list
337: -- p_commit (optional, default FND_API.G_FALSE)
338: -- whether or not to commit the changes to database
339: --
333: -- if set to FND_API.G_TRUE
334: -- initialize error message list
335: -- if set to FND_API.G_FALSE - not initialize error
336: -- message list
337: -- p_commit (optional, default FND_API.G_FALSE)
338: -- whether or not to commit the changes to database
339: --
340: -- Input parameters for clear cross users informations
341: -- p_rowid
343: --
344: -- Output Parameters
345: -- x_return_status
346: -- if the process succeeds, the value is
347: -- fnd_api.g_ret_sts_success;
348: -- if there is an expected error, the value is
349: -- fnd_api.g_ret_sts_error;
350: -- if there is an unexpected error, the value is
351: -- fnd_api.g_ret_sts_unexp_error;
345: -- x_return_status
346: -- if the process succeeds, the value is
347: -- fnd_api.g_ret_sts_success;
348: -- if there is an expected error, the value is
349: -- fnd_api.g_ret_sts_error;
350: -- if there is an unexpected error, the value is
351: -- fnd_api.g_ret_sts_unexp_error;
352: -- x_msg_count
353: -- if there is one or more errors, the number of error messages
347: -- fnd_api.g_ret_sts_success;
348: -- if there is an expected error, the value is
349: -- fnd_api.g_ret_sts_error;
350: -- if there is an unexpected error, the value is
351: -- fnd_api.g_ret_sts_unexp_error;
352: -- x_msg_count
353: -- if there is one or more errors, the number of error messages
354: -- in the buffer
355: -- x_msg_data
353: -- if there is one or more errors, the number of error messages
354: -- in the buffer
355: -- x_msg_data
356: -- if there is one and only one error, the error message
357: -- (See fnd_api package for more details about the above output parameters)
358:
359: --*/
360: PROCEDURE Delete_Row
361: (
359: --*/
360: PROCEDURE Delete_Row
361: (
362: p_api_version IN NUMBER ,
363: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
364: p_commit IN VARCHAR2 := fnd_api.g_false ,
365: x_return_status OUT NOCOPY VARCHAR2 ,
366: x_msg_count OUT NOCOPY NUMBER ,
367: x_msg_data OUT NOCOPY VARCHAR2 ,
360: PROCEDURE Delete_Row
361: (
362: p_api_version IN NUMBER ,
363: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
364: p_commit IN VARCHAR2 := fnd_api.g_false ,
365: x_return_status OUT NOCOPY VARCHAR2 ,
366: x_msg_count OUT NOCOPY NUMBER ,
367: x_msg_data OUT NOCOPY VARCHAR2 ,
368: p_rowid IN VARCHAR2
376: -- Standard Start of API savepoint
377: SAVEPOINT WSH_ITM_ERROR_PKG;
378:
379: -- Standard call to check for call compatibility.
380: IF NOT FND_API.Compatible_API_Call
381: ( l_api_version ,
382: p_api_version ,
383: l_api_name ,
384: G_PKG_NAME )
384: G_PKG_NAME )
385: THEN
386: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
387: FND_MSG_PUB.ADD;
388: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
389: END IF;
390:
391: -- Initialize message list if p_init_msg_list is set to TRUE.
392: IF FND_API.to_Boolean( p_init_msg_list ) THEN
388: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
389: END IF;
390:
391: -- Initialize message list if p_init_msg_list is set to TRUE.
392: IF FND_API.to_Boolean( p_init_msg_list ) THEN
393: FND_MSG_PUB.initialize;
394: END IF;
395:
396: -- Initialize API return status to success
393: FND_MSG_PUB.initialize;
394: END IF;
395:
396: -- Initialize API return status to success
397: x_return_status := FND_API.G_RET_STS_SUCCESS;
398:
399:
400: DELETE FROM WSH_ITM_RESPONSE_RULES
401: WHERE rowid = p_rowid;
402:
403: IF SQL%NOTFOUND THEN
404: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
405: FND_MSG_PUB.ADD;
406: x_return_status := FND_API.G_RET_STS_ERROR;
407: RAISE FND_API.G_EXC_ERROR ;
408: END IF;
409:
410: x_return_status := fnd_api.g_ret_sts_success;
403: IF SQL%NOTFOUND THEN
404: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
405: FND_MSG_PUB.ADD;
406: x_return_status := FND_API.G_RET_STS_ERROR;
407: RAISE FND_API.G_EXC_ERROR ;
408: END IF;
409:
410: x_return_status := fnd_api.g_ret_sts_success;
411:
406: x_return_status := FND_API.G_RET_STS_ERROR;
407: RAISE FND_API.G_EXC_ERROR ;
408: END IF;
409:
410: x_return_status := fnd_api.g_ret_sts_success;
411:
412: -- End of API body
413: -- Standard check of p_commit.
414:
411:
412: -- End of API body
413: -- Standard check of p_commit.
414:
415: IF FND_API.To_Boolean( p_commit ) THEN
416: COMMIT WORK;
417: END IF;
418:
419: -- Standard call to get message count and if count is 1,
424: p_data => x_msg_data
425: );
426:
427: EXCEPTION
428: WHEN FND_API.G_EXC_ERROR THEN
429: ROLLBACK TO WSH_ITM_ERROR_PKG;
430: x_return_status := FND_API.G_RET_STS_ERROR;
431: FND_MSG_PUB.Count_And_Get
432: ( p_count => x_msg_count,
426:
427: EXCEPTION
428: WHEN FND_API.G_EXC_ERROR THEN
429: ROLLBACK TO WSH_ITM_ERROR_PKG;
430: x_return_status := FND_API.G_RET_STS_ERROR;
431: FND_MSG_PUB.Count_And_Get
432: ( p_count => x_msg_count,
433: p_data => x_msg_data
434: );
432: ( p_count => x_msg_count,
433: p_data => x_msg_data
434: );
435:
436: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
437: ROLLBACK TO WSH_ITM_ERROR_PKG;
438: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
439: FND_MSG_PUB.Count_And_Get
440: ( p_count => x_msg_count,
434: );
435:
436: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
437: ROLLBACK TO WSH_ITM_ERROR_PKG;
438: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
439: FND_MSG_PUB.Count_And_Get
440: ( p_count => x_msg_count,
441: p_data => x_msg_data
442: );
468: --
469: -- Input Parameters
470: -- p_api_version
471: -- API version number (current version is 1.0)
472: -- p_init_msg_list (optional, default FND_API.G_FALSE)
473: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
474: -- if set to FND_API.G_TRUE
475: -- initialize error message list
476: -- if set to FND_API.G_FALSE - not initialize error
469: -- Input Parameters
470: -- p_api_version
471: -- API version number (current version is 1.0)
472: -- p_init_msg_list (optional, default FND_API.G_FALSE)
473: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
474: -- if set to FND_API.G_TRUE
475: -- initialize error message list
476: -- if set to FND_API.G_FALSE - not initialize error
477: -- message list
470: -- p_api_version
471: -- API version number (current version is 1.0)
472: -- p_init_msg_list (optional, default FND_API.G_FALSE)
473: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
474: -- if set to FND_API.G_TRUE
475: -- initialize error message list
476: -- if set to FND_API.G_FALSE - not initialize error
477: -- message list
478: -- p_commit (optional, default FND_API.G_FALSE)
472: -- p_init_msg_list (optional, default FND_API.G_FALSE)
473: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
474: -- if set to FND_API.G_TRUE
475: -- initialize error message list
476: -- if set to FND_API.G_FALSE - not initialize error
477: -- message list
478: -- p_commit (optional, default FND_API.G_FALSE)
479: -- whether or not to commit the changes to database
480: --
474: -- if set to FND_API.G_TRUE
475: -- initialize error message list
476: -- if set to FND_API.G_FALSE - not initialize error
477: -- message list
478: -- p_commit (optional, default FND_API.G_FALSE)
479: -- whether or not to commit the changes to database
480: --
481: -- Input parameters for clear cross users informations
482: -- p_VENDOR_ID --Vendor Id
488: --
489: -- Output Parameters
490: -- x_return_status
491: -- if the process succeeds, the value is
492: -- fnd_api.g_ret_sts_success;
493: -- if there is an expected error, the value is
494: -- fnd_api.g_ret_sts_error;
495: -- if there is an unexpected error, the value is
496: -- fnd_api.g_ret_sts_unexp_error;
490: -- x_return_status
491: -- if the process succeeds, the value is
492: -- fnd_api.g_ret_sts_success;
493: -- if there is an expected error, the value is
494: -- fnd_api.g_ret_sts_error;
495: -- if there is an unexpected error, the value is
496: -- fnd_api.g_ret_sts_unexp_error;
497: -- x_msg_count
498: -- if there is one or more errors, the number of error messages
492: -- fnd_api.g_ret_sts_success;
493: -- if there is an expected error, the value is
494: -- fnd_api.g_ret_sts_error;
495: -- if there is an unexpected error, the value is
496: -- fnd_api.g_ret_sts_unexp_error;
497: -- x_msg_count
498: -- if there is one or more errors, the number of error messages
499: -- in the buffer
500: -- x_msg_data
498: -- if there is one or more errors, the number of error messages
499: -- in the buffer
500: -- x_msg_data
501: -- if there is one and only one error, the error message
502: -- (See fnd_api package for more details about the above output parameters)
503:
504: --*/
505: PROCEDURE Lock_Row
506: (
504: --*/
505: PROCEDURE Lock_Row
506: (
507: p_api_version IN NUMBER ,
508: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
509: p_commit IN VARCHAR2 := fnd_api.g_false ,
510: x_return_status OUT NOCOPY VARCHAR2 ,
511: x_msg_count OUT NOCOPY NUMBER ,
512: x_msg_data OUT NOCOPY VARCHAR2 ,
505: PROCEDURE Lock_Row
506: (
507: p_api_version IN NUMBER ,
508: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
509: p_commit IN VARCHAR2 := fnd_api.g_false ,
510: x_return_status OUT NOCOPY VARCHAR2 ,
511: x_msg_count OUT NOCOPY NUMBER ,
512: x_msg_data OUT NOCOPY VARCHAR2 ,
513: p_VENDOR_ID IN NUMBER,
536: -- Standard Start of API savepoint
537: SAVEPOINT WSH_ITM_ERROR_PKG;
538:
539: -- Standard call to check for call compatibility.
540: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
541: p_api_version ,
542: l_api_name ,
543: G_PKG_NAME )
544: THEN
543: G_PKG_NAME )
544: THEN
545: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
546: FND_MSG_PUB.ADD;
547: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
548: END IF;
549:
550: -- Initialize message list if p_init_msg_list is set to TRUE.
551: IF FND_API.to_Boolean( p_init_msg_list ) THEN
547: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
548: END IF;
549:
550: -- Initialize message list if p_init_msg_list is set to TRUE.
551: IF FND_API.to_Boolean( p_init_msg_list ) THEN
552: FND_MSG_PUB.initialize;
553: END IF;
554:
555: -- Initialize API return status to success
552: FND_MSG_PUB.initialize;
553: END IF;
554:
555: -- Initialize API return status to success
556: x_return_status := FND_API.G_RET_STS_SUCCESS;
557:
558: OPEN lock_row;
559: FETCH lock_row into Recinfo;
560:
569: ( (Recinfo.error_code is null)
570: AND (p_error_code is null )))
571: AND (Recinfo.interpreted_value_code =p_interpreted_code)
572: ) THEN
573: x_return_status := FND_API.G_RET_STS_SUCCESS;
574: ELSE
575: x_return_status := FND_API.G_RET_STS_ERROR;
576: Raise Changed;
577: END IF;
571: AND (Recinfo.interpreted_value_code =p_interpreted_code)
572: ) THEN
573: x_return_status := FND_API.G_RET_STS_SUCCESS;
574: ELSE
575: x_return_status := FND_API.G_RET_STS_ERROR;
576: Raise Changed;
577: END IF;
578: CLOSE lock_row;
579:
578: CLOSE lock_row;
579:
580: EXCEPTION
581: WHEN Changed then
582: x_return_status := FND_API.G_RET_STS_ERROR;
583: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
584: WHEN others THEN
585: x_return_status := FND_API.G_RET_STS_ERROR;
586: FND_MESSAGE.Set_Name('FND','FORM_RECORD_DELETED');
581: WHEN Changed then
582: x_return_status := FND_API.G_RET_STS_ERROR;
583: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
584: WHEN others THEN
585: x_return_status := FND_API.G_RET_STS_ERROR;
586: FND_MESSAGE.Set_Name('FND','FORM_RECORD_DELETED');
587: End Lock_Row;
588: END WSH_ITM_ERROR_PKG;