DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_EFC_INFO

Source


1 PACKAGE BODY pqh_efc_info  AS
2 /* $Header: pqhefinf.pkb 115.3 2004/02/12 11:08:59 scnair noship $ */
3 --
4 
5 -- ----------------------------------------------------------------------------
6 -- |-------------------------< get_db_version >-------------------------------|
7 -- ----------------------------------------------------------------------------
8 --
9 -- Description:
10 --  Determines the latest minipack version to have been applied.
11 --
12 -- ----------------------------------------------------------------------------
13 FUNCTION get_db_version RETURN VARCHAR2 IS
14 --
15 
16 -- set EFC baseline version
17 l_version VARCHAR2(30) := 'APR2001';
18 l_detected BOOLEAN;
19 l_db_value varchar2(10);
20 
21 l_status    varchar2(30);
22 l_industry  varchar2(30);
23 l_owner     varchar2(30);
24 
25 l_ret       boolean := FND_INSTALLATION.GET_APP_INFO ('PER', l_status,
26                                                       l_industry, l_owner);
27 cursor csr_test (p_owner varchar2) is
28 select 'Y' from all_tab_columns
29 where table_name ='PQH_BUDGET_VERSIONS'
30 and column_name ='BUDGET_UNIT1_VALUE'
31 and data_precision is null
32 and owner = p_owner;
33 --
34 BEGIN
35 --
36 
37 -- test for product minipack code
38 -- JUL2001 = July 2001
39 
40 l_detected := FALSE;
41 --
42 -- <code for detecting July minipack>
43 -- if found, set l_detected to TRUE
44 --
45 open csr_test(l_owner);
46 fetch csr_test into l_db_value;
47 if csr_test%found then
48    l_detected := TRUE;
49 else
50    l_detected := FALSE;
51 end if;
52 close csr_test;
53 
54 IF l_detected THEN
55   l_version := 'JUL2001';
56 END IF;
57 
58 
59 RETURN(l_version);
60 
61 --
62 END get_db_version;
63 
64 --
65 END pqh_efc_info;