1 PACKAGE BODY GMF_GL_GET_CURRENCIES AS
2 /* $Header: gmfcurdb.pls 115.0 99/07/16 04:17:05 porting shi $ */
3 CURSOR cur_gl_get_currencies(st_date date, en_date date,
4 cur_code varchar2) IS
5 SELECT currency_code, name, description, precision, symbol,
6 creation_date, created_by,
7 last_update_date,last_updated_by
8 FROM fnd_currencies_vl
9 WHERE currency_code like cur_code AND
10 last_update_date BETWEEN nvl(st_date, last_update_date)
11 AND nvl(en_date, last_update_date);
12 function get_name(usr_id number) return varchar2 is
13 usr_name varchar2(100);
14 begin
15 select user_name into usr_name from fnd_user where
16 user_id=usr_id;
17 return(usr_name);
18 end;
19 PROCEDURE proc_gl_get_currencies(
20 st_date in out date,
21 en_date in out date,
22 cur_code in out varchar2,
23 cur_name in out varchar2,
24 descr out varchar2,
25 preci out number,
26 symb out varchar2,
27 creation_date out date,
28 created_by out number,
29 last_update_date out date,
30 last_updated_by out number,
31 row_to_fetch in out number,
32 error_status out number) IS
33 /* ad_by number;*/
34 /* mod_by number;*/
35 Begin /* Beginning of procedure proc_gl_get_currencies*/
36 IF NOT cur_gl_get_currencies%ISOPEN THEN
37 OPEN cur_gl_get_currencies(st_date, en_date, cur_code);
38 END IF;
39 FETCH cur_gl_get_currencies
40 INTO cur_code ,cur_name, descr, preci, symb, creation_date,created_by,last_update_date,
41 last_updated_by;
42 IF cur_gl_get_currencies%NOTFOUND then
43 error_status := 100;
44 END IF;
45 IF cur_gl_get_currencies%NOTFOUND or row_to_fetch = 1 THEN
46 CLOSE cur_gl_get_currencies;
47 END IF;
48 /* SIERRA COMMENTED kiran 3/11/98 instead of getting the user_id into*/
49 /* ad_by and mod_by the values are directly fetched into created_by*/
50 /* and last_updated_by.*/
51 /*created_by:=get_name(ad_by);*/
52 /* modified_by:=get_name(mod_by);*/
53 exception
54 when others then
55 error_status := SQLCODE;
56 END; /* End of procedure proc_gl_get_currencies*/
57 END GMF_GL_GET_CURRENCIES; /* END GMF_GL_GET_CURRENCIES*/