167: l_currency_code varchar2(40);
168: --
169: begin
170: --
171: hr_utility.set_location('Entering'|| l_proc_name, 10);
172: retcode := 0;
173: --
174: hr_utility.set_location('Entering'|| l_proc_name, 11);
175: --
170: --
171: hr_utility.set_location('Entering'|| l_proc_name, 10);
172: retcode := 0;
173: --
174: hr_utility.set_location('Entering'|| l_proc_name, 11);
175: --
176: open check_batch_name(p_batch_name);
177: fetch check_batch_name into l_dummy;
178: if check_batch_name%found then
184: FND_FILE.PUT_LINE(FND_FILE.OUTPUT, errbuf);
185: return;
186: end if;
187: --
188: hr_utility.set_location('Entering'|| l_proc_name, 13);
189: --
190: l_effective_date := fnd_date.canonical_to_date(p_effective_date);
191: l_start_date := fnd_date.canonical_to_date(p_start_date);
192: l_end_date := fnd_date.canonical_to_date(p_end_date);
197: fetch c_org_version into l_org_structure_version_id;
198: close c_org_version;
199: --
200: --
201: hr_utility.set_location('Entering'|| l_proc_name, 14);
202: --
203: --
204: -- Fetch the batch Id into the l_batch_id
205: --
206: open c_batch;
207: fetch c_batch into l_batch_id;
208: close c_batch;
209: --
210: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
211: --
212: -- Create the start record into the Process Log
213: --
214: pqh_process_batch_log.start_log
222: p_information6 =>p_end_date
223: );
224: --
225: --
226: hr_utility.set_location('organization Structure Version : '||l_org_structure_version_id ||' '|| l_proc_name, 100);
227: hr_utility.set_location('start organization : '||p_start_org_id ||' '|| l_proc_name, 100);
228:
229: --
230: -- Fetch the Organizations from the Organization Hierarchy
223: );
224: --
225: --
226: hr_utility.set_location('organization Structure Version : '||l_org_structure_version_id ||' '|| l_proc_name, 100);
227: hr_utility.set_location('start organization : '||p_start_org_id ||' '|| l_proc_name, 100);
228:
229: --
230: -- Fetch the Organizations from the Organization Hierarchy
231: --
232: for l_organization in c_org(l_org_structure_version_id, p_start_org_id)
233: -- Analyse the Positions of each Organization
234: loop
235:
236: hr_utility.set_location('organization : '||l_organization.organization_id ||' '|| l_proc_name, 101);
237: --
238: -- Fetch table route Id for the Organization table(ORU)
239: --
240: open c_table_route('ORU');
245: end if;
246: --
247: close c_table_route;
248:
249: hr_utility.set_location('l_table_route_id : '||l_table_route_id ||' '|| l_proc_name, 102);
250: --
251: -- Check for the type of the cofigurable message(PQH_UNDER_BGT_POSITIONS)
252: --
253: pqh_utility.set_message(8302,'PQH_UNDER_BGT_POSITIONS', l_organization.organization_id);
251: -- Check for the type of the cofigurable message(PQH_UNDER_BGT_POSITIONS)
252: --
253: pqh_utility.set_message(8302,'PQH_UNDER_BGT_POSITIONS', l_organization.organization_id);
254: --
255: hr_utility.set_location('after pqh_utility.set_message : '|| l_proc_name, 103);
256: --
257: l_message_type_cd := pqh_utility.get_message_type_cd;
258: pqh_utility.set_message_token('UOM',
259: hr_general.decode_lookup('BUDGET_MEASUREMENT_TYPE','MONEY'));
261: hr_general.decode_lookup('PQH_BUDGET_ENTITY','POSITION'));
262:
263: l_message := pqh_utility.get_message;
264: --
265: hr_utility.set_location('after pqh_utility.get_message : '||l_message_type_cd|| l_proc_name, 104);
266: --
267: if l_message_type_cd in ('E','W') then
268: if l_message_type_cd = 'E' then
269: l_message_type := 'ERROR';
269: l_message_type := 'ERROR';
270: else
271: l_message_type := 'WARNING';
272: end if;
273: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
274: l_message_type_cd||l_proc_name, 105);
275: hr_utility.set_location('before pqh.set_context_level organization_id: '||
276: l_organization.organization_id, 105);
277: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
271: l_message_type := 'WARNING';
272: end if;
273: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
274: l_message_type_cd||l_proc_name, 105);
275: hr_utility.set_location('before pqh.set_context_level organization_id: '||
276: l_organization.organization_id, 105);
277: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
278: l_table_route_id, 105);
279: hr_utility.set_location('l_orglevel1: '||
273: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
274: l_message_type_cd||l_proc_name, 105);
275: hr_utility.set_location('before pqh.set_context_level organization_id: '||
276: l_organization.organization_id, 105);
277: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
278: l_table_route_id, 105);
279: hr_utility.set_location('l_orglevel1: '||
280: l_organization.level1, 105);
281: hr_utility.set_location('org name: '||
275: hr_utility.set_location('before pqh.set_context_level organization_id: '||
276: l_organization.organization_id, 105);
277: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
278: l_table_route_id, 105);
279: hr_utility.set_location('l_orglevel1: '||
280: l_organization.level1, 105);
281: hr_utility.set_location('org name: '||
282: hr_general.decode_organization(l_organization.organization_id), 105);
283: --
277: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
278: l_table_route_id, 105);
279: hr_utility.set_location('l_orglevel1: '||
280: l_organization.level1, 105);
281: hr_utility.set_location('org name: '||
282: hr_general.decode_organization(l_organization.organization_id), 105);
283: --
284: -- Set the Process Log Context level for the Organization
285: --
290: p_level =>l_organization.level1 + 1,
291: p_log_context =>hr_general.decode_organization(l_organization.organization_id)
292: );
293: --
294: hr_utility.set_location('Organization : '||l_organization.organization_id
295: || ' ' ||l_proc_name, 110);
296:
297: --
298: -- Fetch Positions for the organization
300: for l_position in c_positions(l_organization.organization_id, l_effective_date)
301: -- Analyse the Position Budgeted Salary
302: loop
303:
304: hr_utility.set_location('l_position_id : '||l_position.position_id
305: || ' - ' || substr(l_position.name,1,40) , 110);
306: --
307: -- Get the Budgeted Salary of the Position for the given start date and end date
308: --
346: );
347: --
348: -- Print the details of the Position
349: --
350: hr_utility.set_location('Position : '||l_position.position_id
351: ||' '||l_proc_name, 130);
352: hr_utility.set_location('Budgeted Salary : '||nvl(l_budgeted_sal,0)
353: ||' '||l_proc_name, 140);
354: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_sal,0)
348: -- Print the details of the Position
349: --
350: hr_utility.set_location('Position : '||l_position.position_id
351: ||' '||l_proc_name, 130);
352: hr_utility.set_location('Budgeted Salary : '||nvl(l_budgeted_sal,0)
353: ||' '||l_proc_name, 140);
354: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_sal,0)
355: ||' '||l_proc_name, 140);
356: hr_utility.set_location('Actual Salary : '||nvl(l_actual_sal,0)
350: hr_utility.set_location('Position : '||l_position.position_id
351: ||' '||l_proc_name, 130);
352: hr_utility.set_location('Budgeted Salary : '||nvl(l_budgeted_sal,0)
353: ||' '||l_proc_name, 140);
354: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_sal,0)
355: ||' '||l_proc_name, 140);
356: hr_utility.set_location('Actual Salary : '||nvl(l_actual_sal,0)
357: ||' '||l_proc_name, 150);
358: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_sal,0)
352: hr_utility.set_location('Budgeted Salary : '||nvl(l_budgeted_sal,0)
353: ||' '||l_proc_name, 140);
354: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_sal,0)
355: ||' '||l_proc_name, 140);
356: hr_utility.set_location('Actual Salary : '||nvl(l_actual_sal,0)
357: ||' '||l_proc_name, 150);
358: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_sal,0)
359: ||' '||l_proc_name, 160);
360: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_sal,0)
354: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_sal,0)
355: ||' '||l_proc_name, 140);
356: hr_utility.set_location('Actual Salary : '||nvl(l_actual_sal,0)
357: ||' '||l_proc_name, 150);
358: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_sal,0)
359: ||' '||l_proc_name, 160);
360: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_sal,0)
361: ||' '||l_proc_name, 160);
362: --
356: hr_utility.set_location('Actual Salary : '||nvl(l_actual_sal,0)
357: ||' '||l_proc_name, 150);
358: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_sal,0)
359: ||' '||l_proc_name, 160);
360: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_sal,0)
361: ||' '||l_proc_name, 160);
362: --
363: -- Check, whether the Position is Under Budgeted
364: --
420: open c_wf_seq_no;
421: fetch c_wf_seq_no into l_workflow_seq_no;
422: close c_wf_seq_no;
423: --
424: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
425: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
426: --
427: if l_user_name is not null then
428: --
421: fetch c_wf_seq_no into l_workflow_seq_no;
422: close c_wf_seq_no;
423: --
424: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
425: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
426: --
427: if l_user_name is not null then
428: --
429: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
425: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
426: --
427: if l_user_name is not null then
428: --
429: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
430: --
431: l_parameter1_value :=
432: hr_general.decode_position_latest_name(l_position.position_id);
433: l_parameter2_value := p_batch_name;
462: , p_apply_error_num => l_apply_error_num
463: );
464: end if;
465: --
466: hr_utility.set_location(l_position.position_id || ' is under budgeted'
467: ||' '||l_proc_name, 170);
468: --
469: end if;
470: --
476: --
477: -- End the Process Log
478: --
479: pqh_process_batch_log.end_log;
480: hr_utility.set_location('End Process'
481: ||' '||l_proc_name, 180);
482: commit;
483: exception
484: when others then
482: commit;
483: exception
484: when others then
485: retcode := -1;
486: --hr_utility.set_location('Error '||sqlerrm,190);
487: --
488: end;
489: --
490: /*
621: l_document varchar2(4000);
622: l_proc varchar2(61) := 'fyi_notification' ;
623: l_position_name varchar2(1000);
624: BEGIN
625: hr_utility.set_location('inside fyi notification'||l_proc,10);
626: fnd_message.set_name('PQH','PQH_FYI_UNDER_BDGT_POS');
627: fnd_message.set_token('POSITION',l_position_name);
628: l_document := fnd_message.get;
629: return l_document;
725: --
726: l_currency_code varchar2(40);
727: --
728: begin
729: hr_utility.set_location('organization : '||p_organization_id ||' '|| l_proc_name, 101);
730: --
731: --
732: open c_org_name(p_organization_id);
733: fetch c_org_name into l_org_name;
743: end if;
744: --
745: close c_table_route;
746:
747: hr_utility.set_location('l_table_route_id : '||l_table_route_id ||' '|| l_proc_name, 102);
748: --
749: -- Check for the type of the cofigurable message(PQH_UNDER_BGT_POSITIONS)
750: --
751: pqh_utility.set_message(8302,'PQH_UNDER_BGT_POSITIONS', p_organization_id);
754: hr_general.decode_lookup('BUDGET_MEASUREMENT_TYPE',p_unit_of_measure));
755: pqh_utility.set_message_token('ENTITY',
756: hr_general.decode_lookup('PQH_BUDGET_ENTITY','POSITION'));
757:
758: hr_utility.set_location('after pqh_utility.set_message : '|| l_proc_name, 103);
759: --
760: l_message_type_cd := pqh_utility.get_message_type_cd;
761: l_message := pqh_utility.get_message;
762: --
759: --
760: l_message_type_cd := pqh_utility.get_message_type_cd;
761: l_message := pqh_utility.get_message;
762: --
763: hr_utility.set_location('after pqh_utility.get_message : '||l_message_type_cd|| l_proc_name, 104);
764: --
765: if l_message_type_cd in ('E','W') then
766: if l_message_type_cd = 'E' then
767: l_message_type := 'ERROR';
767: l_message_type := 'ERROR';
768: else
769: l_message_type := 'WARNING';
770: end if;
771: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
772: l_message_type_cd||l_proc_name, 105);
773: hr_utility.set_location('before pqh.set_context_level organization_id: '||
774: p_organization_id, 105);
775: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
769: l_message_type := 'WARNING';
770: end if;
771: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
772: l_message_type_cd||l_proc_name, 105);
773: hr_utility.set_location('before pqh.set_context_level organization_id: '||
774: p_organization_id, 105);
775: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
776: l_table_route_id, 105);
777: hr_utility.set_location('l_orglevel1: '||
771: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
772: l_message_type_cd||l_proc_name, 105);
773: hr_utility.set_location('before pqh.set_context_level organization_id: '||
774: p_organization_id, 105);
775: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
776: l_table_route_id, 105);
777: hr_utility.set_location('l_orglevel1: '||
778: p_level1, 105);
779: hr_utility.set_location('org name: '||
773: hr_utility.set_location('before pqh.set_context_level organization_id: '||
774: p_organization_id, 105);
775: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
776: l_table_route_id, 105);
777: hr_utility.set_location('l_orglevel1: '||
778: p_level1, 105);
779: hr_utility.set_location('org name: '||
780: hr_general.decode_organization(p_organization_id), 105);
781: --
775: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
776: l_table_route_id, 105);
777: hr_utility.set_location('l_orglevel1: '||
778: p_level1, 105);
779: hr_utility.set_location('org name: '||
780: hr_general.decode_organization(p_organization_id), 105);
781: --
782: -- Set the Process Log Context level for the Organization
783: --
788: p_level =>p_level1 + 1,
789: p_log_context =>hr_general.decode_organization(p_organization_id)
790: );
791: --
792: hr_utility.set_location('Organization : '||p_organization_id
793: || ' ' ||l_proc_name, 110);
794: --
795: fnd_file.put_line(FND_FILE.LOG,'Primary Entity => ''POSITION''' || ' Unit of Measure => '||p_unit_of_measure);
796: fnd_file.put_line(FND_FILE.LOG,' ');
805: for l_position in c_positions(p_organization_id, p_effective_date)
806: -- Analyse the Position Budgeted Salary
807: loop
808:
809: hr_utility.set_location('l_position_id : '||l_position.position_id
810: || ' - ' || substr(l_position.name,1,40) , 110);
811:
812: if p_unit_of_measure = 'MONEY' then
813: --
820: ,p_end_date => p_end_date
821: ,p_effective_date => p_effective_date
822: ,p_business_group_id => p_business_group_id
823: );
824: hr_utility.set_location('After get_pc_budgeted_salary', 120);
825: --
826: -- Get the Reallocation amount(Money) of the Position between the given start date and end date
827: --
828: l_reallocation_val := pqh_reallocation_pkg.get_reallocation(
833: ,p_budget_entity => 'POSITION'
834: ,p_system_budget_unit => 'MONEY'
835: ,p_business_group_id => p_business_group_id
836: );
837: hr_utility.set_location('After get_reallocation', 130);
838:
839: pqh_bdgt_actual_cmmtmnt_pkg.get_actual_and_cmmtmnt(
840: p_position_id => l_position.position_id
841: , p_start_date => p_start_date
859: );
860: --
861: -- Print the details of the Position
862: --
863: hr_utility.set_location('Position : '||l_position.position_id
864: ||' '||l_proc_name, 130);
865: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
866: ||' '||l_proc_name, 140);
867: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
861: -- Print the details of the Position
862: --
863: hr_utility.set_location('Position : '||l_position.position_id
864: ||' '||l_proc_name, 130);
865: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
866: ||' '||l_proc_name, 140);
867: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
868: ||' '||l_proc_name, 140);
869: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
863: hr_utility.set_location('Position : '||l_position.position_id
864: ||' '||l_proc_name, 130);
865: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
866: ||' '||l_proc_name, 140);
867: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
868: ||' '||l_proc_name, 140);
869: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
870: ||' '||l_proc_name, 150);
871: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
865: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
866: ||' '||l_proc_name, 140);
867: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
868: ||' '||l_proc_name, 140);
869: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
870: ||' '||l_proc_name, 150);
871: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
872: ||' '||l_proc_name, 160);
873: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_val,0)
867: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
868: ||' '||l_proc_name, 140);
869: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
870: ||' '||l_proc_name, 150);
871: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
872: ||' '||l_proc_name, 160);
873: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_val,0)
874: ||' '||l_proc_name, 160);
875: if l_budgeted_val is not null then
869: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
870: ||' '||l_proc_name, 150);
871: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
872: ||' '||l_proc_name, 160);
873: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_val,0)
874: ||' '||l_proc_name, 160);
875: if l_budgeted_val is not null then
876: --
877: -- Check, whether the Position is Under Budgeted
942: open c_wf_seq_no;
943: fetch c_wf_seq_no into l_workflow_seq_no;
944: close c_wf_seq_no;
945: --
946: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
947: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
948: --
949: if l_user_name is not null then
950: --
943: fetch c_wf_seq_no into l_workflow_seq_no;
944: close c_wf_seq_no;
945: --
946: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
947: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
948: --
949: if l_user_name is not null then
950: --
951: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
947: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
948: --
949: if l_user_name is not null then
950: --
951: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
952: --
953: l_parameter1_value :=
954: hr_general.decode_position_latest_name(l_position.position_id);
955: l_parameter2_value := p_batch_name;
984: , p_apply_error_num => l_apply_error_num
985: );
986: end if;
987: --
988: hr_utility.set_location(l_position.position_id || ' is under budgeted'
989: ||' '||l_proc_name, 170);
990: --
991: end if;--for under budget
992: end if; -- 14/05/02
1034:
1035: --
1036: -- Print the details of the Position
1037: --
1038: hr_utility.set_location('Position : '||l_position.position_id
1039: ||' '||l_proc_name, 130);
1040: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1041: ||' '||l_proc_name, 140);
1042: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1036: -- Print the details of the Position
1037: --
1038: hr_utility.set_location('Position : '||l_position.position_id
1039: ||' '||l_proc_name, 130);
1040: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1041: ||' '||l_proc_name, 140);
1042: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1043: ||' '||l_proc_name, 140);
1044: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
1038: hr_utility.set_location('Position : '||l_position.position_id
1039: ||' '||l_proc_name, 130);
1040: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1041: ||' '||l_proc_name, 140);
1042: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1043: ||' '||l_proc_name, 140);
1044: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
1045: ||' '||l_proc_name, 150);
1046:
1040: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1041: ||' '||l_proc_name, 140);
1042: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1043: ||' '||l_proc_name, 140);
1044: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
1045: ||' '||l_proc_name, 150);
1046:
1047: if l_budgeted_val is not null then
1048: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0)) < nvl(l_actual_val,0) then
1109: open c_wf_seq_no;
1110: fetch c_wf_seq_no into l_workflow_seq_no;
1111: close c_wf_seq_no;
1112: --
1113: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
1114: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
1115: --
1116: if l_user_name is not null then
1117: --
1110: fetch c_wf_seq_no into l_workflow_seq_no;
1111: close c_wf_seq_no;
1112: --
1113: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
1114: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
1115: --
1116: if l_user_name is not null then
1117: --
1118: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
1114: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
1115: --
1116: if l_user_name is not null then
1117: --
1118: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
1119: --
1120: l_parameter1_value :=
1121: hr_general.decode_position_latest_name(l_position.position_id);
1122: l_parameter2_value := p_batch_name;
1149: ,p_apply_error_num => l_apply_error_num
1150: );
1151: end if;
1152: --
1153: hr_utility.set_location(l_position.position_id || ' is under budgeted'
1154: ||' '||l_proc_name, 170);
1155: --
1156:
1157: end if;
1201:
1202: --
1203: -- Print the details of the Position
1204: --
1205: hr_utility.set_location('Position : '||l_position.position_id
1206: ||' '||l_proc_name, 130);
1207: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
1208: ||' '||l_proc_name, 130);
1209: hr_utility.set_location('Budgeted : '||l_budgeted_val
1203: -- Print the details of the Position
1204: --
1205: hr_utility.set_location('Position : '||l_position.position_id
1206: ||' '||l_proc_name, 130);
1207: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
1208: ||' '||l_proc_name, 130);
1209: hr_utility.set_location('Budgeted : '||l_budgeted_val
1210: ||' '||l_proc_name, 140);
1211: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
1205: hr_utility.set_location('Position : '||l_position.position_id
1206: ||' '||l_proc_name, 130);
1207: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
1208: ||' '||l_proc_name, 130);
1209: hr_utility.set_location('Budgeted : '||l_budgeted_val
1210: ||' '||l_proc_name, 140);
1211: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
1212: ||' '||l_proc_name, 140);
1213: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
1207: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
1208: ||' '||l_proc_name, 130);
1209: hr_utility.set_location('Budgeted : '||l_budgeted_val
1210: ||' '||l_proc_name, 140);
1211: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
1212: ||' '||l_proc_name, 140);
1213: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
1214: ||' '||l_proc_name, 150);
1215:
1209: hr_utility.set_location('Budgeted : '||l_budgeted_val
1210: ||' '||l_proc_name, 140);
1211: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
1212: ||' '||l_proc_name, 140);
1213: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
1214: ||' '||l_proc_name, 150);
1215:
1216: if l_budgeted_val is not null then
1217: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0)) < nvl(l_actual_val,0) then
1279: open c_wf_seq_no;
1280: fetch c_wf_seq_no into l_workflow_seq_no;
1281: close c_wf_seq_no;
1282: --
1283: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
1284: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
1285: --
1286: if l_user_name is not null then
1287: --
1280: fetch c_wf_seq_no into l_workflow_seq_no;
1281: close c_wf_seq_no;
1282: --
1283: hr_utility.set_location('l_position.position_id : '|| l_position.position_id, 1111);
1284: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
1285: --
1286: if l_user_name is not null then
1287: --
1288: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
1284: hr_utility.set_location('l_user_name : '|| l_user_name, 1111);
1285: --
1286: if l_user_name is not null then
1287: --
1288: hr_utility.set_location('l_user_name : '|| l_user_name, 1112);
1289: --
1290: l_parameter1_value :=
1291: hr_general.decode_position_latest_name(l_position.position_id);
1292: l_parameter2_value := p_batch_name;
1319: , p_apply_error_num => l_apply_error_num
1320: );
1321: end if;
1322: --
1323: hr_utility.set_location(l_position.position_id || ' is under budgeted'
1324: ||' '||l_proc_name, 170);
1325: --
1326: end if;
1327: end if; --14/05/02
1450: l_batch_id number;
1451: --
1452: begin
1453: --
1454: hr_utility.set_location('Entering'|| l_proc_name, 10);
1455: retcode := 0;
1456: --
1457: hr_utility.set_location('Entering'|| l_proc_name, 11);
1458: --
1453: --
1454: hr_utility.set_location('Entering'|| l_proc_name, 10);
1455: retcode := 0;
1456: --
1457: hr_utility.set_location('Entering'|| l_proc_name, 11);
1458: --
1459: open check_batch_name(p_batch_name);
1460: fetch check_batch_name into l_dummy;
1461: if check_batch_name%found then
1467: FND_FILE.PUT_LINE(FND_FILE.OUTPUT, errbuf);
1468: return;
1469: end if;
1470: --
1471: hr_utility.set_location('Entering'|| l_proc_name, 13);
1472: --
1473: l_effective_date := fnd_date.canonical_to_date(p_effective_date);
1474: l_start_date := fnd_date.canonical_to_date(p_start_date);
1475: l_end_date := fnd_date.canonical_to_date(p_end_date);
1480: fetch c_org_version into l_org_structure_version_id;
1481: close c_org_version;
1482: --
1483: --
1484: hr_utility.set_location('Entering'|| l_proc_name, 14);
1485: --
1486: --
1487: -- Fetch the batch Id into the l_batch_id
1488: --
1489: open c_batch;
1490: fetch c_batch into l_batch_id;
1491: close c_batch;
1492: --
1493: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
1494: --
1495: -- Create the start record into the Process Log
1496: --
1497: pqh_process_batch_log.start_log
1508: p_information9 =>p_unit_of_measure
1509: );
1510: --
1511: --
1512: hr_utility.set_location('Organization Structure Version : '||l_org_structure_version_id ||' '|| l_proc_name, 100);
1513: hr_utility.set_location('start organization : '||p_start_org_id ||' '|| l_proc_name, 100);
1514:
1515: if (l_org_structure_version_id is not null ) then
1516: l_start_org_id := p_start_org_id;
1509: );
1510: --
1511: --
1512: hr_utility.set_location('Organization Structure Version : '||l_org_structure_version_id ||' '|| l_proc_name, 100);
1513: hr_utility.set_location('start organization : '||p_start_org_id ||' '|| l_proc_name, 100);
1514:
1515: if (l_org_structure_version_id is not null ) then
1516: l_start_org_id := p_start_org_id;
1517: -- Bug Fix :2481824 ,get Top Org in Hierarchy as p_start_org_id
1527: for l_organization in c_org(l_org_structure_version_id, l_start_org_id,l_effective_date)
1528: -- Analyse the Positions of each Organization
1529: loop
1530: --
1531: hr_utility.set_location('organization : '||l_organization.organization_id ||' '|| l_proc_name, 101);
1532: --
1533: org_pos_temp(p_organization_id => l_organization.organization_id
1534: ,p_level1 => l_organization.level1
1535: ,p_batch_name => p_batch_name
1547: for l_organization in c_all_org(p_business_group_id, l_effective_date)
1548: -- Analyse the Positions of each Organization
1549: loop
1550: --
1551: hr_utility.set_location('organization : '||l_organization.organization_id ||' '|| l_proc_name, 101);
1552: --
1553: org_pos_temp(p_organization_id => l_organization.organization_id
1554: ,p_level1 => l_organization.level1
1555: ,p_batch_name => p_batch_name
1565: --
1566: -- End the Process Log
1567: --
1568: pqh_process_batch_log.end_log;
1569: hr_utility.set_location('End Process'
1570: ||' '||l_proc_name, 180);
1571: commit;
1572: exception
1573: when others then
1681: l_currency_code varchar2(40);
1682: --
1683: begin
1684: --
1685: hr_utility.set_location('Entering'|| l_proc_name, 10);
1686: retcode := 0;
1687: --
1688: hr_utility.set_location('Entering'|| l_proc_name, 11);
1689: --
1684: --
1685: hr_utility.set_location('Entering'|| l_proc_name, 10);
1686: retcode := 0;
1687: --
1688: hr_utility.set_location('Entering'|| l_proc_name, 11);
1689: --
1690: open check_batch_name(p_batch_name);
1691: fetch check_batch_name into l_dummy;
1692: if check_batch_name%found then
1698: FND_FILE.PUT_LINE(FND_FILE.OUTPUT, errbuf);
1699: return;
1700: end if;
1701: --
1702: hr_utility.set_location('Entering'|| l_proc_name, 13);
1703: --
1704: l_effective_date := fnd_date.canonical_to_date(p_effective_date);
1705: l_start_date := fnd_date.canonical_to_date(p_start_date);
1706: l_end_date := fnd_date.canonical_to_date(p_end_date);
1710: open c_batch;
1711: fetch c_batch into l_batch_id;
1712: close c_batch;
1713: --
1714: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
1715:
1716: hr_utility.set_location('l_effective_date: '||to_char(l_effective_date), 155);
1717: hr_utility.set_location('l_start_date: '||to_char(l_start_date), 156);
1718: hr_utility.set_location('l_end_date: '||to_char(l_end_date), 157);
1712: close c_batch;
1713: --
1714: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
1715:
1716: hr_utility.set_location('l_effective_date: '||to_char(l_effective_date), 155);
1717: hr_utility.set_location('l_start_date: '||to_char(l_start_date), 156);
1718: hr_utility.set_location('l_end_date: '||to_char(l_end_date), 157);
1719: --
1720: -- Create the start record into the Process Log
1713: --
1714: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
1715:
1716: hr_utility.set_location('l_effective_date: '||to_char(l_effective_date), 155);
1717: hr_utility.set_location('l_start_date: '||to_char(l_start_date), 156);
1718: hr_utility.set_location('l_end_date: '||to_char(l_end_date), 157);
1719: --
1720: -- Create the start record into the Process Log
1721: --
1714: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
1715:
1716: hr_utility.set_location('l_effective_date: '||to_char(l_effective_date), 155);
1717: hr_utility.set_location('l_start_date: '||to_char(l_start_date), 156);
1718: hr_utility.set_location('l_end_date: '||to_char(l_end_date), 157);
1719: --
1720: -- Create the start record into the Process Log
1721: --
1722: pqh_process_batch_log.start_log
1742: end if;
1743: --
1744: close c_table_route;
1745:
1746: hr_utility.set_location('l_table_route_id : '||l_table_route_id ||' '|| l_proc_name, 102);
1747: --
1748: -- Check for the type of the cofigurable message(PQH_UNDER_BGT_POSITIONS)
1749: --
1750: pqh_utility.set_message(8302,'PQH_UNDER_BGT_POSITIONS', 200);
1753: hr_general.decode_lookup('BUDGET_MEASUREMENT_TYPE',p_unit_of_measure));
1754: pqh_utility.set_message_token('ENTITY',
1755: hr_general.decode_lookup('PQH_BUDGET_ENTITY','JOB'));
1756:
1757: hr_utility.set_location('after pqh_utility.set_message : '|| l_proc_name, 103);
1758: --
1759: l_message_type_cd := pqh_utility.get_message_type_cd;
1760: l_message := pqh_utility.get_message;
1761: --
1758: --
1759: l_message_type_cd := pqh_utility.get_message_type_cd;
1760: l_message := pqh_utility.get_message;
1761: --
1762: hr_utility.set_location('after pqh_utility.get_message : '||l_message_type_cd|| l_proc_name, 104);
1763: --
1764: if l_message_type_cd in ('E','W') then
1765: if l_message_type_cd = 'E' then
1766: l_message_type := 'ERROR';
1766: l_message_type := 'ERROR';
1767: else
1768: l_message_type := 'WARNING';
1769: end if;
1770: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
1771: l_message_type_cd||l_proc_name, 105);
1772: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
1773: l_table_route_id, 105);
1774: --
1768: l_message_type := 'WARNING';
1769: end if;
1770: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
1771: l_message_type_cd||l_proc_name, 105);
1772: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
1773: l_table_route_id, 105);
1774: --
1775: -- Set the Process Log Context level....What should it be?
1776: --
1793:
1794: for l_job in c_jobs(l_effective_date, l_start_date, l_end_date)
1795: loop
1796:
1797: hr_utility.set_location('l_job_id : '||l_job.job_id , 110);
1798:
1799: if p_unit_of_measure = 'MONEY' then
1800: --
1801: -- Get the Budgeted Salary of the Job for the given start date and end date
1844: );
1845: --
1846: -- Print the details of the job
1847: --
1848: hr_utility.set_location('Job : '||l_job.job_id
1849: ||' '||l_proc_name, 130);
1850: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
1851: ||' '||l_proc_name, 140);
1852: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
1846: -- Print the details of the job
1847: --
1848: hr_utility.set_location('Job : '||l_job.job_id
1849: ||' '||l_proc_name, 130);
1850: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
1851: ||' '||l_proc_name, 140);
1852: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
1853: ||' '||l_proc_name, 140);
1854: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
1848: hr_utility.set_location('Job : '||l_job.job_id
1849: ||' '||l_proc_name, 130);
1850: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
1851: ||' '||l_proc_name, 140);
1852: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
1853: ||' '||l_proc_name, 140);
1854: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
1855: ||' '||l_proc_name, 150);
1856: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
1850: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
1851: ||' '||l_proc_name, 140);
1852: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
1853: ||' '||l_proc_name, 140);
1854: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
1855: ||' '||l_proc_name, 150);
1856: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
1857: ||' '||l_proc_name, 160);
1858: hr_utility.set_location('Actual + Commitment Value : '||nvl(l_actual_commitment_val,0)
1852: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
1853: ||' '||l_proc_name, 140);
1854: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
1855: ||' '||l_proc_name, 150);
1856: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
1857: ||' '||l_proc_name, 160);
1858: hr_utility.set_location('Actual + Commitment Value : '||nvl(l_actual_commitment_val,0)
1859: ||' '||l_proc_name, 160);
1860: --
1854: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
1855: ||' '||l_proc_name, 150);
1856: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
1857: ||' '||l_proc_name, 160);
1858: hr_utility.set_location('Actual + Commitment Value : '||nvl(l_actual_commitment_val,0)
1859: ||' '||l_proc_name, 160);
1860: --
1861: -- Check, whether the Job is Under Budgeted
1862: --
1919: p_information13 => l_currency_code
1920: );
1921:
1922: --
1923: hr_utility.set_location(l_job.job_id || ' is under budgeted'
1924: ||' '||l_proc_name, 170);
1925: --
1926: end if;--for under budget
1927: end if; --14/05/02
1968:
1969: --
1970: -- Print the details of the Job
1971: --
1972: hr_utility.set_location('Job : '||l_job.job_id
1973: ||' '||l_proc_name, 130);
1974: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1975: ||' '||l_proc_name, 140);
1976: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1970: -- Print the details of the Job
1971: --
1972: hr_utility.set_location('Job : '||l_job.job_id
1973: ||' '||l_proc_name, 130);
1974: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1975: ||' '||l_proc_name, 140);
1976: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1977: ||' '||l_proc_name, 140);
1978: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
1972: hr_utility.set_location('Job : '||l_job.job_id
1973: ||' '||l_proc_name, 130);
1974: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1975: ||' '||l_proc_name, 140);
1976: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1977: ||' '||l_proc_name, 140);
1978: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
1979: ||' '||l_proc_name, 150);
1980:
1974: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
1975: ||' '||l_proc_name, 140);
1976: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
1977: ||' '||l_proc_name, 140);
1978: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
1979: ||' '||l_proc_name, 150);
1980:
1981: if l_budgeted_val is not null then
1982: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0)) < nvl(l_actual_val,0) then
2086:
2087: --
2088: -- Print the details of the Job
2089: --
2090: hr_utility.set_location('Job : '||l_job.job_id
2091: ||' '||l_proc_name, 130);
2092: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2093: ||' '||l_proc_name, 130);
2094: hr_utility.set_location('Budgeted : '||l_budgeted_val
2088: -- Print the details of the Job
2089: --
2090: hr_utility.set_location('Job : '||l_job.job_id
2091: ||' '||l_proc_name, 130);
2092: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2093: ||' '||l_proc_name, 130);
2094: hr_utility.set_location('Budgeted : '||l_budgeted_val
2095: ||' '||l_proc_name, 140);
2096: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2090: hr_utility.set_location('Job : '||l_job.job_id
2091: ||' '||l_proc_name, 130);
2092: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2093: ||' '||l_proc_name, 130);
2094: hr_utility.set_location('Budgeted : '||l_budgeted_val
2095: ||' '||l_proc_name, 140);
2096: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2097: ||' '||l_proc_name, 140);
2098: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
2092: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2093: ||' '||l_proc_name, 130);
2094: hr_utility.set_location('Budgeted : '||l_budgeted_val
2095: ||' '||l_proc_name, 140);
2096: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2097: ||' '||l_proc_name, 140);
2098: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
2099: ||' '||l_proc_name, 150);
2100:
2094: hr_utility.set_location('Budgeted : '||l_budgeted_val
2095: ||' '||l_proc_name, 140);
2096: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2097: ||' '||l_proc_name, 140);
2098: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
2099: ||' '||l_proc_name, 150);
2100:
2101: if l_budgeted_val is not null then
2102: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0)) < nvl(l_actual_val,0) then
2159:
2160: );
2161:
2162: --
2163: hr_utility.set_location(l_job.job_id || ' is under budgeted'
2164: ||' '||l_proc_name, 170);
2165: --
2166: end if;--FYI
2167: end if; --14/05/02
2175: --
2176: -- End the Process Log
2177: --
2178: pqh_process_batch_log.end_log;
2179: hr_utility.set_location('End Process'
2180: ||' '||l_proc_name, 180);
2181: commit;
2182: exception
2183: when others then
2181: commit;
2182: exception
2183: when others then
2184: retcode := -1;
2185: -- hr_utility.set_location('Error '||sqlerrm,190);
2186: --
2187: end;
2188: --
2189: -- GRADES
2290: l_currency_code varchar2(40);
2291: --
2292: begin
2293: --
2294: hr_utility.set_location('Entering'|| l_proc_name, 10);
2295: retcode := 0;
2296: --
2297: hr_utility.set_location('Entering'|| l_proc_name, 11);
2298: --
2293: --
2294: hr_utility.set_location('Entering'|| l_proc_name, 10);
2295: retcode := 0;
2296: --
2297: hr_utility.set_location('Entering'|| l_proc_name, 11);
2298: --
2299: open check_batch_name(p_batch_name);
2300: fetch check_batch_name into l_dummy;
2301: if check_batch_name%found then
2307: FND_FILE.PUT_LINE(FND_FILE.OUTPUT, errbuf);
2308: return;
2309: end if;
2310: --
2311: hr_utility.set_location('Entering'|| l_proc_name, 13);
2312: --
2313: l_effective_date := fnd_date.canonical_to_date(p_effective_date);
2314: l_start_date := fnd_date.canonical_to_date(p_start_date);
2315: l_end_date := fnd_date.canonical_to_date(p_end_date);
2319: open c_batch;
2320: fetch c_batch into l_batch_id;
2321: close c_batch;
2322: --
2323: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
2324: --
2325: -- Create the start record into the Process Log
2326: --
2327: pqh_process_batch_log.start_log
2347: end if;
2348: --
2349: close c_table_route;
2350:
2351: hr_utility.set_location('l_table_route_id : '||l_table_route_id ||' '|| l_proc_name, 102);
2352: --
2353: -- Check for the type of the cofigurable message(PQH_UNDER_BGT_POSITIONS)
2354: --
2355: pqh_utility.set_message(8302,'PQH_UNDER_BGT_POSITIONS',200);
2358: pqh_utility.set_message_token('ENTITY',
2359: hr_general.decode_lookup('PQH_BUDGET_ENTITY','GRADE'));
2360:
2361: --
2362: hr_utility.set_location('after pqh_utility.set_message : '|| l_proc_name, 103);
2363: --
2364: l_message_type_cd := pqh_utility.get_message_type_cd;
2365: l_message := pqh_utility.get_message;
2366: --
2363: --
2364: l_message_type_cd := pqh_utility.get_message_type_cd;
2365: l_message := pqh_utility.get_message;
2366: --
2367: hr_utility.set_location('after pqh_utility.get_message : '||l_message_type_cd|| l_proc_name, 104);
2368: --
2369: if l_message_type_cd in ('E','W') then
2370: if l_message_type_cd = 'E' then
2371: l_message_type := 'ERROR';
2371: l_message_type := 'ERROR';
2372: else
2373: l_message_type := 'WARNING';
2374: end if;
2375: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
2376: l_message_type_cd||l_proc_name, 105);
2377: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
2378: l_table_route_id, 105);
2379: --
2373: l_message_type := 'WARNING';
2374: end if;
2375: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
2376: l_message_type_cd||l_proc_name, 105);
2377: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
2378: l_table_route_id, 105);
2379: --
2380: -- Set the Process Log Context level....What should it be?
2381: --
2397: --
2398: for l_grade in c_grades(l_effective_date, l_start_date, l_end_date)
2399: loop
2400:
2401: hr_utility.set_location('l_grade_id : '||l_grade.grade_id|| ' - ' || substr(l_grade.name,1,40) , 110);
2402:
2403: if p_unit_of_measure = 'MONEY' then
2404: --
2405: -- Get the Budgeted Salary of the Grade for the given start date and end date
2447: );
2448: --
2449: -- Print the details of the grade
2450: --
2451: hr_utility.set_location('Grade : '||l_grade.grade_id
2452: ||' '||l_proc_name, 130);
2453: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
2454: ||' '||l_proc_name, 140);
2455: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
2449: -- Print the details of the grade
2450: --
2451: hr_utility.set_location('Grade : '||l_grade.grade_id
2452: ||' '||l_proc_name, 130);
2453: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
2454: ||' '||l_proc_name, 140);
2455: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
2456: ||' '||l_proc_name, 140);
2457: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
2451: hr_utility.set_location('Grade : '||l_grade.grade_id
2452: ||' '||l_proc_name, 130);
2453: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
2454: ||' '||l_proc_name, 140);
2455: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
2456: ||' '||l_proc_name, 140);
2457: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
2458: ||' '||l_proc_name, 150);
2459: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
2453: hr_utility.set_location('Budgeted Value : '||l_budgeted_val
2454: ||' '||l_proc_name, 140);
2455: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
2456: ||' '||l_proc_name, 140);
2457: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
2458: ||' '||l_proc_name, 150);
2459: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
2460: ||' '||l_proc_name, 160);
2461: hr_utility.set_location('Actual + Commitment Value : '||nvl(l_actual_commitment_val,0)
2455: hr_utility.set_location('Reallocation Value : '||nvl(l_reallocation_val,0)
2456: ||' '||l_proc_name, 140);
2457: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
2458: ||' '||l_proc_name, 150);
2459: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
2460: ||' '||l_proc_name, 160);
2461: hr_utility.set_location('Actual + Commitment Value : '||nvl(l_actual_commitment_val,0)
2462: ||' '||l_proc_name, 160);
2463: --
2457: hr_utility.set_location('Actual Value : '||nvl(l_actual_val,0)
2458: ||' '||l_proc_name, 150);
2459: hr_utility.set_location('Commitment Value : '||nvl(l_commitment_val,0)
2460: ||' '||l_proc_name, 160);
2461: hr_utility.set_location('Actual + Commitment Value : '||nvl(l_actual_commitment_val,0)
2462: ||' '||l_proc_name, 160);
2463: --
2464: -- Check, whether the Grade is Under Budgeted
2465: --
2521: p_information13 => l_currency_code
2522: );
2523:
2524: --
2525: hr_utility.set_location(l_grade.grade_id || ' is under budgeted'
2526: ||' '||l_proc_name, 170);
2527: --
2528: end if;--for under budget
2529: end if; --14/05/02
2570:
2571: --
2572: -- Print the details of the Grade
2573: --
2574: hr_utility.set_location('Grade : '||l_grade.grade_id
2575: ||' '||l_proc_name, 130);
2576: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
2577: ||' '||l_proc_name, 140);
2578: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
2572: -- Print the details of the Grade
2573: --
2574: hr_utility.set_location('Grade : '||l_grade.grade_id
2575: ||' '||l_proc_name, 130);
2576: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
2577: ||' '||l_proc_name, 140);
2578: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
2579: ||' '||l_proc_name, 140);
2580: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
2574: hr_utility.set_location('Grade : '||l_grade.grade_id
2575: ||' '||l_proc_name, 130);
2576: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
2577: ||' '||l_proc_name, 140);
2578: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
2579: ||' '||l_proc_name, 140);
2580: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
2581: ||' '||l_proc_name, 150);
2582:
2576: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
2577: ||' '||l_proc_name, 140);
2578: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
2579: ||' '||l_proc_name, 140);
2580: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
2581: ||' '||l_proc_name, 150);
2582:
2583: if l_budgeted_val is not null then
2584: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0)) < nvl(l_actual_val,0) then
2689:
2690: --
2691: -- Print the details of the Grade
2692: --
2693: hr_utility.set_location('Grade : '||l_grade.grade_id
2694: ||' '||l_proc_name, 130);
2695: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2696: ||' '||l_proc_name, 130);
2697: hr_utility.set_location('Budgeted : '||l_budgeted_val
2691: -- Print the details of the Grade
2692: --
2693: hr_utility.set_location('Grade : '||l_grade.grade_id
2694: ||' '||l_proc_name, 130);
2695: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2696: ||' '||l_proc_name, 130);
2697: hr_utility.set_location('Budgeted : '||l_budgeted_val
2698: ||' '||l_proc_name, 140);
2699: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2693: hr_utility.set_location('Grade : '||l_grade.grade_id
2694: ||' '||l_proc_name, 130);
2695: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2696: ||' '||l_proc_name, 130);
2697: hr_utility.set_location('Budgeted : '||l_budgeted_val
2698: ||' '||l_proc_name, 140);
2699: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2700: ||' '||l_proc_name, 140);
2701: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
2695: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
2696: ||' '||l_proc_name, 130);
2697: hr_utility.set_location('Budgeted : '||l_budgeted_val
2698: ||' '||l_proc_name, 140);
2699: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2700: ||' '||l_proc_name, 140);
2701: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
2702: ||' '||l_proc_name, 150);
2703:
2697: hr_utility.set_location('Budgeted : '||l_budgeted_val
2698: ||' '||l_proc_name, 140);
2699: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
2700: ||' '||l_proc_name, 140);
2701: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
2702: ||' '||l_proc_name, 150);
2703:
2704: if l_budgeted_val is not null then
2705: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0)) < nvl(l_actual_val,0) then
2758: p_information12 =>'REPORT'
2759: );
2760:
2761: --
2762: hr_utility.set_location(l_grade.grade_id || ' is under budgeted'
2763: ||' '||l_proc_name, 170);
2764: --
2765: end if;
2766: end if; --14/05/02
2775: --
2776: -- End the Process Log
2777: --
2778: pqh_process_batch_log.end_log;
2779: hr_utility.set_location('End Process'
2780: ||' '||l_proc_name, 180);
2781: commit;
2782: exception
2783: when others then
2837: --
2838: l_currency_code varchar2(40);
2839: --
2840: BEGIN
2841: hr_utility.set_location('organization : '||p_organization_id ||' '|| l_proc_name, 101);
2842:
2843: open c_org_name(p_organization_id);
2844: fetch c_org_name into l_org_name;
2845: close c_org_name;
2854: end if;
2855: --
2856: close c_table_route;
2857:
2858: hr_utility.set_location('l_table_route_id : '||l_table_route_id ||' '|| l_proc_name, 102);
2859: --
2860: -- Check for the type of the cofigurable message(PQH_UNDER_BGT_POSITIONS)
2861: --
2862: pqh_utility.set_message(8302,'PQH_UNDER_BGT_POSITIONS', p_organization_id);
2865: hr_general.decode_lookup('BUDGET_MEASUREMENT_TYPE',p_unit_of_measure));
2866: pqh_utility.set_message_token('ENTITY',
2867: hr_general.decode_lookup('PQH_BUDGET_ENTITY','ORGANIZATION'));
2868:
2869: hr_utility.set_location('after pqh_utility.set_message : '|| l_proc_name, 103);
2870: --
2871: l_message_type_cd := pqh_utility.get_message_type_cd;
2872: l_message := pqh_utility.get_message;
2873: --
2870: --
2871: l_message_type_cd := pqh_utility.get_message_type_cd;
2872: l_message := pqh_utility.get_message;
2873: --
2874: hr_utility.set_location('after pqh_utility.get_message : '||l_message_type_cd|| l_proc_name, 104);
2875: --
2876: if l_message_type_cd in ('E','W') then
2877: if l_message_type_cd = 'E' then
2878: l_message_type := 'ERROR';
2878: l_message_type := 'ERROR';
2879: else
2880: l_message_type := 'WARNING';
2881: end if;
2882: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
2883: l_message_type_cd||l_proc_name, 105);
2884: hr_utility.set_location('before pqh.set_context_level organization_id: '||
2885: p_organization_id, 105);
2886: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
2880: l_message_type := 'WARNING';
2881: end if;
2882: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
2883: l_message_type_cd||l_proc_name, 105);
2884: hr_utility.set_location('before pqh.set_context_level organization_id: '||
2885: p_organization_id, 105);
2886: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
2887: l_table_route_id, 105);
2888: hr_utility.set_location('l_orglevel1: '||
2882: hr_utility.set_location('before pqh_process_batch_log.set_context_level : '||
2883: l_message_type_cd||l_proc_name, 105);
2884: hr_utility.set_location('before pqh.set_context_level organization_id: '||
2885: p_organization_id, 105);
2886: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
2887: l_table_route_id, 105);
2888: hr_utility.set_location('l_orglevel1: '||
2889: p_level1, 105);
2890: hr_utility.set_location('org name: '||
2884: hr_utility.set_location('before pqh.set_context_level organization_id: '||
2885: p_organization_id, 105);
2886: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
2887: l_table_route_id, 105);
2888: hr_utility.set_location('l_orglevel1: '||
2889: p_level1, 105);
2890: hr_utility.set_location('org name: '||
2891: hr_general.decode_organization(p_organization_id), 105);
2892: --
2886: hr_utility.set_location('before pqh.set_context_level l_table_route_id: '||
2887: l_table_route_id, 105);
2888: hr_utility.set_location('l_orglevel1: '||
2889: p_level1, 105);
2890: hr_utility.set_location('org name: '||
2891: hr_general.decode_organization(p_organization_id), 105);
2892: --
2893: -- Set the Process Log Context level for the Organization
2894: --
2899: p_level =>p_level1 + 1,
2900: p_log_context =>hr_general.decode_organization(P_organization_id)
2901: );
2902: --
2903: hr_utility.set_location('Organization : '||p_organization_id
2904: || ' ' ||l_proc_name, 110);
2905:
2906: if p_unit_of_measure = 'MONEY' then
2907: --
2950: );
2951: --
2952: -- Print the details of the organization
2953: --
2954: hr_utility.set_location('Organization : '||p_organization_id
2955: ||' '||l_proc_name, 130);
2956: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
2957: ||' '||l_proc_name, 140);
2958: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
2952: -- Print the details of the organization
2953: --
2954: hr_utility.set_location('Organization : '||p_organization_id
2955: ||' '||l_proc_name, 130);
2956: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
2957: ||' '||l_proc_name, 140);
2958: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
2959: ||' '||l_proc_name, 140);
2960: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
2954: hr_utility.set_location('Organization : '||p_organization_id
2955: ||' '||l_proc_name, 130);
2956: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
2957: ||' '||l_proc_name, 140);
2958: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
2959: ||' '||l_proc_name, 140);
2960: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
2961: ||' '||l_proc_name, 150);
2962: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
2956: hr_utility.set_location('Budgeted Salary : '||l_budgeted_val
2957: ||' '||l_proc_name, 140);
2958: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
2959: ||' '||l_proc_name, 140);
2960: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
2961: ||' '||l_proc_name, 150);
2962: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
2963: ||' '||l_proc_name, 160);
2964: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_val,0)
2958: hr_utility.set_location('Budget Reallocation : '||nvl(l_reallocation_val,0)
2959: ||' '||l_proc_name, 140);
2960: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
2961: ||' '||l_proc_name, 150);
2962: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
2963: ||' '||l_proc_name, 160);
2964: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_val,0)
2965: ||' '||l_proc_name, 160);
2966: --
2960: hr_utility.set_location('Actual Salary : '||nvl(l_actual_val,0)
2961: ||' '||l_proc_name, 150);
2962: hr_utility.set_location('Commitment Salary : '||nvl(l_commitment_val,0)
2963: ||' '||l_proc_name, 160);
2964: hr_utility.set_location('Actual + Commitment Salary : '||nvl(l_actual_commitment_val,0)
2965: ||' '||l_proc_name, 160);
2966: --
2967: -- Check, whether the organization is Under Budgeted
2968: --
3014: p_information12 =>'REPORT',
3015: p_information13 => l_currency_code
3016: );
3017: --
3018: hr_utility.set_location(p_organization_id ||
3019: ' is under budgeted' ||' '||l_proc_name, 170);
3020: --
3021: end if;--for under budget
3022: end if;
3063:
3064: --
3065: -- Print the details of the organization
3066: --
3067: hr_utility.set_location('Organization : '||p_organization_id
3068: ||' '||l_proc_name, 130);
3069: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
3070: ||' '||l_proc_name, 140);
3071: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
3065: -- Print the details of the organization
3066: --
3067: hr_utility.set_location('Organization : '||p_organization_id
3068: ||' '||l_proc_name, 130);
3069: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
3070: ||' '||l_proc_name, 140);
3071: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
3072: ||' '||l_proc_name, 140);
3073: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
3067: hr_utility.set_location('Organization : '||p_organization_id
3068: ||' '||l_proc_name, 130);
3069: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
3070: ||' '||l_proc_name, 140);
3071: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
3072: ||' '||l_proc_name, 140);
3073: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
3074: ||' '||l_proc_name, 150);
3075:
3069: hr_utility.set_location('Budgeted Hours : '||l_budgeted_val
3070: ||' '||l_proc_name, 140);
3071: hr_utility.set_location('Reallocation Hours: '||nvl(l_reallocation_val,0)
3072: ||' '||l_proc_name, 140);
3073: hr_utility.set_location('Actual Hours : '||nvl(l_actual_val,0)
3074: ||' '||l_proc_name, 150);
3075:
3076: if l_budgeted_val is not null then
3077: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0))
3116: p_information11 =>p_batch_name,
3117: p_information12 =>'REPORT'
3118: );
3119:
3120: hr_utility.set_location(p_organization_id ||
3121: ' is under budgeted' ||' '||l_proc_name, 170);
3122: --
3123:
3124: end if;
3169:
3170: --
3171: -- Print the details of the organization
3172: --
3173: hr_utility.set_location('Organization : '||p_organization_id
3174: ||' '||l_proc_name, 130);
3175: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
3176: ||' '||l_proc_name, 130);
3177: hr_utility.set_location('Budgeted : '||l_budgeted_val
3171: -- Print the details of the organization
3172: --
3173: hr_utility.set_location('Organization : '||p_organization_id
3174: ||' '||l_proc_name, 130);
3175: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
3176: ||' '||l_proc_name, 130);
3177: hr_utility.set_location('Budgeted : '||l_budgeted_val
3178: ||' '||l_proc_name, 140);
3179: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
3173: hr_utility.set_location('Organization : '||p_organization_id
3174: ||' '||l_proc_name, 130);
3175: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
3176: ||' '||l_proc_name, 130);
3177: hr_utility.set_location('Budgeted : '||l_budgeted_val
3178: ||' '||l_proc_name, 140);
3179: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
3180: ||' '||l_proc_name, 140);
3181: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
3175: hr_utility.set_location('Unit of measure : '||p_unit_of_measure
3176: ||' '||l_proc_name, 130);
3177: hr_utility.set_location('Budgeted : '||l_budgeted_val
3178: ||' '||l_proc_name, 140);
3179: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
3180: ||' '||l_proc_name, 140);
3181: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
3182: ||' '||l_proc_name, 150);
3183:
3177: hr_utility.set_location('Budgeted : '||l_budgeted_val
3178: ||' '||l_proc_name, 140);
3179: hr_utility.set_location('Reallocation: '||nvl(l_reallocation_val,0)
3180: ||' '||l_proc_name, 140);
3181: hr_utility.set_location('Actual : '||nvl(l_actual_val,0)
3182: ||' '||l_proc_name, 150);
3183:
3184: if l_budgeted_val is not null then
3185: if (nvl(l_budgeted_val,0) + nvl(l_reallocation_val,0)) < nvl(l_actual_val,0) then
3219: p_information11 =>p_batch_name,
3220: p_information12 =>'REPORT'
3221: );
3222: --
3223: hr_utility.set_location(p_organization_id ||
3224: ' is under budgeted' ||' '||l_proc_name, 170);
3225: --
3226: end if;
3227: end if;
3371: l_apply_error_num varchar2(100);
3372: --
3373: begin
3374: --
3375: hr_utility.set_location('Entering'|| l_proc_name, 10);
3376: retcode := 0;
3377: --
3378: hr_utility.set_location('Entering'|| l_proc_name, 11);
3379: --
3374: --
3375: hr_utility.set_location('Entering'|| l_proc_name, 10);
3376: retcode := 0;
3377: --
3378: hr_utility.set_location('Entering'|| l_proc_name, 11);
3379: --
3380: open check_batch_name(p_batch_name);
3381: fetch check_batch_name into l_dummy;
3382: if check_batch_name%found then
3388: FND_FILE.PUT_LINE(FND_FILE.OUTPUT, errbuf);
3389: return;
3390: end if;
3391: --
3392: hr_utility.set_location('Entering'|| l_proc_name, 13);
3393: --
3394: l_effective_date := fnd_date.canonical_to_date(p_effective_date);
3395: l_start_date := fnd_date.canonical_to_date(p_start_date);
3396: l_end_date := fnd_date.canonical_to_date(p_end_date);
3401: fetch c_org_version into l_org_structure_version_id;
3402: close c_org_version;
3403: --
3404: --
3405: hr_utility.set_location('Entering'|| l_proc_name, 14);
3406: --
3407: --
3408: -- Fetch the batch Id into the l_batch_id
3409: --
3410: open c_batch;
3411: fetch c_batch into l_batch_id;
3412: close c_batch;
3413: --
3414: hr_utility.set_location('l_batch_id : '||l_batch_id ||' - ' || l_proc_name, 15);
3415: --
3416: -- Create the start record into the Process Log
3417: --
3418: pqh_process_batch_log.start_log
3429: p_information9 =>p_unit_of_measure
3430: );
3431: --
3432: --
3433: hr_utility.set_location('Organization Structure Version : '||l_org_structure_version_id ||' '|| l_proc_name, 100);
3434: hr_utility.set_location('start organization : '||p_start_org_id ||' '|| l_proc_name, 100);
3435: --
3436: --
3437: fnd_file.put_line(FND_FILE.LOG,'Primary Entity => ''ORGANIZATION''' || ' Unit of Measure => '||p_unit_of_measure);
3430: );
3431: --
3432: --
3433: hr_utility.set_location('Organization Structure Version : '||l_org_structure_version_id ||' '|| l_proc_name, 100);
3434: hr_utility.set_location('start organization : '||p_start_org_id ||' '|| l_proc_name, 100);
3435: --
3436: --
3437: fnd_file.put_line(FND_FILE.LOG,'Primary Entity => ''ORGANIZATION''' || ' Unit of Measure => '||p_unit_of_measure);
3438: fnd_file.put_line(FND_FILE.LOG,' ');
3453: -- Fetch the Organizations from the Organization Hierarchy
3454: for l_organization in c_org(l_org_structure_version_id, l_start_org_id,l_effective_date)
3455: loop
3456: --
3457: hr_utility.set_location('organization : '||l_organization.organization_id ||' '|| l_proc_name, 101);
3458: --
3459: org_temp( p_organization_id => l_organization.organization_id
3460: ,p_level1 => l_organization.level1
3461: ,p_batch_name => p_batch_name
3472: then
3473: for l_organization in c_all_org(p_business_group_id, l_effective_date)
3474: loop
3475: --
3476: hr_utility.set_location('organization : '||l_organization.organization_id ||' '|| l_proc_name, 101);
3477: --
3478: org_temp( p_organization_id => l_organization.organization_id
3479: ,p_level1 => l_organization.level1
3480: ,p_batch_name => p_batch_name
3489: --
3490: -- End the Process Log
3491: --
3492: pqh_process_batch_log.end_log;
3493: hr_utility.set_location('End Process'
3494: ||' '||l_proc_name, 180);
3495: commit;
3496: exception
3497: when others then