12: --
13: -- Input Parameters
14: -- p_api_version
15: -- API version number (current version is 1.0)
16: -- p_init_msg_list (optional, default FND_API.G_FALSE)
17: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
18: -- if set to FND_API.G_TRUE
19: -- initialize error message list
20: -- if set to FND_API.G_FALSE - not initialize error
13: -- Input Parameters
14: -- p_api_version
15: -- API version number (current version is 1.0)
16: -- p_init_msg_list (optional, default FND_API.G_FALSE)
17: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
18: -- if set to FND_API.G_TRUE
19: -- initialize error message list
20: -- if set to FND_API.G_FALSE - not initialize error
21: -- message list
14: -- p_api_version
15: -- API version number (current version is 1.0)
16: -- p_init_msg_list (optional, default FND_API.G_FALSE)
17: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
18: -- if set to FND_API.G_TRUE
19: -- initialize error message list
20: -- if set to FND_API.G_FALSE - not initialize error
21: -- message list
22: -- p_commit (optional, default FND_API.G_FALSE)
16: -- p_init_msg_list (optional, default FND_API.G_FALSE)
17: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
18: -- if set to FND_API.G_TRUE
19: -- initialize error message list
20: -- if set to FND_API.G_FALSE - not initialize error
21: -- message list
22: -- p_commit (optional, default FND_API.G_FALSE)
23: -- whether or not to commit the changes to database
24: --
18: -- if set to FND_API.G_TRUE
19: -- initialize error message list
20: -- if set to FND_API.G_FALSE - not initialize error
21: -- message list
22: -- p_commit (optional, default FND_API.G_FALSE)
23: -- whether or not to commit the changes to database
24: --
25: -- Input parameters for clear cross service setups informations
26: --
26: --
27: -- Output Parameters
28: -- x_return_status
29: -- if the process succeeds, the value is
30: -- fnd_api.g_ret_sts_success;
31: -- if there is an expected error, the value is
32: -- fnd_api.g_ret_sts_error;
33: -- if there is an unexpected error, the value is
34: -- fnd_api.g_ret_sts_unexp_error;
28: -- x_return_status
29: -- if the process succeeds, the value is
30: -- fnd_api.g_ret_sts_success;
31: -- if there is an expected error, the value is
32: -- fnd_api.g_ret_sts_error;
33: -- if there is an unexpected error, the value is
34: -- fnd_api.g_ret_sts_unexp_error;
35: -- x_msg_count
36: -- if there is one or more errors, the number of error messages
30: -- fnd_api.g_ret_sts_success;
31: -- if there is an expected error, the value is
32: -- fnd_api.g_ret_sts_error;
33: -- if there is an unexpected error, the value is
34: -- fnd_api.g_ret_sts_unexp_error;
35: -- x_msg_count
36: -- if there is one or more errors, the number of error messages
37: -- in the buffer
38: -- x_msg_data
36: -- if there is one or more errors, the number of error messages
37: -- in the buffer
38: -- x_msg_data
39: -- if there is one and only one error, the error message
40: -- (See fnd_api package for more details about the above output parameters)
41: -- p_CC_SERVICE_SEQUENCE_ID - Clear Cross Service sequence Id ( PK)
42: --*/
43:
44: PROCEDURE Insert_Row
43:
44: PROCEDURE Insert_Row
45: (
46: p_api_version IN NUMBER ,
47: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
48: p_commit IN VARCHAR2 := fnd_api.g_false ,
49: x_return_status OUT VARCHAR2 ,
50: x_msg_count OUT NUMBER ,
51: x_msg_data OUT VARCHAR2 ,
44: PROCEDURE Insert_Row
45: (
46: p_api_version IN NUMBER ,
47: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
48: p_commit IN VARCHAR2 := fnd_api.g_false ,
49: x_return_status OUT VARCHAR2 ,
50: x_msg_count OUT NUMBER ,
51: x_msg_data OUT VARCHAR2 ,
52: p_APPLICATION_ID IN NUMBER,
78: --dbms_output.put_line('begin api');
79: -- Standard Start of API savepoint
80: SAVEPOINT WSH_CC_SERVICE_SETUPS_PKG;
81: -- Standard call to check for call compatibility.
82: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
83: p_api_version ,
84: l_api_name ,
85: G_PKG_NAME )
86: THEN
85: G_PKG_NAME )
86: THEN
87: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
88: FND_MSG_PUB.ADD;
89: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
90: END IF;
91: -- Initialize message list if p_init_msg_list is set to TRUE.
92: IF FND_API.to_Boolean( p_init_msg_list ) THEN
93: FND_MSG_PUB.initialize;
88: FND_MSG_PUB.ADD;
89: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
90: END IF;
91: -- Initialize message list if p_init_msg_list is set to TRUE.
92: IF FND_API.to_Boolean( p_init_msg_list ) THEN
93: FND_MSG_PUB.initialize;
94: END IF;
95: -- Initialize API return status to success
96: x_return_status := FND_API.G_RET_STS_SUCCESS;
92: IF FND_API.to_Boolean( p_init_msg_list ) THEN
93: FND_MSG_PUB.initialize;
94: END IF;
95: -- Initialize API return status to success
96: x_return_status := FND_API.G_RET_STS_SUCCESS;
97: --dbms_output.put_line('begin api-2');
98:
99: select wsh_cc_service_setups_s.nextval into l_CC_Service_Sequence_ID from dual;
100: /* Validate input parameters if any */
156: ) ;
157: IF SQL%NOTFOUND THEN
158: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
159: FND_MSG_PUB.ADD;
160: x_return_status := FND_API.G_RET_STS_ERROR;
161: RAISE FND_API.G_EXC_ERROR ;
162: END IF;
163: --dbms_output.put_line('Seq Id got it '||l_CC_Service_SEQUENCE_ID||'success');
164: x_return_status := fnd_api.g_ret_sts_success;
157: IF SQL%NOTFOUND THEN
158: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
159: FND_MSG_PUB.ADD;
160: x_return_status := FND_API.G_RET_STS_ERROR;
161: RAISE FND_API.G_EXC_ERROR ;
162: END IF;
163: --dbms_output.put_line('Seq Id got it '||l_CC_Service_SEQUENCE_ID||'success');
164: x_return_status := fnd_api.g_ret_sts_success;
165: p_CC_SERVICE_SEQUENCE_ID := l_CC_SERVICE_SEQUENCE_ID;
160: x_return_status := FND_API.G_RET_STS_ERROR;
161: RAISE FND_API.G_EXC_ERROR ;
162: END IF;
163: --dbms_output.put_line('Seq Id got it '||l_CC_Service_SEQUENCE_ID||'success');
164: x_return_status := fnd_api.g_ret_sts_success;
165: p_CC_SERVICE_SEQUENCE_ID := l_CC_SERVICE_SEQUENCE_ID;
166: -- End of API body
167: -- Standard check of p_commit.
168: IF FND_API.To_Boolean( p_commit ) THEN
164: x_return_status := fnd_api.g_ret_sts_success;
165: p_CC_SERVICE_SEQUENCE_ID := l_CC_SERVICE_SEQUENCE_ID;
166: -- End of API body
167: -- Standard check of p_commit.
168: IF FND_API.To_Boolean( p_commit ) THEN
169: COMMIT WORK;
170: END IF;
171: -- Standard call to get message count and if count is 1,
172: -- get message info.
175: p_data => x_msg_data
176: );
177:
178: EXCEPTION
179: WHEN FND_API.G_EXC_ERROR THEN
180: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
181: x_return_status := FND_API.G_RET_STS_ERROR;
182: FND_MSG_PUB.Count_And_Get
183: ( p_count => x_msg_count,
177:
178: EXCEPTION
179: WHEN FND_API.G_EXC_ERROR THEN
180: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
181: x_return_status := FND_API.G_RET_STS_ERROR;
182: FND_MSG_PUB.Count_And_Get
183: ( p_count => x_msg_count,
184: p_data => x_msg_data
185: );
182: FND_MSG_PUB.Count_And_Get
183: ( p_count => x_msg_count,
184: p_data => x_msg_data
185: );
186: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
187: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
188: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
189: FND_MSG_PUB.Count_And_Get
190: ( p_count => x_msg_count,
184: p_data => x_msg_data
185: );
186: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
187: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
188: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
189: FND_MSG_PUB.Count_And_Get
190: ( p_count => x_msg_count,
191: p_data => x_msg_data
192: );
191: p_data => x_msg_data
192: );
193: WHEN OTHERS THEN
194: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
195: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
196: IF FND_MSG_PUB.Check_Msg_Level
197: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
198: THEN
199: FND_MSG_PUB.Add_Exc_Msg
216: --
217: -- Input Parameters
218: -- p_api_version
219: -- API version number (current version is 1.0)
220: -- p_init_msg_list (optional, default FND_API.G_FALSE)
221: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
222: -- if set to FND_API.G_TRUE
223: -- initialize error message list
224: -- if set to FND_API.G_FALSE - not initialize error
217: -- Input Parameters
218: -- p_api_version
219: -- API version number (current version is 1.0)
220: -- p_init_msg_list (optional, default FND_API.G_FALSE)
221: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
222: -- if set to FND_API.G_TRUE
223: -- initialize error message list
224: -- if set to FND_API.G_FALSE - not initialize error
225: -- message list
218: -- p_api_version
219: -- API version number (current version is 1.0)
220: -- p_init_msg_list (optional, default FND_API.G_FALSE)
221: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
222: -- if set to FND_API.G_TRUE
223: -- initialize error message list
224: -- if set to FND_API.G_FALSE - not initialize error
225: -- message list
226: -- p_commit (optional, default FND_API.G_FALSE)
220: -- p_init_msg_list (optional, default FND_API.G_FALSE)
221: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
222: -- if set to FND_API.G_TRUE
223: -- initialize error message list
224: -- if set to FND_API.G_FALSE - not initialize error
225: -- message list
226: -- p_commit (optional, default FND_API.G_FALSE)
227: -- whether or not to commit the changes to database
228: --
222: -- if set to FND_API.G_TRUE
223: -- initialize error message list
224: -- if set to FND_API.G_FALSE - not initialize error
225: -- message list
226: -- p_commit (optional, default FND_API.G_FALSE)
227: -- whether or not to commit the changes to database
228: --
229: -- Input parameters for clear cross service setups informations
230: --
231: --
232: -- Output Parameters
233: -- x_return_status
234: -- if the process succeeds, the value is
235: -- fnd_api.g_ret_sts_success;
236: -- if there is an expected error, the value is
237: -- fnd_api.g_ret_sts_error;
238: -- if there is an unexpected error, the value is
239: -- fnd_api.g_ret_sts_unexp_error;
233: -- x_return_status
234: -- if the process succeeds, the value is
235: -- fnd_api.g_ret_sts_success;
236: -- if there is an expected error, the value is
237: -- fnd_api.g_ret_sts_error;
238: -- if there is an unexpected error, the value is
239: -- fnd_api.g_ret_sts_unexp_error;
240: -- x_msg_count
241: -- if there is one or more errors, the number of error messages
235: -- fnd_api.g_ret_sts_success;
236: -- if there is an expected error, the value is
237: -- fnd_api.g_ret_sts_error;
238: -- if there is an unexpected error, the value is
239: -- fnd_api.g_ret_sts_unexp_error;
240: -- x_msg_count
241: -- if there is one or more errors, the number of error messages
242: -- in the buffer
243: -- x_msg_data
241: -- if there is one or more errors, the number of error messages
242: -- in the buffer
243: -- x_msg_data
244: -- if there is one and only one error, the error message
245: -- (See fnd_api package for more details about the above output parameters)
246:
247: --*/
248: PROCEDURE Update_Row
249: (
247: --*/
248: PROCEDURE Update_Row
249: (
250: p_api_version IN NUMBER ,
251: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
252: p_commit IN VARCHAR2 := fnd_api.g_false ,
253: x_return_status OUT VARCHAR2 ,
254: x_msg_count OUT NUMBER ,
255: x_msg_data OUT VARCHAR2 ,
248: PROCEDURE Update_Row
249: (
250: p_api_version IN NUMBER ,
251: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
252: p_commit IN VARCHAR2 := fnd_api.g_false ,
253: x_return_status OUT VARCHAR2 ,
254: x_msg_count OUT NUMBER ,
255: x_msg_data OUT VARCHAR2 ,
256: p_APPLICATION_ID IN NUMBER,
254: x_msg_count OUT NUMBER ,
255: x_msg_data OUT VARCHAR2 ,
256: p_APPLICATION_ID IN NUMBER,
257: p_MASTER_ORGANIZATION_ID IN NUMBER,
258: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
259: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
260: p_SERVICE_TYPE_CODE IN VARCHAR2,
261: p_SERVICE_VERSION IN VARCHAR2 default null,
262: p_SERVICE_HANDLER IN VARCHAR2,
255: x_msg_data OUT VARCHAR2 ,
256: p_APPLICATION_ID IN NUMBER,
257: p_MASTER_ORGANIZATION_ID IN NUMBER,
258: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
259: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
260: p_SERVICE_TYPE_CODE IN VARCHAR2,
261: p_SERVICE_VERSION IN VARCHAR2 default null,
262: p_SERVICE_HANDLER IN VARCHAR2,
263: p_SERVICE_DEFAULT_THRESHOLD IN NUMBER,
281: --dbms_output.put_line('begin');
282: -- Standard Start of API savepoint
283: SAVEPOINT WSH_CC_SERVICE_SETUPS_PKG;
284: -- Standard call to check for call compatibility.
285: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
286: p_api_version ,
287: l_api_name ,
288: G_PKG_NAME )
289: THEN
288: G_PKG_NAME )
289: THEN
290: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
291: FND_MSG_PUB.ADD;
292: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
293: END IF;
294: -- Initialize message list if p_init_msg_list is set to TRUE.
295: IF FND_API.to_Boolean( p_init_msg_list ) THEN
296: FND_MSG_PUB.initialize;
291: FND_MSG_PUB.ADD;
292: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
293: END IF;
294: -- Initialize message list if p_init_msg_list is set to TRUE.
295: IF FND_API.to_Boolean( p_init_msg_list ) THEN
296: FND_MSG_PUB.initialize;
297: END IF;
298: -- Initialize API return status to success
299: x_return_status := FND_API.G_RET_STS_SUCCESS;
295: IF FND_API.to_Boolean( p_init_msg_list ) THEN
296: FND_MSG_PUB.initialize;
297: END IF;
298: -- Initialize API return status to success
299: x_return_status := FND_API.G_RET_STS_SUCCESS;
300:
301: -- Update a row into wsh_cc_users entity with all detail information
302: -- for the given cc seq id
303:
304: update wsh_cc_service_setups
305: SET
306: MASTER_ORGANIZATION_ID = p_MASTER_ORGANIZATION_ID
307: ,APPLICATION_ID = p_APPLICATION_ID
308: ,ORGANIZATION_ID = decode(p_ORGANIZATION_ID,fnd_api.g_miss_num,
309: ORGANIZATION_ID,p_ORGANIZATION_ID)
310: ,APPLICATION_USER_ID = decode(p_APPLICATION_USER_ID,fnd_api.g_miss_num,
311: APPLICATION_USER_ID,p_APPLICATION_USER_ID)
312: ,SERVICE_TYPE_CODE = p_SERVICE_TYPE_CODE
306: MASTER_ORGANIZATION_ID = p_MASTER_ORGANIZATION_ID
307: ,APPLICATION_ID = p_APPLICATION_ID
308: ,ORGANIZATION_ID = decode(p_ORGANIZATION_ID,fnd_api.g_miss_num,
309: ORGANIZATION_ID,p_ORGANIZATION_ID)
310: ,APPLICATION_USER_ID = decode(p_APPLICATION_USER_ID,fnd_api.g_miss_num,
311: APPLICATION_USER_ID,p_APPLICATION_USER_ID)
312: ,SERVICE_TYPE_CODE = p_SERVICE_TYPE_CODE
313: ,SERVICE_VERSION = p_SERVICE_VERSION
314: ,SERVICE_HANDLER = p_SERVICE_HANDLER
330: where cc_service_sequence_id = p_cc_service_sequence_id ;
331: IF SQL%NOTFOUND THEN
332: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
333: FND_MSG_PUB.ADD;
334: x_return_status := FND_API.G_RET_STS_ERROR;
335: RAISE FND_API.G_EXC_ERROR ;
336: END IF;
337: --dbms_output.put_line('begin-5');
338: x_return_status := fnd_api.g_ret_sts_success;
331: IF SQL%NOTFOUND THEN
332: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
333: FND_MSG_PUB.ADD;
334: x_return_status := FND_API.G_RET_STS_ERROR;
335: RAISE FND_API.G_EXC_ERROR ;
336: END IF;
337: --dbms_output.put_line('begin-5');
338: x_return_status := fnd_api.g_ret_sts_success;
339:
334: x_return_status := FND_API.G_RET_STS_ERROR;
335: RAISE FND_API.G_EXC_ERROR ;
336: END IF;
337: --dbms_output.put_line('begin-5');
338: x_return_status := fnd_api.g_ret_sts_success;
339:
340: -- End of API body
341: -- Standard check of p_commit.
342: IF FND_API.To_Boolean( p_commit ) THEN
338: x_return_status := fnd_api.g_ret_sts_success;
339:
340: -- End of API body
341: -- Standard check of p_commit.
342: IF FND_API.To_Boolean( p_commit ) THEN
343: COMMIT WORK;
344: END IF;
345: -- Standard call to get message count and if count is 1,
346: -- get message info.
349: p_data => x_msg_data
350: );
351:
352: EXCEPTION
353: WHEN FND_API.G_EXC_ERROR THEN
354: --dbms_output.put_line(sqlerrm);
355: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
356: x_return_status := FND_API.G_RET_STS_ERROR;
357: FND_MSG_PUB.Count_And_Get
352: EXCEPTION
353: WHEN FND_API.G_EXC_ERROR THEN
354: --dbms_output.put_line(sqlerrm);
355: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
356: x_return_status := FND_API.G_RET_STS_ERROR;
357: FND_MSG_PUB.Count_And_Get
358: ( p_count => x_msg_count,
359: p_data => x_msg_data
360: );
357: FND_MSG_PUB.Count_And_Get
358: ( p_count => x_msg_count,
359: p_data => x_msg_data
360: );
361: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
362: --dbms_output.put_line(sqlerrm);
363: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
364: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
365: FND_MSG_PUB.Count_And_Get
360: );
361: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
362: --dbms_output.put_line(sqlerrm);
363: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
364: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
365: FND_MSG_PUB.Count_And_Get
366: ( p_count => x_msg_count,
367: p_data => x_msg_data
368: );
394: --
395: -- Input Parameters
396: -- p_api_version
397: -- API version number (current version is 1.0)
398: -- p_init_msg_list (optional, default FND_API.G_FALSE)
399: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
400: -- if set to FND_API.G_TRUE
401: -- initialize error message list
402: -- if set to FND_API.G_FALSE - not initialize error
395: -- Input Parameters
396: -- p_api_version
397: -- API version number (current version is 1.0)
398: -- p_init_msg_list (optional, default FND_API.G_FALSE)
399: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
400: -- if set to FND_API.G_TRUE
401: -- initialize error message list
402: -- if set to FND_API.G_FALSE - not initialize error
403: -- message list
396: -- p_api_version
397: -- API version number (current version is 1.0)
398: -- p_init_msg_list (optional, default FND_API.G_FALSE)
399: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
400: -- if set to FND_API.G_TRUE
401: -- initialize error message list
402: -- if set to FND_API.G_FALSE - not initialize error
403: -- message list
404: -- p_commit (optional, default FND_API.G_FALSE)
398: -- p_init_msg_list (optional, default FND_API.G_FALSE)
399: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
400: -- if set to FND_API.G_TRUE
401: -- initialize error message list
402: -- if set to FND_API.G_FALSE - not initialize error
403: -- message list
404: -- p_commit (optional, default FND_API.G_FALSE)
405: -- whether or not to commit the changes to database
406: --
400: -- if set to FND_API.G_TRUE
401: -- initialize error message list
402: -- if set to FND_API.G_FALSE - not initialize error
403: -- message list
404: -- p_commit (optional, default FND_API.G_FALSE)
405: -- whether or not to commit the changes to database
406: --
407: -- Input parameters for clear cross users informations
408: -- p_CC_SERVICE_SEQUENCE_ID -- CC Service Seq Id
410: --
411: -- Output Parameters
412: -- x_return_status
413: -- if the process succeeds, the value is
414: -- fnd_api.g_ret_sts_success;
415: -- if there is an expected error, the value is
416: -- fnd_api.g_ret_sts_error;
417: -- if there is an unexpected error, the value is
418: -- fnd_api.g_ret_sts_unexp_error;
412: -- x_return_status
413: -- if the process succeeds, the value is
414: -- fnd_api.g_ret_sts_success;
415: -- if there is an expected error, the value is
416: -- fnd_api.g_ret_sts_error;
417: -- if there is an unexpected error, the value is
418: -- fnd_api.g_ret_sts_unexp_error;
419: -- x_msg_count
420: -- if there is one or more errors, the number of error messages
414: -- fnd_api.g_ret_sts_success;
415: -- if there is an expected error, the value is
416: -- fnd_api.g_ret_sts_error;
417: -- if there is an unexpected error, the value is
418: -- fnd_api.g_ret_sts_unexp_error;
419: -- x_msg_count
420: -- if there is one or more errors, the number of error messages
421: -- in the buffer
422: -- x_msg_data
420: -- if there is one or more errors, the number of error messages
421: -- in the buffer
422: -- x_msg_data
423: -- if there is one and only one error, the error message
424: -- (See fnd_api package for more details about the above output parameters)
425:
426: --*/
427: PROCEDURE Delete_Row
428: (
426: --*/
427: PROCEDURE Delete_Row
428: (
429: p_api_version IN NUMBER ,
430: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
431: p_commit IN VARCHAR2 := fnd_api.g_false ,
432: x_return_status OUT VARCHAR2 ,
433: x_msg_count OUT NUMBER ,
434: x_msg_data OUT VARCHAR2 ,
427: PROCEDURE Delete_Row
428: (
429: p_api_version IN NUMBER ,
430: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
431: p_commit IN VARCHAR2 := fnd_api.g_false ,
432: x_return_status OUT VARCHAR2 ,
433: x_msg_count OUT NUMBER ,
434: x_msg_data OUT VARCHAR2 ,
435: p_CC_SERVICE_SEQUENCE_ID IN NUMBER
441: --dbms_output.put_line('begin');
442: -- Standard Start of API savepoint
443: SAVEPOINT WSH_CC_SERVICE_SETUPS_PKG;
444: -- Standard call to check for call compatibility.
445: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
446: p_api_version ,
447: l_api_name ,
448: G_PKG_NAME )
449: THEN
448: G_PKG_NAME )
449: THEN
450: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
451: FND_MSG_PUB.ADD;
452: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
453: END IF;
454: -- Initialize message list if p_init_msg_list is set to TRUE.
455: IF FND_API.to_Boolean( p_init_msg_list ) THEN
456: FND_MSG_PUB.initialize;
451: FND_MSG_PUB.ADD;
452: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
453: END IF;
454: -- Initialize message list if p_init_msg_list is set to TRUE.
455: IF FND_API.to_Boolean( p_init_msg_list ) THEN
456: FND_MSG_PUB.initialize;
457: END IF;
458: -- Initialize API return status to success
459: x_return_status := FND_API.G_RET_STS_SUCCESS;
455: IF FND_API.to_Boolean( p_init_msg_list ) THEN
456: FND_MSG_PUB.initialize;
457: END IF;
458: -- Initialize API return status to success
459: x_return_status := FND_API.G_RET_STS_SUCCESS;
460:
461: -- Delete a row from wsh_cc_service_setups entity
462: -- for the given service seq id
463:
465: WHERE cc_service_sequence_id = p_cc_service_sequence_id ;
466: IF SQL%NOTFOUND THEN
467: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
468: FND_MSG_PUB.ADD;
469: x_return_status := FND_API.G_RET_STS_ERROR;
470: RAISE FND_API.G_EXC_ERROR ;
471: END IF;
472: --dbms_output.put_line('begin-5');
473: x_return_status := fnd_api.g_ret_sts_success;
466: IF SQL%NOTFOUND THEN
467: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
468: FND_MSG_PUB.ADD;
469: x_return_status := FND_API.G_RET_STS_ERROR;
470: RAISE FND_API.G_EXC_ERROR ;
471: END IF;
472: --dbms_output.put_line('begin-5');
473: x_return_status := fnd_api.g_ret_sts_success;
474:
469: x_return_status := FND_API.G_RET_STS_ERROR;
470: RAISE FND_API.G_EXC_ERROR ;
471: END IF;
472: --dbms_output.put_line('begin-5');
473: x_return_status := fnd_api.g_ret_sts_success;
474:
475: -- End of API body
476: -- Standard check of p_commit.
477: IF FND_API.To_Boolean( p_commit ) THEN
473: x_return_status := fnd_api.g_ret_sts_success;
474:
475: -- End of API body
476: -- Standard check of p_commit.
477: IF FND_API.To_Boolean( p_commit ) THEN
478: COMMIT WORK;
479: END IF;
480: -- Standard call to get message count and if count is 1,
481: -- get message info.
484: p_data => x_msg_data
485: );
486:
487: EXCEPTION
488: WHEN FND_API.G_EXC_ERROR THEN
489: --dbms_output.put_line(sqlerrm);
490: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
491: x_return_status := FND_API.G_RET_STS_ERROR;
492: FND_MSG_PUB.Count_And_Get
487: EXCEPTION
488: WHEN FND_API.G_EXC_ERROR THEN
489: --dbms_output.put_line(sqlerrm);
490: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
491: x_return_status := FND_API.G_RET_STS_ERROR;
492: FND_MSG_PUB.Count_And_Get
493: ( p_count => x_msg_count,
494: p_data => x_msg_data
495: );
492: FND_MSG_PUB.Count_And_Get
493: ( p_count => x_msg_count,
494: p_data => x_msg_data
495: );
496: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
497: --dbms_output.put_line(sqlerrm);
498: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
499: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
500: FND_MSG_PUB.Count_And_Get
495: );
496: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
497: --dbms_output.put_line(sqlerrm);
498: ROLLBACK TO WSH_CC_SERVICE_SETUPS_PKG;
499: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
500: FND_MSG_PUB.Count_And_Get
501: ( p_count => x_msg_count,
502: p_data => x_msg_data
503: );
530: --
531: -- Input Parameters
532: -- p_api_version
533: -- API version number (current version is 1.0)
534: -- p_init_msg_list (optional, default FND_API.G_FALSE)
535: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
536: -- if set to FND_API.G_TRUE
537: -- initialize error message list
538: -- if set to FND_API.G_FALSE - not initialize error
531: -- Input Parameters
532: -- p_api_version
533: -- API version number (current version is 1.0)
534: -- p_init_msg_list (optional, default FND_API.G_FALSE)
535: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
536: -- if set to FND_API.G_TRUE
537: -- initialize error message list
538: -- if set to FND_API.G_FALSE - not initialize error
539: -- message list
532: -- p_api_version
533: -- API version number (current version is 1.0)
534: -- p_init_msg_list (optional, default FND_API.G_FALSE)
535: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
536: -- if set to FND_API.G_TRUE
537: -- initialize error message list
538: -- if set to FND_API.G_FALSE - not initialize error
539: -- message list
540: -- p_commit (optional, default FND_API.G_FALSE)
534: -- p_init_msg_list (optional, default FND_API.G_FALSE)
535: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
536: -- if set to FND_API.G_TRUE
537: -- initialize error message list
538: -- if set to FND_API.G_FALSE - not initialize error
539: -- message list
540: -- p_commit (optional, default FND_API.G_FALSE)
541: -- whether or not to commit the changes to database
542: --
536: -- if set to FND_API.G_TRUE
537: -- initialize error message list
538: -- if set to FND_API.G_FALSE - not initialize error
539: -- message list
540: -- p_commit (optional, default FND_API.G_FALSE)
541: -- whether or not to commit the changes to database
542: --
543: -- Input parameters for clear cross service setups informations
544: --
544: --
545: -- Output Parameters
546: -- x_return_status
547: -- if the process succeeds, the value is
548: -- fnd_api.g_ret_sts_success;
549: -- if there is an expected error, the value is
550: -- fnd_api.g_ret_sts_error;
551: -- if there is an unexpected error, the value is
552: -- fnd_api.g_ret_sts_unexp_error;
546: -- x_return_status
547: -- if the process succeeds, the value is
548: -- fnd_api.g_ret_sts_success;
549: -- if there is an expected error, the value is
550: -- fnd_api.g_ret_sts_error;
551: -- if there is an unexpected error, the value is
552: -- fnd_api.g_ret_sts_unexp_error;
553: -- x_msg_count
554: -- if there is one or more errors, the number of error messages
548: -- fnd_api.g_ret_sts_success;
549: -- if there is an expected error, the value is
550: -- fnd_api.g_ret_sts_error;
551: -- if there is an unexpected error, the value is
552: -- fnd_api.g_ret_sts_unexp_error;
553: -- x_msg_count
554: -- if there is one or more errors, the number of error messages
555: -- in the buffer
556: -- x_msg_data
554: -- if there is one or more errors, the number of error messages
555: -- in the buffer
556: -- x_msg_data
557: -- if there is one and only one error, the error message
558: -- (See fnd_api package for more details about the above output parameters)
559:
560: --*/
561: PROCEDURE Lock_Row
562: (
560: --*/
561: PROCEDURE Lock_Row
562: (
563: p_api_version IN NUMBER ,
564: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
565: p_commit IN VARCHAR2 := fnd_api.g_false ,
566: x_return_status OUT VARCHAR2 ,
567: x_msg_count OUT NUMBER ,
568: x_msg_data OUT VARCHAR2 ,
561: PROCEDURE Lock_Row
562: (
563: p_api_version IN NUMBER ,
564: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
565: p_commit IN VARCHAR2 := fnd_api.g_false ,
566: x_return_status OUT VARCHAR2 ,
567: x_msg_count OUT NUMBER ,
568: x_msg_data OUT VARCHAR2 ,
569: p_APPLICATION_ID IN NUMBER,
567: x_msg_count OUT NUMBER ,
568: x_msg_data OUT VARCHAR2 ,
569: p_APPLICATION_ID IN NUMBER,
570: p_MASTER_ORGANIZATION_ID IN NUMBER,
571: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
572: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
573: p_SERVICE_TYPE_CODE IN VARCHAR2,
574: p_SERVICE_VERSION IN VARCHAR2 default null,
575: p_SERVICE_HANDLER IN VARCHAR2,
568: x_msg_data OUT VARCHAR2 ,
569: p_APPLICATION_ID IN NUMBER,
570: p_MASTER_ORGANIZATION_ID IN NUMBER,
571: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
572: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
573: p_SERVICE_TYPE_CODE IN VARCHAR2,
574: p_SERVICE_VERSION IN VARCHAR2 default null,
575: p_SERVICE_HANDLER IN VARCHAR2,
576: p_SERVICE_DEFAULT_THRESHOLD IN NUMBER,
603: --dbms_output.put_line('begin');
604: -- Standard Start of API savepoint
605: SAVEPOINT WSH_CC_SERVICE_SETUPS_PKG;
606: -- Standard call to check for call compatibility.
607: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
608: p_api_version ,
609: l_api_name ,
610: G_PKG_NAME )
611: THEN
610: G_PKG_NAME )
611: THEN
612: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
613: FND_MSG_PUB.ADD;
614: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
615: END IF;
616: -- Initialize message list if p_init_msg_list is set to TRUE.
617: IF FND_API.to_Boolean( p_init_msg_list ) THEN
618: FND_MSG_PUB.initialize;
613: FND_MSG_PUB.ADD;
614: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
615: END IF;
616: -- Initialize message list if p_init_msg_list is set to TRUE.
617: IF FND_API.to_Boolean( p_init_msg_list ) THEN
618: FND_MSG_PUB.initialize;
619: END IF;
620: -- Initialize API return status to success
621: x_return_status := FND_API.G_RET_STS_SUCCESS;
617: IF FND_API.to_Boolean( p_init_msg_list ) THEN
618: FND_MSG_PUB.initialize;
619: END IF;
620: -- Initialize API return status to success
621: x_return_status := FND_API.G_RET_STS_SUCCESS;
622:
623: -- Check Lock a row of wsh_cc_service_setups
624: OPEN lock_row;
625: FETCH lock_row into Recinfo;
690: AND ((Recinfo.wf_activity =p_wf_activity) OR
691: ( (Recinfo.wf_activity is null)
692: AND (p_wf_activity is null )))
693: ) THEN
694: x_return_status := FND_API.G_RET_STS_SUCCESS;
695: ELSE
696: x_return_status := FND_API.G_RET_STS_ERROR;
697: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
698: app_exception.raise_exception;
692: AND (p_wf_activity is null )))
693: ) THEN
694: x_return_status := FND_API.G_RET_STS_SUCCESS;
695: ELSE
696: x_return_status := FND_API.G_RET_STS_ERROR;
697: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
698: app_exception.raise_exception;
699: END IF;
700: EXCEPTION