DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PEOPLE_V14_PKG

Source


1 PACKAGE BODY PER_PEOPLE_V14_PKG AS
2 /* $Header: peper14t.pkb 120.1.12020000.5 2012/10/05 11:00:14 srannama ship $ */
3 
4 --
5 g_package  varchar2(20) := 'PER_PEOPLE_V14_PKG.';
6 g_debug    boolean; -- debug flag
7 --
8 
9 PROCEDURE form_startup(X_Business_group_id IN OUT NOCOPY NUMBER
10                       ,X_Set_Of_Books_Id IN OUT NOCOPY NUMBER
11                       ,X_Resp_Appl_Id NUMBER
12                       ,X_Resp_Id NUMBER
13                       ,X_Legislation_Code IN OUT NOCOPY VARCHAR2
14                       ,X_business_group_name IN OUT NOCOPY VARCHAR2
15                       ,X_property_on NUMBER
16                       ,X_property_off NUMBER
17                       ,X_Query_Only_Flag VARCHAR2
18                       ,X_employee_property IN OUT NOCOPY NUMBER
19                       ,X_expense_check_to_address IN OUT NOCOPY VARCHAR2
20                       ,X_expense_to_address_meaning IN OUT NOCOPY VARCHAR2
21                       ,X_chart_of_accounts_id IN OUT NOCOPY NUMBER
22                       ,X_set_of_books_name IN OUT NOCOPY VARCHAR2
23                       ,X_Session_Date IN OUT NOCOPY DATE
24                       ,X_End_Of_Time IN OUT NOCOPY DATE
25                       ,X_current_appl_id IN OUT NOCOPY NUMBER
26                       ,X_person_type_id IN OUT NOCOPY NUMBER
27                       ,X_current_employee_flag IN OUT NOCOPY VARCHAR2
28                       ,X_current_applicant_flag IN OUT NOCOPY VARCHAR2
29                       ,X_current_emp_or_apl_flag IN OUT NOCOPY VARCHAR2)
30 IS
31 --
32 CURSOR data_group
33 IS
34 SELECT dgu.oracle_id
35 ,      fr.data_group_application_id
36 FROM   fnd_data_group_units dgu
37 ,      fnd_responsibility fr
38 WHERE  fr.data_group_id = dgu.data_group_id
39 AND    fr.data_group_application_id = dgu.application_id
40 AND    fr.application_id = X_Resp_Appl_Id
41 AND    fr.responsibility_id = X_Resp_Id;
42 --
43 --
44 CURSOR chart_of_accounts
45 IS
46 SELECT gsb.chart_of_accounts_id
47 ,      gsb.name
48 FROM   gl_sets_of_books gsb
49 WHERE  gsb.set_of_books_id = X_Set_Of_Books_Id;
50 --
51 CURSOR bg_details
52 IS
53 SELECT pbg.legislation_code
54 ,      pbg.name
55 ,      DECODE(pbg.METHOD_OF_GENERATION_EMP_NUM,'A'
56 ,      X_property_off , X_property_on)
57 FROM   per_business_groups pbg
58 WHERE  pbg.business_group_id = X_Business_group_id;
59 --
60 CURSOR expense_address
61 IS
62 SELECT hl.meaning
63 FROM   hr_lookups hl
64 WHERE  hl.lookup_type= 'HOME_OFFICE'
65 AND    hl.lookup_code = X_expense_check_to_address;
66 --
67 CURSOR person_type IS
68 SELECT ppt.person_type_id
69 ,      pst.current_employee_flag
70 ,      pst.current_applicant_flag
71 ,      pst.current_emp_or_apl_flag
72 ,      TRUNC(SYSDATE)
73 ,      TO_DATE('31/12/4712','DD/MM/YYYY')
74 FROM per_person_types ppt
75 ,    per_startup_person_types pst
76 WHERE ppt.business_group_id = X_Business_group_id -- Bug 3648460
77 AND   ppt.system_person_type = pst.system_person_type
78 AND   ppt.system_person_type = DECODE(X_current_appl_id,810,'OTHER','EMP')
79 AND   ppt.default_flag = 'Y'
80 AND   pst.default_flag = 'Y';
81 --
82 l_sql_text VARCHAR2(2000):=NULL;
83 l_sql_cursor INTEGER;
84 l_rows_fetched INTEGER;
85 l_rows NUMBER;
86 l_oracle_id NUMBER;
87 l_fsp_business_group_id NUMBER;
88 l_set_of_books_id NUMBER;
89 l_dummy BOOLEAN;
90 l_status VARCHAR2(1);
91 l_ap_status VARCHAR2(1);
92 l_po_status VARCHAR2(1);
93 l_industry VARCHAR2(1);
94 --
95 BEGIN
96   --
97   -- Check whether responsibility is allowed to use form
98   --
99   OPEN data_group;
100   FETCH data_group INTO l_oracle_id, X_current_appl_id;
101   CLOSE data_group;
102   --
103   -- If query only mode then ignore this test
104   --
105   IF (SUBSTR(X_Query_Only_Flag,1,1) <> 'Y')
106   THEN
107   --
108   -- Check HR not Installed and Liscensed.
109   --
110   IF (fnd_installation.get(appl_id => 800
111                           ,dep_appl_id => 800
112                           ,status => l_status
113                           ,industry => l_industry))
114   THEN
115 	 -- If installed and Not OTA
116 	 -- then error
117 	 IF (l_status = 'I')
118 	  AND (X_current_appl_id <> 810)
119 	 THEN
120 		hr_utility.set_message('801','HR_6041_PO_EMP_HR_INSTALLED');
121 		hr_utility.raise_error;
122 		hr_utility.raise_error;
123 	 END IF;
124   END IF;
125   END IF;
126 
127   --
128   -- Check Purchasing and Payables not Installed and Liscensed.
129   --
130     l_dummy :=fnd_installation.get(appl_id => 201
131                           ,dep_appl_id => 201
132                           ,status => l_ap_status
133                           ,industry => l_industry);
134 
135      l_dummy :=fnd_installation.get(appl_id => 200
136                           ,dep_appl_id => 200
137                           ,status => l_po_status
138                           ,industry => l_industry);
139 	 --
140 	 -- If either AP or PO is fully installed (l_status = 'I')
141 	 -- get the set of books from financials_system_parameters
142 	 --
143     IF (l_ap_status = 'I') OR  (l_po_status = 'I')
144     THEN
145   --
146   -- Dynamic SQL cursor to get round the problem of Table not existing.
147   -- This uses a similar method to OCI but Via PL/SQL instead.
148   --
149     BEGIN
150       --
151       /* l_sql_text := 'select fsp.set_of_books_id '
152                  || ',fsp.expense_check_address_flag '
153                  || 'from financials_system_parameters fsp'; */
154 
155       /* l_sql_text:= 'select fspa.set_of_books_id,fspa.expense_check_address_flag
156 	               from FINANCIALS_SYSTEM_PARAMS_ALL fspa where fspa.org_id=nvl (to_number
157 		       (decode (substrb (userenv ('
158                       ||'''CLIENT_INFO'''
159                       ||'),1,1),'
160                       ||''' '''
161                       ||',NULL,substrb (userenv ('
162                       ||'''CLIENT_INFO'''
163                       ||'),1,10))),- 99)' ;  */
164 
165       -- Bug 14584982
166 
167          l_sql_text:= 'select fspa.set_of_books_id,fspa.expense_check_address_flag
168               from FINANCIALS_SYSTEM_PARAMS_ALL fspa where fspa.business_group_id =
169 	      (select distinct business_group_id from per_business_groups
170                where name = '||''''||X_business_group_name||''''||
171                ' and legislation_code = '||''''||X_Legislation_Code||''''||')';
172       -- Bug 14584982
173 
174 
175       --
176       -- Open Cursor for Processing Sql statment.
177       --
178       l_sql_cursor := dbms_sql.open_cursor;
179       --
180       -- Parse SQL statement.
181       --
182       dbms_sql.parse(l_sql_cursor, l_sql_text, dbms_sql.v7);
183       --
184       -- Map the local variables to each returned Column
185       --
186       dbms_sql.define_column(l_sql_cursor, 1, l_set_of_books_id);
187       dbms_sql.define_column(l_sql_cursor,2, X_expense_check_to_address,30);
188       --
189       -- Execute the SQL statement.
190       --
191       l_rows_fetched := dbms_sql.EXECUTE(l_sql_cursor);
192       --
193       --
194       l_rows := dbms_sql.fetch_rows(l_sql_cursor);
195       --
196       IF l_rows > 1
197       THEN
198 	hr_utility.set_message('801','HR_6153_ALL_PROCEDURE_FAIL');
199       	hr_utility.set_message_token('PROCEDURE','Form_startup');
200         hr_utility.raise_error;
201       END IF;
202       --
203       IF l_rows > 0
204       THEN
205         --
206         -- Extract the select list for the current row into local variables.
207         --
208         dbms_sql.column_value(l_sql_cursor, 1, l_set_of_books_id);
209         dbms_sql.column_value(l_sql_cursor, 2, X_expense_check_to_address);
210       END IF;
211       --
212       -- Close cursor used for processing SQL statement.
213       --
214       dbms_sql.close_cursor(l_sql_cursor);
215     END;
216     END IF;
217   --
218   --
219   IF l_set_of_books_id IS NOT NULL
220   THEN
221       X_Set_Of_Books_ID := l_set_of_books_id;
222   END IF;
223   --
224   -- Get the chart of Accounts id for the GL Flexfield
225   -- If set of books profile is set.
226   -- Note: with shared install this table should always exist
227   --       so no need for Dynamic PL/SQL cursor.
228   --
229   IF X_Set_Of_Books_Id IS NOT NULL
230   THEN
231     OPEN chart_of_accounts;
232     FETCH chart_of_accounts INTO X_chart_of_accounts_id
233 			 ,X_set_of_books_name;
234     IF chart_of_accounts%NOTFOUND THEN
235       hr_utility.set_message('801','HR_6153_ALL_PROCEDURE_FAIL');
236       hr_utility.set_message_token('PROCEDURE','Form_startup');
237       hr_utility.raise_error;
238     END IF;
239     CLOSE chart_of_accounts;
240   END IF;
241   --
242   -- Gets the Legislation of the Business Group (used to Default style
243   -- for the address) and the form property of the Employee Number field
244   -- which is toggled based on whether the Business group has
245   -- its generation set to A(utomatic) or not.
246   --
247   OPEN bg_details;
248   FETCH bg_details INTO X_Legislation_Code
249                        ,X_business_group_name
250                        ,X_employee_property;
251   CLOSE bg_details;
252   --
253   OPEN expense_address;
254   FETCH expense_address INTO X_expense_to_address_meaning;
255   CLOSE expense_address;
256   --
257   -- Get the Default Employee Person_type from Per_Person_types
258   -- and the start and end dates for a row entered as of sysdate.
259   --
260   OPEN person_type;
261   FETCH person_type INTO X_person_type_id,X_current_employee_flag
262                         ,X_current_applicant_flag,X_current_emp_or_apl_flag
263                         ,X_Session_Date,X_End_Of_Time;
264   CLOSE person_type;
265   --
266 END;
267 --
268 PROCEDURE Insert_period_of_Service(X_Person_Id NUMBER
269                                   ,X_Business_Group_Id NUMBER
270                                   ,X_Date_Start DATE
271                                   ,X_Period_of_Service_Id IN OUT NOCOPY NUMBER)
272 IS
273 CURSOR C1 IS SELECT per_periods_of_service_s.NEXTVAL FROM sys.dual;
274 --
275 -- START WWBUG 1390173 fix
276 --
277 l_old   ben_pps_ler.g_pps_ler_rec;
278 l_new   ben_pps_ler.g_pps_ler_rec;
279 --
280 l_proc            varchar2(24) :=  'Insert_period_of_Service';
281 --
282 -- END WWBUG 1390173 fix
283 --
284 --
285 
286 BEGIN
287   g_debug := hr_utility.debug_enabled; -- get debug status
288   IF g_debug THEN
289     hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
290   END IF;
291 
292   OPEN C1;
293   FETCH C1 INTO X_Period_of_Service_Id;
294   CLOSE C1;
295 --
296   IF g_debug THEN
297     hr_utility.set_location('Entering: '|| g_package || l_proc, 10);
298   END IF;
299   INSERT INTO PER_PERIODS_OF_SERVICE(
300    PERIOD_OF_SERVICE_ID
301   ,BUSINESS_GROUP_ID
302   ,PERSON_ID
303   ,DATE_START
304   ) VALUES (
305   X_Period_of_Service_Id
306  ,X_Business_Group_Id
307  ,X_Person_Id
308  ,X_Date_Start);
309 --
310 --
311 -- START WWBUG 1390173 fix
312 --
313 l_new.PERSON_ID := x_person_id;
314 l_new.BUSINESS_GROUP_ID := x_business_group_id;
315 l_new.DATE_START := x_date_start;
316 l_new.ACTUAL_TERMINATION_DATE := NULL;
317 l_new.LEAVING_REASON := NULL;
318 l_new.ADJUSTED_SVC_DATE := NULL;
319 l_new.ATTRIBUTE1 := NULL;
320 l_new.ATTRIBUTE2 := NULL;
321 l_new.ATTRIBUTE3 := NULL;
322 l_new.ATTRIBUTE4 := NULL;
323 l_new.ATTRIBUTE5 := NULL;
324 l_new.final_process_date := NULL;
325 --
326   IF g_debug THEN
327     hr_utility.set_location('Entering: '|| g_package || l_proc, 20);
328   END IF;
329 ben_pps_ler.ler_chk(p_old            => l_old
330                    ,p_new            => l_new
331                    ,p_event          => 'INSERTING'
332                    ,p_effective_date => x_date_start);
333 --
334 -- END WWBUG 1390173 fix
335 --
336 --
337   IF g_debug THEN
338     hr_utility.set_location('Leaving: '|| g_package || l_proc, 30);
339   END IF;
340 
341 END insert_period_of_service;
342 --
343 PROCEDURE Insert_Row(X_Rowid                        IN OUT NOCOPY VARCHAR2,
344                      X_Person_Id                           IN OUT NOCOPY NUMBER,
345                      X_Party_Id                            NUMBER DEFAULT NULL,
346                      X_Effective_Start_Date                DATE,
347                      X_Effective_End_Date                  DATE,
348                      X_Business_Group_Id                   NUMBER,
349                      X_Person_Type_Id                      NUMBER,
350                      X_Last_Name                           VARCHAR2,
351                      X_Start_Date                          DATE,
352                      X_Applicant_Number                    VARCHAR2,
353                      X_Comment_Id                          NUMBER,
354                      X_Current_Applicant_Flag              VARCHAR2,
355                      X_Current_Emp_Or_Apl_Flag             VARCHAR2,
356                      X_Current_Employee_Flag               VARCHAR2,
357                      X_Date_Employee_Data_Verified         DATE,
358                      X_Date_Of_Birth                       DATE,
359                      X_Email_Address                       VARCHAR2,
360                      X_Employee_Number                     VARCHAR2,
361                      X_Expense_Check_To_Address       VARCHAR2,
362                      X_First_Name                          VARCHAR2,
363                      X_Full_Name                           VARCHAR2,
364                      X_Known_As                            VARCHAR2,
365                      X_Marital_Status                      VARCHAR2,
366                      X_Middle_Names                        VARCHAR2,
367                      X_Nationality                         VARCHAR2,
368                      X_National_Identifier                 VARCHAR2,
369                      X_Previous_Last_Name                  VARCHAR2,
370                      X_Registered_Disabled_Flag            VARCHAR2,
371                      X_Sex                                 VARCHAR2,
372                      X_Title                               VARCHAR2,
373                      X_Vendor_Id                           NUMBER,
374                      X_Work_Telephone                      VARCHAR2,
375                      X_Attribute_Category                  VARCHAR2,
376                      X_Attribute1                          VARCHAR2,
377                      X_Attribute2                          VARCHAR2,
378                      X_Attribute3                          VARCHAR2,
379                      X_Attribute4                          VARCHAR2,
380                      X_Attribute5                          VARCHAR2,
381                      X_Attribute6                          VARCHAR2,
382                      X_Attribute7                          VARCHAR2,
383                      X_Attribute8                          VARCHAR2,
384                      X_Attribute9                          VARCHAR2,
385                      X_Attribute10                         VARCHAR2,
386                      X_Attribute11                         VARCHAR2,
387                      X_Attribute12                         VARCHAR2,
388                      X_Attribute13                         VARCHAR2,
389                      X_Attribute14                         VARCHAR2,
390                      X_Attribute15                         VARCHAR2,
391                      X_Attribute16                         VARCHAR2,
392                      X_Attribute17                         VARCHAR2,
393                      X_Attribute18                         VARCHAR2,
394                      X_Attribute19                         VARCHAR2,
395                      X_Attribute20                         VARCHAR2,
396                      X_Attribute21                         VARCHAR2,
397                      X_Attribute22                         VARCHAR2,
398                      X_Attribute23                         VARCHAR2,
399                      X_Attribute24                         VARCHAR2,
400                      X_Attribute25                         VARCHAR2,
401                      X_Attribute26                         VARCHAR2,
402                      X_Attribute27                         VARCHAR2,
403                      X_Attribute28                         VARCHAR2,
404                      X_Attribute29                         VARCHAR2,
405                      X_Attribute30                         VARCHAR2,
406                      X_Per_Information_Category            VARCHAR2,
407                      X_Per_Information1                    VARCHAR2,
408                      X_Per_Information2                    VARCHAR2,
409                      X_Per_Information3                    VARCHAR2,
410                      X_Per_Information4                    VARCHAR2,
411                      X_Per_Information5                    VARCHAR2,
412                      X_Per_Information6                    VARCHAR2,
413                      X_Per_Information7                    VARCHAR2,
414                      X_Per_Information8                    VARCHAR2,
415                      X_Per_Information9                    VARCHAR2,
416                      X_Per_Information10                   VARCHAR2,
417                      X_Per_Information11                   VARCHAR2,
418                      X_Per_Information12                   VARCHAR2,
419                      X_Per_Information13                   VARCHAR2,
420                      X_Per_Information14                   VARCHAR2,
421                      X_Per_Information15                   VARCHAR2,
422                      X_Per_Information16                   VARCHAR2,
423                      X_Per_Information17                   VARCHAR2,
424                      X_Per_Information18                   VARCHAR2,
425                      X_Per_Information19                   VARCHAR2,
426                      X_Per_Information20                   VARCHAR2,
427                      X_Per_Information21                   VARCHAR2,
428                      X_Per_Information22                   VARCHAR2,
429                      X_Per_Information23                   VARCHAR2,
430                      X_Per_Information24                   VARCHAR2,
431                      X_Per_Information25                   VARCHAR2,
432                      X_Per_Information26                   VARCHAR2,
433                      X_Per_Information27                   VARCHAR2,
434                      X_Per_Information28                   VARCHAR2,
435                      X_Per_Information29                   VARCHAR2,
436                      X_Per_Information30                   VARCHAR2,
437                      X_Last_Update_Date                    DATE,
438                      X_Last_Updated_By                     NUMBER,
439                      X_Last_Update_Login                   NUMBER,
440                      X_Created_By                          NUMBER,
441                      X_Creation_Date                       DATE,
442                      X_Order_Name                          VARCHAR2,
443                      X_Global_Name                         VARCHAR2,
444                      X_Local_Name                          VARCHAR2,
445                      X_PERIOD_OF_SERVICE_ID         IN OUT NOCOPY NUMBER,
446 				 X_TOWN_OF_BIRTH                       VARCHAR2 DEFAULT NULL,
447 				 X_REGION_OF_BIRTH                     VARCHAR2 DEFAULT NULL,
448 				 X_COUNTRY_OF_BIRTH                    VARCHAR2 DEFAULT NULL,
449 			      X_GLOBAL_PERSON_ID                    VARCHAR2 DEFAULT NULL,
450                      X_blood_type            VARCHAR2 default NULL,
451                      X_correspondence_language VARCHAR2 default NULL,
452                      X_honors                 VARCHAR2 default NULL,
453                      X_pre_name_adjunct       VARCHAR2 default NULL,
454                      X_rehire_authorizor      VARCHAR2 default NULL,
455                      X_rehire_recommendation  VARCHAR2 default NULL,
456                      X_resume_exists          VARCHAR2 default NULL,
457                      X_resume_last_updated    DATE default NULL,
458                      X_second_passport_exists VARCHAR2 default NULL,
459                      X_student_status     VARCHAR2 default NULL,
460                      X_suffix             VARCHAR2 default NULL,
461                      X_date_of_death      DATE default NULL,
462                      X_uses_tobacco_flag  VARCHAR2 default NULL,
463                      X_fast_path_employee VARCHAR2 default NULL,
464                      X_fte_capacity    VARCHAR2 default NULL
465  ) IS
466 l_period_of_service_id NUMBER;
467    CURSOR C IS SELECT ROWID FROM PER_ALL_PEOPLE_F
468              WHERE person_id = X_Person_Id;
469     CURSOR C2 IS SELECT per_people_s.NEXTVAL FROM sys.dual;
470 --
471 CURSOR c_person IS
472   SELECT *
473   FROM   per_all_people_f
474   WHERE  person_id = x_person_id
475   AND    x_effective_start_date
476          BETWEEN effective_start_date
477          AND     effective_end_date;
478 --
479 l_person per_all_people_f%ROWTYPE;
480 --
481 l_phone_ovn        NUMBER       := NULL ;
482 l_phone_id         NUMBER       := NULL ;
483   l_proc VARCHAR2(72):='per_people_v14_pkg.insert_row';
484 --
485 BEGIN
486   hr_utility.set_location('Entering: '||l_proc,10);
487    IF (X_Person_Id IS NULL) THEN
488      OPEN C2;
489      FETCH C2 INTO X_Person_Id;
490      CLOSE C2;
491    END IF;
492 
493    -- Verify party id, if one is passed in
494    IF X_party_id IS NOT NULL THEN
495      --
496      per_per_bus.chk_party_id
497        (p_person_id             => X_person_id
498        ,p_party_id              => X_party_id
499        ,p_effective_date        => X_effective_start_date
500        ,p_object_version_number => NULL);
501    END IF;
502    hr_utility.set_location(l_proc,20);
503   INSERT INTO PER_ALL_PEOPLE_F(
504           person_id,
505           effective_start_date,
506           effective_end_date,
507           business_group_id,
508           person_type_id,
509           last_name,
510           start_date,
511           applicant_number,
512           comment_id,
513           current_applicant_flag,
514           current_emp_or_apl_flag,
515           current_employee_flag,
516           date_employee_data_verified,
517           date_of_birth,
518           email_address,
519           employee_number,
520           expense_check_send_to_address,
521           first_name,
522           full_name,
523           known_as,
524           marital_status,
525           middle_names,
526           nationality,
527           national_identifier,
528           previous_last_name,
529           registered_disabled_flag,
530           sex,
531           title,
532           vendor_id,
533     --    work_telephone,      -- Now handled by the Create_phone call.
534           attribute_category,
535           attribute1,
536           attribute2,
537           attribute3,
538           attribute4,
539           attribute5,
540           attribute6,
541           attribute7,
542           attribute8,
543           attribute9,
544           attribute10,
545           attribute11,
546           attribute12,
547           attribute13,
548           attribute14,
549           attribute15,
550           attribute16,
551           attribute17,
552           attribute18,
553           attribute19,
554           attribute20,
555           attribute21,
556           attribute22,
557           attribute23,
558           attribute24,
559           attribute25,
560           attribute26,
561           attribute27,
562           attribute28,
563           attribute29,
564           attribute30,
565           per_information_category,
566           per_information1,
567           per_information2,
568           per_information3,
569           per_information4,
570           per_information5,
571           per_information6,
572           per_information7,
573           per_information8,
574           per_information9,
575           per_information10,
576           per_information11,
577           per_information12,
578           per_information13,
579           per_information14,
580           per_information15,
581           per_information16,
582           per_information17,
583           per_information18,
584           per_information19,
585           per_information20,
586           per_information21,
587           per_information22,
588           per_information23,
589           per_information24,
590           per_information25,
591           per_information26,
592           per_information27,
593           per_information28,
594           per_information29,
595           per_information30,
596           last_update_date,
597           last_updated_by,
598           last_update_login,
599           created_by,
600           creation_date,
601 		town_of_birth,
602 		region_of_birth,
603 		country_of_birth,
604 		global_person_id,
605         party_id,
606         blood_type,
607         correspondence_language,
608         honors,
609         pre_name_adjunct,
610         rehire_authorizor,
611         rehire_recommendation,
612         resume_exists,
613         resume_last_updated,
614         second_passport_exists,
615         student_status,
616         suffix,
617         date_of_death,
618         uses_tobacco_flag,
619         fast_path_employee,
620         fte_capacity,
621         order_name,   -- #3889584
622         global_name,
623         local_name
624          ) VALUES (
625           X_Person_Id,
626           X_Effective_Start_Date,
627           X_Effective_End_Date,
628           X_Business_Group_Id,
629 --          X_Person_Type_Id,
630           hr_person_type_usage_info.get_default_person_type_id(X_Person_Type_Id),
631           X_Last_Name,
632           X_Start_Date,
633           X_Applicant_Number,
634           X_Comment_Id,
635           X_Current_Applicant_Flag,
636           X_Current_Emp_Or_Apl_Flag,
637           X_Current_Employee_Flag,
638           X_Date_Employee_Data_Verified,
639           X_Date_Of_Birth,
640           X_Email_Address,
641           X_Employee_Number,
642           X_Expense_Check_To_Address,
643           X_First_Name,
644           X_Full_Name,
645           X_Known_As,
646           X_Marital_Status,
647           X_Middle_Names,
648           X_Nationality,
649           X_National_Identifier,
650           X_Previous_Last_Name,
651           X_Registered_Disabled_Flag,
652           X_Sex,
653           X_Title,
654           X_Vendor_Id,
655 --        X_Work_Telephone, -- Now handled by the Create_phone call.
656           X_Attribute_Category,
657           X_Attribute1,
658           X_Attribute2,
659           X_Attribute3,
660           X_Attribute4,
661           X_Attribute5,
662           X_Attribute6,
663           X_Attribute7,
664           X_Attribute8,
665           X_Attribute9,
666           X_Attribute10,
667           X_Attribute11,
668           X_Attribute12,
669           X_Attribute13,
670           X_Attribute14,
671           X_Attribute15,
672           X_Attribute16,
673           X_Attribute17,
674           X_Attribute18,
675           X_Attribute19,
676           X_Attribute20,
677           X_Attribute21,
678           X_Attribute22,
679           X_Attribute23,
680           X_Attribute24,
681           X_Attribute25,
682           X_Attribute26,
683           X_Attribute27,
684           X_Attribute28,
685           X_Attribute29,
686           X_Attribute30,
687           X_per_information_category,
688           X_per_information1,
689           X_per_information2,
690           X_per_information3,
691           X_per_information4,
692           X_per_information5,
693           X_per_information6,
694           X_per_information7,
695           X_per_information8,
696           X_per_information9,
697           X_per_information10,
698           X_per_information11,
699           X_per_information12,
700           X_per_information13,
701           X_per_information14,
702           X_per_information15,
703           X_per_information16,
704           X_per_information17,
705           X_per_information18,
706           X_per_information19,
707           X_per_information20,
708           X_per_information21,
709           X_per_information22,
710           X_per_information23,
711           X_per_information24,
712           X_per_information25,
713           X_per_information26,
714           X_per_information27,
715           X_per_information28,
716           X_per_information29,
717           X_per_information30,
718           X_Last_Update_Date,
719           X_Last_Updated_By,
720           X_Last_Update_Login,
721           X_Created_By,
722           X_Creation_Date,
723 		X_town_of_birth,
724 		X_region_of_birth,
725 		X_country_of_birth,
726 		X_global_person_id,
727           X_party_id,
728           X_blood_type,
729           X_correspondence_language,
730           X_honors,
731           X_pre_name_adjunct,
732           X_rehire_authorizor,
733           X_rehire_recommendation,
734           X_resume_exists,
735           X_resume_last_updated,
736           X_second_passport_exists,
737           X_student_status,
738           X_suffix,
739           X_date_of_death,
740           X_uses_tobacco_flag,
741           X_fast_path_employee,
742           X_fte_capacity,
743           X_Order_Name,
744           X_Global_Name,
745           X_Local_Name);
746 
747   hr_utility.set_location(l_proc,30);
748   --kramajey uncommented the part of the commented code to make sure the person details are
749   --populated in l_person Bug 4093145
750 
751   --
752   OPEN c_person;
753     --
754     FETCH c_person INTO l_person;
755     --
756   CLOSE c_person;
757   --
758     /* BEGIN OF PARTY_ID WORK */
759   /* This is being commented out as part of TCA party unmerge. This part of the code
760    is being called from per_person_type_usage_internal.maintain_person_type_usage
761   --
762   per_hrtca_merge.create_tca_person(p_rec => l_person);
763   hr_utility.set_location('UPDATING party id',10);
764   --
765   -- Now assign the resulting party id back to the record.
766   --
767 --Bug fix 4861893
768 --update statement modified ,per_All_people_f used  instead of per_people_f.
769 IF x_party_id IS NULL THEN
770     UPDATE per_all_people_f
771        SET party_id = l_person.party_id
772      WHERE person_id = x_person_id;
773   END IF;
774   --
775   */
776   /* END OF PARTY ID WORK */
777   --
778   -- HR/WF synchronization call
779   --
780   per_hrwf_synch.per_per_wf(p_rec      => l_person,
781                             p_action   => 'INSERT');
782   --
783   --
784   -- Create a phone row if the work_telephone parm is not null.
785   -- Use p_start_date (i.e., p_date_received passed from per_applicant_pkg)
786   -- as the value for effective date and date from.
787   --
788   IF x_work_telephone IS NOT NULL THEN
789   hr_utility.set_location(l_proc,40);
790          hr_phone_api.create_phone
791             (p_date_from                 => x_effective_start_date
792             ,p_date_to                   => NULL
793             ,p_phone_type                => 'W1'
794             ,p_phone_number              => x_work_telephone
795             ,p_parent_id                 => x_person_id
796             ,p_parent_table              => 'PER_ALL_PEOPLE_F'
797             ,p_validate                  => FALSE
798             ,p_effective_date            => x_start_date
799             ,p_object_version_number     => l_phone_ovn  --out
800             ,p_phone_id                  => l_phone_id   --out
801             );
802   END IF;
803   hr_utility.set_location(l_proc,50);
804   --
805   OPEN C;
806   FETCH C INTO X_Rowid;
807   IF (C%NOTFOUND) THEN
808     CLOSE C;
809     RAISE NO_DATA_FOUND;
810   END IF;
811   CLOSE C;
812   hr_utility.set_location(l_proc,60);
813 --
814 -- add the person to the security lists
815 --
816   IF (X_current_emp_or_apl_flag='Y') THEN
817   hr_utility.set_location(l_proc,70);
818     hr_security_internal.populate_new_person
819     (p_person_id         => X_Person_Id
820     ,p_business_group_id => X_Business_group_Id);
821   END IF;
822   hr_utility.set_location(l_proc,80);
823   IF (X_current_employee_flag IS NOT NULL)
824   THEN
825   hr_utility.set_location(l_proc,90);
826     insert_period_of_service(X_Person_id => X_Person_Id
827                             ,X_Business_Group_Id => X_Business_Group_id
828                             ,X_Date_Start => X_effective_Start_Date
829                             ,X_Period_Of_Service_Id => X_Period_Of_Service_Id
830                             );
831   END IF;
832 -- PTU : Start of Changes
833   hr_utility.set_location(l_proc,95);
834 
835  hr_per_type_usage_internal.maintain_person_type_usage
836         (p_effective_date       => X_effective_Start_Date
837         ,p_person_id            => X_Person_Id
838         ,p_person_type_id       => X_Person_Type_Id
839         );
840 
841 -- PTU : End of Changes
842 
843   hr_utility.set_location('Leaving '||l_proc,100);
844 END Insert_Row;
845 --
846 PROCEDURE Lock_Row(X_Rowid                                 VARCHAR2,
847                    X_Person_Id                             NUMBER,
848                    X_Effective_Start_Date                  DATE,
849                    X_Effective_End_Date                    DATE,
850                    X_Business_Group_Id                     NUMBER,
851                    X_Person_Type_Id                        NUMBER,
852                    X_Last_Name                             VARCHAR2,
853                    X_Start_Date                            DATE,
854                    X_Applicant_Number                      VARCHAR2,
855                    X_Comment_Id                            NUMBER,
856                    X_Current_Applicant_Flag                VARCHAR2,
857                    X_Current_Emp_Or_Apl_Flag               VARCHAR2,
858                    X_Current_Employee_Flag                 VARCHAR2,
859                    X_Date_Employee_Data_Verified           DATE,
860                    X_Date_Of_Birth                         DATE,
861                    X_Email_Address                         VARCHAR2,
862                    X_Employee_Number                       VARCHAR2,
863                    X_Expense_Check_To_Address              VARCHAR2,
864                    X_First_Name                            VARCHAR2,
865                    X_Full_Name                             VARCHAR2,
866                    X_Known_As                              VARCHAR2,
867                    X_Marital_Status                        VARCHAR2,
868                    X_Middle_Names                          VARCHAR2,
869                    X_Nationality                           VARCHAR2,
870                    X_National_Identifier                   VARCHAR2,
871                    X_Previous_Last_Name                    VARCHAR2,
872                    X_Registered_Disabled_Flag              VARCHAR2,
873                    X_Sex                                   VARCHAR2,
874                    X_Title                                 VARCHAR2,
875                    X_Vendor_Id                             NUMBER,
876                    X_Work_Telephone                        VARCHAR2,
877                    X_Attribute_Category                    VARCHAR2,
878                    X_Attribute1                            VARCHAR2,
879                    X_Attribute2                            VARCHAR2,
880                    X_Attribute3                            VARCHAR2,
881                    X_Attribute4                            VARCHAR2,
882                    X_Attribute5                            VARCHAR2,
883                    X_Attribute6                            VARCHAR2,
884                    X_Attribute7                            VARCHAR2,
885                    X_Attribute8                            VARCHAR2,
886                    X_Attribute9                            VARCHAR2,
887                    X_Attribute10                           VARCHAR2,
888                    X_Attribute11                           VARCHAR2,
889                    X_Attribute12                           VARCHAR2,
890                    X_Attribute13                           VARCHAR2,
891                    X_Attribute14                           VARCHAR2,
892                    X_Attribute15                           VARCHAR2,
893                    X_Attribute16                           VARCHAR2,
894                    X_Attribute17                           VARCHAR2,
895                    X_Attribute18                           VARCHAR2,
896                    X_Attribute19                           VARCHAR2,
897                    X_Attribute20                           VARCHAR2,
898                    X_Attribute21                           VARCHAR2,
899                    X_Attribute22                           VARCHAR2,
900                    X_Attribute23                           VARCHAR2,
901                    X_Attribute24                           VARCHAR2,
902                    X_Attribute25                           VARCHAR2,
903                    X_Attribute26                           VARCHAR2,
904                    X_Attribute27                           VARCHAR2,
905                    X_Attribute28                           VARCHAR2,
906                    X_Attribute29                           VARCHAR2,
907                    X_Attribute30                           VARCHAR2,
908                    X_Per_Information_Category              VARCHAR2,
909                    X_Per_Information1                      VARCHAR2,
910                    X_Per_Information2                      VARCHAR2,
911                    X_Per_Information3                      VARCHAR2,
912                    X_Per_Information4                      VARCHAR2,
913                    X_Per_Information5                      VARCHAR2,
914                    X_Per_Information6                      VARCHAR2,
915                    X_Per_Information7                      VARCHAR2,
916                    X_Per_Information8                      VARCHAR2,
917                    X_Per_Information9                      VARCHAR2,
918                    X_Per_Information10                     VARCHAR2,
919                    X_Per_Information11                     VARCHAR2,
920                    X_Per_Information12                     VARCHAR2,
921                    X_Per_Information13                     VARCHAR2,
922                    X_Per_Information14                     VARCHAR2,
923                    X_Per_Information15                     VARCHAR2,
924                    X_Per_Information16                     VARCHAR2,
925                    X_Per_Information17                     VARCHAR2,
926                    X_Per_Information18                     VARCHAR2,
927                    X_Per_Information19                     VARCHAR2,
928                    X_Per_Information20                     VARCHAR2,
929                    X_Per_Information21                     VARCHAR2,
930                    X_Per_Information22                     VARCHAR2,
931                    X_Per_Information23                     VARCHAR2,
932                    X_Per_Information24                     VARCHAR2,
933                    X_Per_Information25                     VARCHAR2,
934                    X_Per_Information26                     VARCHAR2,
935                    X_Per_Information27                     VARCHAR2,
936                    X_Per_Information28                     VARCHAR2,
937                    X_Per_Information29                     VARCHAR2,
938                    X_Per_Information30                     VARCHAR2) IS
939 
940   CURSOR C IS
941       SELECT *
942       FROM   PER_ALL_PEOPLE_F
943       WHERE  ROWID = X_Rowid
944       FOR UPDATE OF Person_Id  NOWAIT;
945   Recinfo C%ROWTYPE;
946 
947   --
948   -- Declare a similar cursor to lock the phone row.
949   --
950   CURSOR csr_phones IS
951       SELECT phone_number
952       FROM per_phones
953       WHERE parent_id = X_person_id
954       FOR UPDATE OF phone_id NOWAIT;
955   phoneinfo csr_phones%ROWTYPE;
956 --
957 l_proc            varchar2(10) :=  'insert_row';
958 --
959 
960 BEGIN
961   g_debug := hr_utility.debug_enabled; -- get debug status
962   IF g_debug THEN
963     hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
964   END IF;
965   OPEN C;
966   FETCH C INTO Recinfo;
967   IF (C%NOTFOUND) THEN
968     CLOSE C;
969     RAISE NO_DATA_FOUND;
970   END IF;
971   CLOSE C;
972 
973   OPEN csr_phones;
974   FETCH csr_phones INTO phoneinfo;
975     -- no need to raise an error if no data found. Phone is not mandatory.
976   CLOSE csr_phones;
977 
978   IF (
979           (   (Recinfo.person_id = X_Person_Id)
980            OR (    (Recinfo.person_id IS NULL)
981                AND (X_Person_Id IS NULL)))
982       AND (   (Recinfo.effective_start_date = X_Effective_Start_Date)
983            OR (    (Recinfo.effective_start_date IS NULL)
984                AND (X_Effective_Start_Date IS NULL)))
985       AND (   (Recinfo.effective_end_date = X_Effective_End_Date)
986            OR (    (Recinfo.effective_end_date IS NULL)
987                AND (X_Effective_End_Date IS NULL)))
988       AND (   (Recinfo.business_group_id = X_Business_Group_Id)
989            OR (    (Recinfo.business_group_id IS NULL)
990                AND (X_Business_Group_Id IS NULL)))
991 -- PTU : Changes
992 --      AND (   (Recinfo.person_type_id = X_Person_Type_Id)
993 --           OR (    (Recinfo.person_type_id IS NULL)
994 --               AND (X_Person_Type_Id IS NULL)))
995 -- PTU : End Changes
996       AND (   (Recinfo.last_name = X_Last_Name)
997            OR (    (Recinfo.last_name IS NULL)
998                AND (X_Last_Name IS NULL)))
999       AND (   (Recinfo.start_date = X_Start_Date)
1000            OR (    (Recinfo.start_date IS NULL)
1001                AND (X_Start_Date IS NULL)))
1002       AND (   (Recinfo.applicant_number = X_Applicant_Number)
1003            OR (    (Recinfo.applicant_number IS NULL)
1004                AND (X_Applicant_Number IS NULL)))
1005       AND (   (Recinfo.comment_id = X_Comment_Id)
1006            OR (    (Recinfo.comment_id IS NULL)
1007                AND (X_Comment_Id IS NULL)))
1008       AND (   (Recinfo.current_applicant_flag = X_Current_Applicant_Flag)
1009            OR (    (Recinfo.current_applicant_flag IS NULL)
1010                AND (X_Current_Applicant_Flag IS NULL)))
1011       AND (   (Recinfo.current_emp_or_apl_flag = X_Current_Emp_Or_Apl_Flag)
1012            OR (    (Recinfo.current_emp_or_apl_flag IS NULL)
1013                AND (X_Current_Emp_Or_Apl_Flag IS NULL)))
1014       AND (   (Recinfo.current_employee_flag = X_Current_Employee_Flag)
1015            OR (    (Recinfo.current_employee_flag IS NULL)
1016                AND (X_Current_Employee_Flag IS NULL)))
1017       AND (
1018 (Recinfo.date_employee_data_verified = X_Date_Employee_Data_Verified)
1019            OR (    (Recinfo.date_employee_data_verified IS NULL)
1020                AND (X_Date_Employee_Data_Verified IS NULL)))
1021       AND (   (Recinfo.date_of_birth = X_Date_Of_Birth)
1022            OR (    (Recinfo.date_of_birth IS NULL)
1023                AND (X_Date_Of_Birth IS NULL)))
1024       AND (   (Recinfo.email_address = X_Email_Address)
1025            OR (    (Recinfo.email_address IS NULL)
1026                AND (X_Email_Address IS NULL)))
1027       AND (   (Recinfo.employee_number = X_Employee_Number)
1028            OR (    (Recinfo.employee_number IS NULL)
1029                AND (X_Employee_Number IS NULL)))
1030       AND (   (Recinfo.expense_check_send_to_address =
1031       X_Expense_Check_To_Address)
1032            OR (    (Recinfo.expense_check_send_to_address IS NULL)
1033                AND (X_Expense_Check_To_Address IS NULL)))
1034       AND (   (Recinfo.first_name = X_First_Name)
1035            OR (    (Recinfo.first_name IS NULL)
1036                AND (X_First_Name IS NULL)))
1037       AND (   (Recinfo.full_name = X_Full_Name)
1038            OR (    (Recinfo.full_name IS NULL)
1039                AND (X_Full_Name IS NULL)))
1040       AND (   (Recinfo.known_as = X_Known_As)
1041            OR (    (Recinfo.known_as IS NULL)
1042                AND (X_Known_As IS NULL)))
1043       AND (   (Recinfo.marital_status = X_Marital_Status)
1044            OR (    (Recinfo.marital_status IS NULL)
1045                AND (X_Marital_Status IS NULL)))
1046       AND (   (Recinfo.middle_names = X_Middle_Names)
1047            OR (    (Recinfo.middle_names IS NULL)
1048                AND (X_Middle_Names IS NULL)))
1049       AND (   (Recinfo.nationality = X_Nationality)
1050            OR (    (Recinfo.nationality IS NULL)
1051                AND (X_Nationality IS NULL)))
1052       AND (   (Recinfo.national_identifier = X_National_Identifier)
1053            OR (    (Recinfo.national_identifier IS NULL)
1054                AND (X_National_Identifier IS NULL)))
1055       AND (   (Recinfo.previous_last_name = X_Previous_Last_Name)
1056            OR (    (Recinfo.previous_last_name IS NULL)
1057                AND (X_Previous_Last_Name IS NULL)))
1058       AND (   (Recinfo.registered_disabled_flag = X_Registered_Disabled_Flag)
1059            OR (    (Recinfo.registered_disabled_flag IS NULL)
1060                AND (X_Registered_Disabled_Flag IS NULL)))
1061       AND (   (Recinfo.sex = X_Sex)
1062            OR (    (Recinfo.sex IS NULL)
1063                AND (X_Sex IS NULL)))
1064       AND (   (Recinfo.title = X_Title)
1065            OR (    (Recinfo.title IS NULL)
1066                AND (X_Title IS NULL)))
1067       AND (   (Recinfo.vendor_id = X_Vendor_Id)
1068            OR (    (Recinfo.vendor_id IS NULL)
1069                AND (X_Vendor_Id IS NULL)))
1070       AND (   (phoneinfo.phone_number = X_Work_Telephone)
1071            OR (    (phoneinfo.phone_number IS NULL)
1072                AND (X_Work_Telephone IS NULL)))
1073 
1074        )
1075 THEN
1076      IF (
1077          (   (Recinfo.attribute_category = X_Attribute_Category)
1078            OR (    (Recinfo.attribute_category IS NULL)
1079                AND (X_Attribute_Category IS NULL)))
1080       AND (   (Recinfo.attribute1 = X_Attribute1)
1081            OR (    (Recinfo.attribute1 IS NULL)
1082                AND (X_Attribute1 IS NULL)))
1083       AND (   (Recinfo.attribute2 = X_Attribute2)
1084            OR (    (Recinfo.attribute2 IS NULL)
1085                AND (X_Attribute2 IS NULL)))
1086       AND (   (Recinfo.attribute3 = X_Attribute3)
1087            OR (    (Recinfo.attribute3 IS NULL)
1088                AND (X_Attribute3 IS NULL)))
1089       AND (   (Recinfo.attribute4 = X_Attribute4)
1090            OR (    (Recinfo.attribute4 IS NULL)
1091                AND (X_Attribute4 IS NULL)))
1092       AND (   (Recinfo.attribute5 = X_Attribute5)
1093            OR (    (Recinfo.attribute5 IS NULL)
1094                AND (X_Attribute5 IS NULL)))
1095       AND (   (Recinfo.attribute6 = X_Attribute6)
1096            OR (    (Recinfo.attribute6 IS NULL)
1097                AND (X_Attribute6 IS NULL)))
1098       AND (   (Recinfo.attribute7 = X_Attribute7)
1099            OR (    (Recinfo.attribute7 IS NULL)
1100                AND (X_Attribute7 IS NULL)))
1101       AND (   (Recinfo.attribute8 = X_Attribute8)
1102            OR (    (Recinfo.attribute8 IS NULL)
1103                AND (X_Attribute8 IS NULL)))
1104       AND (   (Recinfo.attribute9 = X_Attribute9)
1105            OR (    (Recinfo.attribute9 IS NULL)
1106                AND (X_Attribute9 IS NULL)))
1107       AND (   (Recinfo.attribute10 = X_Attribute10)
1108            OR (    (Recinfo.attribute10 IS NULL)
1109                AND (X_Attribute10 IS NULL)))
1110       AND (   (Recinfo.attribute11 = X_Attribute11)
1111            OR (    (Recinfo.attribute11 IS NULL)
1112                AND (X_Attribute11 IS NULL)))
1113       AND (   (Recinfo.attribute12 = X_Attribute12)
1114            OR (    (Recinfo.attribute12 IS NULL)
1115                AND (X_Attribute12 IS NULL)))
1116       AND (   (Recinfo.attribute13 = X_Attribute13)
1117            OR (    (Recinfo.attribute13 IS NULL)
1118                AND (X_Attribute13 IS NULL)))
1119       AND (   (Recinfo.attribute14 = X_Attribute14)
1120            OR (    (Recinfo.attribute14 IS NULL)
1121                AND (X_Attribute14 IS NULL)))
1122       AND (   (Recinfo.attribute15 = X_Attribute15)
1123            OR (    (Recinfo.attribute15 IS NULL)
1124                AND (X_Attribute15 IS NULL)))
1125       AND (   (Recinfo.attribute16 = X_Attribute16)
1126            OR (    (Recinfo.attribute16 IS NULL)
1127                AND (X_Attribute16 IS NULL)))
1128       AND (   (Recinfo.attribute17 = X_Attribute17)
1129            OR (    (Recinfo.attribute17 IS NULL)
1130                AND (X_Attribute17 IS NULL)))
1131       AND (   (Recinfo.attribute18 = X_Attribute18)
1132            OR (    (Recinfo.attribute18 IS NULL)
1133                AND (X_Attribute18 IS NULL)))
1134       AND (   (Recinfo.attribute19 = X_Attribute19)
1135            OR (    (Recinfo.attribute19 IS NULL)
1136                AND (X_Attribute19 IS NULL)))
1137       AND (   (Recinfo.attribute20 = X_Attribute20)
1138            OR (    (Recinfo.attribute20 IS NULL)
1139                AND (X_Attribute20 IS NULL)))
1140       AND (   (Recinfo.attribute21 = X_Attribute21)
1141            OR (    (Recinfo.attribute21 IS NULL)
1142                AND (X_Attribute21 IS NULL)))
1143       AND (   (Recinfo.attribute22 = X_Attribute22)
1144            OR (    (Recinfo.attribute22 IS NULL)
1145                AND (X_Attribute22 IS NULL)))
1146       AND (   (Recinfo.attribute23 = X_Attribute23)
1147            OR (    (Recinfo.attribute23 IS NULL)
1148                AND (X_Attribute23 IS NULL)))
1149       AND (   (Recinfo.attribute24 = X_Attribute24)
1150            OR (    (Recinfo.attribute24 IS NULL)
1151                AND (X_Attribute24 IS NULL)))
1152       AND (   (Recinfo.attribute25 = X_Attribute25)
1153            OR (    (Recinfo.attribute25 IS NULL)
1154                AND (X_Attribute25 IS NULL)))
1155       AND (   (Recinfo.attribute26 = X_Attribute26)
1156            OR (    (Recinfo.attribute26 IS NULL)
1157                AND (X_Attribute26 IS NULL)))
1158       AND (   (Recinfo.attribute27 = X_Attribute27)
1159            OR (    (Recinfo.attribute27 IS NULL)
1160                AND (X_Attribute27 IS NULL)))
1161       AND (   (Recinfo.attribute28 = X_Attribute28)
1162            OR (    (Recinfo.attribute28 IS NULL)
1163                AND (X_Attribute28 IS NULL)))
1164       AND (   (Recinfo.attribute29 = X_Attribute29)
1165            OR (    (Recinfo.attribute29 IS NULL)
1166                AND (X_Attribute29 IS NULL)))
1167       AND (   (Recinfo.attribute30 = X_Attribute30)
1168            OR (    (Recinfo.attribute30 IS NULL)
1169                AND (X_Attribute30 IS NULL)))
1170       AND (   (Recinfo.per_information_category = X_Per_Information_Category)
1171            OR (    (Recinfo.per_information_category IS NULL)
1172                AND (X_Per_Information_Category IS NULL)))
1173       AND (   (Recinfo.per_information1 = X_Per_Information1)
1174            OR (    (Recinfo.per_information1 IS NULL)
1175                AND (X_Per_Information1 IS NULL)))
1176       AND (   (Recinfo.per_information2 = X_Per_Information2)
1177            OR (    (Recinfo.per_information2 IS NULL)
1178                AND (X_Per_Information2 IS NULL)))
1179       AND (   (Recinfo.per_information3 = X_Per_Information3)
1180            OR (    (Recinfo.per_information3 IS NULL)
1181                AND (X_Per_Information3 IS NULL)))
1182       AND (   (Recinfo.per_information4 = X_Per_Information4)
1183            OR (    (Recinfo.per_information4 IS NULL)
1184                AND (X_Per_Information4 IS NULL)))
1185       AND (   (Recinfo.per_information5 = X_Per_Information5)
1186            OR (    (Recinfo.per_information5 IS NULL)
1187                AND (X_Per_Information5 IS NULL)))
1188       AND (   (Recinfo.per_information6 = X_Per_Information6)
1189            OR (    (Recinfo.per_information6 IS NULL)
1190                AND (X_Per_Information6 IS NULL)))
1191       AND (   (Recinfo.per_information7 = X_Per_Information7)
1192            OR (    (Recinfo.per_information7 IS NULL)
1193                AND (X_Per_Information7 IS NULL)))
1194       AND (   (Recinfo.per_information8 = X_Per_Information8)
1195            OR (    (Recinfo.per_information8 IS NULL)
1196                AND (X_Per_Information8 IS NULL)))
1197       AND (   (Recinfo.per_information9 = X_Per_Information9)
1198            OR (    (Recinfo.per_information9 IS NULL)
1199                AND (X_Per_Information9 IS NULL)))
1200       AND (   (Recinfo.per_information10 = X_Per_Information10)
1201            OR (    (Recinfo.per_information10 IS NULL)
1202                AND (X_Per_Information10 IS NULL)))
1203       AND (   (Recinfo.per_information11 = X_Per_Information11)
1204            OR (    (Recinfo.per_information11 IS NULL)
1205                AND (X_Per_Information11 IS NULL)))
1206       AND (   (Recinfo.per_information12 = X_Per_Information12)
1207            OR (    (Recinfo.per_information12 IS NULL)
1208                AND (X_Per_Information12 IS NULL)))
1209       AND (   (Recinfo.per_information13 = X_Per_Information13)
1210            OR (    (Recinfo.per_information13 IS NULL)
1211                AND (X_Per_Information13 IS NULL)))
1212       AND (   (Recinfo.per_information14 = X_Per_Information14)
1213            OR (    (Recinfo.per_information14 IS NULL)
1214                AND (X_Per_Information14 IS NULL)))
1215       AND (   (Recinfo.per_information15 = X_Per_Information15)
1216            OR (    (Recinfo.per_information15 IS NULL)
1217                AND (X_Per_Information15 IS NULL)))
1218       AND (   (Recinfo.per_information16 = X_Per_Information16)
1219            OR (    (Recinfo.per_information16 IS NULL)
1220                AND (X_Per_Information16 IS NULL)))
1221       AND (   (Recinfo.per_information17 = X_Per_Information17)
1222            OR (    (Recinfo.per_information17 IS NULL)
1223                AND (X_Per_Information17 IS NULL)))
1224       AND (   (Recinfo.per_information18 = X_Per_Information18)
1225            OR (    (Recinfo.per_information18 IS NULL)
1226                AND (X_Per_Information18 IS NULL)))
1227       AND (   (Recinfo.per_information19 = X_Per_Information19)
1228            OR (    (Recinfo.per_information19 IS NULL)
1229                AND (X_Per_Information19 IS NULL)))
1230       AND (   (Recinfo.per_information20 = X_Per_Information20)
1231            OR (    (Recinfo.per_information20 IS NULL)
1232                AND (X_Per_Information20 IS NULL)))
1233       AND (   (Recinfo.per_information21 = X_Per_Information21)
1234            OR (    (Recinfo.per_information21 IS NULL)
1235                AND (X_Per_Information21 IS NULL)))
1236       AND (   (Recinfo.per_information22 = X_Per_Information22)
1237            OR (    (Recinfo.per_information22 IS NULL)
1238                AND (X_Per_Information22 IS NULL)))
1239       AND (   (Recinfo.per_information23 = X_Per_Information23)
1240            OR (    (Recinfo.per_information23 IS NULL)
1241                AND (X_Per_Information23 IS NULL)))
1242       AND (   (Recinfo.per_information24 = X_Per_Information24)
1243            OR (    (Recinfo.per_information24 IS NULL)
1244                AND (X_Per_Information24 IS NULL)))
1245       AND (   (Recinfo.per_information25 = X_Per_Information25)
1246            OR (    (Recinfo.per_information25 IS NULL)
1247                AND (X_Per_Information25 IS NULL)))
1248       AND (   (Recinfo.per_information26 = X_Per_Information26)
1249            OR (    (Recinfo.per_information26 IS NULL)
1250                AND (X_Per_Information26 IS NULL)))
1251       AND (   (Recinfo.per_information27 = X_Per_Information27)
1252            OR (    (Recinfo.per_information27 IS NULL)
1253                AND (X_Per_Information27 IS NULL)))
1254       AND (   (Recinfo.per_information28 = X_Per_Information28)
1255            OR (    (Recinfo.per_information28 IS NULL)
1256                AND (X_Per_Information28 IS NULL)))
1257       AND (   (Recinfo.per_information29 = X_Per_Information29)
1258            OR (    (Recinfo.per_information29 IS NULL)
1259                AND (X_Per_Information29 IS NULL)))
1260       AND (   (Recinfo.per_information30 = X_Per_Information30)
1261            OR (    (Recinfo.per_information30 IS NULL)
1262                AND (X_Per_Information30 IS NULL)))
1263           ) THEN
1264     RETURN;
1265   ELSE
1266     FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
1267     APP_EXCEPTION.RAISE_EXCEPTION;
1268   END IF;
1269  END IF;
1270    IF g_debug THEN
1271     hr_utility.set_location('Leaving: '|| g_package || l_proc, 10);
1272   END IF;
1273 
1274 END Lock_Row;
1275 --
1276 END PER_PEOPLE_V14_PKG;