DBA Data[Home] [Help]

PACKAGE BODY: APPS.INV_ITEM_UTIL

Source


1 PACKAGE BODY INV_ITEM_UTIL AS
2 /* $Header: INVVITUB.pls 120.6 2007/11/08 21:44:12 mantyaku ship $ */
3 -- ------------------------------------------------------------
4 -- -------------- Package variables and constants -------------
5 -- ------------------------------------------------------------
6 
7 G_PKG_NAME       CONSTANT   VARCHAR2(30)  := 'INV_ITEM_UTIL';
8 
9 l_installed   BOOLEAN;
10 l_status      VARCHAR2(10);
11 l_industry    VARCHAR2(10);
12 l_exist       NUMBER := 0;
13 
14 -- -------------------------------------------------------
15 -- --------------------- Procedures ----------------------
16 -- -------------------------------------------------------
17 
18 --
19 -- --------- Get record conaining application installation statuses --------
20 --
21 
22 FUNCTION Appl_Install
23 RETURN  Appl_Inst_type  IS
24 BEGIN
25   RETURN( INV_Item_Util.g_Appl_Inst );
26 END Appl_Install;
27 
28 --
29 -- --------------- Single application installation status ---------------
30 --
31 
32 FUNCTION Appl_Inst_Status ( p_Appl_ID  IN  NUMBER )
33 RETURN  VARCHAR2
34 IS
35 BEGIN
36 
37   IF ( NVL( p_Appl_ID, 0 ) <> 0 )
38      AND ( p_Appl_ID IN
39        ( INV_Item_Util.g_Appl_Inst.inv
40        , INV_Item_Util.g_Appl_Inst.po
41        , INV_Item_Util.g_Appl_Inst.bom
42        , INV_Item_Util.g_Appl_Inst.eng
43        , INV_Item_Util.g_Appl_Inst.cs
44        , INV_Item_Util.g_Appl_Inst.ar
45        , INV_Item_Util.g_Appl_Inst.mrp
46        , INV_Item_Util.g_Appl_Inst.oe
47        , INV_Item_Util.g_Appl_Inst.ONT
48        , INV_Item_Util.g_Appl_Inst.QP
49        , INV_Item_Util.g_Appl_Inst.wip
50        , INV_Item_Util.g_Appl_Inst.fa
51        , INV_Item_Util.g_Appl_Inst.jl
52        , INV_Item_Util.g_Appl_Inst.WMS
53        , INV_Item_Util.g_Appl_Inst.CSP
54        , INV_Item_Util.g_Appl_Inst.CSS
55        , INV_Item_Util.g_Appl_Inst.OKS
56        , INV_Item_Util.g_Appl_Inst.AMS
57        , INV_Item_Util.g_Appl_Inst.IBA
58        , INV_Item_Util.g_Appl_Inst.IBE
59        , INV_Item_Util.g_Appl_Inst.CUI
60        , INV_Item_Util.g_Appl_Inst.XNC
61        , INV_Item_Util.g_Appl_Inst.CUN
62        , INV_Item_Util.g_Appl_Inst.CUS
63        , INV_Item_Util.g_Appl_Inst.WPS
64        , INV_Item_Util.g_Appl_Inst.EAM
65        , INV_Item_Util.g_Appl_Inst.ENI
66        , INV_Item_Util.g_Appl_Inst.EGO
67        , INV_Item_Util.g_Appl_Inst.CSI
68        , INV_Item_Util.g_Appl_Inst.CZ
69        , INV_Item_Util.g_Appl_Inst.FTE
70        , INV_Item_Util.g_Appl_Inst.GMI
71        /* Start Bug 3713912 */
72        , INV_Item_Util.g_Appl_Inst.GMD
73        , INV_Item_Util.g_Appl_Inst.GME
74        , INV_Item_Util.g_Appl_Inst.GR
75        /* End Bug 3713912 */
76        /* Bug 5015595 */
77        ,INV_Item_Util.g_Appl_Inst.XDP
78        --6531763: Adding ICX install check.
79        ,INV_Item_Util.g_Appl_Inst.ICX)
80      )
81   THEN
82      RETURN ( 'I' );
83   ELSE
84      RETURN ( 'N' );
85   END IF;
86 
87 END Appl_Inst_Status;
88 
89 
90 /*fix for bug:6133992 */
91 
92 FUNCTION create_inv_mvlog (p_table_name varchar2)
93 RETURN NUMBER
94 IS
95 lv_dummy1            VARCHAR2(2000);
96 lv_dummy2            VARCHAR2(2000);
97 lv_inv_schema        VARCHAR2(40);
98 lv_retval            BOOLEAN;
99 v_applsys_schema     VARCHAR2(40);
100 lv_prod_short_name   VARCHAR2(30);
101 v_sql_stmt           VARCHAR2(6000);
102 
103 begin
104   lv_retval := FND_INSTALLATION.GET_APP_INFO('FND', lv_dummy1,lv_dummy2, v_applsys_schema);
105   lv_prod_short_name := AD_TSPACE_UTIL.get_product_short_name(401);
106   lv_retval := FND_INSTALLATION.GET_APP_INFO (lv_prod_short_name, lv_dummy1, lv_dummy2, lv_inv_schema);
107 
108   v_sql_stmt:= 'CREATE MATERIALIZED VIEW log ON '||lv_inv_schema ||'.'||p_table_name||'  WITH ROWID ' ;
109   ad_ddl.do_ddl( applsys_schema => v_applsys_schema,
110                  application_short_name => lv_prod_short_name ,
111                  statement_type => AD_DDL.CREATE_TABLE,
112                  statement => v_sql_stmt,
113                  object_name => p_table_name);
114   RETURN 0;
115 EXCEPTION
116   WHEN OTHERS THEN
117 	FND_FILE.PUT_LINE(FND_FILE.LOG, SQLERRM);
118 	RAISE;
119 end create_inv_mvlog;
120 
121 
122 
123 
124 
125 FUNCTION Appl_Inst_inv
126 RETURN  NUMBER  IS
127 BEGIN
128   RETURN( INV_Item_Util.g_Appl_Inst.inv );
129 END Appl_Inst_inv;
130 
131 FUNCTION Appl_Inst_po
132 RETURN  NUMBER  IS
133 BEGIN
134   RETURN( INV_Item_Util.g_Appl_Inst.po );
135 END;
136 
137 FUNCTION Appl_Inst_bom
138 RETURN  NUMBER  IS
139 BEGIN
140   RETURN( INV_Item_Util.g_Appl_Inst.bom );
141 END;
142 
143 FUNCTION Appl_Inst_eng
144 RETURN  NUMBER  IS
145 BEGIN
146   RETURN( INV_Item_Util.g_Appl_Inst.eng );
147 END;
148 
149 FUNCTION Appl_Inst_cs
150 RETURN  NUMBER  IS
151 BEGIN
152   RETURN( INV_Item_Util.g_Appl_Inst.cs );
153 END;
154 
155 FUNCTION Appl_Inst_ar
156 RETURN  NUMBER  IS
157 BEGIN
158   RETURN( INV_Item_Util.g_Appl_Inst.ar );
159 END;
160 
161 FUNCTION Appl_Inst_mrp
162 RETURN  NUMBER  IS
163 BEGIN
164   RETURN( INV_Item_Util.g_Appl_Inst.mrp );
165 END;
166 
167 FUNCTION Appl_Inst_oe
168 RETURN  NUMBER  IS
169 BEGIN
170   RETURN( INV_Item_Util.g_Appl_Inst.oe );
171 END;
172 
173 FUNCTION Appl_Inst_ONT
174 RETURN  NUMBER  IS
175 BEGIN
176   RETURN( INV_Item_Util.g_Appl_Inst.ONT );
177 END;
178 
179 FUNCTION Appl_Inst_QP
180 RETURN  NUMBER  IS
181 BEGIN
182   RETURN( INV_Item_Util.g_Appl_Inst.QP );
183 END;
184 
185 FUNCTION Appl_Inst_wip
186 RETURN  NUMBER  IS
187 BEGIN
188   RETURN( INV_Item_Util.g_Appl_Inst.wip );
189 END;
190 
191 FUNCTION Appl_Inst_fa
192 RETURN  NUMBER  IS
193 BEGIN
194   RETURN( INV_Item_Util.g_Appl_Inst.fa );
195 END;
196 
197 FUNCTION Appl_Inst_jl
198 RETURN  NUMBER  IS
199 BEGIN
200   RETURN( INV_Item_Util.g_Appl_Inst.jl );
201 END;
202 
203 FUNCTION Appl_Inst_WMS
204 RETURN  NUMBER  IS
205 BEGIN
206   RETURN( INV_Item_Util.g_Appl_Inst.WMS );
207 END;
208 
209 FUNCTION Appl_Inst_CSP
210 RETURN  NUMBER  IS
211 BEGIN
212   RETURN( INV_Item_Util.g_Appl_Inst.CSP );
213 END;
214 
215 FUNCTION Appl_Inst_CSS
216 RETURN  NUMBER  IS
217 BEGIN
218   RETURN( INV_Item_Util.g_Appl_Inst.CSS );
219 END;
220 
221 FUNCTION Appl_Inst_OKS
222 RETURN  NUMBER  IS
223 BEGIN
227 FUNCTION Appl_Inst_AMS
224   RETURN( INV_Item_Util.g_Appl_Inst.OKS );
225 END;
226 
228 RETURN  NUMBER  IS
229 BEGIN
230   RETURN( INV_Item_Util.g_Appl_Inst.AMS );
231 END;
232 
233 FUNCTION Appl_Inst_IBA
234 RETURN  NUMBER  IS
235 BEGIN
236   RETURN( INV_Item_Util.g_Appl_Inst.IBA );
237 END;
238 
239 FUNCTION Appl_Inst_IBE
240 RETURN  NUMBER  IS
241 BEGIN
242   RETURN( INV_Item_Util.g_Appl_Inst.IBE );
243 END;
244 
245 FUNCTION Appl_Inst_CUI
246 RETURN  NUMBER  IS
247 BEGIN
248   RETURN( INV_Item_Util.g_Appl_Inst.CUI );
249 END;
250 
251 FUNCTION Appl_Inst_XNC
252 RETURN  NUMBER  IS
253 BEGIN
254   RETURN( INV_Item_Util.g_Appl_Inst.XNC );
255 END;
256 
257 FUNCTION Appl_Inst_CUN
258 RETURN  NUMBER  IS
259 BEGIN
260   RETURN( INV_Item_Util.g_Appl_Inst.CUN );
264 RETURN  NUMBER  IS
261 END;
262 
263 FUNCTION Appl_Inst_CUS
265 BEGIN
266   RETURN( INV_Item_Util.g_Appl_Inst.CUS );
267 END;
268 
269 FUNCTION Appl_Inst_WPS
270 RETURN  NUMBER  IS
271 BEGIN
272   RETURN( INV_Item_Util.g_Appl_Inst.WPS );
273 END;
274 
275 FUNCTION Appl_Inst_EAM
276 RETURN  NUMBER  IS
277 BEGIN
278   RETURN( INV_Item_Util.g_Appl_Inst.EAM );
279 END;
280 
281 --Bug: 2718703
282 FUNCTION Appl_Inst_ENI
283 RETURN  NUMBER  IS
284 BEGIN
285   RETURN( INV_Item_Util.g_Appl_Inst.ENI );
286 END;
287 
288 --Bug: 2728939
289 FUNCTION Appl_Inst_EGO
290 RETURN  NUMBER  IS
291 BEGIN
292   RETURN( INV_Item_Util.g_Appl_Inst.EGO );
293 END;
294 
295 FUNCTION Appl_Inst_CSI
296 RETURN  NUMBER  IS
297 BEGIN
298   RETURN( INV_Item_Util.g_Appl_Inst.CSI );
299 END;
300 
301 FUNCTION Appl_Inst_CZ
302 RETURN  NUMBER  IS
303 BEGIN
304   RETURN( INV_Item_Util.g_Appl_Inst.CZ );
305 END;
306 --Bug: 2691174
307 FUNCTION Appl_Inst_FTE
308 RETURN  NUMBER  IS
309 BEGIN
310   RETURN( INV_Item_Util.g_Appl_Inst.FTE );
311 END;
312 FUNCTION Appl_Inst_GMI
313 RETURN  NUMBER  IS
314 BEGIN
315   RETURN( INV_Item_Util.g_Appl_Inst.GMI);
316 END;
317   /* Start Bug 3713912 */ /* remove GMI function */
318 
319 FUNCTION Appl_Inst_GMD
320 RETURN  NUMBER  IS
321 BEGIN
322   RETURN( INV_Item_Util.g_Appl_Inst.GMD);
323 END;
324 FUNCTION Appl_Inst_GME
325 RETURN  NUMBER  IS
326 BEGIN
327   RETURN( INV_Item_Util.g_Appl_Inst.GME);
328 END;
329 FUNCTION Appl_Inst_GR
330 RETURN  NUMBER  IS
331 BEGIN
332   RETURN( INV_Item_Util.g_Appl_Inst.GR);
333 END;
334 
335 /* End Bug 3713912 */
336 
337 -- PJM_Unit_Eff_Enabled
338 --
339 FUNCTION PJM_Unit_Eff_Enabled
340 RETURN  VARCHAR2  IS
341 BEGIN
342   RETURN( INV_Item_Util.g_Appl_Inst.PJM_Unit_Eff_flag );
343 END;
344 
345 -- 6531763: Adding ICX install check
346 FUNCTION Appl_Inst_ICX
347 RETURN  NUMBER  IS
348 BEGIN
349   RETURN( INV_Item_Util.g_Appl_Inst.ICX);
350 END;
351 
352 
353 FUNCTION Object_Exists(p_object_type VARCHAR2,p_object_name VARCHAR2)
354 RETURN  VARCHAR2 IS
355   l_exists VARCHAR2(1) := 'N';
356    --*Modified by dikrishn,Added for bug:3872140
357    --*To support GSCC Test removing hard coded shema name APPS
358    schema_name VARCHAR2(30):='APPS';
359    --Schema Names can be 30 char wide Bug:5026190
360  CURSOR c_check_object(cp_object_type VARCHAR2, cp_object_name VARCHAR2)IS
361     SELECT 'Y'
362     FROM   all_objects
363     WHERE  owner        = schema_name
364     AND    object_type  = cp_object_type
365     AND    object_name  = cp_object_name
366     AND    status       = 'VALID';
367 BEGIN
368   OPEN  c_check_object(cp_object_type => p_object_type
369                       ,cp_object_name => p_object_name);
370 
371   FETCH c_check_object INTO l_exists;
372   CLOSE c_check_object;
373 
374   RETURN l_exists;
375 END Object_Exists;
376 /*-----------------------------------------------------------*/
377 /* Package initialization block (runs only once per session) */
378 /*-----------------------------------------------------------*/
379 
380 BEGIN
381   l_installed := fnd_installation.get( appl_id => 401, dep_appl_id => 401,
382                                        status => l_status, industry => l_industry );
383   if (l_status = 'I')
384   then  g_Appl_Inst.inv := 401;
385   else  g_Appl_Inst.inv := 0;
386   end if;
387 
388   l_installed := fnd_installation.get( appl_id => 201, dep_appl_id => 201,
389                                        status => l_status, industry => l_industry );
390   if (l_status = 'I')
391   then  g_Appl_Inst.po := 201;
392   else  g_Appl_Inst.po := 0;
393   end if;
394 
395   l_installed := fnd_installation.get( appl_id => 702, dep_appl_id => 702,
396                                        status => l_status, industry => l_industry );
397   if (l_status = 'I')
398   then  g_Appl_Inst.bom := 702;
399   else  g_Appl_Inst.bom := 0;
400   end if;
401 
402   l_installed := fnd_installation.get( appl_id => 703, dep_appl_id => 703,
403                                        status => l_status, industry => l_industry );
404   if (l_status = 'I')
405   then  g_Appl_Inst.eng := 703;
406   else  g_Appl_Inst.eng := 0;
407   end if;
408 
409   l_installed := fnd_installation.get( appl_id => 170, dep_appl_id => 170,
410                                        status => l_status, industry => l_industry );
411   if (l_status = 'I')
412   then  g_Appl_Inst.cs := 170;
413   else  g_Appl_Inst.cs := 0;
414   end if;
415 
416   l_installed := fnd_installation.get( appl_id => 222, dep_appl_id => 222,
417                                        status => l_status, industry => l_industry );
418   if (l_status = 'I')
419   then  g_Appl_Inst.ar := 222;
420   else  g_Appl_Inst.ar := 0;
421   end if;
422 
423   l_installed := fnd_installation.get( appl_id => 704, dep_appl_id => 704,
424                                        status => l_status, industry => l_industry );
425   if (l_status in ('I', 'S'))
426   then  g_Appl_Inst.mrp := 704;
427   else  g_Appl_Inst.mrp := 0;
428   end if;
429 
430   l_installed := fnd_installation.get( appl_id => 300, dep_appl_id => 300,
431                                        status => l_status, industry => l_industry );
432   if (l_status = 'I')
433   then  g_Appl_Inst.oe := 300;
434   else  g_Appl_Inst.oe := 0;
435   end if;
436 
440   then  g_Appl_Inst.ONT := 660;
437   l_installed := fnd_installation.get( appl_id => 660, dep_appl_id => 660,
438                                        status => l_status, industry => l_industry );
439   if (l_status = 'I')
441   else  g_Appl_Inst.ONT := 0;
442   end if;
443 
444   l_installed := fnd_installation.get( appl_id => 661, dep_appl_id => 661,
445                                        status => l_status, industry => l_industry );
446   if (l_status = 'I')
447   then  g_Appl_Inst.QP := 661;
448   else  g_Appl_Inst.QP := 0;
449   end if;
450 
451   l_installed := fnd_installation.get( appl_id => 706, dep_appl_id => 706,
452                                        status => l_status, industry => l_industry );
453   if (l_status in ('I', 'S'))
454   then  g_Appl_Inst.wip := 706;
455   else  g_Appl_Inst.wip := 0;
456   end if;
457 
458   l_installed := fnd_installation.get( appl_id => 140, dep_appl_id => 140,
459                                        status => l_status, industry => l_industry );
460   if (l_status = 'I')
461   then  g_Appl_Inst.fa := 140;
462   else  g_Appl_Inst.fa := 0;
463   end if;
464 
465   l_installed := fnd_installation.get( appl_id => 7004, dep_appl_id => 7004,
466                                        status => l_status, industry => l_industry );
467   -- Depends on Latin America Localizations profile value
468   --
469   --Bug: 4880971 The profile option JGZZ_PRODUCT_CODE is getting obsoleted
470   if (l_status = 'I')
471   then  g_Appl_Inst.jl := 7004;
472   else  g_Appl_Inst.jl := 0;
473   end if;
474 
475   l_installed := fnd_installation.get( appl_id => 385, dep_appl_id => 385,
476                                        status => l_status, industry => l_industry );
477   if (l_status = 'I')
478   then  g_Appl_Inst.WMS := 385;
479   else  g_Appl_Inst.WMS := 0;
480   end if;
481 
482   l_installed := fnd_installation.get( appl_id => 523, dep_appl_id => 523,
483                                        status => l_status, industry => l_industry );
484   if (l_status = 'I')
485   then  g_Appl_Inst.CSP := 523;
486   else  g_Appl_Inst.CSP := 0;
487   end if;
488 
489   l_installed := fnd_installation.get( appl_id => 514, dep_appl_id => 514,
490                                        status => l_status, industry => l_industry );
491   if (l_status = 'I')
492   then  g_Appl_Inst.CSS := 514;
493   else  g_Appl_Inst.CSS := 0;
494   end if;
495 
496   l_installed := fnd_installation.get( appl_id => 515, dep_appl_id => 515,
497                                        status => l_status, industry => l_industry );
498   if (l_status = 'I')
499   then  g_Appl_Inst.OKS := 515;
500   else  g_Appl_Inst.OKS := 0;
501   end if;
502 
503   l_installed := fnd_installation.get( appl_id => 530, dep_appl_id => 530,
504                                        status => l_status, industry => l_industry );
505   if (l_status = 'I')
506   then  g_Appl_Inst.AMS := 530;
507   else  g_Appl_Inst.AMS := 0;
508   end if;
509 
510   l_installed := fnd_installation.get( appl_id => 670, dep_appl_id => 670,
511                                        status => l_status, industry => l_industry );
512   if (l_status = 'I')
513   then  g_Appl_Inst.IBA := 670;
514   else  g_Appl_Inst.IBA := 0;
515   end if;
516 
517   l_installed := fnd_installation.get( appl_id => 671, dep_appl_id => 671,
518                                        status => l_status, industry => l_industry );
519   if (l_status = 'I')
520   then  g_Appl_Inst.IBE := 671;
521   else  g_Appl_Inst.IBE := 0;
522   end if;
523 
524   l_installed := fnd_installation.get( appl_id => 8722, dep_appl_id => 8722,
525                                        status => l_status, industry => l_industry );
526   if (l_status = 'I')
527   then  g_Appl_Inst.CUI := 8722;
528   else  g_Appl_Inst.CUI := 0;
529   end if;
530 
531   l_installed := fnd_installation.get( appl_id => 532, dep_appl_id => 532,
532                                        status => l_status, industry => l_industry );
533   if (l_status = 'I')
534   then  g_Appl_Inst.XNC := 532;
535   else  g_Appl_Inst.XNC := 0;
536   end if;
537 
538   l_installed := fnd_installation.get( appl_id => 8729, dep_appl_id => 8729,
539                                        status => l_status, industry => l_industry );
540   if (l_status = 'I')
541   then  g_Appl_Inst.CUN := 8729;
542   else  g_Appl_Inst.CUN := 0;
543   end if;
544 
545   l_installed := fnd_installation.get( appl_id => 8727, dep_appl_id => 8727,
546                                        status => l_status, industry => l_industry );
547   if (l_status = 'I')
548   then  g_Appl_Inst.CUS := 8727;
549   else  g_Appl_Inst.CUS := 0;
550   end if;
551 
552   l_installed := fnd_installation.get( appl_id => 388, dep_appl_id => 388,
553                                        status => l_status, industry => l_industry );
554   if (l_status = 'I')
555   then  g_Appl_Inst.WPS := 388;
556   else  g_Appl_Inst.WPS := 0;
557   end if;
558 
559   l_installed := fnd_installation.get( appl_id => 426, dep_appl_id => 426,
560                                        status => l_status, industry => l_industry );
561   if (l_status = 'I')
562   then  g_Appl_Inst.EAM := 426;
563   else  g_Appl_Inst.EAM := 0;
564   end if;
565 
566  /*Bug 3013937: Eni application installed check not required.
567   l_installed := fnd_installation.get( appl_id => 455, dep_appl_id => 455,
568                                        status => l_status, industry => l_industry );
569   if (l_status = 'I')  then
570   */
571   --Bug: 2858117 Checking for ENI package
572   SELECT count(1)  INTO l_exist
573   FROM user_objects
574   WHERE objecT_name= 'ENI_ITEMS_STAR_PKG'
575   AND object_type = 'PACKAGE';
576   if (l_exist <> 0 ) then
580   end if;
577     g_Appl_Inst.ENI := 455;
578   else
579     g_Appl_Inst.ENI := 0;
581 /* Bug 3013937: Eni application installed check not required.
582   else
583       g_Appl_Inst.ENI := 0;
584   end if;
585 */
586   l_installed := fnd_installation.get( appl_id => 431, dep_appl_id => 431,
587                                        status => l_status, industry => l_industry );
588   if (l_status = 'I')
589   then  g_Appl_Inst.EGO := 431;
590   else  g_Appl_Inst.EGO := 0;
591   end if;
592 
593   l_installed := fnd_installation.get( appl_id => 542, dep_appl_id => 542,
594                                        status => l_status, industry => l_industry );
595   if (l_status = 'I')
596   then  g_Appl_Inst.CSI := 542;
597   else  g_Appl_Inst.CSI := 0;
598   end if;
599 
600   l_installed := fnd_installation.get( appl_id => 708, dep_appl_id => 708,
601                                        status => l_status, industry => l_industry );
602   if (l_status = 'I')
603   then  g_Appl_Inst.CZ := 708;
604   else  g_Appl_Inst.CZ := 0;
605   end if;
606 
607 --Bug: 2691174
608   l_installed := fnd_installation.get( appl_id => 716, dep_appl_id => 716,
609                                        status => l_status, industry => l_industry );
610   if (l_status = 'I')
611   then  g_Appl_Inst.FTE := 716;
612   else  g_Appl_Inst.FTE := 0;
613   end if;
614   l_installed := fnd_installation.get( appl_id => 716, dep_appl_id => 551,
615                                        status => l_status, industry => l_industry );
616   if (l_status = 'I')
617   then  g_Appl_Inst.GMI := 551;
618   else  g_Appl_Inst.GMI := 0;
619   end if;
620 /* Start Bug 3713912 */
621   l_installed := fnd_installation.get( appl_id => 716, dep_appl_id => 552,
622                                        status => l_status, industry => l_industry );
623   if (l_status = 'I')
624   then  g_Appl_Inst.GMD := 552;
625   else  g_Appl_Inst.GMD := 0;
626   end if;
627   l_installed := fnd_installation.get( appl_id => 716, dep_appl_id => 553,
628                                        status => l_status, industry => l_industry );
629   if (l_status = 'I')
630   then  g_Appl_Inst.GME := 553;
631   else  g_Appl_Inst.GME := 0;
632   end if;
633   l_installed := fnd_installation.get( appl_id => 716, dep_appl_id => 557,
634                                        status => l_status, industry => l_industry );
635   if (l_status = 'I')
636   then  g_Appl_Inst.GR := 557;
637   else  g_Appl_Inst.GR := 0;
638   end if;
639 
640 /* End Bug 3713912 */
641 
642 /* Start Bug 5015595 */
643   l_installed := fnd_installation.get( appl_id => 535, dep_appl_id => 535,
644                                         status => l_status, industry => l_industry );
645   if (l_status = 'I')
646   then  g_Appl_Inst.XDP := 535;
647   else  g_Appl_Inst.XDP := 0;
648   end if;
649 /* End Bug 5015595 */
650 
651   -- Parameter gets value Y/N depending on whether Model/Unit Effectivity
652   -- has been enabled or not.
653   --
654   g_Appl_Inst.PJM_Unit_Eff_flag := PJM_UNIT_EFF.Enabled();
655 
656   -- 6531763: Adding ICX install check
657   l_installed := fnd_installation.get( appl_id => 178, dep_appl_id => 178,
658                                         status => l_status, industry => l_industry );
659   if (l_status = 'I')
660   then  g_Appl_Inst.ICX := 178;
661   else  g_Appl_Inst.ICX := 0;
662   end if;
663 
664 END INV_ITEM_UTIL;