111: OPEN C;
112: FETCH C INTO X_Rowid;
113: if (C%NOTFOUND) then
114: CLOSE C;
115: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116: hr_utility.set_message_token('PROCEDURE',
117: 'ff_globals_f_pkg.insert_row');
118: hr_utility.set_message_token('STEP','1');
119: hr_utility.raise_error;
112: FETCH C INTO X_Rowid;
113: if (C%NOTFOUND) then
114: CLOSE C;
115: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116: hr_utility.set_message_token('PROCEDURE',
117: 'ff_globals_f_pkg.insert_row');
118: hr_utility.set_message_token('STEP','1');
119: hr_utility.raise_error;
120: end if;
114: CLOSE C;
115: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116: hr_utility.set_message_token('PROCEDURE',
117: 'ff_globals_f_pkg.insert_row');
118: hr_utility.set_message_token('STEP','1');
119: hr_utility.raise_error;
120: end if;
121: CLOSE C;
122: --
115: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116: hr_utility.set_message_token('PROCEDURE',
117: 'ff_globals_f_pkg.insert_row');
118: hr_utility.set_message_token('STEP','1');
119: hr_utility.raise_error;
120: end if;
121: CLOSE C;
122: --
123: Exception
162: OPEN C;
163: FETCH C INTO Recinfo;
164: if (C%NOTFOUND) then
165: CLOSE C;
166: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE',
168: 'ff_globals_f_pkg.lock_row');
169: hr_utility.set_message_token('STEP','1');
170: hr_utility.raise_error;
163: FETCH C INTO Recinfo;
164: if (C%NOTFOUND) then
165: CLOSE C;
166: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE',
168: 'ff_globals_f_pkg.lock_row');
169: hr_utility.set_message_token('STEP','1');
170: hr_utility.raise_error;
171: end if;
165: CLOSE C;
166: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE',
168: 'ff_globals_f_pkg.lock_row');
169: hr_utility.set_message_token('STEP','1');
170: hr_utility.raise_error;
171: end if;
172: CLOSE C;
173: --
166: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE',
168: 'ff_globals_f_pkg.lock_row');
169: hr_utility.set_message_token('STEP','1');
170: hr_utility.raise_error;
171: end if;
172: CLOSE C;
173: --
174: -- Remove trailing spaces
278: g_dml_status := FALSE;
279: --------------------------------------------------------------------------------
280: ---
281: if (SQL%NOTFOUND) then
282: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
283: hr_utility.set_message_token('PROCEDURE',
284: 'ff_globals_f_pkg.update_row');
285: hr_utility.set_message_token('STEP','1');
286: hr_utility.raise_error;
279: --------------------------------------------------------------------------------
280: ---
281: if (SQL%NOTFOUND) then
282: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
283: hr_utility.set_message_token('PROCEDURE',
284: 'ff_globals_f_pkg.update_row');
285: hr_utility.set_message_token('STEP','1');
286: hr_utility.raise_error;
287: end if;
281: if (SQL%NOTFOUND) then
282: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
283: hr_utility.set_message_token('PROCEDURE',
284: 'ff_globals_f_pkg.update_row');
285: hr_utility.set_message_token('STEP','1');
286: hr_utility.raise_error;
287: end if;
288: --
289: Exception
282: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
283: hr_utility.set_message_token('PROCEDURE',
284: 'ff_globals_f_pkg.update_row');
285: hr_utility.set_message_token('STEP','1');
286: hr_utility.raise_error;
287: end if;
288: --
289: Exception
290: When Others then
333: --
334: g_dml_status := FALSE;
335: --
336: if (SQL%NOTFOUND) then
337: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
338: hr_utility.set_message_token('PROCEDURE',
339: 'ff_globals_f_pkg.delete_row');
340: hr_utility.set_message_token('STEP','1');
341: hr_utility.raise_error;
334: g_dml_status := FALSE;
335: --
336: if (SQL%NOTFOUND) then
337: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
338: hr_utility.set_message_token('PROCEDURE',
339: 'ff_globals_f_pkg.delete_row');
340: hr_utility.set_message_token('STEP','1');
341: hr_utility.raise_error;
342: end if;
336: if (SQL%NOTFOUND) then
337: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
338: hr_utility.set_message_token('PROCEDURE',
339: 'ff_globals_f_pkg.delete_row');
340: hr_utility.set_message_token('STEP','1');
341: hr_utility.raise_error;
342: end if;
343: --
344: Exception
337: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
338: hr_utility.set_message_token('PROCEDURE',
339: 'ff_globals_f_pkg.delete_row');
340: hr_utility.set_message_token('STEP','1');
341: hr_utility.raise_error;
342: end if;
343: --
344: Exception
345: When Others then
598: is
599: Begin
600: --Assumption Global has been validated
601: --Idea is to enter a global row alonwith the WHO columns
602: hr_utility.trace('Inserting global '||P_BASE_GLOBAL_NAME||'Date '||P_EFFECTIVE_START_DATE);
603: Insert into FF_GLOBALS_F
604: (GLOBAL_ID
605: ,EFFECTIVE_START_DATE
606: ,EFFECTIVE_END_DATE
637: ,P_GLOBAL_DESCRIPTION_TL Varchar2
638: ) is
639:
640: Begin
641: hr_utility.trace('Inserting tl global '||P_GLOBAL_NAME_TL);
642: ff_fgt_ins.ins_tl( P_LANGUAGE_CODE => userenv('LANG')
643: ,P_GLOBAL_ID => P_GLOBAL_ID
644: ,P_GLOBAL_NAME => P_GLOBAL_NAME_TL
645: ,P_GLOBAL_DESCRIPTION => P_GLOBAL_DESCRIPTION_TL
702: where global_id=p_global_id;
703: End Delete_glb_and_child_entities;
704:
705: BEGIN
706: hr_utility.set_location('Entering:'||'FF_GLOBALS_F_PKG.Load_row',10);
707:
708: if not ( (nvl(g_glb_record.global_name,'~nvl~') = P_BASE_GLOBAL_NAME)
709: and (nvl(g_glb_record.legislation_code,'~nvl~')=P_LEGISLATION_CODE)
710: )then
713: --Global from ldt encountered first time
714: --check if it exists for this legislation in ff_globals_f
715:
716:
717: hr_utility.trace(P_BASE_GLOBAL_NAME||'*20');
718:
719:
720: open csr_glb_exists_for_current_leg(r_global_name=>P_BASE_GLOBAL_NAME,
721: r_legislation_code=>P_LEGISLATION_CODE);
737: --delete all globals and user entities
738: --that match the global_name for this localization
739: --and recreate the globals,user entities etc..
740:
741: hr_utility.trace(P_BASE_GLOBAL_NAME||'*30');
742: hr_general.g_data_migrator_mode:='Y';
743:
744: --deleting child entities
745: --manually.Hence g_data_migrator_mode is set
783: g_glb_record.global_upload_flag :=true;
784: /*
785: elsif ( p_max_update_date = l_glb_exists_for_current_leg.lud and g_glb_record.global_upload_flag)then
786:
787: hr_utility.trace(P_BASE_GLOBAL_NAME||'*40');
788: global_ins( P_GLOBAL_ID => l_glb_exists_for_current_leg.global_id
789: ,P_EFFECTIVE_START_DATE => P_EFFECTIVE_START_DATE
790: ,P_EFFECTIVE_END_DATE => P_EFFECTIVE_END_DATE
791: ,P_LEGISLATION_CODE => P_LEGISLATION_CODE
804:
805: --p_max_update_date
807: --rest of rows that match global_name and legislation_code
808: hr_utility.trace(P_BASE_GLOBAL_NAME||'*50');
809: g_glb_record:=null;
810: g_glb_record.global_name :=P_BASE_GLOBAL_NAME;
811: g_glb_record.legislation_code :=P_LEGISLATION_CODE;
812: g_glb_record.global_upload_flag :=false;
825: --Ensure that there isnt a global with
826: --similar name for a BG that belongs to this leg
827: --ffdict doesnt perform this check
828: Begin
829: hr_utility.trace(P_BASE_GLOBAL_NAME||'*60');
830: open csr_glb_exists_for_bg(r_global_name =>P_BASE_GLOBAL_NAME
831: ,r_legislation_code =>P_LEGISLATION_CODE ) ;
832:
833: fetch csr_glb_exists_for_bg into l_null;
832:
833: fetch csr_glb_exists_for_bg into l_null;
834: if csr_glb_exists_for_bg%FOUND then
835: close csr_glb_exists_for_bg;
836: hr_utility.set_message(801,'FF52_NAME_ALREADY_USED');
837: hr_utility.set_message_token('1',P_BASE_GLOBAL_NAME);
838: hr_utility.set_message_token('2','Global Variable');
839: hr_utility.raise_error;
840: end if;
833: fetch csr_glb_exists_for_bg into l_null;
834: if csr_glb_exists_for_bg%FOUND then
835: close csr_glb_exists_for_bg;
836: hr_utility.set_message(801,'FF52_NAME_ALREADY_USED');
837: hr_utility.set_message_token('1',P_BASE_GLOBAL_NAME);
838: hr_utility.set_message_token('2','Global Variable');
839: hr_utility.raise_error;
840: end if;
841: close csr_glb_exists_for_bg;
834: if csr_glb_exists_for_bg%FOUND then
835: close csr_glb_exists_for_bg;
836: hr_utility.set_message(801,'FF52_NAME_ALREADY_USED');
837: hr_utility.set_message_token('1',P_BASE_GLOBAL_NAME);
838: hr_utility.set_message_token('2','Global Variable');
839: hr_utility.raise_error;
840: end if;
841: close csr_glb_exists_for_bg;
842:
835: close csr_glb_exists_for_bg;
836: hr_utility.set_message(801,'FF52_NAME_ALREADY_USED');
837: hr_utility.set_message_token('1',P_BASE_GLOBAL_NAME);
838: hr_utility.set_message_token('2','Global Variable');
839: hr_utility.raise_error;
840: end if;
841: close csr_glb_exists_for_bg;
842:
843: l_dummy_global_name:=P_BASE_GLOBAL_NAME;
854: raise;
855: End;
856:
857: -- to disable triggers from firing dml staments
858: hr_utility.trace(P_BASE_GLOBAL_NAME||'*70');
859: hr_general.g_data_migrator_mode:='Y';
860:
861: select ff_globals_s.nextval
862: into l_new_global_id
905: else --Global has been encountered in ldt before,hence name,id,etc known
906: --hence,only need to do a simple insert into table
907:
908: if g_glb_record.global_upload_flag then
909: hr_utility.trace(P_BASE_GLOBAL_NAME||'*80');
910: hr_general.g_data_migrator_mode:='Y';
911: global_ins( P_GLOBAL_ID => g_glb_record.global_id
912: ,P_EFFECTIVE_START_DATE => P_EFFECTIVE_START_DATE
913: ,P_EFFECTIVE_END_DATE => P_EFFECTIVE_END_DATE
925: hr_general.g_data_migrator_mode:='N';
926: end if;
927: end if;
928:
929: hr_utility.set_location('Leaving:'||'FF_GLOBALS_F_PKG.Load_row',100);
930: End Load_row;
931:
932:
933: