18: -- This function determines if Contracts is enabled or not.
19: --Parameters:
20: -- None
21: --Returns:
22: -- FND_API.G_TRUE if Procurement Contracts is enabled
23: -- FND_API.G_FALSE if Procurement Contracts is disabled.
24: --Testing:
25: --
26: --End of Comments
19: --Parameters:
20: -- None
21: --Returns:
22: -- FND_API.G_TRUE if Procurement Contracts is enabled
23: -- FND_API.G_FALSE if Procurement Contracts is disabled.
24: --Testing:
25: --
26: --End of Comments
27: -------------------------------------------------------------------------------
31: BEGIN
32:
33: -- read the global variable that stores the profile option.
34: IF (g_contracts_enabled = 'Y') THEN
35: RETURN FND_API.G_TRUE;
36: ELSE
37: RETURN FND_API.G_FALSE;
38: END IF;
39:
33: -- read the global variable that stores the profile option.
34: IF (g_contracts_enabled = 'Y') THEN
35: RETURN FND_API.G_TRUE;
36: ELSE
37: RETURN FND_API.G_FALSE;
38: END IF;
39:
40: EXCEPTION
41: WHEN OTHERS THEN
64: -- Message count
65: --x_msg_data
66: -- message data
67: --x_return_status
68: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
69: --x_contracts_enabled
70: -- FND_API.G_TRUE if Procurement Contracts is enabled
71: -- FND_API.G_FALSE if Procurement Contracts is disabled.
72: --Testing:
66: -- message data
67: --x_return_status
68: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
69: --x_contracts_enabled
70: -- FND_API.G_TRUE if Procurement Contracts is enabled
71: -- FND_API.G_FALSE if Procurement Contracts is disabled.
72: --Testing:
73: --
74: --End of Comments
67: --x_return_status
68: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
69: --x_contracts_enabled
70: -- FND_API.G_TRUE if Procurement Contracts is enabled
71: -- FND_API.G_FALSE if Procurement Contracts is disabled.
72: --Testing:
73: --
74: --End of Comments
75: -------------------------------------------------------------------------------
75: -------------------------------------------------------------------------------
76:
77: PROCEDURE is_contracts_enabled
78: (p_api_version IN NUMBER --bug4028805
79: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
80: ,x_return_status OUT NOCOPY VARCHAR2
81: ,x_msg_count OUT NOCOPY NUMBER
82: ,x_msg_data OUT NOCOPY VARCHAR2
83: ,x_contracts_enabled OUT NOCOPY VARCHAR2) IS
87: l_api_version CONSTANT NUMBER := 1.0; --bug 4028805
88:
89: BEGIN
90:
91: IF NOT (FND_API.compatible_api_call(l_api_version
92: ,p_api_version
93: ,l_api_name
94: ,g_pkg_name)) THEN
95: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
91: IF NOT (FND_API.compatible_api_call(l_api_version
92: ,p_api_version
93: ,l_api_name
94: ,g_pkg_name)) THEN
95: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
96: END IF;
97:
98: -- initialize API return status to success
99: x_return_status:= FND_API.G_RET_STS_SUCCESS;
95: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
96: END IF;
97:
98: -- initialize API return status to success
99: x_return_status:= FND_API.G_RET_STS_SUCCESS;
100:
101: -- initialize meesage list
102: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
103: FND_MSG_PUB.initialize;
98: -- initialize API return status to success
99: x_return_status:= FND_API.G_RET_STS_SUCCESS;
100:
101: -- initialize meesage list
102: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
103: FND_MSG_PUB.initialize;
104: END IF;
105:
106: x_contracts_enabled := is_contracts_enabled;
106: x_contracts_enabled := is_contracts_enabled;
107:
108: EXCEPTION
109: WHEN OTHERS THEN
110: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
111: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
112: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
113: IF (g_fnd_debug='Y') THEN
114: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN
193: -- Message count
194: --x_msg_data
195: -- message data
196: --x_return_status
197: -- FND_API.G_RET_STS_ERROR - for expected error
198: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
199: -- FND_API.G_RET_STS_SUCCESS - for success
200: --x_supplier_userlist
201: -- PL/SQL table of supplier user names
194: --x_msg_data
195: -- message data
196: --x_return_status
197: -- FND_API.G_RET_STS_ERROR - for expected error
198: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
199: -- FND_API.G_RET_STS_SUCCESS - for success
200: --x_supplier_userlist
201: -- PL/SQL table of supplier user names
202: --Notes:
195: -- message data
196: --x_return_status
197: -- FND_API.G_RET_STS_ERROR - for expected error
198: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
199: -- FND_API.G_RET_STS_SUCCESS - for success
200: --x_supplier_userlist
201: -- PL/SQL table of supplier user names
202: --Notes:
203: -- SAHEGDE 07/18/2003
212: -------------------------------------------------------------------------------
213:
214: PROCEDURE get_external_userlist
215: (p_api_version IN NUMBER --bug4028805
216: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
217: ,p_document_id IN NUMBER
218: ,p_document_type IN VARCHAR2
219: ,p_external_contact_id IN NUMBER DEFAULT NULL
220: ,x_return_status OUT NOCOPY VARCHAR2
232:
233:
234: BEGIN
235:
236: IF NOT (FND_API.compatible_api_call(l_api_version
237: ,p_api_version
238: ,l_api_name
239: ,g_pkg_name)) THEN
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
236: IF NOT (FND_API.compatible_api_call(l_api_version
237: ,p_api_version
238: ,l_api_name
239: ,g_pkg_name)) THEN
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: END IF;
242:
243: -- initialize API return status to success
244: x_return_status:= FND_API.G_RET_STS_SUCCESS;
240: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: END IF;
242:
243: -- initialize API return status to success
244: x_return_status:= FND_API.G_RET_STS_SUCCESS;
245:
246: -- initialize meesage list
247: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
248: FND_MSG_PUB.initialize;
243: -- initialize API return status to success
244: x_return_status:= FND_API.G_RET_STS_SUCCESS;
245:
246: -- initialize meesage list
247: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
248: FND_MSG_PUB.initialize;
249: END IF;
250:
251: -- parse the contracts document type to type lookup
262: ,x_msg_data => x_msg_data
263: ,x_external_user_tbl => l_external_user_tbl);
264:
265:
266: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
267: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
268: END IF;
269:
270: -- populate the out parameter. Contracts need comma delimited list of users.
263: ,x_external_user_tbl => l_external_user_tbl);
264:
265:
266: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
267: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
268: END IF;
269:
270: -- populate the out parameter. Contracts need comma delimited list of users.
271: x_external_user_tbl := l_external_user_tbl;
270: -- populate the out parameter. Contracts need comma delimited list of users.
271: x_external_user_tbl := l_external_user_tbl;
272:
273: EXCEPTION
274: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
275: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
276: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
277: ,p_data => x_msg_data);
278: WHEN OTHERS THEN
271: x_external_user_tbl := l_external_user_tbl;
272:
273: EXCEPTION
274: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
275: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
276: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
277: ,p_data => x_msg_data);
278: WHEN OTHERS THEN
279: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
275: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
276: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
277: ,p_data => x_msg_data);
278: WHEN OTHERS THEN
279: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
280: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
281: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
282: IF (g_fnd_debug='Y') THEN
283: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN
324: -- Message count
325: --x_msg_data
326: -- message data
327: --x_return_status
328: -- FND_API.G_RET_STS_ERROR - for expected error
329: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
330: -- FND_API.G_RET_STS_SUCCESS - for success
331: --x_supplier_userlist
332: -- Comma delimited list of supplier user names
325: --x_msg_data
326: -- message data
327: --x_return_status
328: -- FND_API.G_RET_STS_ERROR - for expected error
329: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
330: -- FND_API.G_RET_STS_SUCCESS - for success
331: --x_supplier_userlist
332: -- Comma delimited list of supplier user names
333: --Notes:
326: -- message data
327: --x_return_status
328: -- FND_API.G_RET_STS_ERROR - for expected error
329: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
330: -- FND_API.G_RET_STS_SUCCESS - for success
331: --x_supplier_userlist
332: -- Comma delimited list of supplier user names
333: --Notes:
334: -- This is an overloaded API to return the supplier names in a comma delimited
338: --End of Comments
339: -------------------------------------------------------------------------------
340: PROCEDURE get_external_userlist
341: (p_api_version IN NUMBER --bug4028805
342: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
343: ,p_document_id IN NUMBER
344: ,p_document_type IN VARCHAR2
345: ,p_external_contact_id IN NUMBER DEFAULT NULL
346: ,x_return_status OUT NOCOPY VARCHAR2
363:
364:
365: BEGIN
366:
367: IF NOT (FND_API.compatible_api_call(l_api_version
368: ,p_api_version
369: ,l_api_name
370: ,g_pkg_name)) THEN
371: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
367: IF NOT (FND_API.compatible_api_call(l_api_version
368: ,p_api_version
369: ,l_api_name
370: ,g_pkg_name)) THEN
371: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
372: END IF;
373:
374: -- initialize API return status to success
375: x_return_status:= FND_API.G_RET_STS_SUCCESS;
371: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
372: END IF;
373:
374: -- initialize API return status to success
375: x_return_status:= FND_API.G_RET_STS_SUCCESS;
376:
377: -- initialize meesage list
378: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
379: FND_MSG_PUB.initialize;
374: -- initialize API return status to success
375: x_return_status:= FND_API.G_RET_STS_SUCCESS;
376:
377: -- initialize meesage list
378: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
379: FND_MSG_PUB.initialize;
380: END IF;
381:
382: -- parse the contracts document type to type lookup
383: l_document_type := SUBSTR(p_document_type, 1, 2);
384:
385: PO_VENDORS_GRP.get_external_userlist
386: (p_api_version => 1.0 --bug4028805
387: ,p_init_msg_list => FND_API.G_FALSE
388: ,p_document_id => p_document_id
389: ,p_document_type => l_document_type
390: ,p_external_contact_id => p_external_contact_id
391: ,x_return_status => l_return_status
398: ,x_vendor_id => l_vendor_id);
399:
400:
401:
402: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
403: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
404: END IF;
405:
406: -- populate the out parameter. Contracts need comma delimited list of users.
399:
400:
401:
402: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
403: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
404: END IF;
405:
406: -- populate the out parameter. Contracts need comma delimited list of users.
407: x_external_userlist := l_external_userlist;
406: -- populate the out parameter. Contracts need comma delimited list of users.
407: x_external_userlist := l_external_userlist;
408:
409: EXCEPTION
410: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
411: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
412: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
413: ,p_data => x_msg_data);
414: WHEN OTHERS THEN
407: x_external_userlist := l_external_userlist;
408:
409: EXCEPTION
410: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
411: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
412: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
413: ,p_data => x_msg_data);
414: WHEN OTHERS THEN
415: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
411: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
412: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
413: ,p_data => x_msg_data);
414: WHEN OTHERS THEN
415: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
416: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
417: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
418: IF (g_fnd_debug='Y') THEN
419: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN
453: -- Message count
454: --x_msg_data
455: -- message data
456: --x_return_status
457: -- FND_API.G_RET_STS_ERROR - for expected error
458: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
459: -- FND_API.G_RET_STS_SUCCESS - for success
460: --x_category_tbl
461: -- PL/SQL table of concatenated category names for lines used in the PO
454: --x_msg_data
455: -- message data
456: --x_return_status
457: -- FND_API.G_RET_STS_ERROR - for expected error
458: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
459: -- FND_API.G_RET_STS_SUCCESS - for success
460: --x_category_tbl
461: -- PL/SQL table of concatenated category names for lines used in the PO
462: --x_item_tbl
455: -- message data
456: --x_return_status
457: -- FND_API.G_RET_STS_ERROR - for expected error
458: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
459: -- FND_API.G_RET_STS_SUCCESS - for success
460: --x_category_tbl
461: -- PL/SQL table of concatenated category names for lines used in the PO
462: --x_item_tbl
463: -- PL/SQL table of concatenated items for the lines used in the PO
469: -------------------------------------------------------------------------------
470:
471: PROCEDURE get_item_categorylist
472: (p_api_version IN NUMBER
473: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
474: ,p_document_id IN NUMBER
475: ,x_return_status OUT NOCOPY VARCHAR2
476: ,x_msg_count OUT NOCOPY NUMBER
477: ,x_msg_data OUT NOCOPY VARCHAR2
493: l_item_tbl item_table_type;
494:
495: BEGIN
496:
497: IF NOT (FND_API.compatible_api_call(l_api_version
498: ,p_api_version
499: ,l_api_name
500: ,g_pkg_name)) THEN
501: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
497: IF NOT (FND_API.compatible_api_call(l_api_version
498: ,p_api_version
499: ,l_api_name
500: ,g_pkg_name)) THEN
501: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
502: END IF;
503:
504: -- initialize API return status to success
505: x_return_status:= FND_API.G_RET_STS_SUCCESS;
501: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
502: END IF;
503:
504: -- initialize API return status to success
505: x_return_status:= FND_API.G_RET_STS_SUCCESS;
506:
507: -- initialize meesage list
508: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
509: FND_MSG_PUB.initialize;
504: -- initialize API return status to success
505: x_return_status:= FND_API.G_RET_STS_SUCCESS;
506:
507: -- initialize meesage list
508: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
509: FND_MSG_PUB.initialize;
510: END IF;
511:
512: -- what: for the given document id, bulk collect item categories
559: end loop;
560: END IF;
561:
562: EXCEPTION
563: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
564: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
565: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
566: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
567: IF (g_fnd_debug='Y') THEN
560: END IF;
561:
562: EXCEPTION
563: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
564: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
565: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
566: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
567: IF (g_fnd_debug='Y') THEN
568: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN
620: --x_msg_data
621: -- Standard parameter.message data
622: --x_return_status
623: -- Standard parameter. Status Returned to calling API. Possible values are following
624: -- FND_API.G_RET_STS_ERROR - for expected error
625: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
626: -- FND_API.G_RET_STS_SUCCESS - for success
627: --Notes:
628: -- 07/11/2003 smhanda
621: -- Standard parameter.message data
622: --x_return_status
623: -- Standard parameter. Status Returned to calling API. Possible values are following
624: -- FND_API.G_RET_STS_ERROR - for expected error
625: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
626: -- FND_API.G_RET_STS_SUCCESS - for success
627: --Notes:
628: -- 07/11/2003 smhanda
629: -- 1. This API has been written specifically for integration with contracts wherein Contracts Changes
622: --x_return_status
623: -- Standard parameter. Status Returned to calling API. Possible values are following
624: -- FND_API.G_RET_STS_ERROR - for expected error
625: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
626: -- FND_API.G_RET_STS_SUCCESS - for success
627: --Notes:
628: -- 07/11/2003 smhanda
629: -- 1. This API has been written specifically for integration with contracts wherein Contracts Changes
630: -- are treated as extension to PO Entry form changes of the PO. Before using it in any other place
647: --End of Comments
648: -------------------------------------------------------------------------------
649: PROCEDURE IS_po_update_allowed (
650: p_api_version IN NUMBER,
651: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
652: p_header_id IN NUMBER,
653: p_callout_string IN VARCHAR2,
654: p_lock_flag IN VARCHAR2 DEFAULT 'N',
655: x_update_allowed OUT NOCOPY VARCHAR2,
684: END IF;
685: End if;
686:
687: -- Standard call to check for call compatibility.
688: IF NOT FND_API.Compatible_API_Call (p_current_version_number=>l_api_version,
689: p_caller_version_number =>p_api_version,
690: p_api_name =>l_api_name,
691: p_pkg_name =>G_PKG_NAME)
692:
690: p_api_name =>l_api_name,
691: p_pkg_name =>G_PKG_NAME)
692:
693: THEN
694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
695: END IF;
696:
697: -- Initialize message list if p_init_msg_list is set to TRUE.
698: IF FND_API.to_Boolean(p_init_msg_list ) THEN
694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
695: END IF;
696:
697: -- Initialize message list if p_init_msg_list is set to TRUE.
698: IF FND_API.to_Boolean(p_init_msg_list ) THEN
699: FND_MSG_PUB.initialize;
700: END IF;
701:
702: -- Initialize API return status to success
699: FND_MSG_PUB.initialize;
700: END IF;
701:
702: -- Initialize API return status to success
703: x_return_status := FND_API.G_RET_STS_SUCCESS;
704: X_update_allowed := 'Y';
705:
706: If g_fnd_debug = 'Y' then
707: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
716: Fnd_message.set_name('PO','PO_VALUE_MISSING');
717: Fnd_message.set_token( token => 'VARIABLE'
718: , VALUE => 'p_header_id');
719: FND_MSG_PUB.Add;
720: x_return_status := FND_API.G_RET_STS_ERROR;
721: RAISE FND_API.G_EXC_ERROR;
722: END IF;
723:
724: If p_callout_string is not null then
717: Fnd_message.set_token( token => 'VARIABLE'
718: , VALUE => 'p_header_id');
719: FND_MSG_PUB.Add;
720: x_return_status := FND_API.G_RET_STS_ERROR;
721: RAISE FND_API.G_EXC_ERROR;
722: END IF;
723:
724: If p_callout_string is not null then
725: L_start := 1;
740: Fnd_message.set_name('PO','PO_VALUE_MISSING');
741: Fnd_message.set_token( token => 'VARIABLE'
742: , VALUE => 'p_callout_string');
743: FND_MSG_PUB.Add;
744: x_return_status := FND_API.G_RET_STS_ERROR;
745: RAISE FND_API.G_EXC_ERROR;
746:
747: END IF;-- p_callout _string
748: If g_fnd_debug = 'Y' then
741: Fnd_message.set_token( token => 'VARIABLE'
742: , VALUE => 'p_callout_string');
743: FND_MSG_PUB.Add;
744: x_return_status := FND_API.G_RET_STS_ERROR;
745: RAISE FND_API.G_EXC_ERROR;
746:
747: END IF;-- p_callout _string
748: If g_fnd_debug = 'Y' then
749: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
771: Fnd_message.set_name('PO','PO_VALUE_MISSING');
772: Fnd_message.set_token( token => 'VARIABLE'
773: , VALUE => 'callout_status');
774: FND_MSG_PUB.Add;
775: x_return_status := FND_API.G_RET_STS_ERROR;
776: RAISE FND_API.G_EXC_ERROR;
777: END IF;
778: IF l_callout_revision is null then
779: Fnd_message.set_name('PO','PO_VALUE_MISSING');
772: Fnd_message.set_token( token => 'VARIABLE'
773: , VALUE => 'callout_status');
774: FND_MSG_PUB.Add;
775: x_return_status := FND_API.G_RET_STS_ERROR;
776: RAISE FND_API.G_EXC_ERROR;
777: END IF;
778: IF l_callout_revision is null then
779: Fnd_message.set_name('PO','PO_VALUE_MISSING');
780: Fnd_message.set_token( token => 'VARIABLE'
779: Fnd_message.set_name('PO','PO_VALUE_MISSING');
780: Fnd_message.set_token( token => 'VARIABLE'
781: , VALUE => 'callout_revision');
782: FND_MSG_PUB.Add;
783: x_return_status := FND_API.G_RET_STS_ERROR;
784: RAISE FND_API.G_EXC_ERROR;
785: END IF;
786: BEGIN
787: -- SQL WHAT-get the current status and revision of the PO
780: Fnd_message.set_token( token => 'VARIABLE'
781: , VALUE => 'callout_revision');
782: FND_MSG_PUB.Add;
783: x_return_status := FND_API.G_RET_STS_ERROR;
784: RAISE FND_API.G_EXC_ERROR;
785: END IF;
786: BEGIN
787: -- SQL WHAT-get the current status and revision of the PO
788: -- SQL WHY - Needed to compare status and revision with passed in values
797: EXCEPTION
798: WHEN NO_DATA_FOUND then
799: Fnd_message.set_name('PO','PO_DOESNOT_EXIST');
800: FND_MSG_PUB.Add;
801: x_return_status := FND_API.G_RET_STS_ERROR;
802: RAISE FND_API.G_EXC_ERROR;
803:
804: END;
805:
798: WHEN NO_DATA_FOUND then
799: Fnd_message.set_name('PO','PO_DOESNOT_EXIST');
800: FND_MSG_PUB.Add;
801: x_return_status := FND_API.G_RET_STS_ERROR;
802: RAISE FND_API.G_EXC_ERROR;
803:
804: END;
805:
806: IF g_fnd_debug = 'Y' then
823: Fnd_message.set_name('PO','PO_VALUE_MISSING');
824: Fnd_message.set_token( token => 'VARIABLE'
825: , VALUE => 'emp_id_in_callout_str');
826: FND_MSG_PUB.Add;
827: x_return_status := FND_API.G_RET_STS_ERROR;
828: RAISE FND_API.G_EXC_ERROR;
829: End if;--emp id is null
830: --Check if current user is the current approver for the PO
831: IF g_fnd_debug = 'Y' then
824: Fnd_message.set_token( token => 'VARIABLE'
825: , VALUE => 'emp_id_in_callout_str');
826: FND_MSG_PUB.Add;
827: x_return_status := FND_API.G_RET_STS_ERROR;
828: RAISE FND_API.G_EXC_ERROR;
829: End if;--emp id is null
830: --Check if current user is the current approver for the PO
831: IF g_fnd_debug = 'Y' then
832: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
916: END IF;
917: END IF;
918: ---Return status handling.
919: --If any errors happen abort API.
920: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
921: RAISE FND_API.G_EXC_ERROR;
922: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
923: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
924: END IF;
917: END IF;
918: ---Return status handling.
919: --If any errors happen abort API.
920: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
921: RAISE FND_API.G_EXC_ERROR;
922: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
923: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
924: END IF;
925: --PO Status check returns N if document is in status "In Process"
918: ---Return status handling.
919: --If any errors happen abort API.
920: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
921: RAISE FND_API.G_EXC_ERROR;
922: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
923: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
924: END IF;
925: --PO Status check returns N if document is in status "In Process"
926: -- But for Terms authoring it is a valid status. So ignore
919: --If any errors happen abort API.
920: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
921: RAISE FND_API.G_EXC_ERROR;
922: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
923: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
924: END IF;
925: --PO Status check returns N if document is in status "In Process"
926: -- But for Terms authoring it is a valid status. So ignore
927: -- results by PO Status Check in that case because the other flags
948: END IF;
949: END IF;
950: EXCEPTION
951: WHEN l_STATUS_CHANGED then
952: x_return_status := FND_API.G_RET_STS_ERROR;
953: x_update_allowed := 'N';
954: FND_MESSAGE.set_name('PO', 'PO_STATUS_CHANGED');
955: FND_MSG_PUB.Add;
956: FND_MSG_PUB.Count_And_Get
965: END IF;
966:
967:
968: WHEN l_DONOT_UPDATE then
969: x_return_status := FND_API.G_RET_STS_ERROR;
970: x_update_allowed := 'N';
971: FND_MESSAGE.set_name('PO', 'PO_NO_UPDATE_ALLOWED');
972: FND_MSG_PUB.Add;
973: FND_MSG_PUB.Count_And_Get
980: MESSAGE =>'550:Exception l_donot_update ');
981: END IF;
982: END IF;
983:
984: WHEN FND_API.G_EXC_ERROR then
985: x_return_status := FND_API.G_RET_STS_ERROR;
986: x_update_allowed := 'N';
987: FND_MSG_PUB.Count_And_Get
988: (p_count => x_msg_count,
981: END IF;
982: END IF;
983:
984: WHEN FND_API.G_EXC_ERROR then
985: x_return_status := FND_API.G_RET_STS_ERROR;
986: x_update_allowed := 'N';
987: FND_MSG_PUB.Count_And_Get
988: (p_count => x_msg_count,
989: p_data => x_msg_data );
1001: END IF;
1002: END LOOP;
1003:
1004: END IF;
1005: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1006: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1007: x_update_allowed := 'N';
1008: FND_MSG_PUB.Count_And_Get
1009: (p_count => x_msg_count,
1002: END LOOP;
1003:
1004: END IF;
1005: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1006: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1007: x_update_allowed := 'N';
1008: FND_MSG_PUB.Count_And_Get
1009: (p_count => x_msg_count,
1010: p_data => x_msg_data );
1024:
1025: END IF;
1026:
1027: WHEN OTHERS THEN
1028: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1029: X_update_allowed := 'N';
1030:
1031: IF FND_MSG_PUB.Check_Msg_Level
1032: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1100: --x_msg_data
1101: -- Standard parameter.message data
1102: --x_return_status
1103: -- Standard parameter. Status Returned to calling API. Possible values are following
1104: -- FND_API.G_RET_STS_ERROR - for expected error
1105: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1106: -- FND_API.G_RET_STS_SUCCESS - for success
1107: --Notes:
1108: -- 07/11/2003 smhanda
1101: -- Standard parameter.message data
1102: --x_return_status
1103: -- Standard parameter. Status Returned to calling API. Possible values are following
1104: -- FND_API.G_RET_STS_ERROR - for expected error
1105: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1106: -- FND_API.G_RET_STS_SUCCESS - for success
1107: --Notes:
1108: -- 07/11/2003 smhanda
1109: -- 1. This API has been written specifically for integration with contracts wherein Contracts Changes
1102: --x_return_status
1103: -- Standard parameter. Status Returned to calling API. Possible values are following
1104: -- FND_API.G_RET_STS_ERROR - for expected error
1105: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1106: -- FND_API.G_RET_STS_SUCCESS - for success
1107: --Notes:
1108: -- 07/11/2003 smhanda
1109: -- 1. This API has been written specifically for integration with contracts wherein Contracts Changes
1110: -- are treated as extension to PO Entry form changes of the PO. Before using it in any other place
1130: --End of Comments
1131: -------------------------------------------------------------------------------
1132: PROCEDURE Apply_template_change (
1133: p_api_version IN NUMBER,
1134: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
1135: p_header_id IN NUMBER,
1136: p_callout_string IN VARCHAR2,
1137: p_template_changed IN VARCHAR2,
1138: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
1134: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
1135: p_header_id IN NUMBER,
1136: p_callout_string IN VARCHAR2,
1137: p_template_changed IN VARCHAR2,
1138: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
1139: x_update_allowed OUT NOCOPY VARCHAR2,
1140: x_return_status OUT NOCOPY VARCHAR2,
1141: x_msg_data OUT NOCOPY VARCHAR2,
1142: x_msg_count OUT NOCOPY NUMBER
1162: End if;
1163: --Savepoint
1164: SAVEPOINT SP_APPLY_TEMPLATE_CHANGE;
1165: -- Standard call to check for call compatibility.
1166: IF NOT FND_API.Compatible_API_Call (p_current_version_number=>l_api_version,
1167: p_caller_version_number =>p_api_version,
1168: p_api_name =>l_api_name,
1169: p_pkg_name =>G_PKG_NAME)
1170: THEN
1167: p_caller_version_number =>p_api_version,
1168: p_api_name =>l_api_name,
1169: p_pkg_name =>G_PKG_NAME)
1170: THEN
1171: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1172: END IF;
1173:
1174: -- Initialize message list if p_init_msg_list is set to TRUE.
1175: IF FND_API.to_Boolean(p_init_msg_list ) THEN
1171: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1172: END IF;
1173:
1174: -- Initialize message list if p_init_msg_list is set to TRUE.
1175: IF FND_API.to_Boolean(p_init_msg_list ) THEN
1176: FND_MSG_PUB.initialize;
1177: END IF;
1178:
1179: -- Initialize API return status to success
1176: FND_MSG_PUB.initialize;
1177: END IF;
1178:
1179: -- Initialize API return status to success
1180: x_return_status := FND_API.G_RET_STS_SUCCESS;
1181: x_update_allowed := 'N';
1182:
1183: IF g_fnd_debug = 'Y' then
1184: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1219: Fnd_message.set_name('PO','PO_VALUE_MISSING');
1220: Fnd_message.set_token( token => 'VARIABLE'
1221: , VALUE => 'p_callout_string');
1222: FND_MSG_PUB.Add;
1223: x_return_status := FND_API.G_RET_STS_ERROR;
1224: RAISE FND_API.G_EXC_ERROR;
1225:
1226: END IF;-- p_callout _string
1227: IF g_fnd_debug = 'Y' then
1220: Fnd_message.set_token( token => 'VARIABLE'
1221: , VALUE => 'p_callout_string');
1222: FND_MSG_PUB.Add;
1223: x_return_status := FND_API.G_RET_STS_ERROR;
1224: RAISE FND_API.G_EXC_ERROR;
1225:
1226: END IF;-- p_callout _string
1227: IF g_fnd_debug = 'Y' then
1228: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1287: MODULE =>g_module_prefix||l_api_name,
1288: MESSAGE =>'200:update allowed after calling is_po_update_allowed'||x_update_allowed);
1289: END IF;
1290: End if;
1291: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1292: RAISE FND_API.G_EXC_ERROR;
1293: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1294: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1295: END IF;
1288: MESSAGE =>'200:update allowed after calling is_po_update_allowed'||x_update_allowed);
1289: END IF;
1290: End if;
1291: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1292: RAISE FND_API.G_EXC_ERROR;
1293: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1294: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1295: END IF;
1296:
1289: END IF;
1290: End if;
1291: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1292: RAISE FND_API.G_EXC_ERROR;
1293: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1294: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1295: END IF;
1296:
1297: -- take action on PO if update is allowed. The Control should reach here
1290: End if;
1291: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1292: RAISE FND_API.G_EXC_ERROR;
1293: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1294: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1295: END IF;
1296:
1297: -- take action on PO if update is allowed. The Control should reach here
1298: -- only if x_update_allowed = Y. Otherwise po_update_allowed
1345: Fnd_message.set_name('PO','PO_VALUE_MISSING');
1346: Fnd_message.set_token( token => 'VARIABLE'
1347: , VALUE => 'p_template_changed');
1348: FND_MSG_PUB.Add;
1349: x_return_status := FND_API.G_RET_STS_ERROR;
1350: RAISE FND_API.G_EXC_ERROR;
1351:
1352: END IF; -- if p_template_changed other than Y or D
1353:
1346: Fnd_message.set_token( token => 'VARIABLE'
1347: , VALUE => 'p_template_changed');
1348: FND_MSG_PUB.Add;
1349: x_return_status := FND_API.G_RET_STS_ERROR;
1350: RAISE FND_API.G_EXC_ERROR;
1351:
1352: END IF; -- if p_template_changed other than Y or D
1353:
1354: -- Commit the transaction if p_commit set true
1351:
1352: END IF; -- if p_template_changed other than Y or D
1353:
1354: -- Commit the transaction if p_commit set true
1355: IF FND_API.TO_BOOLEAN(p_commit) then
1356: IF g_fnd_debug = 'Y' then
1357: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
1358: FND_LOG.string(LOG_LEVEL=>FND_LOG.LEVEL_STATEMENT,
1359: MODULE =>g_module_prefix||l_api_name,
1370: END IF;
1371: End if;
1372: EXCEPTION
1373: WHEN l_update_not_allowed then
1374: x_return_status := FND_API.G_RET_STS_ERROR;
1375: X_update_allowed := 'N';
1376: ROLLBACK TO SP_APPLY_TEMPLATE_CHANGE;
1377: FND_MESSAGE.set_name('PO', 'PO_NO_TEMPLATE_CHANGE');
1378: FND_MSG_PUB.Add;
1385: MODULE =>g_module_prefix||l_api_name,
1386: MESSAGE =>'450:Exception l_update_not_allowed ');
1387: END IF;
1388: END IF;
1389: WHEN FND_API.G_EXC_ERROR then
1390: x_return_status := FND_API.G_RET_STS_ERROR;
1391: ROLLBACK TO SP_APPLY_TEMPLATE_CHANGE;
1392: FND_MSG_PUB.Count_And_Get
1393: (p_count => x_msg_count,
1386: MESSAGE =>'450:Exception l_update_not_allowed ');
1387: END IF;
1388: END IF;
1389: WHEN FND_API.G_EXC_ERROR then
1390: x_return_status := FND_API.G_RET_STS_ERROR;
1391: ROLLBACK TO SP_APPLY_TEMPLATE_CHANGE;
1392: FND_MSG_PUB.Count_And_Get
1393: (p_count => x_msg_count,
1394: p_data => x_msg_data );
1405: MESSAGE =>'470:errors '||FND_MSG_PUB.Get(p_msg_index=>i,p_encoded =>'F' ));
1406: END IF;
1407: END LOOP;
1408: END IF;
1409: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1410: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1411: ROLLBACK TO SP_APPLY_TEMPLATE_CHANGE;
1412: FND_MSG_PUB.Count_And_Get
1413: (p_count => x_msg_count,
1406: END IF;
1407: END LOOP;
1408: END IF;
1409: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1410: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1411: ROLLBACK TO SP_APPLY_TEMPLATE_CHANGE;
1412: FND_MSG_PUB.Count_And_Get
1413: (p_count => x_msg_count,
1414: p_data => x_msg_data );
1428:
1429: END IF;
1430:
1431: WHEN OTHERS THEN
1432: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1433: ROLLBACK TO SP_APPLY_TEMPLATE_CHANGE;
1434: IF FND_MSG_PUB.Check_Msg_Level
1435: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1436: THEN
1482: --x_msg_data
1483: -- Standard parameter.message data
1484: --x_return_status
1485: -- Standard parameter. Status Returned to calling API. Possible values are following
1486: -- FND_API.G_RET_STS_ERROR - for expected error
1487: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1488: -- FND_API.G_RET_STS_SUCCESS - for success
1489: --Notes:
1490: -- 07/11/2003 smhanda
1483: -- Standard parameter.message data
1484: --x_return_status
1485: -- Standard parameter. Status Returned to calling API. Possible values are following
1486: -- FND_API.G_RET_STS_ERROR - for expected error
1487: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1488: -- FND_API.G_RET_STS_SUCCESS - for success
1489: --Notes:
1490: -- 07/11/2003 smhanda
1491: -- 1. This API has been written specifically for integration with contracts Before using it in any other place
1484: --x_return_status
1485: -- Standard parameter. Status Returned to calling API. Possible values are following
1486: -- FND_API.G_RET_STS_ERROR - for expected error
1487: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1488: -- FND_API.G_RET_STS_SUCCESS - for success
1489: --Notes:
1490: -- 07/11/2003 smhanda
1491: -- 1. This API has been written specifically for integration with contracts Before using it in any other place
1492: -- Please diagnose the impact about including security
1496: --End of Comments
1497: -------------------------------------------------------------------------------
1498: PROCEDURE attribute_value_changed (
1499: p_api_version IN NUMBER,
1500: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
1501: p_doc_id IN NUMBER,
1502: p_sys_var_tbl IN OUT NOCOPY VARIABLE_CODE_TBL_TYPE,
1503: x_return_status OUT NOCOPY VARCHAR2,
1504: x_msg_data OUT NOCOPY VARCHAR2,
1524: MESSAGE =>'10: Start API' ||l_api_name);
1525: END IF;
1526: END IF;
1527: -- Standard call to check for call compatibility.
1528: IF NOT FND_API.Compatible_API_Call (p_current_version_number=>l_api_version,
1529: p_caller_version_number =>p_api_version,
1530: p_api_name =>l_api_name,
1531: p_pkg_name =>G_PKG_NAME)
1532: THEN
1529: p_caller_version_number =>p_api_version,
1530: p_api_name =>l_api_name,
1531: p_pkg_name =>G_PKG_NAME)
1532: THEN
1533: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1534: END IF;
1535:
1536: -- Initialize message list if p_init_msg_list is set to TRUE.
1537: IF FND_API.to_Boolean(p_init_msg_list ) THEN
1533: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1534: END IF;
1535:
1536: -- Initialize message list if p_init_msg_list is set to TRUE.
1537: IF FND_API.to_Boolean(p_init_msg_list ) THEN
1538: FND_MSG_PUB.initialize;
1539: END IF;
1540:
1541: -- Initialize API return status to success
1538: FND_MSG_PUB.initialize;
1539: END IF;
1540:
1541: -- Initialize API return status to success
1542: x_return_status := FND_API.G_RET_STS_SUCCESS;
1543:
1544: -- Basic validations about in parameters
1545: IF p_doc_id is null then
1546: Fnd_message.set_name('PO','PO_VALUE_MISSING');
1546: Fnd_message.set_name('PO','PO_VALUE_MISSING');
1547: Fnd_message.set_token( token => 'VARIABLE'
1548: , VALUE => 'p_doc_id');
1549: FND_MSG_PUB.Add;
1550: x_return_status := FND_API.G_RET_STS_ERROR;
1551: RAISE FND_API.G_EXC_ERROR;
1552: END IF;
1553:
1554:
1547: Fnd_message.set_token( token => 'VARIABLE'
1548: , VALUE => 'p_doc_id');
1549: FND_MSG_PUB.Add;
1550: x_return_status := FND_API.G_RET_STS_ERROR;
1551: RAISE FND_API.G_EXC_ERROR;
1552: END IF;
1553:
1554:
1555: -- SQL WHAT-get the changed status for PO system Variables
1796: END IF;
1797: END IF; -- if fnd debug
1798: EXCEPTION
1799:
1800: WHEN FND_API.G_EXC_ERROR then
1801: x_return_status := FND_API.G_RET_STS_ERROR;
1802: FND_MSG_PUB.Count_And_Get
1803: (p_count => x_msg_count,
1804: p_data => x_msg_data );
1797: END IF; -- if fnd debug
1798: EXCEPTION
1799:
1800: WHEN FND_API.G_EXC_ERROR then
1801: x_return_status := FND_API.G_RET_STS_ERROR;
1802: FND_MSG_PUB.Count_And_Get
1803: (p_count => x_msg_count,
1804: p_data => x_msg_data );
1805: IF g_fnd_debug = 'Y' then
1816: END IF;
1817: END LOOP;
1818:
1819: END IF;
1820: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1821: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1822: FND_MSG_PUB.Count_And_Get
1823: (p_count => x_msg_count,
1824: p_data => x_msg_data );
1817: END LOOP;
1818:
1819: END IF;
1820: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1821: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1822: FND_MSG_PUB.Count_And_Get
1823: (p_count => x_msg_count,
1824: p_data => x_msg_data );
1825: IF g_fnd_debug = 'Y' then
1838:
1839: END IF;
1840:
1841: WHEN OTHERS THEN
1842: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1843: IF FND_MSG_PUB.Check_Msg_Level
1844: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1845: THEN
1846: FND_MSG_PUB.Add_Exc_Msg
1899: --x_msg_data
1900: -- Standard parameter.message data
1901: --x_return_status
1902: -- Standard parameter. Status Returned to calling API. Possible values are following
1903: -- FND_API.G_RET_STS_ERROR - for expected error
1904: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1905: -- FND_API.G_RET_STS_SUCCESS - for success
1906: --Notes:
1907: -- 07/11/2003 smhanda
1900: -- Standard parameter.message data
1901: --x_return_status
1902: -- Standard parameter. Status Returned to calling API. Possible values are following
1903: -- FND_API.G_RET_STS_ERROR - for expected error
1904: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1905: -- FND_API.G_RET_STS_SUCCESS - for success
1906: --Notes:
1907: -- 07/11/2003 smhanda
1908: -- 1. This API has been written specifically for integration with contracts Before using it in any other place
1901: --x_return_status
1902: -- Standard parameter. Status Returned to calling API. Possible values are following
1903: -- FND_API.G_RET_STS_ERROR - for expected error
1904: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
1905: -- FND_API.G_RET_STS_SUCCESS - for success
1906: --Notes:
1907: -- 07/11/2003 smhanda
1908: -- 1. This API has been written specifically for integration with contracts Before using it in any other place
1909: -- Please diagnose the impact about including security
1913: --End of Comments
1914: -------------------------------------------------------------------------------
1915: PROCEDURE Get_PO_Attribute_values(
1916: p_api_version IN NUMBER,
1917: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
1918: p_doc_id IN NUMBER,
1919: p_sys_var_value_tbl IN OUT NOCOPY VARIABLE_VALUE_TBL_TYPE,
1920: x_return_status OUT NOCOPY VARCHAR2,
1921: x_msg_data OUT NOCOPY VARCHAR2,
1958: MESSAGE =>'10: Start API' ||l_api_name);
1959: END IF;
1960: END IF;
1961: -- Standard call to check for call compatibility.
1962: IF NOT FND_API.Compatible_API_Call (p_current_version_number=>l_api_version,
1963: p_caller_version_number =>p_api_version,
1964: p_api_name =>l_api_name,
1965: p_pkg_name =>G_PKG_NAME)
1966: THEN
1963: p_caller_version_number =>p_api_version,
1964: p_api_name =>l_api_name,
1965: p_pkg_name =>G_PKG_NAME)
1966: THEN
1967: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1968: END IF;
1969:
1970: -- Initialize message list if p_init_msg_list is set to TRUE.
1971: IF FND_API.to_Boolean(p_init_msg_list ) THEN
1967: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1968: END IF;
1969:
1970: -- Initialize message list if p_init_msg_list is set to TRUE.
1971: IF FND_API.to_Boolean(p_init_msg_list ) THEN
1972: FND_MSG_PUB.initialize;
1973: END IF;
1974:
1975: -- Initialize API return status to success
1972: FND_MSG_PUB.initialize;
1973: END IF;
1974:
1975: -- Initialize API return status to success
1976: x_return_status := FND_API.G_RET_STS_SUCCESS;
1977:
1978: -- Basic validations about in parameters
1979: IF p_doc_id is null then
1980: Fnd_message.set_name('PO','PO_VALUE_MISSING');
1980: Fnd_message.set_name('PO','PO_VALUE_MISSING');
1981: Fnd_message.set_token( token => 'VARIABLE'
1982: , VALUE => 'p_doc_id');
1983: FND_MSG_PUB.Add;
1984: x_return_status := FND_API.G_RET_STS_ERROR;
1985: RAISE FND_API.G_EXC_ERROR;
1986: END IF;
1987:
1988: -- make the return table with attribute names
1981: Fnd_message.set_token( token => 'VARIABLE'
1982: , VALUE => 'p_doc_id');
1983: FND_MSG_PUB.Add;
1984: x_return_status := FND_API.G_RET_STS_ERROR;
1985: RAISE FND_API.G_EXC_ERROR;
1986: END IF;
1987:
1988: -- make the return table with attribute names
1989: l_po_attrib_tbl(1).variable_code:= 'OKC$B_ORGANIZATION';
2476: END IF;
2477: END IF;-- if fnd debug
2478: EXCEPTION
2479:
2480: WHEN FND_API.G_EXC_ERROR then
2481: x_return_status := FND_API.G_RET_STS_ERROR;
2482: FND_MSG_PUB.Count_And_Get
2483: (p_count => x_msg_count,
2484: p_data => x_msg_data );
2477: END IF;-- if fnd debug
2478: EXCEPTION
2479:
2480: WHEN FND_API.G_EXC_ERROR then
2481: x_return_status := FND_API.G_RET_STS_ERROR;
2482: FND_MSG_PUB.Count_And_Get
2483: (p_count => x_msg_count,
2484: p_data => x_msg_data );
2485: IF g_fnd_debug = 'Y' then
2495: MESSAGE =>'610:errors '||FND_MSG_PUB.Get(p_msg_index=>i,p_encoded =>'F' ));
2496: END IF;
2497: END LOOP;
2498: END IF;
2499: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
2500: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2501: FND_MSG_PUB.Count_And_Get
2502: (p_count => x_msg_count,
2503: p_data => x_msg_data );
2496: END IF;
2497: END LOOP;
2498: END IF;
2499: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
2500: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2501: FND_MSG_PUB.Count_And_Get
2502: (p_count => x_msg_count,
2503: p_data => x_msg_data );
2504: IF g_fnd_debug = 'Y' then
2517:
2518: END IF;
2519:
2520: WHEN OTHERS THEN
2521: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2522: IF FND_MSG_PUB.Check_Msg_Level
2523: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2524: THEN
2525: FND_MSG_PUB.Add_Exc_Msg
2566: --x_msg_data
2567: -- Standard parameter.message data
2568: --x_return_status
2569: -- Standard parameter. Status Returned to calling API. Possible values are following
2570: -- FND_API.G_RET_STS_ERROR - for expected error
2571: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2572: -- FND_API.G_RET_STS_SUCCESS - for success
2573: --x_signed_records
2574: -- Returns 'Y' if there exists a Signed record. Otherwise returns 'N'
2567: -- Standard parameter.message data
2568: --x_return_status
2569: -- Standard parameter. Status Returned to calling API. Possible values are following
2570: -- FND_API.G_RET_STS_ERROR - for expected error
2571: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2572: -- FND_API.G_RET_STS_SUCCESS - for success
2573: --x_signed_records
2574: -- Returns 'Y' if there exists a Signed record. Otherwise returns 'N'
2575: --Notes:
2568: --x_return_status
2569: -- Standard parameter. Status Returned to calling API. Possible values are following
2570: -- FND_API.G_RET_STS_ERROR - for expected error
2571: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2572: -- FND_API.G_RET_STS_SUCCESS - for success
2573: --x_signed_records
2574: -- Returns 'Y' if there exists a Signed record. Otherwise returns 'N'
2575: --Notes:
2576: -- 09/23/2003 rbairraj
2582: --End of Comments
2583: -------------------------------------------------------------------------------
2584: PROCEDURE Get_Last_Signed_Revision (
2585: p_api_version IN NUMBER,
2586: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
2587: p_header_id IN NUMBER,
2588: p_revision_num IN NUMBER,
2589: x_signed_revision_num OUT NOCOPY NUMBER,
2590: x_signed_records OUT NOCOPY VARCHAR2,
2601:
2602: BEGIN
2603:
2604:
2605: IF NOT (FND_API.compatible_api_call(l_api_version
2606: ,p_api_version
2607: ,l_api_name
2608: ,g_pkg_name)) THEN
2609: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2605: IF NOT (FND_API.compatible_api_call(l_api_version
2606: ,p_api_version
2607: ,l_api_name
2608: ,g_pkg_name)) THEN
2609: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2610: END IF;
2611:
2612: -- initialize API return status to success
2613: x_return_status:= FND_API.G_RET_STS_SUCCESS;
2609: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2610: END IF;
2611:
2612: -- initialize API return status to success
2613: x_return_status:= FND_API.G_RET_STS_SUCCESS;
2614:
2615: -- initialize meesage list
2616: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
2617: FND_MSG_PUB.initialize;
2612: -- initialize API return status to success
2613: x_return_status:= FND_API.G_RET_STS_SUCCESS;
2614:
2615: -- initialize meesage list
2616: IF (FND_API.to_Boolean(p_init_msg_list)) THEN
2617: FND_MSG_PUB.initialize;
2618: END IF;
2619:
2620: PO_SIGNATURE_PVT.get_last_signed_revision(
2623: x_signed_revision_num => l_signed_revision_num,
2624: x_signed_records => l_signed_records,
2625: x_return_status => x_return_status);
2626:
2627: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2628: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2629: END IF;
2630:
2631: IF l_signed_revision_num is not null THEN
2624: x_signed_records => l_signed_records,
2625: x_return_status => x_return_status);
2626:
2627: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2628: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2629: END IF;
2630:
2631: IF l_signed_revision_num is not null THEN
2632: -- Migrate PO
2659: x_signed_revision_num := l_signed_revision_num;
2660: END IF;
2661:
2662: EXCEPTION
2663: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2664: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2665: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
2666: ,p_data => x_msg_data);
2667: WHEN OTHERS THEN
2660: END IF;
2661:
2662: EXCEPTION
2663: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2664: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2665: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
2666: ,p_data => x_msg_data);
2667: WHEN OTHERS THEN
2668: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2664: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2665: FND_MSG_PUB.Count_and_Get(p_count => x_msg_count
2666: ,p_data => x_msg_data);
2667: WHEN OTHERS THEN
2668: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2669: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2670: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
2671: IF (g_fnd_debug='Y') THEN
2672: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN
2706: -- Message count
2707: --x_msg_data
2708: -- message data
2709: --x_return_status
2710: -- FND_API.G_RET_STS_ERROR - for expected error
2711: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2712: -- FND_API.G_RET_STS_SUCCESS - for success
2713: --Testing:
2714: --
2707: --x_msg_data
2708: -- message data
2709: --x_return_status
2710: -- FND_API.G_RET_STS_ERROR - for expected error
2711: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2712: -- FND_API.G_RET_STS_SUCCESS - for success
2713: --Testing:
2714: --
2715: --End of Comments
2708: -- message data
2709: --x_return_status
2710: -- FND_API.G_RET_STS_ERROR - for expected error
2711: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2712: -- FND_API.G_RET_STS_SUCCESS - for success
2713: --Testing:
2714: --
2715: --End of Comments
2716: ------------------------------------------------------------------------------
2748: END IF;
2749:
2750: l_progress := 20;
2751: -- Initialize API return status to success
2752: x_return_status := FND_API.G_RET_STS_SUCCESS;
2753:
2754: l_progress := 25;
2755: IF g_contracts_enabled = 'N' OR
2756: g_auto_apply_template = 'N' THEN
2840: END IF;
2841:
2842: OKC_TERMS_UTIL_GRP.GET_DEFAULT_TEMPLATE(
2843: p_api_version => 1.0,
2844: p_init_msg_list => FND_API.G_TRUE,
2845: x_return_status => x_return_status,
2846: x_msg_data => l_msg_data,
2847: x_msg_count => l_msg_count,
2848: p_document_type => l_k_doc_type,
2858: || l_progress,'Return status from get default template:'||x_return_status );
2859: END IF;
2860: END IF;
2861:
2862: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2863: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2864: END IF;
2865:
2866: ELSE
2859: END IF;
2860: END IF;
2861:
2862: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2863: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2864: END IF;
2865:
2866: ELSE
2867: l_progress := 60;
2896: p_api_version => 1.0, --bug4028805
2897: x_return_status => x_return_status,
2898: x_msg_data => l_msg_data,
2899: x_msg_count => l_msg_count,
2900: p_commit => FND_API.G_FALSE,
2901: p_template_id => l_template_id,
2902: p_target_doc_type => l_k_doc_type,
2903: p_target_doc_id => p_document_id,
2904: p_document_number => l_doc_number, -- Bug 4096095
2907: p_external_party_site_id => l_vendor_site_id, -- Bug 4096095
2908: p_retain_deliverable => 'N',
2909: p_internal_contact_id => l_agent_id,
2910: p_article_effective_date => sysdate,
2911: p_validate_commit => FND_API.G_TRUE,
2912: p_validation_string => l_status ||','||l_revision||','|| null
2913: );
2914:
2915: IF g_debug_stmt THEN
2919: END IF;
2920: END IF;
2921: ELSE
2922: -- Do not apply any terms if the template is null
2923: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2925: END IF;
2926: END IF;
2927:
2920: END IF;
2921: ELSE
2922: -- Do not apply any terms if the template is null
2923: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2925: END IF;
2926: END IF;
2927:
2928: l_progress := 80;
2930: PO_DEBUG.debug_end(l_log_head);
2931: END IF;
2932:
2933: Exception
2934: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2935: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2936: FND_MSG_PUB.Count_and_Get(p_count => l_msg_count
2937: ,p_data => l_msg_data);
2938: WHEN OTHERS THEN
2931: END IF;
2932:
2933: Exception
2934: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2935: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2936: FND_MSG_PUB.Count_and_Get(p_count => l_msg_count
2937: ,p_data => l_msg_data);
2938: WHEN OTHERS THEN
2939: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2935: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2936: FND_MSG_PUB.Count_and_Get(p_count => l_msg_count
2937: ,p_data => l_msg_data);
2938: WHEN OTHERS THEN
2939: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2940: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2941: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
2942: IF (g_fnd_debug='Y') THEN
2943: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN
2977: -- defaulted template id
2978: --x_template_name
2979: -- defaulted template name
2980: --x_return_status
2981: -- FND_API.G_RET_STS_ERROR - for expected error
2982: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2983: -- FND_API.G_RET_STS_SUCCESS - for success
2984: --Testing:
2985: --
2978: --x_template_name
2979: -- defaulted template name
2980: --x_return_status
2981: -- FND_API.G_RET_STS_ERROR - for expected error
2982: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2983: -- FND_API.G_RET_STS_SUCCESS - for success
2984: --Testing:
2985: --
2986: --End of Comments
2979: -- defaulted template name
2980: --x_return_status
2981: -- FND_API.G_RET_STS_ERROR - for expected error
2982: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
2983: -- FND_API.G_RET_STS_SUCCESS - for success
2984: --Testing:
2985: --
2986: --End of Comments
2987: ------------------------------------------------------------------------------
3011: END IF;
3012:
3013: l_progress := 20;
3014: -- Initialize API return status to success
3015: x_return_status := fnd_api.g_ret_sts_success;
3016: l_progress := 25;
3017:
3018: IF g_contracts_enabled = 'N' OR g_auto_apply_template = 'N'
3019: THEN
3070: END IF;
3071:
3072: okc_terms_util_grp.get_default_template (
3073: p_api_version => 1.0,
3074: p_init_msg_list => fnd_api.g_true,
3075: x_return_status => x_return_status,
3076: x_msg_data => l_msg_data,
3077: x_msg_count => l_msg_count,
3078: p_document_type => l_k_doc_type,
3093: );
3094: END IF;
3095: END IF;
3096:
3097: IF x_return_status <> fnd_api.g_ret_sts_success
3098: THEN
3099: RAISE fnd_api.g_exc_unexpected_error;
3100: END IF;
3101:
3095: END IF;
3096:
3097: IF x_return_status <> fnd_api.g_ret_sts_success
3098: THEN
3099: RAISE fnd_api.g_exc_unexpected_error;
3100: END IF;
3101:
3102: IF x_template_id IS NOT NULL
3103: THEN
3102: IF x_template_id IS NOT NULL
3103: THEN
3104: okc_terms_util_grp.get_contract_defaults (
3105: p_api_version => 1.0,
3106: p_init_msg_list => fnd_api.g_true,
3107: x_return_status => x_return_status,
3108: x_msg_data => l_msg_data,
3109: x_msg_count => l_msg_count,
3110: p_template_id => x_template_id,
3114: x_template_name => x_template_name,
3115: x_template_description => l_template_desc
3116: );
3117:
3118: IF x_return_status <> fnd_api.g_ret_sts_success
3119: THEN
3120: RAISE fnd_api.g_exc_unexpected_error;
3121: END IF;
3122: END IF;
3116: );
3117:
3118: IF x_return_status <> fnd_api.g_ret_sts_success
3119: THEN
3120: RAISE fnd_api.g_exc_unexpected_error;
3121: END IF;
3122: END IF;
3123:
3124: l_progress := 60;
3127: THEN
3128: po_debug.debug_end (l_log_head);
3129: END IF;
3130: EXCEPTION
3131: WHEN fnd_api.g_exc_unexpected_error
3132: THEN
3133: x_return_status := fnd_api.g_ret_sts_unexp_error;
3134: fnd_msg_pub.count_and_get (p_count => l_msg_count,
3135: p_data => l_msg_data);
3129: END IF;
3130: EXCEPTION
3131: WHEN fnd_api.g_exc_unexpected_error
3132: THEN
3133: x_return_status := fnd_api.g_ret_sts_unexp_error;
3134: fnd_msg_pub.count_and_get (p_count => l_msg_count,
3135: p_data => l_msg_data);
3136: WHEN OTHERS
3137: THEN
3134: fnd_msg_pub.count_and_get (p_count => l_msg_count,
3135: p_data => l_msg_data);
3136: WHEN OTHERS
3137: THEN
3138: x_return_status := fnd_api.g_ret_sts_unexp_error;
3139:
3140: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3141: THEN
3142: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3179: -- template name
3180: --x_authoring_party
3181: -- authoring party
3182: --x_return_status
3183: -- FND_API.G_RET_STS_ERROR - for expected error
3184: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
3185: -- FND_API.G_RET_STS_SUCCESS - for success
3186: --Testing:
3187: --
3180: --x_authoring_party
3181: -- authoring party
3182: --x_return_status
3183: -- FND_API.G_RET_STS_ERROR - for expected error
3184: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
3185: -- FND_API.G_RET_STS_SUCCESS - for success
3186: --Testing:
3187: --
3188: --End of Comments
3181: -- authoring party
3182: --x_return_status
3183: -- FND_API.G_RET_STS_ERROR - for expected error
3184: -- FND_API.G_RET_STS_UNEXP_ERROR - for unexpected error
3185: -- FND_API.G_RET_STS_SUCCESS - for success
3186: --Testing:
3187: --
3188: --End of Comments
3189: ------------------------------------------------------------------------------
3244: END IF;
3245:
3246: OKC_TERMS_UTIL_GRP.Get_Contract_Details(
3247: p_api_version => l_api_version,
3248: p_init_msg_list => FND_API.G_TRUE,
3249: x_return_status => x_return_status,
3250: x_msg_data => l_msg_data,
3251: x_msg_count => l_msg_count,
3252: p_document_type => l_k_doc_type,
3269: );
3270: END IF;
3271: END IF;
3272:
3273: IF x_return_status <> fnd_api.g_ret_sts_success
3274: THEN
3275: RAISE fnd_api.g_exc_unexpected_error;
3276: END IF;
3277:
3271: END IF;
3272:
3273: IF x_return_status <> fnd_api.g_ret_sts_success
3274: THEN
3275: RAISE fnd_api.g_exc_unexpected_error;
3276: END IF;
3277:
3278: -- Bug 4691053
3279: -- Override template name and authoring party names to be null in case
3293: x_authoring_party := NULL;
3294: END IF;
3295:
3296: EXCEPTION
3297: WHEN fnd_api.g_exc_unexpected_error
3298: THEN
3299: x_return_status := fnd_api.g_ret_sts_unexp_error;
3300: fnd_msg_pub.count_and_get (p_count => l_msg_count,
3301: p_data => l_msg_data);
3295:
3296: EXCEPTION
3297: WHEN fnd_api.g_exc_unexpected_error
3298: THEN
3299: x_return_status := fnd_api.g_ret_sts_unexp_error;
3300: fnd_msg_pub.count_and_get (p_count => l_msg_count,
3301: p_data => l_msg_data);
3302: WHEN OTHERS
3303: THEN
3300: fnd_msg_pub.count_and_get (p_count => l_msg_count,
3301: p_data => l_msg_data);
3302: WHEN OTHERS
3303: THEN
3304: x_return_status := fnd_api.g_ret_sts_unexp_error;
3305:
3306: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3307: THEN
3308: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);