[Home] [Help]
PACKAGE BODY: APPS.GMS_INSTALL_EXTN
Source
1 PACKAGE BODY GMS_Install_Extn AS
2 /* $Header: gmspixtb.pls 115.6 2002/11/25 23:35:26 jmuthuku ship $ */
3
4 PROCEDURE Run_Process
5 (
6 errbuf OUT NOCOPY VARCHAR2,
7 retcode OUT NOCOPY VARCHAR2
8 )
9 IS
10 --
11 l_config_file VARCHAR2(100) := '@GMS:patch/115/import/';
12 l_language VARCHAR2(20) ;
13 l_data_file VARCHAR2(100) ;
14 l_req_id NUMBER ;
15 --
16 cursor c_territory is select language_code
17 from fnd_languages
18 where installed_flag in ('I', 'B');
19
20 BEGIN
21 --
22 SAVEPOINT Run_Process_PVT ;
23 --
24 l_req_id := fnd_request.submit_request
25 (program => 'GMSPIDRV',
26 application => 'GMS',
27 description => NULL,
28 start_time => NULL,
29 sub_request => FALSE);
30
31 if l_req_id = 0 then
32
33 errbuf := fnd_message.get ;
34 retcode := 2 ;
35 raise fnd_api.g_exc_error ;
36
37 end if;
38
39
40 -- Load Seed Data for each of the installed languages
41
42 for c_territory_rec in c_territory loop
43
44 l_language := c_territory_rec.language_code ;
45
46 -- Load lookup PA data
47
48 l_data_file := l_config_file||l_language||'/gmspilkp.ldt';
49
50 l_req_id := fnd_request.submit_request
51 (program => 'FNDLOAD',
52 application => 'FND',
53 description => NULL,
54 start_time => NULL,
55 sub_request => FALSE,
56 argument1 => 'UPLOAD',
57 argument2 => l_config_file||'gmspilkp.lct',
58 argument3 => l_data_file);
59
60 if l_req_id = 0 then
61
62 errbuf := fnd_message.get ;
63 retcode := 2 ;
64 raise fnd_api.g_exc_error ;
65
66 end if;
67
68 -- Load lookup PA budget entry methods
69
70 l_data_file := l_config_file||l_language||'/gmspibem.ldt';
71
72 l_req_id := fnd_request.submit_request
73 (program => 'FNDLOAD',
74 application => 'FND',
75 description => NULL,
76 start_time => NULL,
77 sub_request => FALSE,
78 argument1 => 'UPLOAD',
79 argument2 => l_config_file||'gmspibem.lct',
80 argument3 => l_data_file);
81
82 if l_req_id = 0 then
83
84 errbuf := fnd_message.get ;
85 retcode := 2 ;
86 raise fnd_api.g_exc_error ;
87
88 end if;
89
90 -- Load lookup PA event types
91
92 l_data_file := l_config_file||l_language||'/gmspievt.ldt';
93
94 l_req_id := fnd_request.submit_request
95 (program => 'FNDLOAD',
96 application => 'FND',
97 description => NULL,
98 start_time => NULL,
99 sub_request => FALSE,
100 argument1 => 'UPLOAD',
101 argument2 => l_config_file||'gmspievt.lct',
102 argument3 => l_data_file);
103
104 if l_req_id = 0 then
105
106 errbuf := fnd_message.get ;
107 retcode := 2 ;
108 raise fnd_api.g_exc_error ;
109
110 end if;
111 -- Load lookup PA billing extensions
112
113 l_data_file := l_config_file||l_language||'/gmspiblx.ldt';
114
115 l_req_id := fnd_request.submit_request
116 (program => 'FNDLOAD',
117 application => 'FND',
118 description => NULL,
119 start_time => NULL,
120 sub_request => FALSE,
121 argument1 => 'UPLOAD',
122 argument2 => l_config_file||'gmspiblx.lct',
123 argument3 => l_data_file);
124
125 if l_req_id = 0 then
126
127 errbuf := fnd_message.get ;
128 retcode := 2 ;
129 raise fnd_api.g_exc_error ;
130
131 end if;
132
133 -- Load lookup PA transaction sources GOLD, GOLDE
134
135 l_data_file := l_config_file||l_language||'/gmspitxn.ldt';
136
137 l_req_id := fnd_request.submit_request
138 (program => 'FNDLOAD',
139 application => 'FND',
140 description => NULL,
141 start_time => NULL,
142 sub_request => FALSE,
143 argument1 => 'UPLOAD',
144 argument2 => l_config_file||'gmspitxn.lct',
145 argument3 => l_data_file);
146
147 if l_req_id = 0 then
148
149 errbuf := fnd_message.get ;
150 retcode := 2 ;
151 raise fnd_api.g_exc_error ;
152
153 end if;
154 end loop ;
155
156 retcode := 0 ;
157
158 EXCEPTION
159 --
160 WHEN FND_API.G_EXC_ERROR THEN
161 --
162 ROLLBACK TO Run_Process_PVT ;
163 retcode := 2 ;
164 --
165 WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
166 --
167 ROLLBACK TO Run_Process_PVT ;
168 retcode := 2 ;
169 --
170 WHEN OTHERS THEN
171 --
172 ROLLBACK TO Run_Process_PVT ;
173 retcode := 2 ;
174 --
175 END Run_Process ;
176
177 END GMS_Install_Extn ;