1 PACKAGE BODY fnd_oracle_schema AS
2 /* $Header: AFSCSHMB.pls 120.1 2005/07/02 03:09:53 appldev ship $ */
3
4
5
6 function GetOuValue (
7 x_lookup_code in varchar2
8 ) return varchar2 is
9 ret_value varchar(150);
10 begin
11 begin
12 select tag
13 into ret_value
14 from fnd_lookup_values
15 where lookup_type = 'EXTERNAL_SCHEMA'
16 and lookup_code = x_lookup_code
17 and language = userenv('LANG');
18 return(ret_value);
19 exception
20 when no_data_found then
21 return('');
22 when others then
23 raise;
24 end;
25 end GetOuValue;
26
27 function GetOpValue (
28 schema_name in varchar2,
29 applsyspwd in varchar2
30 ) return varchar2 is
31 cnt number;
32 begin
33 if (schema_name is null or applsyspwd is null) then
34 return('');
35 else
36 -- validate this is an existing schema name
37 begin
38 select oracle_id
39 into cnt
40 from fnd_oracle_userid
41 where oracle_username = upper(schema_name);
42 exception
43 when no_data_found then
44 fnd_message.set_name('FND', 'FND_NO_SCHEMA_NAME');
45 fnd_message.set_token('SCHEMA_NAME', schema_name);
46 app_exception.raise_exception;
47 end;
48 return(fnd_web_sec.get_op_value(schema_name, applsyspwd));
49 end if;
50 end GetOpValue;
51
52 END FND_ORACLE_SCHEMA;