1 package PA_PROJECT_CORE1 AUTHID CURRENT_USER as
2 -- $Header: PAXPCO1S.pls 120.8 2010/11/12 05:41:00 smijosep ship $
3
4 --
5 -- PROCEDURE
6 -- get_project_number_by_numcode
7 -- PURPOSE
8 -- This procedure retrieves project number for a specified
9 -- project id according to the implementation-defined Project
10 -- number generation mode. If mode is 'MANUAL', the
11 -- user-provided project number is used; otherwise, a system
12 -- generated number will be generted.
13 --
14 procedure get_project_number_by_numcode ( x_orig_proj_num IN varchar2
15 , x_resu_proj_num IN OUT NOCOPY varchar2 --File.Sql.39 bug 4440895
16 , x_proj_number_gen_mode OUT NOCOPY varchar2 -- Added for Bug# 7445534
17 , x_err_code IN OUT NOCOPY number --File.Sql.39 bug 4440895
18 , x_err_stage IN OUT NOCOPY varchar2 --File.Sql.39 bug 4440895
19 , x_err_stack IN OUT NOCOPY varchar2); --File.Sql.39 bug 4440895
20
21 --
22 -- PROCEDURE
23 -- revert_proj_number
24 -- PURPOSE
25 -- This procedure reverts the project number if an error
26 -- has occured. Added for Bug# 7445534
27 --
28 PROCEDURE revert_proj_number(p_proj_number_gen_mode IN VARCHAR2
29 ,p_project_number IN VARCHAR2 );
30
31
32 --
33 -- PROCEDURE
34 -- copy_project
35 -- PURPOSE
36 --
37 -- The objective of this procedure is to create a new
38 -- project and other project related information such
39 -- as wbs, project players, budget information, billing,
40 -- and costing information by copying from a specific project
41 -- and its related information.
42 --
43 -- Users can choose whether to copy budget, tasks, and task
44 -- related information by passing in 'Y' or 'N' for the
45 -- x_copy_task_flag and x_copy_budget_flag parameters.
46 -- Users can also choose whether to use copy override
47 -- associated with the original project by passing in
48 -- 'Y' or 'N' for x_use_override_flag. If 'Y' is passed
49 -- for x_use_override_flag, then project players with
50 -- project roles that are overrideable, project classes
51 -- with categories that are overrideable, and customers
52 -- with relationship role type that are overrideable will
53 -- not get copied from the original project to the new
54 -- project. The overrideable information can be entered
55 -- via the Enter Project form in this case.
56 --
57 -- If no value is provided for any of these flag, the
58 -- default is 'Y'.
59 --
60 -- User can pass 'Y' or 'N' for x_template_flag to indicate
61 -- whether the resulting record is a template or not. If
62 -- no value is passed, the default is 'N'.
63 --
64 procedure copy_project (
65 x_orig_project_id IN number
66 , x_project_name IN varchar2
67 , x_long_name IN VARCHAR2 default null
68 , x_project_number IN varchar2
69 , x_description IN varchar2
70 , x_project_type IN varchar2
71 , x_project_status_code IN varchar2
72 , x_distribution_rule IN varchar2
73 , x_public_sector_flag IN varchar2
74 , x_organization_id IN number
75 , x_start_date IN date
76 , x_completion_date IN date
77 , x_probability_member_id IN number
78 , x_project_value IN number
79 , x_expected_approval_date IN date
80 --MCA Sakthi for MultiAgreementCurreny Project
81 , x_agreement_currency IN VARCHAR2
82 , x_agreement_amount IN NUMBER
83 , x_agreement_org_id IN NUMBER
84 --MCA Sakthi for MultiAgreementCurreny Project
85 , x_copy_task_flag IN varchar2
86 , x_copy_budget_flag IN varchar2
87 , x_use_override_flag IN varchar2
88 , x_copy_assignment_flag IN varchar2 default 'N'
89 , x_template_flag IN varchar2
90 , x_project_id OUT NOCOPY number --File.Sql.39 bug 4440895
91 , x_err_code IN OUT NOCOPY number --File.Sql.39 bug 4440895
92 , x_err_stage IN OUT NOCOPY varchar2 --File.Sql.39 bug 4440895
93 , x_err_stack IN OUT NOCOPY varchar2 --File.Sql.39 bug 4440895
94 , x_customer_id IN number default NULL
95 , x_new_project_number IN OUT NOCOPY varchar2 --File.Sql.39 bug 4440895
96 , x_pm_product_code IN varchar2 default NULL
97 , x_pm_project_reference IN varchar2 default NULL
98 , x_project_currency_code IN varchar2 default NULL /* 8297384 */
99 , x_attribute_category IN varchar2 default NULL
100 , x_attribute1 IN varchar2 default NULL
101 , x_attribute2 IN varchar2 default NULL
102 , x_attribute3 IN varchar2 default NULL
103 , x_attribute4 IN varchar2 default NULL
104 , x_attribute5 IN varchar2 default NULL
105 , x_attribute6 IN varchar2 default NULL
106 , x_attribute7 IN varchar2 default NULL
107 , x_attribute8 IN varchar2 default NULL
108 , x_attribute9 IN varchar2 default NULL
109 , x_attribute10 IN varchar2 default NULL
110 , x_actual_start_date IN DATE default NULL
111 , x_actual_finish_date IN DATE default NULL
112 , x_early_start_date IN DATE default NULL
113 , x_early_finish_date IN DATE default NULL
114 , x_late_start_date IN DATE default NULL
115 , x_late_finish_date IN DATE default NULL
116 , x_scheduled_start_date IN DATE default NULL
117 , x_scheduled_finish_date IN DATE default NULL
118 , x_team_template_id IN NUMBER
119 , x_country_code IN VARCHAR2
120 , x_region IN VARCHAR2
121 , x_city IN VARCHAR2
122 , x_opp_value_currency_code IN VARCHAR2
123 , x_org_project_copy_flag IN VARCHAR2 default 'N'
124 , x_priority_code IN VARCHAR2 default null
125 , x_security_level IN NUMBER default 1
126 --Bug 3279981
127 , p_en_top_task_cust_flag IN VARCHAR2 default null
128 , p_en_top_task_inv_mth_flag IN VARCHAR2 default null
129 --Bug 3279981
130 --sunkalya:federal Bug#5511353
131 , p_date_eff_funds_flag IN VARCHAR2 default null
132 --sunkalya:federal Bug#5511353
133 , p_ar_rec_notify_flag IN VARCHAR2 default 'N' -- 7508661 : EnC
134 , p_auto_release_pwp_inv IN VARCHAR2 default 'Y' -- 7508661 : EnC
135 );
136
137 /*********************************************************************
138 ** Get_Next_Avail_Proj_Num
139 ** Procedure to return the next available
140 ** Project number for automatic project numbering.
141 **
142 ** Called when the new automatic project number generated is not unique.
143 **
144 ** Parameters :
145 ** Start_proj_num - Project number(segment1) which was found to be
146 ** non-unique. It starts from the next number.
147 ** No_tries - The no of times it should loop around for checking
148 ** the uniqueness of the project number.
149 ** Next_proj_num - Next Project number
150 ** x_error_code - 0 if unique number found in the tries specified
151 ** 1 if unique number not found
152 ** SQLCODE (< 0) if exception raised.
153 ** x_error_stage - Message
154 ** x_error_stack - The Satck of procedures.
155 **
156 ** Author - tsaifee 01/24/97
157 **
158 *********************************************************************/
159
160 Procedure Get_Next_Avail_Proj_Num (
161 Start_proj_num IN Number,
162 No_tries IN Number,
163 Next_proj_num IN OUT NOCOPY Number, --File.Sql.39 bug 4440895
164 x_error_code IN OUT NOCOPY Number, --File.Sql.39 bug 4440895
165 x_error_stack IN OUT NOCOPY Varchar2, --File.Sql.39 bug 4440895
166 x_error_stage IN OUT NOCOPY Varchar2 ); --File.Sql.39 bug 4440895
167
168 --
169 -- FUNCTION
170 --
171 -- Get_Message_from_stack
172 -- This function returns message from the stack and if does not
173 -- find one then returns whatever message passed to it.
174 -- HISTORY
175 -- 12-DEC-01 MAansari -Created
176
177 FUNCTION Get_Message_from_stack( p_err_stage IN VARCHAR2 ) RETURN VARCHAR2;
178
179
180 -- PROCEDURE : populate_copy_options
181 -- PURPOSE : This API should be called to populate values for copy options into the global
182 -- temporary table PA_PROJECT_COPY_OPTIONS_TMP
183 PROCEDURE populate_copy_options( p_api_version IN NUMBER := 1.0
184 ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
185 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
186 ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
187 ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
188 ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
189 ,p_debug_mode IN VARCHAR2 := 'N'
190 ,p_context_tbl IN SYSTEM.PA_VARCHAR2_30_TBL_TYPE := SYSTEM.PA_VARCHAR2_30_TBL_TYPE()
191 ,p_flag_tbl IN SYSTEM.PA_VARCHAR2_1_TBL_TYPE := SYSTEM.PA_VARCHAR2_1_TBL_TYPE()
192 ,p_version_id_tbl IN SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE()
193 ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
194 ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
195 ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
196 ) ;
197
198 -- PROCEDURE : populate_default_copy_options
199 -- PURPOSE : This API should be called to populate default values for copy options into the global
200 -- temporary table PA_PROJECT_COPY_OPTIONS_TMP
201 PROCEDURE populate_default_copy_options( p_api_version IN NUMBER := 1.0
202 ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
203 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
204 ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
205 ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
206 ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
207 ,p_debug_mode IN VARCHAR2 := 'N'
208 ,p_src_project_id IN NUMBER
209 ,p_src_template_flag IN VARCHAR2
210 ,p_dest_template_flag IN VARCHAR2
211 ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
212 ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
213 ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
214 );
215
216 -- 4363092 Commented COPY_BUDGETORY_CTRL procedure from specification to fix invalid
217 -- object issue, the fix for 4431234 will be done later after complete analysis
218 /*
219 PROCEDURE COPY_BUDGETORY_CTRL
220 (
221 p_api_version_number IN NUMBER := 1.0
222 , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
223 , p_commit IN VARCHAR2 := FND_API.G_FALSE
224 , p_src_project_id IN NUMBER
225 , p_dest_project_id IN NUMBER
226 , x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
227 , x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
228 , x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
229 );
230 */
231
232 end PA_PROJECT_CORE1 ;
233