1 PACKAGE BODY GMF_GL_GET_SOB_ID AS
2 /* $Header: gmfsobib.pls 115.1 2002/11/11 00:44:19 rseshadr ship $ */
3 CURSOR cur_gl_get_sob_id(st_date date, en_date date,
4 sob_name varchar2) IS
5 SELECT set_of_books_id
6 FROM gl_sets_of_books
7 WHERE name LIKE sob_name
8 AND creation_date
9 BETWEEN nvl(st_date,creation_date)
10 AND nvl(en_date,creation_date);
11
12 PROCEDURE proc_gl_get_sob_id(
13 st_date in out NOCOPY date,
14 en_date in out NOCOPY date,
15 sob_name in out NOCOPY varchar2,
16 sob_id out NOCOPY number,
17 row_to_fetch in number,
18 error_status out NOCOPY number) IS
19 Begin /* Beginning of procedure proc_gl_get_sob_id */
20
21 IF NOT cur_gl_get_sob_id%ISOPEN THEN
22 OPEN cur_gl_get_sob_id(st_date, en_date, sob_name);
23 END IF;
24 FETCH cur_gl_get_sob_id
25 INTO sob_id;
26 if cur_gl_get_sob_id%NOTFOUND then
27 error_status := 100;
28 end if;
29 if (cur_gl_get_sob_id%NOTFOUND) or row_to_fetch = 1 THEN
30 CLOSE cur_gl_get_sob_id;
31 end if;
32 exception
33 when others then
34 error_status := SQLCODE;
35 END; /* End of procedure proc_gl_get_sob_id */
36 END GMF_GL_GET_SOB_ID; -- END GMF_GL_GET_SOB_ID