[Home] [Help]
PACKAGE BODY: APPS.FA_MC_UPG_CONVERT_PKG
Source
1 PACKAGE BODY FA_MC_UPG_CONVERT_PKG AS
2 /* $Header: faxmcucb.pls 120.3 2005/10/07 14:04:07 bridgway ship $ */
3
4 g_print_debug boolean := fa_cache_pkg.fa_print_debug;
5
6 PROCEDURE main_convert(
7 errbuf OUT NOCOPY VARCHAR2,
8 retcode OUT NOCOPY NUMBER,
9 p_book_type_code IN VARCHAR2,
10 p_reporting_book IN VARCHAR2,
11 p_fixed_conversion IN VARCHAR2) IS
12
13 p_msg_count NUMBER := 0;
14 p_msg_data VARCHAR2(512);
15
16 BEGIN
17 fa_rx_conc_mesg_pkg.log('Converting Assets from ');
18 fa_rx_conc_mesg_pkg.log('Primary Book: ' || p_book_type_code || ' TO');
19 fa_rx_conc_mesg_pkg.log('Reporting Book: ' || p_reporting_book);
20
21 -- Initialize server message stack
22 FA_SRVR_MSG.Init_Server_Message;
23 FA_DEBUG_PKG.Initialize;
24 -- FA_DEBUG_PKG.Set_Debug_Flag;
25
26 -- call routine to convert assets to reporting book
27 fa_mc_upg1_pkg.convert_reporting_book(
28 p_book_type_code,
29 p_reporting_book,
30 p_fixed_conversion);
31
32 fa_srvr_msg.add_message(
33 calling_fn => 'fa_mc_upg_select_pkg.main_convert',
34 name => 'FA_SHARED_END_SUCCESS',
35 token1 => 'PROGRAM',
36 value1 => 'FAMRCUPG2');
37
38 -- Dump Debug messages when run in debug mode to log file
39 IF (g_print_debug) THEN
40 fa_mc_upg1_pkg.Write_DebugMsg_Log(
41 p_msg_count);
42 END IF;
43
44 -- write messages to log file
45 FND_MSG_PUB.Count_And_Get(
46 p_count => p_msg_count,
47 p_data => p_msg_data);
48
49 fa_mc_upg1_pkg.Write_ErrMsg_Log(p_msg_count);
50
51 -- return success to concurrent manager
52 retcode := 0;
53
54 EXCEPTION
55 WHEN OTHERS THEN
56 fa_srvr_msg.add_message(
57 calling_fn => 'fa_mc_upg_select_pkg.main_convert',
58 name => 'FA_SHARED_END_WITH_ERROR',
59 token1 => 'PROGRAM',
60 value1 => 'FAMRCUPG2');
61
62 IF (g_print_debug) THEN
63 fa_mc_upg1_pkg.Write_DebugMsg_Log(
64 p_msg_count);
65 END IF;
66
67 FND_MSG_PUB.Count_And_Get(
68 p_count => p_msg_count,
69 p_data => p_msg_data);
70
71 fa_mc_upg1_pkg.Write_ErrMsg_Log(
72 p_msg_count);
73
74 -- return failure to concurrent manager
75 retcode := 2;
76
77 END main_convert;
78
79 END FA_MC_UPG_CONVERT_PKG;