DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_US_SQWL_MISC

Source


1 PACKAGE BODY pay_us_sqwl_misc AS
2 /* $Header: pyussqmn.pkb 115.0 2002/03/16 08:21:56 pkm ship        $ */
3 /*
4    ******************************************************************
5    *                                                                *
6    *  Copyright (C) 1993 Oracle Corporation.                        *
7    *  All rights reserved.                                          *
8    *                                                                *
9    *  This material has been provided pursuant to an agreement      *
10    *  containing restrictions on its use.  The material is also     *
11    *  protected by copyright law.  No part of this material may     *
12    *  be copied or distributed, transmitted or transcribed, in      *
13    *  any form or by any means, electronic, mechanical, magnetic,   *
14    *  manual, or otherwise, or disclosed to third parties without   *
15    *  the express written permission of Oracle Corporation,         *
16    *  500 Oracle Parkway, Redwood City, CA, 94065.                  *
17    *                                                                *
18    ******************************************************************
19 
20     Name        : pay_us_sqwl_misc
21 
22     Description :
23 
24     Change List
25     -----------
26     Date        Name       Vers    Bug No   Description
27     ----------- ---------- ------  -------  --------------------------
28     14-MAR-2002 asasthan    115.0  735180   Created.
29 */
30 
31 
32   FUNCTION get_old_month3_count(
33                 p_asact_ctx_id      in number
34                  )
35   RETURN VARCHAR2
36   IS
37 
38   ln_user_entity_id   number;
39   lv_value     varchar2(80) := '0';
40 
41 
42   cursor c_old_month3(p_asact_ctx_id in number) is
43   select value
44     from ff_archive_items fai,
45          ff_user_entities fue
46    where context1 = p_asact_ctx_id
47      and fue.user_entity_id = fai.user_entity_id
48      and fue.user_entity_name = 'A_SIT_GROSS_PER_JD_GRE_MON_3';
49 
50 
51   BEGIN
52       hr_utility.trace('opened  c_old_month3 for month 3');
53 
54       open c_old_month3(p_asact_ctx_id);
55 
56       fetch c_old_month3 into lv_value;
57 
58       IF c_old_month3%NOTFOUND THEN
59            close  c_old_month3;
60            RETURN  '0';
61       END IF;
62 
63       close  c_old_month3;
64 
65       return (lv_value);
66 
67   END get_old_month3_count;
68 
69 
70 
71   FUNCTION get_old_month2_count(
72                 p_asact_ctx_id      in number
73                  )
74   RETURN VARCHAR2
75   IS
76 
77   ln_user_entity_id   number;
78   lv_value     varchar2(80) := '0';
79 
80 
81   cursor c_old_month2(p_asact_ctx_id in number) is
82   select value
83     from ff_archive_items fai,
84          ff_user_entities fue
85    where context1 = p_asact_ctx_id
86      and fue.user_entity_id = fai.user_entity_id
87      and fue.user_entity_name = 'A_SIT_GROSS_PER_JD_GRE_MON_2';
88 
89 
90   BEGIN
91       hr_utility.trace('opened  c_old_month2 for month 2');
92 
93       open c_old_month2(p_asact_ctx_id);
94 
95       fetch c_old_month2 into lv_value;
96 
97       IF c_old_month2%NOTFOUND THEN
98            close  c_old_month2;
99            RETURN  '0';
100       END IF;
101 
102       close  c_old_month2;
103 
104       return (lv_value);
105 
106   END get_old_month2_count;
107 
108 
109 
110   FUNCTION get_old_month1_count(
111                 p_asact_ctx_id      in number
112                  )
113   RETURN VARCHAR2
114   IS
115 
116   ln_user_entity_id   number;
117   lv_value     varchar2(80) := '0';
118 
119 
120   cursor c_old_month1(p_asact_ctx_id in number) is
121   select value
122     from ff_archive_items fai,
123          ff_user_entities fue
124    where context1 = p_asact_ctx_id
125      and fue.user_entity_id = fai.user_entity_id
126      and fue.user_entity_name = 'A_SIT_GROSS_PER_JD_GRE_MON_1';
127 
128 
129   BEGIN
130       hr_utility.trace('opened  c_old_month1 for month 1');
131 
132       open c_old_month1(p_asact_ctx_id);
133 
134       fetch c_old_month1 into lv_value;
135 
136       IF c_old_month1%NOTFOUND THEN
137            close  c_old_month1;
138            RETURN  '0';
139       END IF;
140 
141       close  c_old_month1;
142 
143       return (lv_value);
144 
145   END get_old_month1_count;
146 
147 END pay_us_sqwl_misc;