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 users informations
26: -- p_APPLICATION_ID --Application ID added.
32: --
33: -- Output Parameters
34: -- x_return_status
35: -- if the process succeeds, the value is
36: -- fnd_api.g_ret_sts_success;
37: -- if there is an expected error, the value is
38: -- fnd_api.g_ret_sts_error;
39: -- if there is an unexpected error, the value is
40: -- fnd_api.g_ret_sts_unexp_error;
34: -- x_return_status
35: -- if the process succeeds, the value is
36: -- fnd_api.g_ret_sts_success;
37: -- if there is an expected error, the value is
38: -- fnd_api.g_ret_sts_error;
39: -- if there is an unexpected error, the value is
40: -- fnd_api.g_ret_sts_unexp_error;
41: -- x_msg_count
42: -- if there is one or more errors, the number of error messages
36: -- fnd_api.g_ret_sts_success;
37: -- if there is an expected error, the value is
38: -- fnd_api.g_ret_sts_error;
39: -- if there is an unexpected error, the value is
40: -- fnd_api.g_ret_sts_unexp_error;
41: -- x_msg_count
42: -- if there is one or more errors, the number of error messages
43: -- in the buffer
44: -- x_msg_data
42: -- if there is one or more errors, the number of error messages
43: -- in the buffer
44: -- x_msg_data
45: -- if there is one and only one error, the error message
46: -- (See fnd_api package for more details about the above output parameters)
47: -- p_CC_USER_SEQUENCE_ID - Clear Cross sequence Id ( PK)
48: --*/
49:
50: PROCEDURE Insert_Row
49:
50: PROCEDURE Insert_Row
51: (
52: p_api_version IN NUMBER ,
53: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
54: p_commit IN VARCHAR2 := fnd_api.g_false ,
55: x_return_status OUT VARCHAR2 ,
56: x_msg_count OUT NUMBER ,
57: x_msg_data OUT VARCHAR2 ,
50: PROCEDURE Insert_Row
51: (
52: p_api_version IN NUMBER ,
53: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
54: p_commit IN VARCHAR2 := fnd_api.g_false ,
55: x_return_status OUT VARCHAR2 ,
56: x_msg_count OUT NUMBER ,
57: x_msg_data OUT VARCHAR2 ,
58: p_APPLICATION_ID IN NUMBER,
71: --dbms_output.put_line('begin api');
72: -- Standard Start of API savepoint
73: SAVEPOINT WSH_CC_USERS_PKG;
74: -- Standard call to check for call compatibility.
75: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
76: p_api_version ,
77: l_api_name ,
78: G_PKG_NAME )
79: THEN
78: G_PKG_NAME )
79: THEN
80: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
81: FND_MSG_PUB.ADD;
82: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
83: END IF;
84: -- Initialize message list if p_init_msg_list is set to TRUE.
85: IF FND_API.to_Boolean( p_init_msg_list ) THEN
86: FND_MSG_PUB.initialize;
81: FND_MSG_PUB.ADD;
82: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
83: END IF;
84: -- Initialize message list if p_init_msg_list is set to TRUE.
85: IF FND_API.to_Boolean( p_init_msg_list ) THEN
86: FND_MSG_PUB.initialize;
87: END IF;
88: -- Initialize API return status to success
89: x_return_status := FND_API.G_RET_STS_SUCCESS;
85: IF FND_API.to_Boolean( p_init_msg_list ) THEN
86: FND_MSG_PUB.initialize;
87: END IF;
88: -- Initialize API return status to success
89: x_return_status := FND_API.G_RET_STS_SUCCESS;
90: --dbms_output.put_line('begin api-2');
91:
92: select wsh_cc_user_setups_s.nextval into l_CC_USER_SEQUENCE_ID from dual;
93: /* Validate input parameters if any */
123: ) ;
124: IF SQL%NOTFOUND THEN
125: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
126: FND_MSG_PUB.ADD;
127: x_return_status := FND_API.G_RET_STS_ERROR;
128: RAISE FND_API.G_EXC_ERROR ;
129: END IF;
130: --dbms_output.put_line('Seq Id got it '||l_CC_USER_SEQUENCE_ID||'success');
131: x_return_status := fnd_api.g_ret_sts_success;
124: IF SQL%NOTFOUND THEN
125: FND_MESSAGE.SET_NAME('WSH', 'WSH_INSERT_FAILED');
126: FND_MSG_PUB.ADD;
127: x_return_status := FND_API.G_RET_STS_ERROR;
128: RAISE FND_API.G_EXC_ERROR ;
129: END IF;
130: --dbms_output.put_line('Seq Id got it '||l_CC_USER_SEQUENCE_ID||'success');
131: x_return_status := fnd_api.g_ret_sts_success;
132: p_CC_USER_SEQUENCE_ID := l_CC_USER_SEQUENCE_ID;
127: x_return_status := FND_API.G_RET_STS_ERROR;
128: RAISE FND_API.G_EXC_ERROR ;
129: END IF;
130: --dbms_output.put_line('Seq Id got it '||l_CC_USER_SEQUENCE_ID||'success');
131: x_return_status := fnd_api.g_ret_sts_success;
132: p_CC_USER_SEQUENCE_ID := l_CC_USER_SEQUENCE_ID;
133: -- End of API body
134: -- Standard check of p_commit.
135: IF FND_API.To_Boolean( p_commit ) THEN
131: x_return_status := fnd_api.g_ret_sts_success;
132: p_CC_USER_SEQUENCE_ID := l_CC_USER_SEQUENCE_ID;
133: -- End of API body
134: -- Standard check of p_commit.
135: IF FND_API.To_Boolean( p_commit ) THEN
136: COMMIT WORK;
137: END IF;
138: -- Standard call to get message count and if count is 1,
139: -- get message info.
142: p_data => x_msg_data
143: );
144:
145: EXCEPTION
146: WHEN FND_API.G_EXC_ERROR THEN
147: ROLLBACK TO WSH_CC_USERS_PKG;
148: x_return_status := FND_API.G_RET_STS_ERROR;
149: FND_MSG_PUB.Count_And_Get
150: ( p_count => x_msg_count,
144:
145: EXCEPTION
146: WHEN FND_API.G_EXC_ERROR THEN
147: ROLLBACK TO WSH_CC_USERS_PKG;
148: x_return_status := FND_API.G_RET_STS_ERROR;
149: FND_MSG_PUB.Count_And_Get
150: ( p_count => x_msg_count,
151: p_data => x_msg_data
152: );
149: FND_MSG_PUB.Count_And_Get
150: ( p_count => x_msg_count,
151: p_data => x_msg_data
152: );
153: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
154: ROLLBACK TO WSH_CC_USERS_PKG;
155: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
156: FND_MSG_PUB.Count_And_Get
157: ( p_count => x_msg_count,
151: p_data => x_msg_data
152: );
153: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
154: ROLLBACK TO WSH_CC_USERS_PKG;
155: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
156: FND_MSG_PUB.Count_And_Get
157: ( p_count => x_msg_count,
158: p_data => x_msg_data
159: );
158: p_data => x_msg_data
159: );
160: WHEN OTHERS THEN
161: ROLLBACK TO WSH_CC_USERS_PKG;
162: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
163: IF FND_MSG_PUB.Check_Msg_Level
164: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
165: THEN
166: FND_MSG_PUB.Add_Exc_Msg
182: --
183: -- Input Parameters
184: -- p_api_version
185: -- API version number (current version is 1.0)
186: -- p_init_msg_list (optional, default FND_API.G_FALSE)
187: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
188: -- if set to FND_API.G_TRUE
189: -- initialize error message list
190: -- if set to FND_API.G_FALSE - not initialize error
183: -- Input Parameters
184: -- p_api_version
185: -- API version number (current version is 1.0)
186: -- p_init_msg_list (optional, default FND_API.G_FALSE)
187: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
188: -- if set to FND_API.G_TRUE
189: -- initialize error message list
190: -- if set to FND_API.G_FALSE - not initialize error
191: -- message list
184: -- p_api_version
185: -- API version number (current version is 1.0)
186: -- p_init_msg_list (optional, default FND_API.G_FALSE)
187: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
188: -- if set to FND_API.G_TRUE
189: -- initialize error message list
190: -- if set to FND_API.G_FALSE - not initialize error
191: -- message list
192: -- p_commit (optional, default FND_API.G_FALSE)
186: -- p_init_msg_list (optional, default FND_API.G_FALSE)
187: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
188: -- if set to FND_API.G_TRUE
189: -- initialize error message list
190: -- if set to FND_API.G_FALSE - not initialize error
191: -- message list
192: -- p_commit (optional, default FND_API.G_FALSE)
193: -- whether or not to commit the changes to database
194: --
188: -- if set to FND_API.G_TRUE
189: -- initialize error message list
190: -- if set to FND_API.G_FALSE - not initialize error
191: -- message list
192: -- p_commit (optional, default FND_API.G_FALSE)
193: -- whether or not to commit the changes to database
194: --
195: -- Input parameters for clear cross users informations
196: -- p_APPLICATION_ID --Application added
204: --
205: -- Output Parameters
206: -- x_return_status
207: -- if the process succeeds, the value is
208: -- fnd_api.g_ret_sts_success;
209: -- if there is an expected error, the value is
210: -- fnd_api.g_ret_sts_error;
211: -- if there is an unexpected error, the value is
212: -- fnd_api.g_ret_sts_unexp_error;
206: -- x_return_status
207: -- if the process succeeds, the value is
208: -- fnd_api.g_ret_sts_success;
209: -- if there is an expected error, the value is
210: -- fnd_api.g_ret_sts_error;
211: -- if there is an unexpected error, the value is
212: -- fnd_api.g_ret_sts_unexp_error;
213: -- x_msg_count
214: -- if there is one or more errors, the number of error messages
208: -- fnd_api.g_ret_sts_success;
209: -- if there is an expected error, the value is
210: -- fnd_api.g_ret_sts_error;
211: -- if there is an unexpected error, the value is
212: -- fnd_api.g_ret_sts_unexp_error;
213: -- x_msg_count
214: -- if there is one or more errors, the number of error messages
215: -- in the buffer
216: -- x_msg_data
214: -- if there is one or more errors, the number of error messages
215: -- in the buffer
216: -- x_msg_data
217: -- if there is one and only one error, the error message
218: -- (See fnd_api package for more details about the above output parameters)
219:
220: --*/
221: PROCEDURE Update_Row
222: (
220: --*/
221: PROCEDURE Update_Row
222: (
223: p_api_version IN NUMBER ,
224: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
225: p_commit IN VARCHAR2 := fnd_api.g_false ,
226: x_return_status OUT VARCHAR2 ,
227: x_msg_count OUT NUMBER ,
228: x_msg_data OUT VARCHAR2 ,
221: PROCEDURE Update_Row
222: (
223: p_api_version IN NUMBER ,
224: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
225: p_commit IN VARCHAR2 := fnd_api.g_false ,
226: x_return_status OUT VARCHAR2 ,
227: x_msg_count OUT NUMBER ,
228: x_msg_data OUT VARCHAR2 ,
229: p_APPLICATION_ID IN NUMBER,
227: x_msg_count OUT NUMBER ,
228: x_msg_data OUT VARCHAR2 ,
229: p_APPLICATION_ID IN NUMBER,
230: p_MASTER_ORGANIZATION_ID IN NUMBER,
231: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
232: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
233: p_CC_USER_ID IN VARCHAR2,
234: p_ENCRYPTED_USER_PASSWORD IN VARCHAR2,
235: p_CC_USER_SEQUENCE_ID IN NUMBER
228: x_msg_data OUT VARCHAR2 ,
229: p_APPLICATION_ID IN NUMBER,
230: p_MASTER_ORGANIZATION_ID IN NUMBER,
231: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
232: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
233: p_CC_USER_ID IN VARCHAR2,
234: p_ENCRYPTED_USER_PASSWORD IN VARCHAR2,
235: p_CC_USER_SEQUENCE_ID IN NUMBER
236: )
241: --dbms_output.put_line('begin');
242: -- Standard Start of API savepoint
243: SAVEPOINT WSH_CC_USERS_PKG;
244: -- Standard call to check for call compatibility.
245: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
246: p_api_version ,
247: l_api_name ,
248: G_PKG_NAME )
249: THEN
248: G_PKG_NAME )
249: THEN
250: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
251: FND_MSG_PUB.ADD;
252: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
253: END IF;
254: -- Initialize message list if p_init_msg_list is set to TRUE.
255: IF FND_API.to_Boolean( p_init_msg_list ) THEN
256: FND_MSG_PUB.initialize;
251: FND_MSG_PUB.ADD;
252: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
253: END IF;
254: -- Initialize message list if p_init_msg_list is set to TRUE.
255: IF FND_API.to_Boolean( p_init_msg_list ) THEN
256: FND_MSG_PUB.initialize;
257: END IF;
258: -- Initialize API return status to success
259: x_return_status := FND_API.G_RET_STS_SUCCESS;
255: IF FND_API.to_Boolean( p_init_msg_list ) THEN
256: FND_MSG_PUB.initialize;
257: END IF;
258: -- Initialize API return status to success
259: x_return_status := FND_API.G_RET_STS_SUCCESS;
260:
261: -- Update a row into wsh_cc_users entity with all detail information
262: -- for the given cc seq id
263:
264: update wsh_cc_user_setups
265: SET
266: APPLICATION_ID = p_APPLICATION_ID
267: ,MASTER_ORGANIZATION_ID = p_MASTER_ORGANIZATION_ID
268: ,ORGANIZATION_ID = decode(p_ORGANIZATION_ID,fnd_api.g_miss_num,
269: ORGANIZATION_ID,p_ORGANIZATION_ID)
270: ,APPLICATION_USER_ID = decode(p_APPLICATION_USER_ID,fnd_api.g_miss_num,
271: APPLICATION_USER_ID,p_APPLICATION_USER_ID)
272: ,CC_USER_ID = p_CC_USER_ID
266: APPLICATION_ID = p_APPLICATION_ID
267: ,MASTER_ORGANIZATION_ID = p_MASTER_ORGANIZATION_ID
268: ,ORGANIZATION_ID = decode(p_ORGANIZATION_ID,fnd_api.g_miss_num,
269: ORGANIZATION_ID,p_ORGANIZATION_ID)
270: ,APPLICATION_USER_ID = decode(p_APPLICATION_USER_ID,fnd_api.g_miss_num,
271: APPLICATION_USER_ID,p_APPLICATION_USER_ID)
272: ,CC_USER_ID = p_CC_USER_ID
273: ,ENCRYPTED_USER_PASSWORD = p_ENCRYPTED_USER_PASSWORD
274: ,LAST_UPDATE_DATE = sysdate
277: where cc_user_sequence_id = p_cc_user_sequence_id ;
278: IF SQL%NOTFOUND THEN
279: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
280: FND_MSG_PUB.ADD;
281: x_return_status := FND_API.G_RET_STS_ERROR;
282: RAISE FND_API.G_EXC_ERROR ;
283: END IF;
284: --dbms_output.put_line('begin-5');
285: x_return_status := fnd_api.g_ret_sts_success;
278: IF SQL%NOTFOUND THEN
279: FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_FAILED');
280: FND_MSG_PUB.ADD;
281: x_return_status := FND_API.G_RET_STS_ERROR;
282: RAISE FND_API.G_EXC_ERROR ;
283: END IF;
284: --dbms_output.put_line('begin-5');
285: x_return_status := fnd_api.g_ret_sts_success;
286:
281: x_return_status := FND_API.G_RET_STS_ERROR;
282: RAISE FND_API.G_EXC_ERROR ;
283: END IF;
284: --dbms_output.put_line('begin-5');
285: x_return_status := fnd_api.g_ret_sts_success;
286:
287: -- End of API body
288: -- Standard check of p_commit.
289: IF FND_API.To_Boolean( p_commit ) THEN
285: x_return_status := fnd_api.g_ret_sts_success;
286:
287: -- End of API body
288: -- Standard check of p_commit.
289: IF FND_API.To_Boolean( p_commit ) THEN
290: COMMIT WORK;
291: END IF;
292: -- Standard call to get message count and if count is 1,
293: -- get message info.
296: p_data => x_msg_data
297: );
298:
299: EXCEPTION
300: WHEN FND_API.G_EXC_ERROR THEN
301: --dbms_output.put_line(sqlerrm);
302: ROLLBACK TO WSH_CC_USERS_PKG;
303: x_return_status := FND_API.G_RET_STS_ERROR;
304: FND_MSG_PUB.Count_And_Get
299: EXCEPTION
300: WHEN FND_API.G_EXC_ERROR THEN
301: --dbms_output.put_line(sqlerrm);
302: ROLLBACK TO WSH_CC_USERS_PKG;
303: x_return_status := FND_API.G_RET_STS_ERROR;
304: FND_MSG_PUB.Count_And_Get
305: ( p_count => x_msg_count,
306: p_data => x_msg_data
307: );
304: FND_MSG_PUB.Count_And_Get
305: ( p_count => x_msg_count,
306: p_data => x_msg_data
307: );
308: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
309: --dbms_output.put_line(sqlerrm);
310: ROLLBACK TO WSH_CC_USERS_PKG;
311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
312: FND_MSG_PUB.Count_And_Get
307: );
308: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
309: --dbms_output.put_line(sqlerrm);
310: ROLLBACK TO WSH_CC_USERS_PKG;
311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
312: FND_MSG_PUB.Count_And_Get
313: ( p_count => x_msg_count,
314: p_data => x_msg_data
315: );
340: --
341: -- Input Parameters
342: -- p_api_version
343: -- API version number (current version is 1.0)
344: -- p_init_msg_list (optional, default FND_API.G_FALSE)
345: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
346: -- if set to FND_API.G_TRUE
347: -- initialize error message list
348: -- if set to FND_API.G_FALSE - not initialize error
341: -- Input Parameters
342: -- p_api_version
343: -- API version number (current version is 1.0)
344: -- p_init_msg_list (optional, default FND_API.G_FALSE)
345: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
346: -- if set to FND_API.G_TRUE
347: -- initialize error message list
348: -- if set to FND_API.G_FALSE - not initialize error
349: -- message list
342: -- p_api_version
343: -- API version number (current version is 1.0)
344: -- p_init_msg_list (optional, default FND_API.G_FALSE)
345: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
346: -- if set to FND_API.G_TRUE
347: -- initialize error message list
348: -- if set to FND_API.G_FALSE - not initialize error
349: -- message list
350: -- p_commit (optional, default FND_API.G_FALSE)
344: -- p_init_msg_list (optional, default FND_API.G_FALSE)
345: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
346: -- if set to FND_API.G_TRUE
347: -- initialize error message list
348: -- if set to FND_API.G_FALSE - not initialize error
349: -- message list
350: -- p_commit (optional, default FND_API.G_FALSE)
351: -- whether or not to commit the changes to database
352: --
346: -- if set to FND_API.G_TRUE
347: -- initialize error message list
348: -- if set to FND_API.G_FALSE - not initialize error
349: -- message list
350: -- p_commit (optional, default FND_API.G_FALSE)
351: -- whether or not to commit the changes to database
352: --
353: -- Input parameters for clear cross users informations
354: -- p_CC_USER_SEQUENCE_ID -- CC Seq Id
356: --
357: -- Output Parameters
358: -- x_return_status
359: -- if the process succeeds, the value is
360: -- fnd_api.g_ret_sts_success;
361: -- if there is an expected error, the value is
362: -- fnd_api.g_ret_sts_error;
363: -- if there is an unexpected error, the value is
364: -- fnd_api.g_ret_sts_unexp_error;
358: -- x_return_status
359: -- if the process succeeds, the value is
360: -- fnd_api.g_ret_sts_success;
361: -- if there is an expected error, the value is
362: -- fnd_api.g_ret_sts_error;
363: -- if there is an unexpected error, the value is
364: -- fnd_api.g_ret_sts_unexp_error;
365: -- x_msg_count
366: -- if there is one or more errors, the number of error messages
360: -- fnd_api.g_ret_sts_success;
361: -- if there is an expected error, the value is
362: -- fnd_api.g_ret_sts_error;
363: -- if there is an unexpected error, the value is
364: -- fnd_api.g_ret_sts_unexp_error;
365: -- x_msg_count
366: -- if there is one or more errors, the number of error messages
367: -- in the buffer
368: -- x_msg_data
366: -- if there is one or more errors, the number of error messages
367: -- in the buffer
368: -- x_msg_data
369: -- if there is one and only one error, the error message
370: -- (See fnd_api package for more details about the above output parameters)
371:
372: --*/
373: PROCEDURE Delete_Row
374: (
372: --*/
373: PROCEDURE Delete_Row
374: (
375: p_api_version IN NUMBER ,
376: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
377: p_commit IN VARCHAR2 := fnd_api.g_false ,
378: x_return_status OUT VARCHAR2 ,
379: x_msg_count OUT NUMBER ,
380: x_msg_data OUT VARCHAR2 ,
373: PROCEDURE Delete_Row
374: (
375: p_api_version IN NUMBER ,
376: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
377: p_commit IN VARCHAR2 := fnd_api.g_false ,
378: x_return_status OUT VARCHAR2 ,
379: x_msg_count OUT NUMBER ,
380: x_msg_data OUT VARCHAR2 ,
381: p_CC_USER_SEQUENCE_ID IN NUMBER
387: --dbms_output.put_line('begin');
388: -- Standard Start of API savepoint
389: SAVEPOINT WSH_CC_USERS_PKG;
390: -- Standard call to check for call compatibility.
391: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
392: p_api_version ,
393: l_api_name ,
394: G_PKG_NAME )
395: THEN
394: G_PKG_NAME )
395: THEN
396: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
397: FND_MSG_PUB.ADD;
398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
399: END IF;
400: -- Initialize message list if p_init_msg_list is set to TRUE.
401: IF FND_API.to_Boolean( p_init_msg_list ) THEN
402: FND_MSG_PUB.initialize;
397: FND_MSG_PUB.ADD;
398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
399: END IF;
400: -- Initialize message list if p_init_msg_list is set to TRUE.
401: IF FND_API.to_Boolean( p_init_msg_list ) THEN
402: FND_MSG_PUB.initialize;
403: END IF;
404: -- Initialize API return status to success
405: x_return_status := FND_API.G_RET_STS_SUCCESS;
401: IF FND_API.to_Boolean( p_init_msg_list ) THEN
402: FND_MSG_PUB.initialize;
403: END IF;
404: -- Initialize API return status to success
405: x_return_status := FND_API.G_RET_STS_SUCCESS;
406:
407: -- Delete a row from wsh_cc_users entity
408: -- for the given cc seq id
409:
411: WHERE cc_user_sequence_id = p_cc_user_sequence_id ;
412: IF SQL%NOTFOUND THEN
413: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
414: FND_MSG_PUB.ADD;
415: x_return_status := FND_API.G_RET_STS_ERROR;
416: RAISE FND_API.G_EXC_ERROR ;
417: END IF;
418: --dbms_output.put_line('begin-5');
419: x_return_status := fnd_api.g_ret_sts_success;
412: IF SQL%NOTFOUND THEN
413: FND_MESSAGE.SET_NAME('WSH', 'WSH_DELETE_FAILED');
414: FND_MSG_PUB.ADD;
415: x_return_status := FND_API.G_RET_STS_ERROR;
416: RAISE FND_API.G_EXC_ERROR ;
417: END IF;
418: --dbms_output.put_line('begin-5');
419: x_return_status := fnd_api.g_ret_sts_success;
420:
415: x_return_status := FND_API.G_RET_STS_ERROR;
416: RAISE FND_API.G_EXC_ERROR ;
417: END IF;
418: --dbms_output.put_line('begin-5');
419: x_return_status := fnd_api.g_ret_sts_success;
420:
421: -- End of API body
422: -- Standard check of p_commit.
423: IF FND_API.To_Boolean( p_commit ) THEN
419: x_return_status := fnd_api.g_ret_sts_success;
420:
421: -- End of API body
422: -- Standard check of p_commit.
423: IF FND_API.To_Boolean( p_commit ) THEN
424: COMMIT WORK;
425: END IF;
426: -- Standard call to get message count and if count is 1,
427: -- get message info.
430: p_data => x_msg_data
431: );
432:
433: EXCEPTION
434: WHEN FND_API.G_EXC_ERROR THEN
435: --dbms_output.put_line(sqlerrm);
436: ROLLBACK TO WSH_CC_USERS_PKG;
437: x_return_status := FND_API.G_RET_STS_ERROR;
438: FND_MSG_PUB.Count_And_Get
433: EXCEPTION
434: WHEN FND_API.G_EXC_ERROR THEN
435: --dbms_output.put_line(sqlerrm);
436: ROLLBACK TO WSH_CC_USERS_PKG;
437: x_return_status := FND_API.G_RET_STS_ERROR;
438: FND_MSG_PUB.Count_And_Get
439: ( p_count => x_msg_count,
440: p_data => x_msg_data
441: );
438: FND_MSG_PUB.Count_And_Get
439: ( p_count => x_msg_count,
440: p_data => x_msg_data
441: );
442: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
443: --dbms_output.put_line(sqlerrm);
444: ROLLBACK TO WSH_CC_USERS_PKG;
445: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
446: FND_MSG_PUB.Count_And_Get
441: );
442: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
443: --dbms_output.put_line(sqlerrm);
444: ROLLBACK TO WSH_CC_USERS_PKG;
445: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
446: FND_MSG_PUB.Count_And_Get
447: ( p_count => x_msg_count,
448: p_data => x_msg_data
449: );
475: --
476: -- Input Parameters
477: -- p_api_version
478: -- API version number (current version is 1.0)
479: -- p_init_msg_list (optional, default FND_API.G_FALSE)
480: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
481: -- if set to FND_API.G_TRUE
482: -- initialize error message list
483: -- if set to FND_API.G_FALSE - not initialize error
476: -- Input Parameters
477: -- p_api_version
478: -- API version number (current version is 1.0)
479: -- p_init_msg_list (optional, default FND_API.G_FALSE)
480: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
481: -- if set to FND_API.G_TRUE
482: -- initialize error message list
483: -- if set to FND_API.G_FALSE - not initialize error
484: -- message list
477: -- p_api_version
478: -- API version number (current version is 1.0)
479: -- p_init_msg_list (optional, default FND_API.G_FALSE)
480: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
481: -- if set to FND_API.G_TRUE
482: -- initialize error message list
483: -- if set to FND_API.G_FALSE - not initialize error
484: -- message list
485: -- p_commit (optional, default FND_API.G_FALSE)
479: -- p_init_msg_list (optional, default FND_API.G_FALSE)
480: -- Valid values: FND_API.G_FALSE or FND_API.G_TRUE.
481: -- if set to FND_API.G_TRUE
482: -- initialize error message list
483: -- if set to FND_API.G_FALSE - not initialize error
484: -- message list
485: -- p_commit (optional, default FND_API.G_FALSE)
486: -- whether or not to commit the changes to database
487: --
481: -- if set to FND_API.G_TRUE
482: -- initialize error message list
483: -- if set to FND_API.G_FALSE - not initialize error
484: -- message list
485: -- p_commit (optional, default FND_API.G_FALSE)
486: -- whether or not to commit the changes to database
487: --
488: -- Input parameters for clear cross users informations
489: -- p_MASTER_ORGANIZATION_ID -- Master Org
497: --
498: -- Output Parameters
499: -- x_return_status
500: -- if the process succeeds, the value is
501: -- fnd_api.g_ret_sts_success;
502: -- if there is an expected error, the value is
503: -- fnd_api.g_ret_sts_error;
504: -- if there is an unexpected error, the value is
505: -- fnd_api.g_ret_sts_unexp_error;
499: -- x_return_status
500: -- if the process succeeds, the value is
501: -- fnd_api.g_ret_sts_success;
502: -- if there is an expected error, the value is
503: -- fnd_api.g_ret_sts_error;
504: -- if there is an unexpected error, the value is
505: -- fnd_api.g_ret_sts_unexp_error;
506: -- x_msg_count
507: -- if there is one or more errors, the number of error messages
501: -- fnd_api.g_ret_sts_success;
502: -- if there is an expected error, the value is
503: -- fnd_api.g_ret_sts_error;
504: -- if there is an unexpected error, the value is
505: -- fnd_api.g_ret_sts_unexp_error;
506: -- x_msg_count
507: -- if there is one or more errors, the number of error messages
508: -- in the buffer
509: -- x_msg_data
507: -- if there is one or more errors, the number of error messages
508: -- in the buffer
509: -- x_msg_data
510: -- if there is one and only one error, the error message
511: -- (See fnd_api package for more details about the above output parameters)
512:
513: --*/
514: PROCEDURE Lock_Row
515: (
513: --*/
514: PROCEDURE Lock_Row
515: (
516: p_api_version IN NUMBER ,
517: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
518: p_commit IN VARCHAR2 := fnd_api.g_false ,
519: x_return_status OUT VARCHAR2 ,
520: x_msg_count OUT NUMBER ,
521: x_msg_data OUT VARCHAR2 ,
514: PROCEDURE Lock_Row
515: (
516: p_api_version IN NUMBER ,
517: p_init_msg_list IN VARCHAR2 := fnd_api.g_false ,
518: p_commit IN VARCHAR2 := fnd_api.g_false ,
519: x_return_status OUT VARCHAR2 ,
520: x_msg_count OUT NUMBER ,
521: x_msg_data OUT VARCHAR2 ,
522: p_APPLICATION_ID IN NUMBER,
520: x_msg_count OUT NUMBER ,
521: x_msg_data OUT VARCHAR2 ,
522: p_APPLICATION_ID IN NUMBER,
523: p_MASTER_ORGANIZATION_ID IN NUMBER,
524: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
525: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
526: p_CC_USER_ID IN VARCHAR2,
527: p_ENCRYPTED_USER_PASSWORD IN VARCHAR2,
528: p_CC_USER_SEQUENCE_ID IN NUMBER,
521: x_msg_data OUT VARCHAR2 ,
522: p_APPLICATION_ID IN NUMBER,
523: p_MASTER_ORGANIZATION_ID IN NUMBER,
524: p_ORGANIZATION_ID IN NUMBER default fnd_api.g_miss_num,
525: p_APPLICATION_USER_ID IN NUMBER default fnd_api.g_miss_num,
526: p_CC_USER_ID IN VARCHAR2,
527: p_ENCRYPTED_USER_PASSWORD IN VARCHAR2,
528: p_CC_USER_SEQUENCE_ID IN NUMBER,
529: p_rowid IN VARCHAR2
543: --dbms_output.put_line('begin');
544: -- Standard Start of API savepoint
545: SAVEPOINT WSH_CC_USERS_PKG;
546: -- Standard call to check for call compatibility.
547: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
548: p_api_version ,
549: l_api_name ,
550: G_PKG_NAME )
551: THEN
550: G_PKG_NAME )
551: THEN
552: FND_MESSAGE.SET_NAME('WSH', 'WSH_INCOMPATIBLE_API_CALL');
553: FND_MSG_PUB.ADD;
554: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
555: END IF;
556: -- Initialize message list if p_init_msg_list is set to TRUE.
557: IF FND_API.to_Boolean( p_init_msg_list ) THEN
558: FND_MSG_PUB.initialize;
553: FND_MSG_PUB.ADD;
554: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
555: END IF;
556: -- Initialize message list if p_init_msg_list is set to TRUE.
557: IF FND_API.to_Boolean( p_init_msg_list ) THEN
558: FND_MSG_PUB.initialize;
559: END IF;
560: -- Initialize API return status to success
561: x_return_status := FND_API.G_RET_STS_SUCCESS;
557: IF FND_API.to_Boolean( p_init_msg_list ) THEN
558: FND_MSG_PUB.initialize;
559: END IF;
560: -- Initialize API return status to success
561: x_return_status := FND_API.G_RET_STS_SUCCESS;
562:
563: -- Check Lock a row into wsh_cc_users entity with all detail information
564: OPEN lock_row;
565: FETCH lock_row into Recinfo;
591: AND ((Recinfo.application_id =p_APPLICATION_ID) OR
592: ( (Recinfo.application_id IS NULL)
593: AND (p_APPLICATION_ID IS NULL)))
594: ) THEN
595: x_return_status := FND_API.G_RET_STS_SUCCESS;
596: ELSE
597: x_return_status := FND_API.G_RET_STS_ERROR;
598: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
599: app_exception.raise_exception;
593: AND (p_APPLICATION_ID IS NULL)))
594: ) THEN
595: x_return_status := FND_API.G_RET_STS_SUCCESS;
596: ELSE
597: x_return_status := FND_API.G_RET_STS_ERROR;
598: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
599: app_exception.raise_exception;
600: END IF;
601: EXCEPTION