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 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_REQUEST_SEQUENCE_ID - Clear Cross Request 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,
75: --dbms_output.put_line('begin api');
76: -- Standard Start of API savepoint
77: SAVEPOINT WSH_CC_REQUEST_SETUPS_PKG;
78: -- Standard call to check for call compatibility.
79: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
80: p_api_version ,
81: l_api_name ,
82: G_PKG_NAME )
83: THEN
82: G_PKG_NAME )
83: THEN
84: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
85: FND_MSG_PUB.ADD;
86: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
87: END IF;
88: -- Initialize message list if p_init_msg_list is set to TRUE.
89: IF FND_API.to_Boolean( p_init_msg_list ) THEN
90: FND_MSG_PUB.initialize;
85: FND_MSG_PUB.ADD;
86: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
87: END IF;
88: -- Initialize message list if p_init_msg_list is set to TRUE.
89: IF FND_API.to_Boolean( p_init_msg_list ) THEN
90: FND_MSG_PUB.initialize;
91: END IF;
92: -- Initialize API return status to success
93: x_return_status := FND_API.G_RET_STS_SUCCESS;
89: IF FND_API.to_Boolean( p_init_msg_list ) THEN
90: FND_MSG_PUB.initialize;
91: END IF;
92: -- Initialize API return status to success
93: x_return_status := FND_API.G_RET_STS_SUCCESS;
94: --dbms_output.put_line('begin api-2');
95:
96: select wsh_cc_request_setups_s.nextval into l_CC_Request_Sequence_ID from dual;
97: /* Validate input parameters if any */
147: ) ;
148: IF SQL%NOTFOUND THEN
149: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
150: FND_MSG_PUB.ADD;
151: x_return_status := FND_API.G_RET_STS_ERROR;
152: RAISE FND_API.G_EXC_ERROR ;
153: END IF;
154: --dbms_output.put_line('Seq Id got it '||l_CC_REQUEST_SEQUENCE_ID||'success');
155: x_return_status := fnd_api.g_ret_sts_success;
148: IF SQL%NOTFOUND THEN
149: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
150: FND_MSG_PUB.ADD;
151: x_return_status := FND_API.G_RET_STS_ERROR;
152: RAISE FND_API.G_EXC_ERROR ;
153: END IF;
154: --dbms_output.put_line('Seq Id got it '||l_CC_REQUEST_SEQUENCE_ID||'success');
155: x_return_status := fnd_api.g_ret_sts_success;
156: p_CC_REQUEST_SEQUENCE_ID := l_CC_REQUEST_SEQUENCE_ID;
151: x_return_status := FND_API.G_RET_STS_ERROR;
152: RAISE FND_API.G_EXC_ERROR ;
153: END IF;
154: --dbms_output.put_line('Seq Id got it '||l_CC_REQUEST_SEQUENCE_ID||'success');
155: x_return_status := fnd_api.g_ret_sts_success;
156: p_CC_REQUEST_SEQUENCE_ID := l_CC_REQUEST_SEQUENCE_ID;
157: -- End of API body
158: -- Standard check of p_commit.
159: IF FND_API.To_Boolean( p_commit ) THEN
155: x_return_status := fnd_api.g_ret_sts_success;
156: p_CC_REQUEST_SEQUENCE_ID := l_CC_REQUEST_SEQUENCE_ID;
157: -- End of API body
158: -- Standard check of p_commit.
159: IF FND_API.To_Boolean( p_commit ) THEN
160: COMMIT WORK;
161: END IF;
162: -- Standard call to get message count and if count is 1,
163: -- get message info.
166: p_data => x_msg_data
167: );
168:
169: EXCEPTION
170: WHEN FND_API.G_EXC_ERROR THEN
171: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
172: x_return_status := FND_API.G_RET_STS_ERROR;
173: FND_MSG_PUB.Count_And_Get
174: ( p_count => x_msg_count,
168:
169: EXCEPTION
170: WHEN FND_API.G_EXC_ERROR THEN
171: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
172: x_return_status := FND_API.G_RET_STS_ERROR;
173: FND_MSG_PUB.Count_And_Get
174: ( p_count => x_msg_count,
175: p_data => x_msg_data
176: );
173: FND_MSG_PUB.Count_And_Get
174: ( p_count => x_msg_count,
175: p_data => x_msg_data
176: );
177: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
178: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
179: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
180: FND_MSG_PUB.Count_And_Get
181: ( p_count => x_msg_count,
175: p_data => x_msg_data
176: );
177: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
178: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
179: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
180: FND_MSG_PUB.Count_And_Get
181: ( p_count => x_msg_count,
182: p_data => x_msg_data
183: );
182: p_data => x_msg_data
183: );
184: WHEN OTHERS THEN
185: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
186: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
187: IF FND_MSG_PUB.Check_Msg_Level
188: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
189: THEN
190: FND_MSG_PUB.Add_Exc_Msg
207: --
208: -- Input Parameters
209: -- p_api_version
210: -- API version number (current version is 1.0)
211: -- p_init_msg_list (optional, default FND_API.G_FALSE)
212: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
213: -- if set to FND_API.G_TRUE
214: -- initialize error message list
215: -- if set to FND_API.G_FALSE - not initialize error
208: -- Input Parameters
209: -- p_api_version
210: -- API version number (current version is 1.0)
211: -- p_init_msg_list (optional, default FND_API.G_FALSE)
212: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
213: -- if set to FND_API.G_TRUE
214: -- initialize error message list
215: -- if set to FND_API.G_FALSE - not initialize error
216: -- message list
209: -- p_api_version
210: -- API version number (current version is 1.0)
211: -- p_init_msg_list (optional, default FND_API.G_FALSE)
212: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
213: -- if set to FND_API.G_TRUE
214: -- initialize error message list
215: -- if set to FND_API.G_FALSE - not initialize error
216: -- message list
217: -- p_commit (optional, default FND_API.G_FALSE)
211: -- p_init_msg_list (optional, default FND_API.G_FALSE)
212: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
213: -- if set to FND_API.G_TRUE
214: -- initialize error message list
215: -- if set to FND_API.G_FALSE - not initialize error
216: -- message list
217: -- p_commit (optional, default FND_API.G_FALSE)
218: -- whether or not to commit the changes to database
219: --
213: -- if set to FND_API.G_TRUE
214: -- initialize error message list
215: -- if set to FND_API.G_FALSE - not initialize error
216: -- message list
217: -- p_commit (optional, default FND_API.G_FALSE)
218: -- whether or not to commit the changes to database
219: --
220: -- Input parameters for clear cross request setups informations
221: --
222: --
223: -- Output Parameters
224: -- x_return_status
225: -- if the process succeeds, the value is
226: -- fnd_api.g_ret_sts_success;
227: -- if there is an expected error, the value is
228: -- fnd_api.g_ret_sts_error;
229: -- if there is an unexpected error, the value is
230: -- fnd_api.g_ret_sts_unexp_error;
224: -- x_return_status
225: -- if the process succeeds, the value is
226: -- fnd_api.g_ret_sts_success;
227: -- if there is an expected error, the value is
228: -- fnd_api.g_ret_sts_error;
229: -- if there is an unexpected error, the value is
230: -- fnd_api.g_ret_sts_unexp_error;
231: -- x_msg_count
232: -- if there is one or more errors, the number of error messages
226: -- fnd_api.g_ret_sts_success;
227: -- if there is an expected error, the value is
228: -- fnd_api.g_ret_sts_error;
229: -- if there is an unexpected error, the value is
230: -- fnd_api.g_ret_sts_unexp_error;
231: -- x_msg_count
232: -- if there is one or more errors, the number of error messages
233: -- in the buffer
234: -- x_msg_data
232: -- if there is one or more errors, the number of error messages
233: -- in the buffer
234: -- x_msg_data
235: -- if there is one and only one error, the error message
236: -- (See fnd_api package for more details about the above output parameters)
237:
238: --*/
239: PROCEDURE Update_Row
240: (
238: --*/
239: PROCEDURE Update_Row
240: (
241: p_api_version IN NUMBER ,
242: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
243: p_commit IN VARCHAR2 := fnd_api.g_false ,
244: x_return_status OUT VARCHAR2 ,
245: x_msg_count OUT NUMBER ,
246: x_msg_data OUT VARCHAR2 ,
239: PROCEDURE Update_Row
240: (
241: p_api_version IN NUMBER ,
242: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
243: p_commit IN VARCHAR2 := fnd_api.g_false ,
244: x_return_status OUT VARCHAR2 ,
245: x_msg_count OUT NUMBER ,
246: x_msg_data OUT VARCHAR2 ,
247: p_APPLICATION_ID IN NUMBER,
245: x_msg_count OUT NUMBER ,
246: x_msg_data OUT VARCHAR2 ,
247: p_APPLICATION_ID IN NUMBER,
248: p_MASTER_ORGANIZATION_ID IN NUMBER,
249: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
250: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
251: p_REQUEST_TYPE_CODE IN VARCHAR2,
252: p_REQUEST_VERSION IN VARCHAR2,
253: p_REQUEST_LANGUAGE IN VARCHAR2,
246: x_msg_data OUT VARCHAR2 ,
247: p_APPLICATION_ID IN NUMBER,
248: p_MASTER_ORGANIZATION_ID IN NUMBER,
249: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
250: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
251: p_REQUEST_TYPE_CODE IN VARCHAR2,
252: p_REQUEST_VERSION IN VARCHAR2,
253: p_REQUEST_LANGUAGE IN VARCHAR2,
254: p_REQUEST_DATE_FORMAT IN VARCHAR2,
269: --dbms_output.put_line('begin');
270: -- Standard Start of API savepoint
271: SAVEPOINT WSH_CC_REQUEST_SETUPS_PKG;
272: -- Standard call to check for call compatibility.
273: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
274: p_api_version ,
275: l_api_name ,
276: G_PKG_NAME )
277: THEN
276: G_PKG_NAME )
277: THEN
278: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
279: FND_MSG_PUB.ADD;
280: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
281: END IF;
282: -- Initialize message list if p_init_msg_list is set to TRUE.
283: IF FND_API.to_Boolean( p_init_msg_list ) THEN
284: FND_MSG_PUB.initialize;
279: FND_MSG_PUB.ADD;
280: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
281: END IF;
282: -- Initialize message list if p_init_msg_list is set to TRUE.
283: IF FND_API.to_Boolean( p_init_msg_list ) THEN
284: FND_MSG_PUB.initialize;
285: END IF;
286: -- Initialize API return status to success
287: x_return_status := FND_API.G_RET_STS_SUCCESS;
283: IF FND_API.to_Boolean( p_init_msg_list ) THEN
284: FND_MSG_PUB.initialize;
285: END IF;
286: -- Initialize API return status to success
287: x_return_status := FND_API.G_RET_STS_SUCCESS;
288:
289: -- Update a row into wsh_cc_users entity with all detail information
290: -- for the given cc seq id
291:
292: update wsh_cc_request_setups
293: SET
294: MASTER_ORGANIZATION_ID = p_MASTER_ORGANIZATION_ID
295: ,APPLICATION_ID = p_APPLICATION_ID
296: ,ORGANIZATION_ID = decode(p_ORGANIZATION_ID,fnd_api.g_miss_num,
297: ORGANIZATION_ID,p_ORGANIZATION_ID)
298: ,APPLICATION_USER_ID = decode(p_APPLICATION_USER_ID,fnd_api.g_miss_num,
299: APPLICATION_USER_ID,p_APPLICATION_USER_ID)
300: ,REQUEST_TYPE_CODE = p_REQUEST_TYPE_CODE
294: MASTER_ORGANIZATION_ID = p_MASTER_ORGANIZATION_ID
295: ,APPLICATION_ID = p_APPLICATION_ID
296: ,ORGANIZATION_ID = decode(p_ORGANIZATION_ID,fnd_api.g_miss_num,
297: ORGANIZATION_ID,p_ORGANIZATION_ID)
298: ,APPLICATION_USER_ID = decode(p_APPLICATION_USER_ID,fnd_api.g_miss_num,
299: APPLICATION_USER_ID,p_APPLICATION_USER_ID)
300: ,REQUEST_TYPE_CODE = p_REQUEST_TYPE_CODE
301: ,REQUEST_VERSION = p_REQUEST_VERSION
302: ,REQUEST_LANGUAGE = p_REQUEST_LANGUAGE
315: where cc_request_sequence_id = p_cc_request_sequence_id ;
316: IF SQL%NOTFOUND THEN
317: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
318: FND_MSG_PUB.ADD;
319: x_return_status := FND_API.G_RET_STS_ERROR;
320: RAISE FND_API.G_EXC_ERROR ;
321: END IF;
322: --dbms_output.put_line('begin-5');
323: x_return_status := fnd_api.g_ret_sts_success;
316: IF SQL%NOTFOUND THEN
317: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
318: FND_MSG_PUB.ADD;
319: x_return_status := FND_API.G_RET_STS_ERROR;
320: RAISE FND_API.G_EXC_ERROR ;
321: END IF;
322: --dbms_output.put_line('begin-5');
323: x_return_status := fnd_api.g_ret_sts_success;
324:
319: x_return_status := FND_API.G_RET_STS_ERROR;
320: RAISE FND_API.G_EXC_ERROR ;
321: END IF;
322: --dbms_output.put_line('begin-5');
323: x_return_status := fnd_api.g_ret_sts_success;
324:
325: -- End of API body
326: -- Standard check of p_commit.
327: IF FND_API.To_Boolean( p_commit ) THEN
323: x_return_status := fnd_api.g_ret_sts_success;
324:
325: -- End of API body
326: -- Standard check of p_commit.
327: IF FND_API.To_Boolean( p_commit ) THEN
328: COMMIT WORK;
329: END IF;
330: -- Standard call to get message count and if count is 1,
331: -- get message info.
334: p_data => x_msg_data
335: );
336:
337: EXCEPTION
338: WHEN FND_API.G_EXC_ERROR THEN
339: --dbms_output.put_line(sqlerrm);
340: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
341: x_return_status := FND_API.G_RET_STS_ERROR;
342: FND_MSG_PUB.Count_And_Get
337: EXCEPTION
338: WHEN FND_API.G_EXC_ERROR THEN
339: --dbms_output.put_line(sqlerrm);
340: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
341: x_return_status := FND_API.G_RET_STS_ERROR;
342: FND_MSG_PUB.Count_And_Get
343: ( p_count => x_msg_count,
344: p_data => x_msg_data
345: );
342: FND_MSG_PUB.Count_And_Get
343: ( p_count => x_msg_count,
344: p_data => x_msg_data
345: );
346: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
347: --dbms_output.put_line(sqlerrm);
348: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
349: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
350: FND_MSG_PUB.Count_And_Get
345: );
346: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
347: --dbms_output.put_line(sqlerrm);
348: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
349: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
350: FND_MSG_PUB.Count_And_Get
351: ( p_count => x_msg_count,
352: p_data => x_msg_data
353: );
379: --
380: -- Input Parameters
381: -- p_api_version
382: -- API version number (current version is 1.0)
383: -- p_init_msg_list (optional, default FND_API.G_FALSE)
384: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
385: -- if set to FND_API.G_TRUE
386: -- initialize error message list
387: -- if set to FND_API.G_FALSE - not initialize error
380: -- Input Parameters
381: -- p_api_version
382: -- API version number (current version is 1.0)
383: -- p_init_msg_list (optional, default FND_API.G_FALSE)
384: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
385: -- if set to FND_API.G_TRUE
386: -- initialize error message list
387: -- if set to FND_API.G_FALSE - not initialize error
388: -- message list
381: -- p_api_version
382: -- API version number (current version is 1.0)
383: -- p_init_msg_list (optional, default FND_API.G_FALSE)
384: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
385: -- if set to FND_API.G_TRUE
386: -- initialize error message list
387: -- if set to FND_API.G_FALSE - not initialize error
388: -- message list
389: -- p_commit (optional, default FND_API.G_FALSE)
383: -- p_init_msg_list (optional, default FND_API.G_FALSE)
384: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
385: -- if set to FND_API.G_TRUE
386: -- initialize error message list
387: -- if set to FND_API.G_FALSE - not initialize error
388: -- message list
389: -- p_commit (optional, default FND_API.G_FALSE)
390: -- whether or not to commit the changes to database
391: --
385: -- if set to FND_API.G_TRUE
386: -- initialize error message list
387: -- if set to FND_API.G_FALSE - not initialize error
388: -- message list
389: -- p_commit (optional, default FND_API.G_FALSE)
390: -- whether or not to commit the changes to database
391: --
392: -- Input parameters for clear cross users informations
393: -- p_CC_REQUEST_SEQUENCE_ID -- CC Request Seq Id
395: --
396: -- Output Parameters
397: -- x_return_status
398: -- if the process succeeds, the value is
399: -- fnd_api.g_ret_sts_success;
400: -- if there is an expected error, the value is
401: -- fnd_api.g_ret_sts_error;
402: -- if there is an unexpected error, the value is
403: -- fnd_api.g_ret_sts_unexp_error;
397: -- x_return_status
398: -- if the process succeeds, the value is
399: -- fnd_api.g_ret_sts_success;
400: -- if there is an expected error, the value is
401: -- fnd_api.g_ret_sts_error;
402: -- if there is an unexpected error, the value is
403: -- fnd_api.g_ret_sts_unexp_error;
404: -- x_msg_count
405: -- if there is one or more errors, the number of error messages
399: -- fnd_api.g_ret_sts_success;
400: -- if there is an expected error, the value is
401: -- fnd_api.g_ret_sts_error;
402: -- if there is an unexpected error, the value is
403: -- fnd_api.g_ret_sts_unexp_error;
404: -- x_msg_count
405: -- if there is one or more errors, the number of error messages
406: -- in the buffer
407: -- x_msg_data
405: -- if there is one or more errors, the number of error messages
406: -- in the buffer
407: -- x_msg_data
408: -- if there is one and only one error, the error message
409: -- (See fnd_api package for more details about the above output parameters)
410:
411: --*/
412: PROCEDURE Delete_Row
413: (
411: --*/
412: PROCEDURE Delete_Row
413: (
414: p_api_version IN NUMBER ,
415: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
416: p_commit IN VARCHAR2 := fnd_api.g_false ,
417: x_return_status OUT VARCHAR2 ,
418: x_msg_count OUT NUMBER ,
419: x_msg_data OUT VARCHAR2 ,
412: PROCEDURE Delete_Row
413: (
414: p_api_version IN NUMBER ,
415: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
416: p_commit IN VARCHAR2 := fnd_api.g_false ,
417: x_return_status OUT VARCHAR2 ,
418: x_msg_count OUT NUMBER ,
419: x_msg_data OUT VARCHAR2 ,
420: p_CC_REQUEST_SEQUENCE_ID IN NUMBER
426: --dbms_output.put_line('begin');
427: -- Standard Start of API savepoint
428: SAVEPOINT WSH_CC_REQUEST_SETUPS_PKG;
429: -- Standard call to check for call compatibility.
430: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
431: p_api_version ,
432: l_api_name ,
433: G_PKG_NAME )
434: THEN
433: G_PKG_NAME )
434: THEN
435: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
436: FND_MSG_PUB.ADD;
437: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
438: END IF;
439: -- Initialize message list if p_init_msg_list is set to TRUE.
440: IF FND_API.to_Boolean( p_init_msg_list ) THEN
441: FND_MSG_PUB.initialize;
436: FND_MSG_PUB.ADD;
437: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
438: END IF;
439: -- Initialize message list if p_init_msg_list is set to TRUE.
440: IF FND_API.to_Boolean( p_init_msg_list ) THEN
441: FND_MSG_PUB.initialize;
442: END IF;
443: -- Initialize API return status to success
444: x_return_status := FND_API.G_RET_STS_SUCCESS;
440: IF FND_API.to_Boolean( p_init_msg_list ) THEN
441: FND_MSG_PUB.initialize;
442: END IF;
443: -- Initialize API return status to success
444: x_return_status := FND_API.G_RET_STS_SUCCESS;
445:
446: -- Delete a row from wsh_cc_request_setups entity
447: -- for the given request seq id
448:
450: WHERE cc_request_sequence_id = p_cc_request_sequence_id ;
451: IF SQL%NOTFOUND THEN
452: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
453: FND_MSG_PUB.ADD;
454: x_return_status := FND_API.G_RET_STS_ERROR;
455: RAISE FND_API.G_EXC_ERROR ;
456: END IF;
457: --dbms_output.put_line('begin-5');
458: x_return_status := fnd_api.g_ret_sts_success;
451: IF SQL%NOTFOUND THEN
452: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
453: FND_MSG_PUB.ADD;
454: x_return_status := FND_API.G_RET_STS_ERROR;
455: RAISE FND_API.G_EXC_ERROR ;
456: END IF;
457: --dbms_output.put_line('begin-5');
458: x_return_status := fnd_api.g_ret_sts_success;
459:
454: x_return_status := FND_API.G_RET_STS_ERROR;
455: RAISE FND_API.G_EXC_ERROR ;
456: END IF;
457: --dbms_output.put_line('begin-5');
458: x_return_status := fnd_api.g_ret_sts_success;
459:
460: -- End of API body
461: -- Standard check of p_commit.
462: IF FND_API.To_Boolean( p_commit ) THEN
458: x_return_status := fnd_api.g_ret_sts_success;
459:
460: -- End of API body
461: -- Standard check of p_commit.
462: IF FND_API.To_Boolean( p_commit ) THEN
463: COMMIT WORK;
464: END IF;
465: -- Standard call to get message count and if count is 1,
466: -- get message info.
469: p_data => x_msg_data
470: );
471:
472: EXCEPTION
473: WHEN FND_API.G_EXC_ERROR THEN
474: --dbms_output.put_line(sqlerrm);
475: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
476: x_return_status := FND_API.G_RET_STS_ERROR;
477: FND_MSG_PUB.Count_And_Get
472: EXCEPTION
473: WHEN FND_API.G_EXC_ERROR THEN
474: --dbms_output.put_line(sqlerrm);
475: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
476: x_return_status := FND_API.G_RET_STS_ERROR;
477: FND_MSG_PUB.Count_And_Get
478: ( p_count => x_msg_count,
479: p_data => x_msg_data
480: );
477: FND_MSG_PUB.Count_And_Get
478: ( p_count => x_msg_count,
479: p_data => x_msg_data
480: );
481: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
482: --dbms_output.put_line(sqlerrm);
483: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
485: FND_MSG_PUB.Count_And_Get
480: );
481: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
482: --dbms_output.put_line(sqlerrm);
483: ROLLBACK TO WSH_CC_REQUEST_SETUPS_PKG;
484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
485: FND_MSG_PUB.Count_And_Get
486: ( p_count => x_msg_count,
487: p_data => x_msg_data
488: );
515: --
516: -- Input Parameters
517: -- p_api_version
518: -- API version number (current version is 1.0)
519: -- p_init_msg_list (optional, default FND_API.G_FALSE)
520: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
521: -- if set to FND_API.G_TRUE
522: -- initialize error message list
523: -- if set to FND_API.G_FALSE - not initialize error
516: -- Input Parameters
517: -- p_api_version
518: -- API version number (current version is 1.0)
519: -- p_init_msg_list (optional, default FND_API.G_FALSE)
520: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
521: -- if set to FND_API.G_TRUE
522: -- initialize error message list
523: -- if set to FND_API.G_FALSE - not initialize error
524: -- message list
517: -- p_api_version
518: -- API version number (current version is 1.0)
519: -- p_init_msg_list (optional, default FND_API.G_FALSE)
520: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
521: -- if set to FND_API.G_TRUE
522: -- initialize error message list
523: -- if set to FND_API.G_FALSE - not initialize error
524: -- message list
525: -- p_commit (optional, default FND_API.G_FALSE)
519: -- p_init_msg_list (optional, default FND_API.G_FALSE)
520: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
521: -- if set to FND_API.G_TRUE
522: -- initialize error message list
523: -- if set to FND_API.G_FALSE - not initialize error
524: -- message list
525: -- p_commit (optional, default FND_API.G_FALSE)
526: -- whether or not to commit the changes to database
527: --
521: -- if set to FND_API.G_TRUE
522: -- initialize error message list
523: -- if set to FND_API.G_FALSE - not initialize error
524: -- message list
525: -- p_commit (optional, default FND_API.G_FALSE)
526: -- whether or not to commit the changes to database
527: --
528: -- Input parameters for clear cross request setups informations
529: --
529: --
530: -- Output Parameters
531: -- x_return_status
532: -- if the process succeeds, the value is
533: -- fnd_api.g_ret_sts_success;
534: -- if there is an expected error, the value is
535: -- fnd_api.g_ret_sts_error;
536: -- if there is an unexpected error, the value is
537: -- fnd_api.g_ret_sts_unexp_error;
531: -- x_return_status
532: -- if the process succeeds, the value is
533: -- fnd_api.g_ret_sts_success;
534: -- if there is an expected error, the value is
535: -- fnd_api.g_ret_sts_error;
536: -- if there is an unexpected error, the value is
537: -- fnd_api.g_ret_sts_unexp_error;
538: -- x_msg_count
539: -- if there is one or more errors, the number of error messages
533: -- fnd_api.g_ret_sts_success;
534: -- if there is an expected error, the value is
535: -- fnd_api.g_ret_sts_error;
536: -- if there is an unexpected error, the value is
537: -- fnd_api.g_ret_sts_unexp_error;
538: -- x_msg_count
539: -- if there is one or more errors, the number of error messages
540: -- in the buffer
541: -- x_msg_data
539: -- if there is one or more errors, the number of error messages
540: -- in the buffer
541: -- x_msg_data
542: -- if there is one and only one error, the error message
543: -- (See fnd_api package for more details about the above output parameters)
544:
545: --*/
546: PROCEDURE Lock_Row
547: (
545: --*/
546: PROCEDURE Lock_Row
547: (
548: p_api_version IN NUMBER ,
549: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
550: p_commit IN VARCHAR2 := fnd_api.g_false ,
551: x_return_status OUT VARCHAR2 ,
552: x_msg_count OUT NUMBER ,
553: x_msg_data OUT VARCHAR2 ,
546: PROCEDURE Lock_Row
547: (
548: p_api_version IN NUMBER ,
549: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
550: p_commit IN VARCHAR2 := fnd_api.g_false ,
551: x_return_status OUT VARCHAR2 ,
552: x_msg_count OUT NUMBER ,
553: x_msg_data OUT VARCHAR2 ,
554: p_APPLICATION_ID IN NUMBER,
552: x_msg_count OUT NUMBER ,
553: x_msg_data OUT VARCHAR2 ,
554: p_APPLICATION_ID IN NUMBER,
555: p_MASTER_ORGANIZATION_ID IN NUMBER,
556: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
557: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
558: p_REQUEST_TYPE_CODE IN VARCHAR2,
559: p_REQUEST_VERSION IN VARCHAR2,
560: p_REQUEST_LANGUAGE IN VARCHAR2,
553: x_msg_data OUT VARCHAR2 ,
554: p_APPLICATION_ID IN NUMBER,
555: p_MASTER_ORGANIZATION_ID IN NUMBER,
556: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
557: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
558: p_REQUEST_TYPE_CODE IN VARCHAR2,
559: p_REQUEST_VERSION IN VARCHAR2,
560: p_REQUEST_LANGUAGE IN VARCHAR2,
561: p_REQUEST_DATE_FORMAT IN VARCHAR2,
585: --dbms_output.put_line('begin');
586: -- Standard Start of API savepoint
587: SAVEPOINT WSH_CC_REQUEST_SETUPS_PKG;
588: -- Standard call to check for call compatibility.
589: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
590: p_api_version ,
591: l_api_name ,
592: G_PKG_NAME )
593: THEN
592: G_PKG_NAME )
593: THEN
594: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
595: FND_MSG_PUB.ADD;
596: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
597: END IF;
598: -- Initialize message list if p_init_msg_list is set to TRUE.
599: IF FND_API.to_Boolean( p_init_msg_list ) THEN
600: FND_MSG_PUB.initialize;
595: FND_MSG_PUB.ADD;
596: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
597: END IF;
598: -- Initialize message list if p_init_msg_list is set to TRUE.
599: IF FND_API.to_Boolean( p_init_msg_list ) THEN
600: FND_MSG_PUB.initialize;
601: END IF;
602: -- Initialize API return status to success
603: x_return_status := FND_API.G_RET_STS_SUCCESS;
599: IF FND_API.to_Boolean( p_init_msg_list ) THEN
600: FND_MSG_PUB.initialize;
601: END IF;
602: -- Initialize API return status to success
603: x_return_status := FND_API.G_RET_STS_SUCCESS;
604:
605: -- Check Lock a row of wsh_cc_request_setups
606: OPEN lock_row;
607: FETCH lock_row into Recinfo;
669: ( (Recinfo.application_id is null)
670: AND (p_application_id is null )))
671:
672: ) THEN
673: x_return_status := FND_API.G_RET_STS_SUCCESS;
674: ELSE
675: x_return_status := FND_API.G_RET_STS_ERROR;
676: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
677: app_exception.raise_exception;
671:
672: ) THEN
673: x_return_status := FND_API.G_RET_STS_SUCCESS;
674: ELSE
675: x_return_status := FND_API.G_RET_STS_ERROR;
676: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
677: app_exception.raise_exception;
678: END IF;
679: EXCEPTION