2: /* $Header: apvdmrgb.pls 120.12.12010000.4 2009/02/05 05:08:16 manjayar ship $ */
3:
4: --Global constants for logging
5: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AP_VENDOR_PARTY_MERGE_PKG';
6: G_MSG_UERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR;
7: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
8: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
9: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;
10: G_MSG_MEDIUM CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM;
3:
4: --Global constants for logging
5: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AP_VENDOR_PARTY_MERGE_PKG';
6: G_MSG_UERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR;
7: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
8: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
9: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;
10: G_MSG_MEDIUM CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM;
11: G_MSG_LOW CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW;
4: --Global constants for logging
5: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AP_VENDOR_PARTY_MERGE_PKG';
6: G_MSG_UERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR;
7: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
8: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
9: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;
10: G_MSG_MEDIUM CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM;
11: G_MSG_LOW CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW;
12: G_LINES_PER_FETCH CONSTANT NUMBER := 1000;
5: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AP_VENDOR_PARTY_MERGE_PKG';
6: G_MSG_UERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR;
7: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
8: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
9: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;
10: G_MSG_MEDIUM CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM;
11: G_MSG_LOW CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW;
12: G_LINES_PER_FETCH CONSTANT NUMBER := 1000;
13:
6: G_MSG_UERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR;
7: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
8: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
9: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;
10: G_MSG_MEDIUM CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM;
11: G_MSG_LOW CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW;
12: G_LINES_PER_FETCH CONSTANT NUMBER := 1000;
13:
14: G_CURRENT_RUNTIME_LEVEL CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
7: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
8: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
9: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;
10: G_MSG_MEDIUM CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM;
11: G_MSG_LOW CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW;
12: G_LINES_PER_FETCH CONSTANT NUMBER := 1000;
13:
14: G_CURRENT_RUNTIME_LEVEL CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
15: G_LEVEL_UNEXPECTED CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
146: --
147: IF l_msg_count > 0 THEN
148: --
149: --
150: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
151: FND_MSG_PUB.Get( p_msg_index => i,
152: p_encoded => 'F',
153: p_data => l_msg_data,
154: p_msg_index_out => l_msg_index_out
147: IF l_msg_count > 0 THEN
148: --
149: --
150: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
151: FND_MSG_PUB.Get( p_msg_index => i,
152: p_encoded => 'F',
153: p_data => l_msg_data,
154: p_msg_index_out => l_msg_index_out
155: );
187: --
188: IF l_msg_count > 0 THEN
189: --
190: --
191: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
192: FND_MSG_PUB.Get( p_msg_index => i,
193: p_encoded => 'F',
194: p_data => l_msg_data,
195: p_msg_index_out => l_msg_index_out
188: IF l_msg_count > 0 THEN
189: --
190: --
191: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
192: FND_MSG_PUB.Get( p_msg_index => i,
193: p_encoded => 'F',
194: p_data => l_msg_data,
195: p_msg_index_out => l_msg_index_out
196: );
225: --
226: IF l_msg_count > 0 THEN
227: --
228: --
229: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
230: FND_MSG_PUB.Get( p_msg_index => i,
231: p_encoded => 'F',
232: p_data => l_msg_data,
233: p_msg_index_out => l_msg_index_out
226: IF l_msg_count > 0 THEN
227: --
228: --
229: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
230: FND_MSG_PUB.Get( p_msg_index => i,
231: p_encoded => 'F',
232: p_data => l_msg_data,
233: p_msg_index_out => l_msg_index_out
234: );
263: --
264: IF l_msg_count > 0 THEN
265: --
266: --
267: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
268: FND_MSG_PUB.Get( p_msg_index => i,
269: p_encoded => 'F',
270: p_data => l_msg_data,
271: p_msg_index_out => l_msg_index_out
264: IF l_msg_count > 0 THEN
265: --
266: --
267: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
268: FND_MSG_PUB.Get( p_msg_index => i,
269: p_encoded => 'F',
270: p_data => l_msg_data,
271: p_msg_index_out => l_msg_index_out
272: );
297: --
298: IF l_msg_count > 0 THEN
299: --
300: --
301: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
302: FND_MSG_PUB.Get( p_msg_index => i,
303: p_encoded => 'F',
304: p_data => l_msg_data,
305: p_msg_index_out => l_msg_index_out
298: IF l_msg_count > 0 THEN
299: --
300: --
301: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
302: FND_MSG_PUB.Get( p_msg_index => i,
303: p_encoded => 'F',
304: p_data => l_msg_data,
305: p_msg_index_out => l_msg_index_out
306: );
335: --
336: IF l_msg_count > 0 THEN
337: --
338: --
339: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
340: FND_MSG_PUB.Get( p_msg_index => i,
341: p_encoded => 'F',
342: p_data => l_msg_data,
343: p_msg_index_out => l_msg_index_out
336: IF l_msg_count > 0 THEN
337: --
338: --
339: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
340: FND_MSG_PUB.Get( p_msg_index => i,
341: p_encoded => 'F',
342: p_data => l_msg_data,
343: p_msg_index_out => l_msg_index_out
344: );
374: --
375: IF l_msg_count > 0 THEN
376: --
377: --
378: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
379: FND_MSG_PUB.Get( p_msg_index => i,
380: p_encoded => 'F',
381: p_data => l_msg_data,
382: p_msg_index_out => l_msg_index_out
375: IF l_msg_count > 0 THEN
376: --
377: --
378: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
379: FND_MSG_PUB.Get( p_msg_index => i,
380: p_encoded => 'F',
381: p_data => l_msg_data,
382: p_msg_index_out => l_msg_index_out
383: );
414: --
415: IF l_msg_count > 0 THEN
416: --
417: --
418: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
419: FND_MSG_PUB.Get( p_msg_index => i,
420: p_encoded => 'F',
421: p_data => l_msg_data,
422: p_msg_index_out => l_msg_index_out
415: IF l_msg_count > 0 THEN
416: --
417: --
418: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
419: FND_MSG_PUB.Get( p_msg_index => i,
420: p_encoded => 'F',
421: p_data => l_msg_data,
422: p_msg_index_out => l_msg_index_out
423: );
477: --
478: IF l_msg_count > 0 THEN
479: --
480: --
481: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
482: FND_MSG_PUB.Get( p_msg_index => i,
483: p_encoded => 'F',
484: p_data => l_msg_data,
485: p_msg_index_out => l_msg_index_out
478: IF l_msg_count > 0 THEN
479: --
480: --
481: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
482: FND_MSG_PUB.Get( p_msg_index => i,
483: p_encoded => 'F',
484: p_data => l_msg_data,
485: p_msg_index_out => l_msg_index_out
486: );
511: --
512: IF l_msg_count > 0 THEN
513: --
514: --
515: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
516: FND_MSG_PUB.Get( p_msg_index => i,
517: p_encoded => 'F',
518: p_data => l_msg_data,
519: p_msg_index_out => l_msg_index_out
512: IF l_msg_count > 0 THEN
513: --
514: --
515: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
516: FND_MSG_PUB.Get( p_msg_index => i,
517: p_encoded => 'F',
518: p_data => l_msg_data,
519: p_msg_index_out => l_msg_index_out
520: );
549: --
550: IF l_msg_count > 0 THEN
551: --
552: --
553: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
554: FND_MSG_PUB.Get( p_msg_index => i,
555: p_encoded => 'F',
556: p_data => l_msg_data,
557: p_msg_index_out => l_msg_index_out
550: IF l_msg_count > 0 THEN
551: --
552: --
553: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
554: FND_MSG_PUB.Get( p_msg_index => i,
555: p_encoded => 'F',
556: p_data => l_msg_data,
557: p_msg_index_out => l_msg_index_out
558: );
587: --
588: IF l_msg_count > 0 THEN
589: --
590: --
591: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
592: FND_MSG_PUB.Get( p_msg_index => i,
593: p_encoded => 'F',
594: p_data => l_msg_data,
595: p_msg_index_out => l_msg_index_out
588: IF l_msg_count > 0 THEN
589: --
590: --
591: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
592: FND_MSG_PUB.Get( p_msg_index => i,
593: p_encoded => 'F',
594: p_data => l_msg_data,
595: p_msg_index_out => l_msg_index_out
596: );
625: --
626: IF l_msg_count > 0 THEN
627: --
628: --
629: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
630: FND_MSG_PUB.Get( p_msg_index => i,
631: p_encoded => 'F',
632: p_data => l_msg_data,
633: p_msg_index_out => l_msg_index_out
626: IF l_msg_count > 0 THEN
627: --
628: --
629: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
630: FND_MSG_PUB.Get( p_msg_index => i,
631: p_encoded => 'F',
632: p_data => l_msg_data,
633: p_msg_index_out => l_msg_index_out
634: );
654:
655:
656: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
657: IF l_msg_count > 0 THEN
658: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
659: FND_MSG_PUB.Get( p_msg_index => i,
660: p_encoded => 'F',
661: p_data => l_msg_data,
662: p_msg_index_out => l_msg_index_out
655:
656: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
657: IF l_msg_count > 0 THEN
658: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
659: FND_MSG_PUB.Get( p_msg_index => i,
660: p_encoded => 'F',
661: p_data => l_msg_data,
662: p_msg_index_out => l_msg_index_out
663: );
674: --
675:
676: EXCEPTION
677: WHEN FND_API.G_EXC_ERROR THEN
678: FND_MSG_PUB.Count_And_Get
679: ( p_count => l_msg_count,
680: p_data => l_msg_data
681: );
682: IF Invoice_Cursor%ISOPEN THEN
690: ROLLBACK;
691: APP_EXCEPTION.RAISE_EXCEPTION;
692:
693: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
694: FND_MSG_PUB.Count_And_Get
695: ( p_count => l_msg_count,
696: p_data => l_msg_data
697: );
698: IF Invoice_Cursor%ISOPEN THEN
706: ROLLBACK;
707: APP_EXCEPTION.RAISE_EXCEPTION;
708:
709: WHEN OTHERS THEN
710: IF FND_MSG_PUB.Check_Msg_Level
711: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
712: FND_MSG_PUB.Add_Exc_Msg
713: ( G_PKG_NAME ,
714: 'AP_VENDOR_PARTY_MERGE_PKG.Other_Products_VendorMerge'
707: APP_EXCEPTION.RAISE_EXCEPTION;
708:
709: WHEN OTHERS THEN
710: IF FND_MSG_PUB.Check_Msg_Level
711: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
712: FND_MSG_PUB.Add_Exc_Msg
713: ( G_PKG_NAME ,
714: 'AP_VENDOR_PARTY_MERGE_PKG.Other_Products_VendorMerge'
715: );
708:
709: WHEN OTHERS THEN
710: IF FND_MSG_PUB.Check_Msg_Level
711: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
712: FND_MSG_PUB.Add_Exc_Msg
713: ( G_PKG_NAME ,
714: 'AP_VENDOR_PARTY_MERGE_PKG.Other_Products_VendorMerge'
715: );
716: END IF;
713: ( G_PKG_NAME ,
714: 'AP_VENDOR_PARTY_MERGE_PKG.Other_Products_VendorMerge'
715: );
716: END IF;
717: FND_MSG_PUB.Count_And_Get
718: ( p_count => l_msg_count,
719: p_data => l_msg_data
720: );
721: IF (SQLCODE <> -20001) THEN
976: WHERE vendor_contact_id = contact_loop_c.vendor_contact_id;
977:
978: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
979: IF x_msg_count > 0 THEN
980: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
981: FND_MSG_PUB.Get( p_msg_index => i,
982: p_encoded => 'F',
983: p_data => x_msg_data,
984: p_msg_index_out => l_msg_index_out
977:
978: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
979: IF x_msg_count > 0 THEN
980: FOR i in 1..FND_MSG_PUB.Count_Msg LOOP
981: FND_MSG_PUB.Get( p_msg_index => i,
982: p_encoded => 'F',
983: p_data => x_msg_data,
984: p_msg_index_out => l_msg_index_out
985: );