DBA Data[Home] [Help]

PACKAGE: APPS.PA_PROJ_ACCUM_MAIN

Source


6    x_last_update_date        NUMBER(15) := FND_GLOBAL.USER_ID;
1 PACKAGE PA_PROJ_ACCUM_MAIN AUTHID CURRENT_USER AS
2 /* $Header: PARESMNS.pls 120.3.12010000.2 2008/08/13 22:34:10 jngeorge ship $ */
3 
4    -- Standard who
5    x_last_updated_by         NUMBER(15) := FND_GLOBAL.USER_ID;
7    x_created_by              NUMBER(15) := FND_GLOBAL.USER_ID;
8    x_last_update_login       NUMBER(15) := FND_GLOBAL.LOGIN_ID;
9    x_request_id              NUMBER(15) := FND_GLOBAL.CONC_REQUEST_ID;
10    x_program_application_id  NUMBER(15) := FND_GLOBAL.PROG_APPL_ID;
11    x_program_id              NUMBER(15) := FND_GLOBAL.CONC_PROGRAM_ID;
12 
13    -- Public variables for this package
14 
15    -- exception corresponding to ORA-000054
16    RECORD_ALREADY_LOCKED     EXCEPTION;
17    PRAGMA EXCEPTION_INIT(RECORD_ALREADY_LOCKED, -54);
18 
19    x_proj_header_locked      BOOLEAN;
20    x_recs_processed          NUMBER;
21    x_summ_process            VARCHAR2(2);
22 
23    -- These variables hold good for one installation of PA
24 
25    x_impl_option               pa_implementations.accumulation_period_type%TYPE;
26 
27    x_current_pa_period         pa_periods_v.period_name%TYPE;
28    x_current_gl_period         pa_periods_v.gl_period_name%TYPE;
29    x_current_pa_start_date     DATE;
30    x_current_pa_end_date       DATE;
31    x_current_gl_start_date     DATE;
32    x_current_gl_end_date       DATE;
33    x_current_year              NUMBER;
34    x_period_yr_start_date      DATE;
35    x_period_yr_end_date        DATE;
36 
37    -- Variable to store the current period before the process ends
38    -- So that we can compare them from the corresponding column
39    -- when the process was started
40 
41    x_new_current_pa_period     pa_periods_v.period_name%TYPE;
42    x_new_current_gl_period     pa_periods_v.gl_period_name%TYPE;
43    x_new_current_pa_start_date DATE;
44    x_new_current_pa_end_date   DATE;
45    x_new_current_gl_start_date DATE;
46    x_new_current_gl_end_date   DATE;
47    x_new_current_year          NUMBER;
48 
49    x_reporting_period_status   VARCHAR2(1);
50 
51    -- These variables hold good for each project
52 
53    x_Prev_Accum_period1        Varchar2(30); -- Added for bug 3653978
54    x_Prev_Accum_period         Varchar2(30);
55    x_Current_period            Varchar2(30);
56    x_Prev_period               Varchar2(30);
57    x_Prev_pa_period            Varchar2(30);
58    x_prev_gl_period            Varchar2(30);
59 
60    x_proj_level_accum_id       Number;
61    x_prev_year                 Number;
62    x_prev_pa_year              Number;
63    x_prev_gl_year              Number;
64    x_prev_accum_year           Number;
65 
66    x_current_start_date        Date;
67    x_current_end_date          Date;
68    x_prev_start_date           Date;
69    x_prev_end_date             Date;
70    x_prev_pa_start_date        Date;
71    x_prev_pa_end_date          Date;
72    x_prev_gl_start_date        Date;
73    x_prev_gl_end_date          Date;
74    x_prev_accum_start_date     Date;
75    x_prev_accum_end_date       Date;
76    x_prev_prev_accum_period    Varchar2(30);
77 
78 
79    -- Variables for getting the start pa_date and end pa_date
80    -- when processing start pa_period and end pa_period
81 
82    x_start_pa_date Date := to_date('01-01-1950','DD-MM-YYYY'); -- very low date
83    x_end_pa_date   Date := to_date('31-12-4712','DD-MM-YYYY'); -- very high date
84 
85    -- Variables for debugging the procedures
86 
87    x_err_stage                 VARCHAR2(120);
88    x_err_code                  NUMBER;
89    x_err_stack                 VARCHAR2(1630);
90    x_old_stack                 VARCHAR2(1630);
91    x_commit_size               NUMBER;
92    rel_lock                    NUMBER;
93 
94    -- Grants Management Integrated Commitment Processing  ---------------------
95    -- added 30-MAY-2003, jwhite
96 
97    G_GMS_Enabled               VARCHAR2(1) := 'N';
98 
99    -- -------------------------------------------------------------------------
100 
101    -- Patchset 'L' Reburdening Enhancement Processing  ---------------------
102    -- added 05-AUG-2003, jwhite
103 
104    G_PA_Enhanced_Burdening	VARCHAR2(1) := 'N';
105 
106    -- -------------------------------------------------------------------------
107 
108 
109    TYPE actions_in_rec_type IS RECORD
110        (action_flag VARCHAR2(2));
111 
112    TYPE action_tbl_type IS TABLE OF actions_in_rec_type
113 	INDEX BY BINARY_INTEGER;
114 
115    PROCEDURE initialize;
116    PROCEDURE initialize_project (x_project_id  IN  NUMBER,
117                                  x_accum_period_type_changed OUT NOCOPY BOOLEAN); --File.Sql.39 bug 4440895
118 
119    PROCEDURE proj_accum
120            (errbuf                 IN OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
121 	    retcode                IN OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
122 	    x_project_num_from        IN  VARCHAR2,
123 	    x_project_num_to          IN  VARCHAR2,
124             x_end_date_through        IN  DATE,
125 	    x_mode                    IN  VARCHAR2,
126             x_actual_cost_flag        IN  VARCHAR2,
127 	    x_system_linkage_function IN  VARCHAR2,
128             x_revenue_flag            IN  VARCHAR2,
129 	    x_budgets_flag            IN  VARCHAR2,
130 	    x_budget_type_code        IN  VARCHAR2,
131 	    x_commitments_flag        IN  VARCHAR2,
132 	    x_grouping_id	      IN  NUMBER,
136 	   );
133 	    x_summ_context	      IN  VARCHAR2,
134 	    x_delete_temp_table	      IN  VARCHAR2,
135 	    x_project_type            IN  VARCHAR2
137 
138   PROCEDURE proj_refresh
139           ( errbuf                 IN OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
140             retcode                IN OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
141             x_project_num_from        IN  VARCHAR2,
142             x_project_num_to          IN  VARCHAR2,
143             x_end_date_through        IN  DATE,
144             x_project_type            IN  VARCHAR2
145            );
146 
147    PROCEDURE ref_rl_accum
148            (errbuf                 IN OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
149 	    retcode                IN OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
150 	    x_project_num_from        IN  VARCHAR2,
151 	    x_project_num_to          IN  VARCHAR2,
152 	    x_resource_list_id        IN  NUMBER
153 	   );
154 
155    PROCEDURE build_txn_accum
156           (errbuf                 IN OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
160 	   x_start_pa_period         IN  VARCHAR2,
157 	   retcode                IN OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
158 	   x_project_num_from        IN  VARCHAR2,
159 	   x_project_num_to          IN  VARCHAR2,
161 	   x_end_pa_period           IN  VARCHAR2,
162 	   x_system_linkage_function IN  VARCHAR2
163 	  );
164 
165    PROCEDURE lock_proj_level_header_record
166                        (x_project_id          IN NUMBER);
167 
168    FUNCTION action_exists
169 	   (x_action_flag  IN VARCHAR2,
170 	    x_actions_in   IN action_tbl_type,
171 	    x_actions_cnt  IN BINARY_INTEGER)
172 	    RETURN VARCHAR2 ;
173 
174    FUNCTION check_period_flags
175 	    (x_project_id  IN NUMBER,
176 	     x_impl_option IN VARCHAR2,
177 	     x_current_end_date IN DATE,
178 	     x_action_flag IN VARCHAR2,
179 	     x_closed_date IN DATE,
180 	     x_current_start_date IN DATE)
181 	     RETURN VARCHAR2 ;
182 --   PRAGMA RESTRICT_REFERENCES( check_period_flags, WNDS );
183 
184    FUNCTION Get_curr_end_date
185      	    RETURN Date;
186    PRAGMA RESTRICT_REFERENCES(Get_curr_end_date, WNDS, WNPS );
187 
188  /*
189  Commented for Bug#6408874
190    PROCEDURE populate_cmt_tmp_table
191 			( p_project_id_tbl            IN   pa_plsql_datatypes.idTabTyp,
192 			  p_system_linkage_function   IN   VARCHAR2 );
193  */
194 
195 PROCEDURE populate_cmt_tmp_table
196                   (p_project_num_from          IN   VARCHAR2,
197                    p_project_num_to            IN   VARCHAR2,
198                    p_system_linkage_function   IN   VARCHAR2, -- Proc added for bug#6408874
199                    p_refresh_flag              IN   VARCHAR2, -- Added for Bug# 7175975
200                    p_project_type              IN   VARCHAR2); -- Added for Bug# 7175975
201 
202 END PA_PROJ_ACCUM_MAIN;