19:
20:
21: PROCEDURE Create_Customer(
22: p_api_version_number IN NUMBER,
23: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
24: p_commit IN VARCHAR2 := FND_API.G_FALSE,
25: p_validation_level IN NUMBER := FND_API.g_valid_level_full,
26: x_return_status OUT NOCOPY VARCHAR2,
27: x_msg_count OUT NOCOPY NUMBER,
20:
21: PROCEDURE Create_Customer(
22: p_api_version_number IN NUMBER,
23: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
24: p_commit IN VARCHAR2 := FND_API.G_FALSE,
25: p_validation_level IN NUMBER := FND_API.g_valid_level_full,
26: x_return_status OUT NOCOPY VARCHAR2,
27: x_msg_count OUT NOCOPY NUMBER,
28: x_msg_data OUT NOCOPY VARCHAR2,
21: PROCEDURE Create_Customer(
22: p_api_version_number IN NUMBER,
23: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
24: p_commit IN VARCHAR2 := FND_API.G_FALSE,
25: p_validation_level IN NUMBER := FND_API.g_valid_level_full,
26: x_return_status OUT NOCOPY VARCHAR2,
27: x_msg_count OUT NOCOPY NUMBER,
28: x_msg_data OUT NOCOPY VARCHAR2,
29:
59: -- Standard Start of API savepoint
60: SAVEPOINT Create_Customer_Pub;
61:
62: -- Standard call to check for call compatibility.
63: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
64: p_api_version_number,
65: l_api_name,
66: G_PKG_NAME)
67: THEN
64: p_api_version_number,
65: l_api_name,
66: G_PKG_NAME)
67: THEN
68: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
69: END IF;
70:
71:
72: -- Initialize message list if p_init_msg_list is set to TRUE.
69: END IF;
70:
71:
72: -- Initialize message list if p_init_msg_list is set to TRUE.
73: IF FND_API.to_Boolean( p_init_msg_list )
74: THEN
75: FND_MSG_PUB.initialize;
76: END IF;
77:
79: AMS_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
80:
81:
82: -- Initialize API return status to SUCCESS
83: x_return_status := FND_API.G_RET_STS_SUCCESS;
84:
85: -- Local variable initialization
86:
87: --partyRec.party_id := p_party_id;
119:
120: IF FND_GLOBAL.USER_ID IS NULL
121: THEN
122: AMS_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
123: RAISE FND_API.G_EXC_ERROR;
124: END IF;
125:
126:
127: -- Debug Message
130: AMS_List_Import_PUB.Create_Customer (
131: p_api_version => p_api_version_number,
132: p_init_msg_list => p_init_msg_list,
133: p_commit => p_commit,
134: p_validation_level => FND_API.g_valid_level_full,
135: x_return_status => x_return_status,
136: x_msg_count => x_msg_count,
137: x_msg_data => x_msg_data,
138: p_party_id => p_party_id,
156:
157:
158: --subir
159: IF x_return_status is NULL THEN
160: x_return_status := FND_API.G_RET_STS_ERROR;
161: END IF;
162: --end
163:
164:
161: END IF;
162: --end
163:
164:
165: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
166: RAISE FND_API.G_EXC_ERROR;
167: END IF;
168:
169: --
162: --end
163:
164:
165: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
166: RAISE FND_API.G_EXC_ERROR;
167: END IF;
168:
169: --
170: -- End of API body
170: -- End of API body
171: --
172:
173: -- Standard check for p_commit
174: IF FND_API.to_Boolean( p_commit )
175: THEN
176: COMMIT WORK;
177: END IF;
178:
188: );
189: EXCEPTION
190:
191: WHEN AMS_Utility_PVT.resource_locked THEN
192: x_return_status := FND_API.g_ret_sts_error;
193: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
194:
195: WHEN FND_API.G_EXC_ERROR THEN
196: ROLLBACK TO Create_Customer_Pub;
191: WHEN AMS_Utility_PVT.resource_locked THEN
192: x_return_status := FND_API.g_ret_sts_error;
193: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
194:
195: WHEN FND_API.G_EXC_ERROR THEN
196: ROLLBACK TO Create_Customer_Pub;
197: x_return_status := FND_API.G_RET_STS_ERROR;
198: -- Standard call to get message count and if count=1, get the message
199: FND_MSG_PUB.Count_And_Get (
193: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
194:
195: WHEN FND_API.G_EXC_ERROR THEN
196: ROLLBACK TO Create_Customer_Pub;
197: x_return_status := FND_API.G_RET_STS_ERROR;
198: -- Standard call to get message count and if count=1, get the message
199: FND_MSG_PUB.Count_And_Get (
200: p_encoded => FND_API.G_FALSE,
201: p_count => x_msg_count,
196: ROLLBACK TO Create_Customer_Pub;
197: x_return_status := FND_API.G_RET_STS_ERROR;
198: -- Standard call to get message count and if count=1, get the message
199: FND_MSG_PUB.Count_And_Get (
200: p_encoded => FND_API.G_FALSE,
201: p_count => x_msg_count,
202: p_data => x_msg_data
203: );
204:
201: p_count => x_msg_count,
202: p_data => x_msg_data
203: );
204:
205: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
206: ROLLBACK TO Create_Customer_Pub;
207: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
208: -- Standard call to get message count and if count=1, get the message
209: FND_MSG_PUB.Count_And_Get (
203: );
204:
205: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
206: ROLLBACK TO Create_Customer_Pub;
207: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
208: -- Standard call to get message count and if count=1, get the message
209: FND_MSG_PUB.Count_And_Get (
210: p_encoded => FND_API.G_FALSE,
211: p_count => x_msg_count,
206: ROLLBACK TO Create_Customer_Pub;
207: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
208: -- Standard call to get message count and if count=1, get the message
209: FND_MSG_PUB.Count_And_Get (
210: p_encoded => FND_API.G_FALSE,
211: p_count => x_msg_count,
212: p_data => x_msg_data
213: );
214:
213: );
214:
215: WHEN OTHERS THEN
216: ROLLBACK TO Create_Customer_Pub;
217: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
218: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
219: THEN
220: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
221: END IF;
220: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
221: END IF;
222: -- Standard call to get message count and if count=1, get the message
223: FND_MSG_PUB.Count_And_Get (
224: p_encoded => FND_API.G_FALSE,
225: p_count => x_msg_count,
226: p_data => x_msg_data
227: );
228: End Create_Customer;
236:
237:
238: PROCEDURE Update_Person_Profile(
239: p_api_version_number IN NUMBER,
240: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
241: p_commit IN VARCHAR2 := FND_API.G_FALSE,
242: p_validation_level IN NUMBER := FND_API.g_valid_level_full,
243: x_return_status OUT NOCOPY VARCHAR2,
244: x_msg_count OUT NOCOPY NUMBER,
237:
238: PROCEDURE Update_Person_Profile(
239: p_api_version_number IN NUMBER,
240: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
241: p_commit IN VARCHAR2 := FND_API.G_FALSE,
242: p_validation_level IN NUMBER := FND_API.g_valid_level_full,
243: x_return_status OUT NOCOPY VARCHAR2,
244: x_msg_count OUT NOCOPY NUMBER,
245: x_msg_data OUT NOCOPY VARCHAR2,
238: PROCEDURE Update_Person_Profile(
239: p_api_version_number IN NUMBER,
240: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
241: p_commit IN VARCHAR2 := FND_API.G_FALSE,
242: p_validation_level IN NUMBER := FND_API.g_valid_level_full,
243: x_return_status OUT NOCOPY VARCHAR2,
244: x_msg_count OUT NOCOPY NUMBER,
245: x_msg_data OUT NOCOPY VARCHAR2,
246:
262: -- Standard Start of API savepoint
263: SAVEPOINT Create_Customer_Pub;
264:
265: -- Standard call to check for call compatibility.
266: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
267: p_api_version_number,
268: l_api_name,
269: G_PKG_NAME)
270: THEN
267: p_api_version_number,
268: l_api_name,
269: G_PKG_NAME)
270: THEN
271: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
272: END IF;
273:
274:
275: -- Initialize message list if p_init_msg_list is set to TRUE.
272: END IF;
273:
274:
275: -- Initialize message list if p_init_msg_list is set to TRUE.
276: IF FND_API.to_Boolean( p_init_msg_list )
277: THEN
278: FND_MSG_PUB.initialize;
279: END IF;
280:
282: AMS_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
283:
284:
285: -- Initialize API return status to SUCCESS
286: x_return_status := FND_API.G_RET_STS_SUCCESS;
287:
288: -- Local variable initialization
289:
290: ---------------------------------------------------------------------------------
313:
314: IF FND_GLOBAL.USER_ID IS NULL
315: THEN
316: AMS_Utility_PVT.Error_Message(p_message_name => 'USER_PROFILE_MISSING');
317: RAISE FND_API.G_EXC_ERROR;
318: END IF;
319:
320: -- Debug Message
321: AMS_UTILITY_PVT.debug_message( 'Public API: Calling HZ_PARTY_V2PUB.UPDATE_PERSON');
334: ---------------------------------------------------------------------------------
335:
336:
337: IF x_return_status is NULL THEN
338: x_return_status := FND_API.G_RET_STS_ERROR;
339: END IF;
340: --end
341:
342:
339: END IF;
340: --end
341:
342:
343: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
344: RAISE FND_API.G_EXC_ERROR;
345: END IF;
346:
347: --
340: --end
341:
342:
343: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
344: RAISE FND_API.G_EXC_ERROR;
345: END IF;
346:
347: --
348: -- End of API body
348: -- End of API body
349: --
350:
351: -- Standard check for p_commit
352: IF FND_API.to_Boolean( p_commit )
353: THEN
354: COMMIT WORK;
355: END IF;
356:
367:
368: EXCEPTION
369:
370: WHEN AMS_Utility_PVT.resource_locked THEN
371: x_return_status := FND_API.g_ret_sts_error;
372: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
373:
374: WHEN FND_API.G_EXC_ERROR THEN
375: ROLLBACK TO Create_Customer_Pub;
370: WHEN AMS_Utility_PVT.resource_locked THEN
371: x_return_status := FND_API.g_ret_sts_error;
372: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
373:
374: WHEN FND_API.G_EXC_ERROR THEN
375: ROLLBACK TO Create_Customer_Pub;
376: x_return_status := FND_API.G_RET_STS_ERROR;
377: -- Standard call to get message count and if count=1, get the message
378: FND_MSG_PUB.Count_And_Get (
372: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
373:
374: WHEN FND_API.G_EXC_ERROR THEN
375: ROLLBACK TO Create_Customer_Pub;
376: x_return_status := FND_API.G_RET_STS_ERROR;
377: -- Standard call to get message count and if count=1, get the message
378: FND_MSG_PUB.Count_And_Get (
379: p_encoded => FND_API.G_FALSE,
380: p_count => x_msg_count,
375: ROLLBACK TO Create_Customer_Pub;
376: x_return_status := FND_API.G_RET_STS_ERROR;
377: -- Standard call to get message count and if count=1, get the message
378: FND_MSG_PUB.Count_And_Get (
379: p_encoded => FND_API.G_FALSE,
380: p_count => x_msg_count,
381: p_data => x_msg_data
382: );
383:
380: p_count => x_msg_count,
381: p_data => x_msg_data
382: );
383:
384: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
385: ROLLBACK TO Create_Customer_Pub;
386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: -- Standard call to get message count and if count=1, get the message
388: FND_MSG_PUB.Count_And_Get (
382: );
383:
384: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
385: ROLLBACK TO Create_Customer_Pub;
386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: -- Standard call to get message count and if count=1, get the message
388: FND_MSG_PUB.Count_And_Get (
389: p_encoded => FND_API.G_FALSE,
390: p_count => x_msg_count,
385: ROLLBACK TO Create_Customer_Pub;
386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: -- Standard call to get message count and if count=1, get the message
388: FND_MSG_PUB.Count_And_Get (
389: p_encoded => FND_API.G_FALSE,
390: p_count => x_msg_count,
391: p_data => x_msg_data
392: );
393:
392: );
393:
394: WHEN OTHERS THEN
395: ROLLBACK TO Create_Customer_Pub;
396: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
397: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
398: THEN
399: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
400: END IF;
399: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
400: END IF;
401: -- Standard call to get message count and if count=1, get the message
402: FND_MSG_PUB.Count_And_Get (
403: p_encoded => FND_API.G_FALSE,
404: p_count => x_msg_count,
405: p_data => x_msg_data
406: );
407: