DBA Data[Home] [Help]

PACKAGE BODY: APPS.FND_FUNCTION_W

Source


1 PACKAGE BODY fnd_function_w  AS
2 /* $Header: hrfndwrs.pkb 115.1 2001/12/18 21:02:22 pkm ship        $*/
3 /*
4   ||===========================================================================
5   || PROCEDURE: test
6   ||---------------------------------------------------------------------------
7   ||
8   || Description:
9   ||     This procedure will call the actual API - fnd_function.test() which
10   ||     does the following ;
11   ||       Test if function is accessible under current responsibility.
12   ||       Only checks static function security, not data security.
13   ||       This is here for cases where performance is important,
14   ||       and for backwards compatibility, but in general new code
15   ||       should use TEST_INSTANCE instead if acting on a particular
16   ||       object instance (database row).
17   ||
18   ||
19   || Pre Conditions:
20   ||
21   || In Arguments:
22   ||     function_name - function to test
23   ||
24   || Out Arguments:
25   ||     result       - 'Y' - if the function is accessible
26   ||                    'N' - if the function is not accessible.
27   ||
28   || In Out Arguments:
29   ||
30   || Post Success:
31   ||     Executes the API call.
32   ||
33   || Post Failure:
34   ||     Raises an exception
35   ||
36   || Access Status:
37   ||     Public.
38   ||
39   ||===========================================================================
40   */
41 
42   procedure TEST (p_function_name in  varchar2,
43                  p_result        out varchar2) is
44 
45   lc_out_result varchar2(1);
46   lb_out_result boolean;
47 
48   begin
49     lc_out_result := 'N';
50 
51     lb_out_result := FND_FUNCTION.TEST(p_function_name);
52 
53     if lb_out_result then
54       lc_out_result := 'Y';
55     end if;
56     p_result := lc_out_result;
57   exception
58     when others then
59       raise;  -- Raise error here relevant to the new tech stack.
60   end;
61 
62 
63 /*
64   ||===========================================================================
65   || PROCEDURE: test_id
66   ||---------------------------------------------------------------------------
67   ||
68   || Description:
69   ||     This procedure will call the actual API - fnd_function.test() which
70   ||     does the following ;
71   ||       Test if function is accessible under current responsibility.
72   ||
73   ||
74   || Pre Conditions:
75   ||
76   || In Arguments:
77   ||     function_id - function id to test
78   ||
79   || Out Arguments:
80   ||     result       - 'Y' - if the function is accessible
81   ||                    'N' - if the function is not accessible.
82   ||
83   || In Out Arguments:
84   ||
85   || Post Success:
86   ||     Executes the API call.
87   ||
88   || Post Failure:
89   ||     Raises an exception
90   ||
91   || Access Status:
92   ||     Public.
93   ||
94   ||===========================================================================
95   */
96 
97   procedure TEST_ID (p_function_id in  number,
98                     p_result      out varchar2)  is
99   lc_out_result varchar2(1);
100   lb_out_result boolean;
101 
102   begin
103     lc_out_result := 'N';
104     lb_out_result := FND_FUNCTION.TEST_ID(p_function_id);
105 
106     if lb_out_result then
107       lc_out_result := 'Y';
108     end if;
109 
110     p_result := lc_out_result;
111   exception
112     when others then
113       raise;  -- Raise error here relevant to the new tech stack.
114   end;
115 
116 
117 
118 END fnd_function_w;