DBA Data[Home] [Help]

PACKAGE BODY: APPS.OE_SOP_UTIL

Source


1 Package body OE_SOP_UTIL As
2 /* $Header: OEXUSOPB.pls 120.0 2005/06/01 02:56:39 appldev noship $ */
3 
4 FUNCTION GET_RESOURCE_ID RETURN NUMBER
5 IS
6 
7 cursor get_current_resource_id(p_userid in number) is
8 select resource_id
9 from jtf_rs_resource_extns
10 where user_id = p_userid;
11 
12 x_userid number;
13 x_resource_id number;
14 x_username varchar2(40);
15 
16 BEGIN
17 
18     x_userid := FND_GLOBAL.USER_ID;
19     OPEN get_current_resource_id ( x_userid );
20 
21     FETCH get_current_resource_id into x_resource_id;
22     if get_current_resource_id%NOTFOUND then
23     return (0);
24     end if;
25     CLOSE get_current_resource_id;
26 
27     return (x_resource_id);
28 
29 END;
30 
31 FUNCTION GET_PERSON_ID RETURN NUMBER
32 IS
33 
34 cursor get_current_person_id(p_userid in number) is
35 select
36      per.person_id
37 from fnd_user usr,
38      per_all_people_f per
39 where usr.employee_id = per.person_id
40 and user_id = p_userid;
41 
42 x_userid number;
43 x_person_id number;
44 x_username varchar2(40);
45 
46 BEGIN
47 
48     x_userid := FND_GLOBAL.USER_ID;
49     OPEN get_current_person_id ( x_userid );
50 
51     FETCH get_current_person_id into x_person_id;
52     if get_current_person_id%NOTFOUND then
53     return (0);
54     end if;
55     CLOSE get_current_person_id;
56 
57     return (x_person_id);
58 
59 END;
60 
61 END OE_SOP_UTIL;