DBA Data[Home] [Help]

PACKAGE BODY: APPS.PA_PROJECTS_PKG

Source


1 PACKAGE BODY PA_PROJECTS_PKG as
2 /* $Header: PAXPROJB.pls 120.4.12010000.2 2008/10/27 16:56:19 atshukla ship $ */
3 
4   PROCEDURE Insert_Row(X_Rowid                   IN OUT NOCOPY VARCHAR2, -- 4537865
5                        X_Project_Id                     IN OUT NOCOPY NUMBER, -- 4537865
6                        x_org_id                         NUMBER, --R12: Bug 4363092
7                        X_Name                           VARCHAR2,
8                        X_Long_Name                      VARCHAR2,
9                        X_Segment1                       VARCHAR2,
10                        X_Last_Update_Date               DATE,
11                        X_Last_Updated_By                NUMBER,
12                        X_Creation_Date                  DATE,
13                        X_Created_By                     NUMBER,
14                        X_Last_Update_Login              NUMBER,
15                        X_Project_Type                   VARCHAR2,
16                        X_Carrying_Out_Organization_Id   NUMBER,
17                        X_Public_Sector_Flag             VARCHAR2,
18                        X_Project_Status_Code            VARCHAR2,
19                        X_Description                    VARCHAR2,
20                        X_Start_Date                     DATE,
21                        X_Completion_Date                DATE,
22                        X_Closed_Date                    DATE,
23                        X_Distribution_Rule              VARCHAR2,
24                        X_Labor_Invoice_Format_Id        NUMBER,
25                        X_NL_Invoice_Format_Id	        NUMBER,
26                        X_Retention_Invoice_Format_Id    NUMBER,
27                        X_Retention_Percentage           NUMBER,
28                        X_Billing_Offset                 NUMBER,
29                        X_Billing_Cycle_Id               NUMBER,
30                        X_Labor_Std_Bill_Rate_Schdl      VARCHAR2,
31                        X_Labor_Bill_Rate_Org_Id         NUMBER,
32                        X_Labor_Schedule_Fixed_Date      DATE,
33                        X_Labor_Schedule_Discount        NUMBER,
34                        X_NL_Std_Bill_Rate_Schdl   	VARCHAR2,
35                        X_NL_Bill_Rate_Org_Id     	NUMBER,
36                        X_NL_Schedule_Fixed_Date  	DATE,
37                        X_NL_Schedule_Discount    	NUMBER,
38                        X_Limit_To_Txn_Controls_Flag     VARCHAR2,
39                        X_Project_Level_Funding_Flag     VARCHAR2,
40                        X_Invoice_Comment                VARCHAR2,
41                        X_Unbilled_Receivable_Dr         NUMBER,
42                        X_Unearned_Revenue_Cr            NUMBER,
43                        X_Summary_Flag                   VARCHAR2,
44                        X_Enabled_Flag                   VARCHAR2,
45                        X_Segment2                       VARCHAR2,
46                        X_Segment3                       VARCHAR2,
47                        X_Segment4                       VARCHAR2,
48                        X_Segment5                       VARCHAR2,
49                        X_Segment6                       VARCHAR2,
50                        X_Segment7                       VARCHAR2,
51                        X_Segment8                       VARCHAR2,
52                        X_Segment9                       VARCHAR2,
53                        X_Segment10                      VARCHAR2,
54                        X_Attribute_Category             VARCHAR2,
55                        X_Attribute1                     VARCHAR2,
56                        X_Attribute2                     VARCHAR2,
57                        X_Attribute3                     VARCHAR2,
58                        X_Attribute4                     VARCHAR2,
59                        X_Attribute5                     VARCHAR2,
60                        X_Attribute6                     VARCHAR2,
61                        X_Attribute7                     VARCHAR2,
62                        X_Attribute8                     VARCHAR2,
63                        X_Attribute9                     VARCHAR2,
64                        X_Attribute10                    VARCHAR2,
65                        X_Cost_Ind_Rate_Sch_Id           NUMBER,
66                        X_Rev_Ind_Rate_Sch_Id            NUMBER,
67                        X_Inv_Ind_Rate_Sch_Id            NUMBER,
68                        X_Cost_Ind_Sch_Fixed_Date        DATE,
69                        X_Rev_Ind_Sch_Fixed_Date         DATE,
70                        X_Inv_Ind_Sch_Fixed_Date         DATE,
71                        X_Labor_Sch_Type                 VARCHAR2,
72                        X_Non_Labor_Sch_Type             VARCHAR2,
73                        X_Template_Flag                  VARCHAR2,
74                        X_Verification_Date              DATE,
75                        X_Created_From_Project_Id        NUMBER,
76                        X_Template_Start_Date		DATE,
77                        X_Template_End_Date    		DATE,
78                        X_Project_Currency_Code          VARCHAR2,
79                        X_Allow_Cross_Charge_Flag        VARCHAR2,
80                        X_Project_Rate_Date              DATE,
81                        X_Project_Rate_Type              VARCHAR2,
82                        X_Output_Tax_Code                VARCHAR2,
83                        X_Retention_Tax_Code             VARCHAR2,
84                        X_CC_Process_Labor_Flag          VARCHAR2,
85                        X_Labor_Tp_Schedule_Id           NUMBER,
86                        X_Labor_Tp_Fixed_Date            DATE,
87                        X_CC_Process_NL_Flag             VARCHAR2,
88                        X_Nl_Tp_Schedule_Id              NUMBER,
89                        X_Nl_Tp_Fixed_Date               DATE,
90                        X_CC_Tax_Task_Id                 NUMBER,
91 --   17-MAY-00  kkekkar     Added the following columns for CBGA project
92 --                          bill_job_group_id, cost_job_group_id
93                        x_bill_job_group_id              NUMBER,
94                        x_cost_job_group_id              NUMBER,
95                        x_role_list_id                   NUMBER,
96                        x_work_type_id                   NUMBER,
97                        x_calendar_id                    NUMBER,
98                        x_location_id                    NUMBER,
99                        x_probability_member_id          NUMBER,
100                        x_project_value                  NUMBER,
101                        x_expected_approval_date         DATE,
102                        x_team_template_id               NUMBER,
103 -- 21-MAR-2001 anlee
104 -- added job_bill_rate_schedule_id,
105 -- emp_bill_rate_schedule_id for
106 -- PRM forecasting changes
107                        x_job_bill_rate_schedule_id      NUMBER,
108                        x_emp_bill_rate_schedule_id      NUMBER,
109 --MCA Sakthi for MultiAgreementCurreny Project
110                        x_competence_match_wt            NUMBER,
111                        x_availability_match_wt          NUMBER,
112                        x_job_level_match_wt             NUMBER,
113                        x_enable_automated_search        VARCHAR2,
114                        x_search_min_availability        NUMBER,
115                        x_search_org_hier_id             NUMBER,
116                        x_search_starting_org_id         NUMBER,
117                        x_search_country_code            VARCHAR2,
118                        x_min_cand_score_reqd_for_nom    NUMBER,
119                        x_non_lab_std_bill_rt_sch_id     NUMBER,
120                        x_invproc_currency_type          VARCHAR2,
121                        x_revproc_currency_code          VARCHAR2,
122                        x_project_bil_rate_date_code     VARCHAR2,
123                        x_project_bil_rate_type          VARCHAR2,
124                        x_project_bil_rate_date          DATE,
125                        x_project_bil_exchange_rate      NUMBER,
126                        x_projfunc_currency_code         VARCHAR2,
127                        x_projfunc_bil_rate_date_code    VARCHAR2,
128                        x_projfunc_bil_rate_type         VARCHAR2,
129                        x_projfunc_bil_rate_date         DATE,
130                        x_projfunc_bil_exchange_rate     NUMBER,
131                        x_funding_rate_date_code         VARCHAR2,
132                        x_funding_rate_type              VARCHAR2,
133                        x_funding_rate_date              DATE,
134                        x_funding_exchange_rate          NUMBER,
135                        x_baseline_funding_flag          VARCHAR2,
136                        x_projfunc_cost_rate_type         VARCHAR2,
137                        x_projfunc_cost_rate_date         DATE,
138                        x_multi_currency_billing_flag    VARCHAR2,
139                        x_inv_by_bill_trans_curr_flag    VARCHAR2,
140 --MCA Sakthi for MultiAgreementCurrency Project
141 --MCA
142                        x_assign_precedes_task       VARCHAR2,
143 --Structure
144                        x_split_cost_from_wokplan_flag   VARCHAR2,
145                        x_split_cost_from_bill_flag       VARCHAR2,
146 --Structure
147 --Advertisement
148                        x_adv_action_set_id              NUMBER,
149                        x_start_adv_action_set_flag      VARCHAR2,
150 --Advertisement
151 --Project Setup
152                        x_priority_code                  VARCHAR2,
153 --Project Setup
154 --Retention
155                        x_retn_billing_inv_format_id     NUMBER,
156                        x_retn_accounting_flag           VARCHAR2,
157 --Retention
158 -- anlee
159 -- patchset K changes
160                        x_revaluate_funding_flag         VARCHAR2,
161                        x_include_gains_losses_flag    VARCHAR2,
162 -- msundare
163                        x_security_level                 NUMBER,
164                        x_labor_disc_reason_code         VARCHAR2,
165                        x_non_labor_disc_reason_code     VARCHAR2,
166 -- End of changes
167                        x_record_version_number          NUMBER,
168                        x_btc_cost_base_rev_code         VARCHAR2,  /* Bug#2638968 */
169                        x_revtrans_currency_type         VARCHAR2,  /* R12 - Bug 4363092 */
170 --PA L
171                        x_asset_allocation_method        VARCHAR2,
172                        x_capital_event_processing       VARCHAR2,
173                        x_cint_rate_sch_id               NUMBER,
174                        x_cint_eligible_flag             VARCHAR2,
175                        x_cint_stop_date                 DATE,
176 --FP_M Changes. Tracking Bug 3279981
177                        x_en_top_task_customer_flag  VARCHAR2,
178                        x_en_top_task_inv_mth_flag   VARCHAR2,
179                        x_revenue_accrual_method         VARCHAR2,
180                        x_invoice_method                 VARCHAR2,
181                        x_projfunc_attr_for_ar_flag      VARCHAR2,
182                        x_sys_program_flag               VARCHAR2,
183                        x_allow_multi_program_rollup     VARCHAR2,
184                        x_proj_req_res_format_id         NUMBER,
185                        x_proj_asgmt_res_format_id       NUMBER,
186 		       --sunkalya:federal Bug#5511353
187 		       x_date_eff_funds_flag        VARCHAR2
188 		       --sunkalya:federal Bug#5511353
189                       ,x_ar_rec_notify_flag             VARCHAR2  -- 7508661 : EnC
190                       ,x_auto_release_pwp_inv           VARCHAR2  -- 7508661 : EnC
191   ) IS
192     CURSOR C IS SELECT rowid FROM pa_projects
193                  WHERE project_id = X_Project_Id;
194       CURSOR C2 IS SELECT pa_projects_s.nextval FROM sys.dual;
195 
196     l_return_status VARCHAR2(1);
197    BEGIN
198       if (X_Project_Id is NULL) then
199         OPEN C2;
200         FETCH C2 INTO X_Project_Id;
201         CLOSE C2;
202       end if;
203 
204        INSERT INTO pa_projects(
205               project_id,
206               org_id, --R12: Bug 4363092
207               name,
208               long_name,
209               segment1,
210               last_update_date,
211               last_updated_by,
212               creation_date,
213               created_by,
214               last_update_login,
215               project_type,
216               carrying_out_organization_id,
217               public_sector_flag,
218               project_status_code,
219               description,
220               start_date,
221               completion_date,
222               closed_date,
223               distribution_rule,
224               labor_invoice_format_id,
225               non_labor_invoice_format_id,
226               retention_invoice_format_id,
227               retention_percentage,
228               billing_offset,
229               billing_cycle_id,
230               labor_std_bill_rate_schdl,
231               labor_bill_rate_org_id,
232               labor_schedule_fixed_date,
233               labor_schedule_discount,
234               non_labor_std_bill_rate_schdl,
235               non_labor_bill_rate_org_id,
236               non_labor_schedule_fixed_date,
237               non_labor_schedule_discount,
238               limit_to_txn_controls_flag,
239               project_level_funding_flag,
240               invoice_comment,
241               unbilled_receivable_dr,
242               unearned_revenue_cr,
243               summary_flag,
244               enabled_flag,
245               segment2,
246               segment3,
247               segment4,
248               segment5,
249               segment6,
250               segment7,
251               segment8,
252               segment9,
253               segment10,
254               attribute_category,
255               attribute1,
256               attribute2,
257               attribute3,
258               attribute4,
259               attribute5,
260               attribute6,
261               attribute7,
262               attribute8,
263               attribute9,
264               attribute10,
265               cost_ind_rate_sch_id,
266               rev_ind_rate_sch_id,
267               inv_ind_rate_sch_id,
268               cost_ind_sch_fixed_date,
269               rev_ind_sch_fixed_date,
270               inv_ind_sch_fixed_date,
271               labor_sch_type,
272               non_labor_sch_type,
273               template_flag,
274               verification_date,
275               created_from_project_id,
276               template_start_date_active,
277               template_end_date_active,
278               Project_Currency_Code,
279               Allow_Cross_Charge_Flag,
280               Project_Rate_Date,
281               Project_Rate_Type,
282               Output_Tax_Code,
283               Retention_Tax_Code,
284 				  CC_Process_Labor_Flag,
285 				  Labor_Tp_Schedule_Id,
286 				  Labor_Tp_Fixed_Date,
287 				  CC_Process_NL_Flag,
288 				  Nl_Tp_Schedule_Id,
289 				  Nl_Tp_Fixed_Date,
290 				  CC_Tax_Task_Id,
291               bill_job_group_id,
292               cost_job_group_id,
293               role_list_id,
294               work_type_id,
295               calendar_id,
296               location_id,
297               probability_member_id,
298               project_value,
299               expected_approval_date,
300               initial_team_template_id,
301               job_bill_rate_schedule_id,
302               emp_bill_rate_schedule_id,
303 --MCA Sakthi for MultiAgreementCurreny Project
304                  competence_match_wt,
305                  availability_match_wt,
306                  job_level_match_wt,
307                  enable_automated_search,
308                  search_min_availability,
309                  search_org_hier_id,
310                  search_starting_org_id,
311                  search_country_code,
312                  min_cand_score_reqd_for_nom,
313                  non_lab_std_bill_rt_sch_id,
314                  invproc_currency_type,
315                  revproc_currency_code,
316                  project_bil_rate_date_code,
317                  project_bil_rate_type,
318                  project_bil_rate_date,
319                  project_bil_exchange_rate,
320                  projfunc_currency_code,
321                  projfunc_bil_rate_date_code,
322                  projfunc_bil_rate_type,
323                  projfunc_bil_rate_date,
324                  projfunc_bil_exchange_rate,
325                  funding_rate_date_code,
326                  funding_rate_type,
327                  funding_rate_date,
328                  funding_exchange_rate,
329                  baseline_funding_flag,
330                  projfunc_cost_rate_type,
331                  projfunc_cost_rate_date,
332                  multi_currency_billing_flag,
333                  inv_by_bill_trans_curr_flag,
334 --MCA Sakthi for MultiAgreementCurreny Project
335                  assign_precedes_task,
336 --Structure
337                  split_cost_From_workplan_flag,
338                  split_cost_from_bill_flag,
339 --Structure
340 --Advertisement
341                  adv_action_set_id        ,
342                  start_adv_action_set_flag,
343 --Advertisement
344 --Project Setup
345                  priority_code,
346 --Project Setup
347 --Retention
348                  retn_billing_inv_format_id,
349                  retn_accounting_flag ,
350 --Retention
351 -- anlee
352 -- patchset K changes
353                  revaluate_funding_flag,
354                  include_gains_losses_flag,
355 -- msundare
356                  security_level                 ,
357                  labor_disc_reason_code         ,
358                  non_labor_disc_reason_code     ,
359 -- End of changes
360               record_version_number,
361 	      btc_cost_base_rev_code , /* Bug#2638968 */
362               revtrans_currency_type, /* R12 - Bug 4363092 */
363 --PA L
364               asset_allocation_method ,
365               capital_event_processing,
366               cint_rate_sch_id ,
367               cint_eligible_flag,
368               cint_stop_date,
369 --FP_M Changes. Tracking Bug 3279981
370               enable_top_task_customer_flag,
371               enable_top_task_inv_mth_flag,
372               revenue_accrual_method,
373               invoice_method,
374               projfunc_attr_for_ar_flag,
375               sys_program_flag,
376               allow_multi_program_rollup,
377               proj_req_res_format_id,
378               proj_asgmt_res_format_id,
379 	      --sunkalya:federal Bug#5511353
380 	      date_eff_funds_consumption
381 	      --sunkalya:federal Bug#5511353
382              ,ar_rec_notify_flag      -- 7508661 : EnC
383              ,auto_release_pwp_inv    -- 7508661 : EnC
384              )
385 	     VALUES (
386               X_Project_Id,
387               X_Org_id, --R12: Bug 4363092
388               X_Name,
389               X_Long_Name,
390               X_Segment1,
391               X_Last_Update_Date,
392               X_Last_Updated_By,
393               X_Creation_Date,
394               X_Created_By,
395               X_Last_Update_Login,
396               X_Project_Type,
397               X_Carrying_Out_Organization_Id,
398               X_Public_Sector_Flag,
399               X_Project_Status_Code,
400               X_Description,
401               X_Start_Date,
402               X_Completion_Date,
403               X_Closed_Date,
404               X_Distribution_Rule,
405               X_Labor_Invoice_Format_Id,
406               X_NL_Invoice_Format_Id,
407               X_Retention_Invoice_Format_Id,
408               X_Retention_Percentage,
409               X_Billing_Offset,
410               X_Billing_Cycle_Id,
411               X_Labor_Std_Bill_Rate_Schdl,
412               X_Labor_Bill_Rate_Org_Id,
413               X_Labor_Schedule_Fixed_Date,
414               X_Labor_Schedule_Discount,
415               X_NL_Std_Bill_Rate_Schdl,
416               X_NL_Bill_Rate_Org_Id,
417               X_NL_Schedule_Fixed_Date,
418               X_NL_Schedule_Discount,
419               X_Limit_To_Txn_Controls_Flag,
420               X_Project_Level_Funding_Flag,
421               X_Invoice_Comment,
422               X_Unbilled_Receivable_Dr,
423               X_Unearned_Revenue_Cr,
424               X_Summary_Flag,
425               X_Enabled_Flag,
426               X_Segment2,
427               X_Segment3,
428               X_Segment4,
429               X_Segment5,
430               X_Segment6,
431               X_Segment7,
432               X_Segment8,
433               X_Segment9,
434               X_Segment10,
435               X_Attribute_Category,
436               X_Attribute1,
437               X_Attribute2,
438               X_Attribute3,
439               X_Attribute4,
440               X_Attribute5,
441               X_Attribute6,
442               X_Attribute7,
443               X_Attribute8,
444               X_Attribute9,
445               X_Attribute10,
446               X_Cost_Ind_Rate_Sch_Id,
447               X_Rev_Ind_Rate_Sch_Id,
448               X_Inv_Ind_Rate_Sch_Id,
449               X_Cost_Ind_Sch_Fixed_Date,
450               X_Rev_Ind_Sch_Fixed_Date,
451               X_Inv_Ind_Sch_Fixed_Date,
452               X_Labor_Sch_Type,
453               X_Non_Labor_Sch_Type,
454               X_Template_Flag,
455               X_Verification_Date,
456               X_Created_From_Project_Id,
457               X_Template_Start_Date,
458               X_Template_End_Date,
459               X_Project_Currency_Code,
460               X_Allow_Cross_Charge_Flag,
461               X_Project_Rate_Date,
462               X_Project_Rate_Type,
463               X_Output_Tax_Code,
464               X_Retention_Tax_Code,
465 				  X_CC_Process_Labor_Flag,
466 				  X_Labor_Tp_Schedule_Id,
467 				  X_Labor_Tp_Fixed_Date,
468 				  X_CC_Process_NL_Flag,
469 				  X_Nl_Tp_Schedule_Id,
470 				  X_Nl_Tp_Fixed_Date,
471 				  X_CC_Tax_Task_Id,
472               x_bill_job_group_id,
473               x_cost_job_group_id,
474               x_role_list_id,
475               x_work_type_id,
476               x_calendar_id,
477               x_location_id,
478               x_probability_member_id,
479               x_project_value,
480               x_expected_approval_date,
481               x_team_template_id,
482               x_job_bill_rate_schedule_id,
483               x_emp_bill_rate_schedule_id,
484 --MCA Sakthi for MultiAgreementCurreny Project
485               x_competence_match_wt,
486               x_availability_match_wt,
487               x_job_level_match_wt,
488               x_enable_automated_search,
489               x_search_min_availability,
490               x_search_org_hier_id,
491               x_search_starting_org_id,
492               x_search_country_code,
493               x_min_cand_score_reqd_for_nom,
494               x_non_lab_std_bill_rt_sch_id,
495               x_invproc_currency_type,
496               x_revproc_currency_code,
497               x_project_bil_rate_date_code,
498               x_project_bil_rate_type,
499               x_project_bil_rate_date,
500               x_project_bil_exchange_rate,
501               x_projfunc_currency_code,
502               x_projfunc_bil_rate_date_code,
503               x_projfunc_bil_rate_type,
504               x_projfunc_bil_rate_date,
505               x_projfunc_bil_exchange_rate,
506               x_funding_rate_date_code,
507               x_funding_rate_type,
508               x_funding_rate_date,
509               x_funding_exchange_rate,
510               x_baseline_funding_flag,
511               x_projfunc_cost_rate_type,
512               x_projfunc_cost_rate_date,
513               x_multi_currency_billing_flag,
514               x_inv_by_bill_trans_curr_flag,
515 --MCA Sakthi for MultiAgreementCurreny Project
516               x_assign_precedes_task,
517 --Structure
518               x_split_cost_from_wokplan_flag,
519               x_split_cost_from_bill_flag,
520 --Structure
521 --Advertisement
522               x_adv_action_set_id        ,
523               x_start_adv_action_set_flag,
524 --Advertisement
525 --Project Setup
526               x_priority_code,
527 --Project Setup
528 --Retention
529               x_retn_billing_inv_format_id  ,
530               x_retn_accounting_flag        ,
531 --Retention
532 -- anlee
533 -- patchset K changes
534                  x_revaluate_funding_flag,
535                  x_include_gains_losses_flag,
536 -- msundare
537                  x_security_level                 ,
538                  x_labor_disc_reason_code         ,
539                  x_non_labor_disc_reason_code     ,
540 -- End of changes
541               x_record_version_number,
542 	      x_btc_cost_base_rev_code,   /* Bug#2638968 */
543               x_revtrans_currency_type, /* R12 - Bug 4363092 */
544 --PA L
545               x_asset_allocation_method ,
546               x_capital_event_processing,
547               x_cint_rate_sch_id ,
548               x_cint_eligible_flag,
549               x_cint_stop_date,
550 --FP_M Changes. Tracking Bug 3279981
551                        x_en_top_task_customer_flag,
552                        x_en_top_task_inv_mth_flag,
553                        x_revenue_accrual_method,
554                        x_invoice_method,
555                        x_projfunc_attr_for_ar_flag,
556                        x_sys_program_flag,
557                        x_allow_multi_program_rollup,
558                        x_proj_req_res_format_id,
559                        x_proj_asgmt_res_format_id,
560 		       --sunkalya:federal Bug#5511353
561 		       x_date_eff_funds_flag
562 		       --sunkalya:federal Bug#5511353
563                       ,x_ar_rec_notify_flag     -- 7508661 : EnC
564                       ,x_auto_release_pwp_inv   -- 7508661 : EnC
565              );
566 
567     OPEN C;
568     FETCH C INTO X_Rowid;
569     if (C%NOTFOUND) then
570       CLOSE C;
571       Raise NO_DATA_FOUND;
572     end if;
573     CLOSE C;
574 
575     -- anlee
576     -- Added for intermedia search
577     PA_PROJECT_CTX_SEARCH_PVT.INSERT_ROW (
578      p_project_id           => x_project_id
579     ,p_template_flag        => x_template_flag
580     ,p_project_name         => x_name
581     ,p_project_number       => x_segment1
582     ,p_project_long_name    => x_long_name
583     ,p_project_description  => x_description
584     ,x_return_status        => l_return_status );
585     -- anlee end of changes
586 
587   EXCEPTION -- 4537865 Included Exception Block
588   WHEN OTHERS THEN
589 	X_Rowid := NULL ;
590 	X_Project_Id := NULL;
591 	Fnd_Msg_Pub.add_exc_msg(p_pkg_name        => 'PA_PROJECTS_PKG'
592 				,p_procedure_name => 'Insert_Row'
593 				,p_error_text     => SUBSTRB(SQLERRM,1,240));
594 	RAISE;
595   END Insert_Row;
596 
597 
598   PROCEDURE Lock_Row(X_Rowid                            VARCHAR2,
599                      X_Project_Id                       NUMBER,
600                      X_Name                             VARCHAR2,
601                      X_Long_Name                        VARCHAR2,
602                      X_Segment1                         VARCHAR2,
603                      X_Project_Type                     VARCHAR2,
604                      X_Carrying_Out_Organization_Id     NUMBER,
605                      X_Public_Sector_Flag               VARCHAR2,
606                      X_Project_Status_Code              VARCHAR2,
607                      X_Description                      VARCHAR2,
608                      X_Start_Date                       DATE,
609                      X_Completion_Date                  DATE,
610                      X_Closed_Date                      DATE,
611                      X_Distribution_Rule                VARCHAR2,
612                      X_Labor_Invoice_Format_Id          NUMBER,
613                      X_NL_Invoice_Format_Id	        NUMBER,
614                      X_Retention_Invoice_Format_Id      NUMBER,
615                      X_Retention_Percentage             NUMBER,
616                      X_Billing_Offset                   NUMBER,
617                      X_Billing_Cycle_Id                 NUMBER,
618                      X_Labor_Std_Bill_Rate_Schdl        VARCHAR2,
619                      X_Labor_Bill_Rate_Org_Id           NUMBER,
620                      X_Labor_Schedule_Fixed_Date        DATE,
621                      X_Labor_Schedule_Discount          NUMBER,
622                      X_NL_Std_Bill_Rate_Schdl		VARCHAR2,
623                      X_NL_Bill_Rate_Org_Id      	NUMBER,
624                      X_NL_Schedule_Fixed_Date    	DATE,
625                      X_NL_Schedule_Discount      	NUMBER,
626                      X_Limit_To_Txn_Controls_Flag       VARCHAR2,
627                      X_Project_Level_Funding_Flag       VARCHAR2,
628                      X_Invoice_Comment                  VARCHAR2,
629                      X_Unbilled_Receivable_Dr           NUMBER,
630                      X_Unearned_Revenue_Cr              NUMBER,
631                      X_Summary_Flag                     VARCHAR2,
632                      X_Enabled_Flag                     VARCHAR2,
633                      X_Segment2                         VARCHAR2,
634                      X_Segment3                         VARCHAR2,
635                      X_Segment4                         VARCHAR2,
636                      X_Segment5                         VARCHAR2,
637                      X_Segment6                         VARCHAR2,
638                      X_Segment7                         VARCHAR2,
639                      X_Segment8                         VARCHAR2,
640                      X_Segment9                         VARCHAR2,
641                      X_Segment10                        VARCHAR2,
642                      X_Attribute_Category               VARCHAR2,
643                      X_Attribute1                       VARCHAR2,
644                      X_Attribute2                       VARCHAR2,
645                      X_Attribute3                       VARCHAR2,
646                      X_Attribute4                       VARCHAR2,
647                      X_Attribute5                       VARCHAR2,
648                      X_Attribute6                       VARCHAR2,
649                      X_Attribute7                       VARCHAR2,
650                      X_Attribute8                       VARCHAR2,
651                      X_Attribute9                       VARCHAR2,
652                      X_Attribute10                      VARCHAR2,
653                      X_Cost_Ind_Rate_Sch_Id             NUMBER,
654                      X_Rev_Ind_Rate_Sch_Id              NUMBER,
655                      X_Inv_Ind_Rate_Sch_Id              NUMBER,
656                      X_Cost_Ind_Sch_Fixed_Date          DATE,
657                      X_Rev_Ind_Sch_Fixed_Date           DATE,
658                      X_Inv_Ind_Sch_Fixed_Date           DATE,
659                      X_Labor_Sch_Type                   VARCHAR2,
660                      X_Non_Labor_Sch_Type               VARCHAR2,
661                      X_Template_Flag                    VARCHAR2,
662                      X_Verification_Date                DATE,
663                      X_Created_From_Project_Id          NUMBER,
664                      X_Template_Start_Date    		DATE,
665                      X_Template_End_Date      		DATE,
666                      X_Project_Currency_Code         VARCHAR2,
667                      X_Allow_Cross_Charge_Flag        VARCHAR2,
668                      X_Project_Rate_Date              DATE,
669                      X_Project_Rate_Type              VARCHAR2,
670                      X_Output_Tax_Code                VARCHAR2,
671                      X_Retention_Tax_Code             VARCHAR2,
672                      X_CC_Process_Labor_Flag          VARCHAR2,
673                      X_Labor_Tp_Schedule_Id           NUMBER,
674                      X_Labor_Tp_Fixed_Date            DATE,
675                      X_CC_Process_NL_Flag             VARCHAR2,
676                      X_Nl_Tp_Schedule_Id              NUMBER,
677                      X_Nl_Tp_Fixed_Date               DATE,
678                      X_CC_Tax_Task_Id                 NUMBER,
679 --   17-MAY-00  kkekkar     Added the following columns for CBGA project
680 --                            bill_job_group_id, cost_job_group_id
681                      x_bill_job_group_id              NUMBER   ,
682                      x_cost_job_group_id              NUMBER   ,
683                      x_role_list_id                   NUMBER,
684                      x_work_type_id                   NUMBER,
685                      x_calendar_id                    NUMBER,
686                      x_location_id                    NUMBER,
687                      x_probability_member_id          NUMBER,
688                      x_project_value              NUMBER,
689                      x_expected_approval_date         DATE,
690                      x_team_template_id               NUMBER,
691 -- 21-MAR-2001 anlee
692 -- added job_bill_rate_schedule_id,
693 -- emp_bill_rate_schedule_id for
694 -- PRM forecasting changes
695                      x_job_bill_rate_schedule_id      NUMBER,
696                      x_emp_bill_rate_schedule_id      NUMBER,
697 --MCA Sakthi for MultiAgreementCurreny Project
698                        x_competence_match_wt            NUMBER,
699                        x_availability_match_wt          NUMBER,
700                        x_job_level_match_wt             NUMBER,
701                        x_enable_automated_search        VARCHAR2,
702                        x_search_min_availability        NUMBER,
703                        x_search_org_hier_id             NUMBER,
704                        x_search_starting_org_id         NUMBER,
705                        x_search_country_code            VARCHAR2,
706                        x_min_cand_score_reqd_for_nom    NUMBER,
707                        x_non_lab_std_bill_rt_sch_id     NUMBER,
708                        x_invproc_currency_type          VARCHAR2,
709                        x_revproc_currency_code          VARCHAR2,
710                        x_project_bil_rate_date_code     VARCHAR2,
711                        x_project_bil_rate_type          VARCHAR2,
712                        x_project_bil_rate_date          DATE,
713                        x_project_bil_exchange_rate      NUMBER,
714                        x_projfunc_currency_code         VARCHAR2,
715                        x_projfunc_bil_rate_date_code    VARCHAR2,
716                        x_projfunc_bil_rate_type         VARCHAR2,
717                        x_projfunc_bil_rate_date         DATE,
718                        x_projfunc_bil_exchange_rate     NUMBER,
719                        x_funding_rate_date_code         VARCHAR2,
720                        x_funding_rate_type              VARCHAR2,
721                        x_funding_rate_date              DATE,
722                        x_funding_exchange_rate          NUMBER,
723                        x_baseline_funding_flag          VARCHAR2,
724                        x_projfunc_cost_rate_type         VARCHAR2,
725                        x_projfunc_cost_rate_date         DATE,
726                        x_multi_currency_billing_flag    VARCHAR2,
727                        x_inv_by_bill_trans_curr_flag    VARCHAR2,
728 --MCA Sakthi for MultiAgreementCurrency Project
729                        x_assign_precedes_task       VARCHAR2,
730 --Structure
731                        x_split_cost_from_wokplan_flag   VARCHAR2,
732                        x_split_cost_from_bill_flag       VARCHAR2,
733 --Structure
734 --Advertisement
735                        x_adv_action_set_id              NUMBER,
736                        x_start_adv_action_set_flag      VARCHAR2,
737 --Advertisement
738 --Project Setup
739                        x_priority_code                  VARCHAR2,
740 --Project Setup
741 --Retention
742                        x_retn_billing_inv_format_id     NUMBER,
743                        x_retn_accounting_flag           VARCHAR2,
744 --Retention
745 -- anlee
746 -- patchset K changes
747                        x_revaluate_funding_flag         VARCHAR2,
748                        x_include_gains_losses_flag    VARCHAR2,
749 -- msundare
750                        x_security_level                 NUMBER,
751                        x_labor_disc_reason_code         VARCHAR2,
752                        x_non_labor_disc_reason_code     VARCHAR2,
753 -- End of changes
754 		     x_record_version_number          NUMBER,
755 		     x_btc_cost_base_rev_code         VARCHAR2,
756                      x_revtrans_currency_type         VARCHAR2,     /* R12 - Bug 4363092 */
757 --PA L
758                        x_asset_allocation_method        VARCHAR2,
759                        x_capital_event_processing       VARCHAR2,
760                        x_cint_rate_sch_id               NUMBER,
761                        x_cint_eligible_flag             VARCHAR2,
762                        x_cint_stop_date                 DATE,
763 --FP_M Changes. Tracking Bug 3279981
764                        x_en_top_task_customer_flag  VARCHAR2,
765                        x_en_top_task_inv_mth_flag   VARCHAR2,
766                        x_revenue_accrual_method         VARCHAR2,
767                        x_invoice_method                 VARCHAR2,
768                        x_projfunc_attr_for_ar_flag      VARCHAR2,
769 		        --sunkalya:federal Bug#5511353
770 		       x_date_eff_funds_flag        VARCHAR2
771 		       --sunkalya:federal Bug#5511353
772                       ,x_ar_rec_notify_flag             VARCHAR2  -- 7508661 : EnC
773                       ,x_auto_release_pwp_inv           VARCHAR2  -- 7508661 : EnC
774   ) IS
775     CURSOR C IS
776         SELECT *
777         FROM   pa_projects
778         WHERE  rowid = X_Rowid
779         FOR UPDATE of Project_Id NOWAIT;
780     Recinfo C%ROWTYPE;
781 
782 
783   BEGIN
784     OPEN C;
785     FETCH C INTO Recinfo;
786     if (C%NOTFOUND) then
787       CLOSE C;
788       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
789       APP_EXCEPTION.Raise_Exception;
790     end if;
791     CLOSE C;
792     if Recinfo.record_version_number <> x_record_version_number
793     then
794       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
795       APP_EXCEPTION.Raise_Exception;
796     end if;
797 
798     if (
799                (Recinfo.project_id =  X_Project_Id)
800            AND (Recinfo.name =  X_Name)
801            AND (Recinfo.long_name =  X_Long_Name)
802            AND (Recinfo.segment1 =  X_Segment1)
803            AND (Recinfo.project_type =  X_Project_Type)
804            AND (Recinfo.carrying_out_organization_id =
805 			 X_Carrying_Out_Organization_Id)
806            AND (Recinfo.public_sector_flag =  X_Public_Sector_Flag)
807            AND (Recinfo.project_status_code =  X_Project_Status_Code)
808            AND (   (Recinfo.description =  X_Description)
809                 OR (    (Recinfo.description IS NULL)
810                     AND (X_Description IS NULL)))
811            AND (   (Recinfo.start_date =  X_Start_Date)
812                 OR (    (Recinfo.start_date IS NULL)
813                     AND (X_Start_Date IS NULL)))
814            AND (   (Recinfo.completion_date =  X_Completion_Date)
815                 OR (    (Recinfo.completion_date IS NULL)
816                     AND (X_Completion_Date IS NULL)))
817 --changed to remove bug# 609287 by Ashia Bagai on 27-jan-98
818            AND (   (TRUNC(Recinfo.closed_date) =  TRUNC(X_Closed_Date))
819 --           AND (   (Recinfo.closed_date =  X_Closed_Date)
820 --end of change to remove bug# 609287
821                 OR (    (Recinfo.closed_date IS NULL)
822                     AND (X_Closed_Date IS NULL)))
823            AND (   (Recinfo.distribution_rule =  X_Distribution_Rule)
824                 OR (    (Recinfo.distribution_rule IS NULL)
825                     AND (X_Distribution_Rule IS NULL)))
826            AND (   (Recinfo.labor_invoice_format_id =
827 			X_Labor_Invoice_Format_Id)
828                 OR (    (Recinfo.labor_invoice_format_id IS NULL)
829                     AND (X_Labor_Invoice_Format_Id IS NULL)))
830            AND (   (Recinfo.non_labor_invoice_format_id =
831 			X_NL_Invoice_Format_Id)
832                 OR (    (Recinfo.non_labor_invoice_format_id IS NULL)
833                     AND (X_NL_Invoice_Format_Id IS NULL)))
834            AND (   (Recinfo.retention_invoice_format_id =
835 			 X_Retention_Invoice_Format_Id)
836                 OR (    (Recinfo.retention_invoice_format_id IS NULL)
837                     AND (X_Retention_Invoice_Format_Id IS NULL)))
838            AND (   (Recinfo.retention_percentage =  X_Retention_Percentage)
839                 OR (    (Recinfo.retention_percentage IS NULL)
840                     AND (X_Retention_Percentage IS NULL)))
841            AND (   (Recinfo.billing_offset =  X_Billing_Offset)
842                 OR (    (Recinfo.billing_offset IS NULL)
843                     AND (X_Billing_Offset IS NULL)))
844            AND (   (Recinfo.billing_cycle_id =  X_Billing_Cycle_Id)
845                 OR (    (Recinfo.billing_cycle_id IS NULL)
846                     AND (X_Billing_Cycle_Id IS NULL)))
847            AND (   (Recinfo.labor_std_bill_rate_schdl =
848 			 X_Labor_Std_Bill_Rate_Schdl)
849                 OR (    (Recinfo.labor_std_bill_rate_schdl IS NULL)
850                     AND (X_Labor_Std_Bill_Rate_Schdl IS NULL)))
851            AND (   (Recinfo.labor_bill_rate_org_id =  X_Labor_Bill_Rate_Org_Id)
852                 OR (    (Recinfo.labor_bill_rate_org_id IS NULL)
853                     AND (X_Labor_Bill_Rate_Org_Id IS NULL)))
854            AND (   (Recinfo.labor_schedule_fixed_date =
855 			 X_Labor_Schedule_Fixed_Date)
856                 OR (    (Recinfo.labor_schedule_fixed_date IS NULL)
857                     AND (X_Labor_Schedule_Fixed_Date IS NULL)))
858            AND (   (Recinfo.labor_schedule_discount =
859 			X_Labor_Schedule_Discount)
860                 OR (    (Recinfo.labor_schedule_discount IS NULL)
861                     AND (X_Labor_Schedule_Discount IS NULL)))
862            AND (   (Recinfo.non_labor_std_bill_rate_schdl =
863 			 X_NL_Std_Bill_Rate_Schdl)
864                 OR (    (Recinfo.non_labor_std_bill_rate_schdl IS NULL)
865                     AND (X_NL_Std_Bill_Rate_Schdl IS NULL)))
866            AND (   (Recinfo.non_labor_bill_rate_org_id =
867 			 X_NL_Bill_Rate_Org_Id)
868                 OR (    (Recinfo.non_labor_bill_rate_org_id IS NULL)
869                     AND (X_NL_Bill_Rate_Org_Id IS NULL)))
870            AND (   (Recinfo.non_labor_schedule_fixed_date =
871 		    	 X_NL_Schedule_Fixed_Date)
872                 OR (    (Recinfo.non_labor_schedule_fixed_date IS NULL)
873                     AND (X_NL_Schedule_Fixed_Date IS NULL)))
874            AND (   (Recinfo.non_labor_schedule_discount =
875 			 X_NL_Schedule_Discount)
876                 OR (    (Recinfo.non_labor_schedule_discount IS NULL)
877                     AND (X_NL_Schedule_Discount IS NULL)))
878            AND (   (Recinfo.limit_to_txn_controls_flag =
879 			 X_Limit_To_Txn_Controls_Flag)
880                 OR (    (Recinfo.limit_to_txn_controls_flag IS NULL)
881                     AND (X_Limit_To_Txn_Controls_Flag IS NULL)))
882            AND (   (Recinfo.project_level_funding_flag =
883 			 X_Project_Level_Funding_Flag)
884                 OR (    (Recinfo.project_level_funding_flag IS NULL)
885                     AND (X_Project_Level_Funding_Flag IS NULL)))
886            AND (   (Recinfo.invoice_comment =  X_Invoice_Comment)
887                 OR (    (Recinfo.invoice_comment IS NULL)
888                     AND (X_Invoice_Comment IS NULL)))
889            AND (   (Recinfo.unbilled_receivable_dr =  X_Unbilled_Receivable_Dr)
890                 OR (    (Recinfo.unbilled_receivable_dr IS NULL)
891                     AND (X_Unbilled_Receivable_Dr IS NULL)))
892            AND (   (Recinfo.unearned_revenue_cr =  X_Unearned_Revenue_Cr)
893                 OR (    (Recinfo.unearned_revenue_cr IS NULL)
894                     AND (X_Unearned_Revenue_Cr IS NULL)))
895            AND (Recinfo.summary_flag =  X_Summary_Flag)
896            AND (Recinfo.enabled_flag =  X_Enabled_Flag)
897            AND (   (Recinfo.segment2 =  X_Segment2)
898                 OR (    (Recinfo.segment2 IS NULL)
899                     AND (X_Segment2 IS NULL)))
900            AND (   (Recinfo.segment3 =  X_Segment3)
901                 OR (    (Recinfo.segment3 IS NULL)
902                     AND (X_Segment3 IS NULL)))
903            AND (   (Recinfo.segment4 =  X_Segment4)
904                 OR (    (Recinfo.segment4 IS NULL)
905                     AND (X_Segment4 IS NULL)))
906            AND (   (Recinfo.segment5 =  X_Segment5)
907                 OR (    (Recinfo.segment5 IS NULL)
908                     AND (X_Segment5 IS NULL)))
909            AND (   (Recinfo.segment6 =  X_Segment6)
910                 OR (    (Recinfo.segment6 IS NULL)
911                     AND (X_Segment6 IS NULL)))
912            AND (   (Recinfo.segment7 =  X_Segment7)
913                 OR (    (Recinfo.segment7 IS NULL)
914                     AND (X_Segment7 IS NULL)))
915            AND (   (Recinfo.segment8 =  X_Segment8)
916                 OR (    (Recinfo.segment8 IS NULL)
917                     AND (X_Segment8 IS NULL)))
918            AND (   (Recinfo.segment9 =  X_Segment9)
919                 OR (    (Recinfo.segment9 IS NULL)
920                     AND (X_Segment9 IS NULL)))
921            AND (   (Recinfo.segment10 =  X_Segment10)
922                 OR (    (Recinfo.segment10 IS NULL)
923                     AND (X_Segment10 IS NULL)))
924            AND (   (Recinfo.attribute_category =  X_Attribute_Category)
925                 OR (    (Recinfo.attribute_category IS NULL)
926                     AND (X_Attribute_Category IS NULL)))
927            AND (   (Recinfo.attribute1 =  X_Attribute1)
928                 OR (    (Recinfo.attribute1 IS NULL)
929                     AND (X_Attribute1 IS NULL)))
930            AND (   (Recinfo.attribute2 =  X_Attribute2)
931                 OR (    (Recinfo.attribute2 IS NULL)
932                     AND (X_Attribute2 IS NULL)))
933            AND (   (Recinfo.attribute3 =  X_Attribute3)
934                 OR (    (Recinfo.attribute3 IS NULL)
935                     AND (X_Attribute3 IS NULL)))
936            AND (   (Recinfo.attribute4 =  X_Attribute4)
937                 OR (    (Recinfo.attribute4 IS NULL)
938                     AND (X_Attribute4 IS NULL)))
939            AND (   (Recinfo.attribute5 =  X_Attribute5)
940                 OR (    (Recinfo.attribute5 IS NULL)
941                     AND (X_Attribute5 IS NULL)))
942            AND (   (Recinfo.attribute6 =  X_Attribute6)
943                 OR (    (Recinfo.attribute6 IS NULL)
944                     AND (X_Attribute6 IS NULL)))
945            AND (   (Recinfo.attribute7 =  X_Attribute7)
946                 OR (    (Recinfo.attribute7 IS NULL)
947                     AND (X_Attribute7 IS NULL)))
948            AND (   (Recinfo.attribute8 =  X_Attribute8)
949                 OR (    (Recinfo.attribute8 IS NULL)
950                     AND (X_Attribute8 IS NULL)))
951            AND (   (Recinfo.attribute9 =  X_Attribute9)
952                 OR (    (Recinfo.attribute9 IS NULL)
953                     AND (X_Attribute9 IS NULL)))
954            AND (   (Recinfo.attribute10 =  X_Attribute10)
955                 OR (    (Recinfo.attribute10 IS NULL)
956                     AND (X_Attribute10 IS NULL)))
957            AND (   (Recinfo.cost_ind_rate_sch_id =  X_Cost_Ind_Rate_Sch_Id)
958                 OR (    (Recinfo.cost_ind_rate_sch_id IS NULL)
959                     AND (X_Cost_Ind_Rate_Sch_Id IS NULL)))
960            AND (   (Recinfo.rev_ind_rate_sch_id =  X_Rev_Ind_Rate_Sch_Id)
961                 OR (    (Recinfo.rev_ind_rate_sch_id IS NULL)
962                     AND (X_Rev_Ind_Rate_Sch_Id IS NULL)))
963            AND (   (Recinfo.inv_ind_rate_sch_id =  X_Inv_Ind_Rate_Sch_Id)
964                 OR (    (Recinfo.inv_ind_rate_sch_id IS NULL)
965                     AND (X_Inv_Ind_Rate_Sch_Id IS NULL)))
966            AND (   (Recinfo.cost_ind_sch_fixed_date =
967 			X_Cost_Ind_Sch_Fixed_Date)
968                 OR (    (Recinfo.cost_ind_sch_fixed_date IS NULL)
969                     AND (X_Cost_Ind_Sch_Fixed_Date IS NULL)))
970            AND (   (Recinfo.rev_ind_sch_fixed_date =  X_Rev_Ind_Sch_Fixed_Date)
971                 OR (    (Recinfo.rev_ind_sch_fixed_date IS NULL)
972                     AND (X_Rev_Ind_Sch_Fixed_Date IS NULL)))
973            AND (   (Recinfo.inv_ind_sch_fixed_date =  X_Inv_Ind_Sch_Fixed_Date)
974                 OR (    (Recinfo.inv_ind_sch_fixed_date IS NULL)
975                     AND (X_Inv_Ind_Sch_Fixed_Date IS NULL)))
976            AND (   (Recinfo.labor_sch_type =  X_Labor_Sch_Type)
977                 OR (    (Recinfo.labor_sch_type IS NULL)
978                     AND (X_Labor_Sch_Type IS NULL)))
979 	)
980     then
981 	   if ((   (Recinfo.non_labor_sch_type =  X_Non_Labor_Sch_Type)
982                 OR (    (Recinfo.non_labor_sch_type IS NULL)
983                     AND (X_Non_Labor_Sch_Type IS NULL)))
984               AND (   (Recinfo.template_flag =  X_Template_Flag)
985                 OR (    (Recinfo.template_flag IS NULL)
986                     AND (X_Template_Flag IS NULL)))
987               AND (   (Recinfo.verification_date =  X_Verification_Date)
988                 OR (    (Recinfo.verification_date IS NULL)
989                     AND (X_Verification_Date IS NULL)))
990               AND (   (Recinfo.created_from_project_id =
991 			 X_Created_From_Project_Id)
992                 OR (    (Recinfo.created_from_project_id IS NULL)
993                     AND (X_Created_From_Project_Id IS NULL)))
994               AND (   (Recinfo.template_start_date_active =
995 			 X_Template_Start_Date)
996                 OR (    (Recinfo.template_start_date_active IS NULL)
997                     AND (X_Template_Start_Date IS NULL)))
998               AND (   (Recinfo.template_end_date_active =
999 			X_Template_End_Date)
1000                 OR (    (Recinfo.template_end_date_active IS NULL)
1001                     AND (X_Template_End_Date IS NULL)))
1002               AND (   (Recinfo.Project_Currency_Code =
1003          X_Project_Currency_Code)
1004                 OR (    (Recinfo.Project_Currency_Code IS NULL)
1005                     AND (X_Project_Currency_Code IS NULL)))
1006               AND (   (Recinfo.Allow_Cross_Charge_Flag =
1007          X_Allow_Cross_Charge_Flag)
1008                 OR (    (Recinfo.Allow_Cross_Charge_Flag IS NULL)
1009                     AND (X_Allow_Cross_Charge_Flag IS NULL)))
1010               AND (   (Recinfo.Project_Rate_Date =
1011          X_Project_Rate_Date)
1012                 OR (    (Recinfo.Project_Rate_Date IS NULL)
1013                     AND (X_Project_Rate_Date IS NULL)))
1014               AND (   (Recinfo.Project_Rate_Type =
1015          X_Project_Rate_Type)
1016                 OR (    (Recinfo.Project_Rate_Type IS NULL)
1017                     AND (X_Project_Rate_Type IS NULL)))
1018              AND (   (Recinfo.Output_Tax_Code =
1019          X_Output_Tax_Code)
1020                 OR (    (Recinfo.Output_Tax_Code IS NULL)
1021                     AND (X_Output_Tax_Code IS NULL)))
1022              AND (   (Recinfo.Retention_Tax_Code =
1023          X_Retention_Tax_Code)
1024                 OR (    (Recinfo.Retention_Tax_Code IS NULL)
1025                     AND (X_Retention_Tax_Code IS NULL)))
1026              AND (   (Recinfo.CC_Process_Labor_Flag =
1027          X_CC_Process_Labor_Flag)
1028                 OR (    (Recinfo.CC_Process_Labor_Flag IS NULL)
1029                     AND (X_CC_Process_Labor_Flag IS NULL)))
1030              AND (   (Recinfo.Labor_Tp_Schedule_Id =
1031          X_Labor_Tp_Schedule_Id)
1032                 OR (    (Recinfo.Labor_Tp_Schedule_Id IS NULL)
1033                     AND (X_Labor_Tp_Schedule_Id IS NULL)))
1034              AND (   (Recinfo.Labor_Tp_Fixed_Date =
1035          X_Labor_Tp_Fixed_Date)
1036                 OR (    (Recinfo.Labor_Tp_Fixed_Date IS NULL)
1037                     AND (X_Labor_Tp_Fixed_Date IS NULL)))
1038              AND (   (Recinfo.CC_Process_NL_Flag =
1039          X_CC_Process_NL_Flag)
1040                 OR (    (Recinfo.CC_Process_NL_Flag IS NULL)
1041                     AND (X_CC_Process_NL_Flag IS NULL)))
1042              AND (   (Recinfo.Nl_Tp_Schedule_Id =
1043          X_Nl_Tp_Schedule_Id)
1044                 OR (    (Recinfo.Nl_Tp_Schedule_Id IS NULL)
1045                     AND (X_Nl_Tp_Schedule_Id IS NULL)))
1046              AND (   (Recinfo.Nl_Tp_Fixed_Date =
1047          X_Nl_Tp_Fixed_Date)
1048                 OR (    (Recinfo.Nl_Tp_Fixed_Date IS NULL)
1049                     AND (X_Nl_Tp_Fixed_Date IS NULL)))
1050              AND (   (Recinfo.CC_Tax_Task_Id =
1051          X_CC_Tax_Task_Id)
1052                 OR (    (Recinfo.CC_Tax_Task_Id IS NULL)
1053                     AND (X_CC_Tax_Task_Id IS NULL)))
1054              AND (   (Recinfo.bill_job_group_id =
1055          X_bill_job_group_id )
1056                 OR (    (Recinfo.bill_job_group_id IS NULL )
1057                     AND (X_bill_job_group_id IS NULL )))
1058             AND (    (Recinfo.cost_job_group_id =
1059          X_cost_job_group_id )
1060                 OR (    (Recinfo.cost_job_group_id IS NULL )
1061                    AND ( X_cost_job_group_id IS NULL )))
1062             AND (    (Recinfo.role_list_id =
1063          X_role_list_id )
1064                 OR (    (Recinfo.role_list_id IS NULL )
1065                    AND ( X_role_list_id IS NULL )))
1066             AND (    (Recinfo.work_type_id =
1067          X_work_type_id )
1068                 OR (    (Recinfo.work_type_id IS NULL )
1069                    AND ( X_work_type_id IS NULL )))
1070             AND (    (Recinfo.calendar_id =
1071          X_calendar_id )
1072                 OR (    (Recinfo.calendar_id IS NULL )
1073                    AND ( X_calendar_id IS NULL )))
1074             AND (    (Recinfo.location_id =
1075          X_location_id )
1076                 OR (    (Recinfo.location_id IS NULL )
1077                    AND ( X_location_id IS NULL )))
1078             AND (    (Recinfo.probability_member_id =
1079          X_probability_member_id )
1080                 OR (    (Recinfo.probability_member_id IS NULL )
1081                    AND ( X_probability_member_id IS NULL )))
1082             AND (    (Recinfo.project_value =
1083          X_project_value )
1084                 OR (    (Recinfo.project_value IS NULL )
1085                    AND ( X_project_value IS NULL )))
1086             AND (    (Recinfo.expected_approval_date =
1087          X_expected_approval_date )
1088                 OR (    (Recinfo.expected_approval_date IS NULL )
1089                    AND ( X_expected_approval_date IS NULL )))
1090             AND (    (Recinfo.initial_team_template_id =
1091          x_team_template_id )
1092                 OR (    (Recinfo.initial_team_template_id IS NULL )
1093                    AND ( x_team_template_id IS NULL )))
1094             AND (    (Recinfo.job_bill_rate_schedule_id =
1095          x_job_bill_rate_schedule_id )
1096                 OR (    (Recinfo.job_bill_rate_schedule_id IS NULL )
1097                    AND ( x_job_bill_rate_schedule_id IS NULL )))
1098             AND (    (Recinfo.emp_bill_rate_schedule_id =
1099          x_emp_bill_rate_schedule_id )
1100                 OR (    (Recinfo.emp_bill_rate_schedule_id IS NULL )
1101                    AND ( x_emp_bill_rate_schedule_id IS NULL )))
1102 --MCA Sakthi for MultiAgreementCurreny Project
1103             AND (    (Recinfo.competence_match_wt =
1104          x_competence_match_wt )
1105                 OR (    (Recinfo.competence_match_wt IS NULL )
1106                    AND ( x_competence_match_wt IS NULL )))
1107             AND (    (Recinfo.availability_match_wt =
1108          x_availability_match_wt )
1109                 OR (    (Recinfo.availability_match_wt IS NULL )
1110                    AND ( x_availability_match_wt IS NULL )))
1111             AND (    (Recinfo.job_level_match_wt =
1112          x_job_level_match_wt )
1113                 OR (    (Recinfo.job_level_match_wt IS NULL )
1114                    AND ( x_job_level_match_wt IS NULL )))
1115             AND (    (Recinfo.enable_automated_search =
1116          x_enable_automated_search )
1117                 OR (    (Recinfo.enable_automated_search IS NULL )
1118                    AND ( x_enable_automated_search IS NULL )))
1119             AND (    (Recinfo.search_min_availability =
1120          x_search_min_availability )
1121                 OR (    (Recinfo.search_min_availability IS NULL )
1122                    AND ( x_search_min_availability IS NULL )))
1123             AND (    (Recinfo.search_org_hier_id =
1124          x_search_org_hier_id )
1125                 OR (    (Recinfo.search_org_hier_id IS NULL )
1126                    AND ( x_search_org_hier_id IS NULL )))
1127             AND (    (Recinfo.search_starting_org_id =
1128          x_search_starting_org_id )
1129                 OR (    (Recinfo.search_starting_org_id IS NULL )
1130                    AND ( x_search_starting_org_id IS NULL )))
1131             AND (    (Recinfo.search_country_code =
1132          x_search_country_code )
1133                 OR (    (Recinfo.search_country_code IS NULL )
1134                    AND ( x_search_country_code IS NULL )))
1135             AND (    (Recinfo.min_cand_score_reqd_for_nom =
1136          x_min_cand_score_reqd_for_nom )
1137                 OR (    (Recinfo.min_cand_score_reqd_for_nom IS NULL )
1138                    AND ( x_min_cand_score_reqd_for_nom IS NULL )))
1139             AND (    (Recinfo.non_lab_std_bill_rt_sch_id =
1140          x_non_lab_std_bill_rt_sch_id )
1141                 OR (    (Recinfo.non_lab_std_bill_rt_sch_id IS NULL )
1142                    AND ( x_non_lab_std_bill_rt_sch_id IS NULL )))
1143             AND (    (Recinfo.invproc_currency_type =
1144          x_invproc_currency_type )
1145                 OR (    (Recinfo.invproc_currency_type IS NULL )
1146                    AND ( x_invproc_currency_type IS NULL )))
1147             AND (    (Recinfo.revproc_currency_code =
1148          x_revproc_currency_code )
1149                 OR (    (Recinfo.revproc_currency_code IS NULL )
1150                    AND ( x_revproc_currency_code IS NULL )))
1151             AND (    (Recinfo.project_bil_rate_date_code =
1152          x_project_bil_rate_date_code )
1153                 OR (    (Recinfo.project_bil_rate_date_code IS NULL )
1154                    AND ( x_project_bil_rate_date_code IS NULL )))
1155             AND (    (Recinfo.project_bil_rate_type =
1156          x_project_bil_rate_type )
1157                 OR (    (Recinfo.project_bil_rate_type IS NULL )
1158                    AND ( x_project_bil_rate_type IS NULL )))
1159             AND (    (Recinfo.project_bil_rate_date =
1160          x_project_bil_rate_date )
1161                 OR (    (Recinfo.project_bil_rate_date IS NULL )
1162                    AND ( x_project_bil_rate_date IS NULL )))
1163             AND (    (Recinfo.project_bil_exchange_rate =
1164          x_project_bil_exchange_rate )
1165                 OR (    (Recinfo.project_bil_exchange_rate IS NULL )
1166                    AND ( x_project_bil_exchange_rate IS NULL )))
1167             AND (    (Recinfo.projfunc_currency_code =
1168          x_projfunc_currency_code )
1169                 OR (    (Recinfo.projfunc_currency_code IS NULL )
1170                    AND ( x_projfunc_currency_code IS NULL )))
1171             AND (    (Recinfo.projfunc_bil_rate_date_code =
1172          x_projfunc_bil_rate_date_code )
1173                 OR (    (Recinfo.projfunc_bil_rate_date_code IS NULL )
1174                    AND ( x_projfunc_bil_rate_date_code IS NULL )))
1175             AND (    (Recinfo.projfunc_bil_rate_type =
1176          x_projfunc_bil_rate_type )
1177                 OR (    (Recinfo.projfunc_bil_rate_type IS NULL )
1178                    AND ( x_projfunc_bil_rate_type IS NULL )))
1179             AND (    (Recinfo.projfunc_bil_rate_date =
1180          x_projfunc_bil_rate_date )
1181                 OR (    (Recinfo.projfunc_bil_rate_date IS NULL )
1182                    AND ( x_projfunc_bil_rate_date IS NULL )))
1183             AND (    (Recinfo.projfunc_bil_exchange_rate =
1184          x_projfunc_bil_exchange_rate )
1185                 OR (    (Recinfo.projfunc_bil_exchange_rate IS NULL )
1186                    AND ( x_projfunc_bil_exchange_rate IS NULL )))
1187             AND (    (Recinfo.funding_rate_date_code =
1188          x_funding_rate_date_code )
1189                 OR (    (Recinfo.funding_rate_date_code IS NULL )
1190                    AND ( x_funding_rate_date_code IS NULL )))
1191             AND (    (Recinfo.funding_rate_type =
1192          x_funding_rate_type )
1193                 OR (    (Recinfo.funding_rate_type IS NULL )
1194                    AND ( x_funding_rate_type IS NULL )))
1195             AND (    (Recinfo.funding_rate_date =
1196          x_funding_rate_date )
1197                 OR (    (Recinfo.funding_rate_date IS NULL )
1198                    AND ( x_funding_rate_date IS NULL )))
1199             AND (    (Recinfo.funding_exchange_rate =
1200          x_funding_exchange_rate )
1201                 OR (    (Recinfo.funding_exchange_rate IS NULL )
1202                    AND ( x_funding_exchange_rate IS NULL )))
1203             AND (    (Recinfo.baseline_funding_flag =
1204          x_baseline_funding_flag )
1205                 OR (    (Recinfo.baseline_funding_flag IS NULL )
1206                    AND ( x_baseline_funding_flag IS NULL )))
1207             AND (    (Recinfo.projfunc_cost_rate_type =
1208          x_projfunc_cost_rate_type )
1209                 OR (    (Recinfo.projfunc_cost_rate_type IS NULL )
1210                    AND ( x_projfunc_cost_rate_type IS NULL )))
1211             AND (    (Recinfo.projfunc_cost_rate_date =
1212          x_projfunc_cost_rate_date )
1213                 OR (    (Recinfo.projfunc_cost_rate_date IS NULL )
1214                    AND ( x_projfunc_cost_rate_date IS NULL )))
1215             AND (    (Recinfo.multi_currency_billing_flag =
1216          x_multi_currency_billing_flag )
1217                 OR (    (Recinfo.multi_currency_billing_flag IS NULL )
1218                    AND ( x_multi_currency_billing_flag IS NULL )))
1219             AND (    (Recinfo.btc_cost_base_rev_code =
1220          x_btc_cost_base_rev_code )
1221                 OR (    (Recinfo.btc_cost_base_rev_code IS NULL )
1222                    AND ( x_btc_cost_base_rev_code IS NULL )))
1223 -- R12 - Bug 4363092
1224             AND (    (Recinfo.revtrans_currency_type =
1225          x_revtrans_currency_type )
1226                 OR (    (Recinfo.revtrans_currency_type IS NULL )
1227                    AND ( x_revtrans_currency_type IS NULL )))
1228 -- R12 - Bug 4363092
1229             AND (    (Recinfo.inv_by_bill_trans_curr_flag =
1230          x_inv_by_bill_trans_curr_flag )
1231                 OR (    (Recinfo.inv_by_bill_trans_curr_flag IS NULL )
1232                    AND ( x_inv_by_bill_trans_curr_flag IS NULL )))
1233 --MCA Sakthi for MultiAgreementCurrency Project
1234             AND (    (Recinfo.assign_precedes_task =
1235          x_assign_precedes_task )
1236                 OR (    (Recinfo.assign_precedes_task IS NULL )
1237                    AND ( x_assign_precedes_task IS NULL )))
1238 --Structure
1239             AND (    (Recinfo.split_cost_from_workplan_flag  =
1240          x_split_cost_from_wokplan_flag )
1241                 OR (    (Recinfo.split_cost_from_workplan_flag IS NULL )
1242                    AND ( x_split_cost_from_wokplan_flag IS NULL )))
1243 
1244             AND (    (Recinfo.split_cost_from_bill_flag =
1245          x_split_cost_from_bill_flag )
1246                 OR (    (Recinfo.split_cost_from_bill_flag IS NULL )
1247                    AND ( x_split_cost_from_bill_flag IS NULL )))
1248 --Structure
1249 --Advertisement
1250             AND (    (Recinfo.adv_action_set_id  =
1251          x_adv_action_set_id )
1252                 OR (    (Recinfo.adv_action_set_id IS NULL )
1253                    AND ( x_adv_action_set_id IS NULL )))
1254 
1255             AND (    (Recinfo.start_adv_action_set_flag =
1256          x_start_adv_action_set_flag )
1257                 OR (    (Recinfo.start_adv_action_set_flag IS NULL )
1258                    AND ( x_start_adv_action_set_flag IS NULL )))
1259 --Advertisement
1260 --Project Setup
1261             AND (    (Recinfo.Priority_code =
1262          x_Priority_code )
1263                 OR (    (Recinfo.Priority_code IS NULL )
1264                    AND ( x_Priority_code IS NULL )))
1265 --Project Setup
1266 --Retention
1267             AND (    (Recinfo.retn_billing_inv_format_id =
1268          x_retn_billing_inv_format_id )
1269                 OR (    (Recinfo.retn_billing_inv_format_id IS NULL )
1270                    AND ( x_retn_billing_inv_format_id IS NULL )))
1271 
1272             AND (    (Recinfo.retn_accounting_flag =
1273          x_retn_accounting_flag )
1274                 OR (    (Recinfo.retn_accounting_flag IS NULL )
1275                    AND ( x_retn_accounting_flag IS NULL )))
1276 --Retention
1277 -- anlee
1278 -- patchset K changes
1279             AND (    (Recinfo.revaluate_funding_flag =
1280          x_revaluate_funding_flag )
1281                 OR (    (Recinfo.revaluate_funding_flag IS NULL )
1282                    AND ( x_revaluate_funding_flag IS NULL )))
1283 
1284             AND (    (Recinfo.include_gains_losses_flag =
1285          x_include_gains_losses_flag )
1286                 OR (    (Recinfo.include_gains_losses_flag IS NULL )
1287                    AND ( x_include_gains_losses_flag IS NULL )))
1288 -- msundare
1289             AND (    (Recinfo.security_level = x_security_level )
1290                 OR (    (Recinfo.security_level IS NULL )
1291                    AND ( x_security_level IS NULL )))
1292 
1293             AND (    (Recinfo.labor_disc_reason_code = x_labor_disc_reason_code )
1294                 OR (    (Recinfo.labor_disc_reason_code IS NULL )
1295                    AND ( x_labor_disc_reason_code IS NULL )))
1296 
1297             AND (    (Recinfo.non_labor_disc_reason_code = x_non_labor_disc_reason_code )
1298                 OR (    (Recinfo.non_labor_disc_reason_code IS NULL )
1299                    AND ( x_non_labor_disc_reason_code IS NULL )))
1300 -- End of changes
1301 --PA L changes
1302             AND (    (Recinfo.asset_allocation_method = x_asset_allocation_method )
1303                 OR (    (Recinfo.asset_allocation_method IS NULL )
1304                    AND ( x_asset_allocation_method IS NULL )))
1305 
1306             AND (    (Recinfo.capital_event_processing = x_capital_event_processing )
1307                 OR (    (Recinfo.capital_event_processing IS NULL )
1308                    AND ( x_capital_event_processing IS NULL )))
1309 
1310             AND (    (Recinfo.cint_rate_sch_id = x_cint_rate_sch_id )
1311                 OR (    (Recinfo.cint_rate_sch_id IS NULL )
1312                    AND ( x_cint_rate_sch_id IS NULL )))
1313 
1314             AND (    (Recinfo.cint_eligible_flag = x_cint_eligible_flag )
1315                 OR (    (Recinfo.cint_eligible_flag IS NULL )
1316                    AND ( x_cint_eligible_flag IS NULL )))
1317 
1318             AND (    (Recinfo.cint_stop_date = x_cint_stop_date )
1319                 OR (    (Recinfo.cint_stop_date IS NULL )
1320                    AND ( x_cint_stop_date IS NULL )))
1321 
1322 --FP_M Changes. Tracking Bug 3279981
1323             AND (    (Recinfo.enable_top_task_customer_flag = x_en_top_task_customer_flag )
1324                 OR (    (Recinfo.enable_top_task_customer_flag IS NULL )
1325                    AND ( x_en_top_task_customer_flag IS NULL )))
1326 
1327             AND (    (Recinfo.enable_top_task_inv_mth_flag = x_en_top_task_inv_mth_flag )
1328                 OR (    (Recinfo.enable_top_task_inv_mth_flag IS NULL )
1329                    AND ( x_en_top_task_inv_mth_flag IS NULL )))
1330 
1331             AND (    (Recinfo.revenue_accrual_method = x_revenue_accrual_method )
1332                 OR (    (Recinfo.revenue_accrual_method IS NULL )
1333                    AND ( x_revenue_accrual_method IS NULL )))
1334 
1335             AND (    (Recinfo.invoice_method = x_invoice_method )
1336                 OR (    (Recinfo.invoice_method IS NULL )
1337                    AND ( x_invoice_method IS NULL )))
1338 
1339             AND (    (Recinfo.projfunc_attr_for_ar_flag = x_projfunc_attr_for_ar_flag )
1340                 OR (    (Recinfo.projfunc_attr_for_ar_flag IS NULL )
1341                    AND ( x_projfunc_attr_for_ar_flag IS NULL )))
1342 
1343 --sunkalya:federal changes Bug#5511353
1344 	    AND (    (Recinfo.date_eff_funds_consumption = x_date_eff_funds_flag )
1345                 OR (    (Recinfo.date_eff_funds_consumption IS NULL )
1346                    AND ( x_date_eff_funds_flag IS NULL )))
1347 --sunkalya:federal changes	Bug#5511353
1348 
1349         /* 7508661 : EnC : Start */
1350         AND (    (Recinfo.ar_rec_notify_flag = x_ar_rec_notify_flag )
1351                 OR (    (Recinfo.ar_rec_notify_flag IS NULL )
1352                    AND ( x_ar_rec_notify_flag IS NULL )))
1353         AND (    (Recinfo.auto_release_pwp_inv = x_auto_release_pwp_inv )
1354                 OR (    (Recinfo.auto_release_pwp_inv IS NULL )
1355                    AND ( x_auto_release_pwp_inv IS NULL )))
1356         /* 7508661 : EnC : End */
1357 
1358        )
1359 	    then
1360 		      return;
1361 	    else
1362 		      FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
1363 		      APP_EXCEPTION.Raise_Exception;
1364 	    end if;
1365     else
1366       FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
1367       APP_EXCEPTION.Raise_Exception;
1368     end if;
1369   END Lock_Row;
1370 
1371 
1372 END PA_PROJECTS_PKG;