DBA Data[Home] [Help]

PACKAGE BODY: APPS.AP_WEB_EXP_ITEM_UTIL

Source


1 PACKAGE BODY ap_web_exp_item_util AS
2 /* $Header: apweiutb.pls 115.2 2002/11/03 22:18:25 osteinme noship $ */
3 
4 
5 function get_rep_id RETURN NUMBER is
6 begin
7   return g_exp_report_id;
8 end;
9 
10 function get_exp_param_id RETURN NUMBER is
11 begin
12   return g_exp_report_parameter_id;
13 end;
14 
15 procedure set_rep_id(id IN NUMBER) is
16 begin
17   g_exp_report_id := id;
18 end;
19 
20 procedure set_exp_param_id(id IN NUMBER) is
21 begin
22   g_exp_report_parameter_id := id;
23 end;
24 
25 
26 /* **********************************************************************
27    function itemization_allowed
28 
29    This function is used in the view ap_web_exp_type_item_v to determine
30    if the 'itemization allowed' checkbox in the itemizations window should
31    be checked or not.  It expects the g_exp_report_parameter_id package
32    global to be set.
33 
34    ********************************************************************** */
35 
36 function itemization_allowed(p_parameter_id IN NUMBER) RETURN VARCHAR2 is
37   l_count NUMBER;
38 begin
39 
40   select count(1)
41   into l_count
42   from ap_pol_itemizations pi
43   where pi.itemization_parameter_id = p_parameter_id
44   and pi.parameter_id = g_exp_report_parameter_id;
45 
46   if l_count = 0 then
47     return 'N';
48   else
49     return 'Y';
50   end if;
51 end;
52 
53 end ap_web_exp_item_util;