[Home] [Help]
PACKAGE BODY: APPS.PAY_CORE_MLS
Source
1 package body pay_core_mls as
2 /* $Header: pycormls.pkb 115.3 2003/01/10 12:46:48 adhunter ship $ */
3 /*
4 * ---------------------------------------------------------------------------
5 Copyright (c) Oracle Corporation (UK) Ltd 1992.
6 All Rights Reserved.
7 --
8 --
9 PRODUCT
10 Oracle*Payroll
11 NAME
12 pay_core_mls
13 NOTES
14 MLS functions for core payroll
15 MODIFIED
16 --
17 PMFLETCH 11-DEC-2002 115.2 Added get_nls_language function
18 N.Bristow 21-JUL-1999 115.1 Changed to use the language
19 that the request was
20 submitted in.
21 N.Bristow 17-JUN-1999 115.0 Created
22 --
23 * ---------------------------------------------------------------------------
24 */
25 function get_srs_lang return varchar2 is
26 lang_str varchar2(30);
27 req_id number;
28 begin
29 --
30 req_id := fnd_request_info.GET_REQUEST_ID;
31 --
32 -- Use the calling language if installed,
33 -- default to US if theres a problem.
34 begin
35 --
36 select LANGUAGE_CODE
37 into lang_str
38 from fnd_languages flang,
39 fnd_concurrent_requests fcr
40 where fcr.NLS_LANGUAGE = flang.NLS_LANGUAGE
41 and fcr.request_id = req_id
42 and flang.INSTALLED_FLAG in ('B', 'I');
43 --
44 exception
45 when others then
46 lang_str := 'US';
47 end;
48 --
49 return (lang_str);
50 --
51 exception
52 when others then
53 lang_str := 'US';
54 return (lang_str);
55 end;
56 --
57 -----------------------------------------------------------------------------
58 function get_nls_language
59 ( p_language_code in fnd_languages.language_code%TYPE
60 ) return varchar2 IS
61 --
62 cursor c_nls_language IS
63 select l.nls_language
64 from fnd_languages l
65 where l.language_code = p_language_code;
66 --
67 l_nls_language fnd_languages.nls_language%TYPE;
68 --
69 nls_language_not_found exception;
70 --
71 begin
72 open c_nls_language;
73 fetch c_nls_language into l_nls_language;
74 close c_nls_language;
75 if ( l_nls_language IS NOT NULL ) then
76 return l_nls_language;
77 else
78 raise nls_language_not_found;
79 end if;
80 exception
81 when nls_language_not_found then
82 hr_utility.set_location(' Cannot find nls_language, pay_core_mls.get_nls_language', 99);
83 raise;
84 when others then
85 raise;
86 end;
87 --
88 end pay_core_mls;