92:
93: lv_format varchar2(1000);
94:
95: BEGIN
96: hr_utility.set_location(gv_package_name || '.formated_header_string', 10);
97: if p_output_file_type = 'CSV' then
98: hr_utility.set_location(gv_package_name || '.formated_header_string', 20);
99: lv_format := p_input_string;
100: elsif p_output_file_type = 'HTML' then
94:
95: BEGIN
96: hr_utility.set_location(gv_package_name || '.formated_header_string', 10);
97: if p_output_file_type = 'CSV' then
98: hr_utility.set_location(gv_package_name || '.formated_header_string', 20);
99: lv_format := p_input_string;
100: elsif p_output_file_type = 'HTML' then
101: hr_utility.set_location(gv_package_name || '.formated_header_string', 30);
102: lv_format := '
97: if p_output_file_type = 'CSV' then
98: hr_utility.set_location(gv_package_name || '.formated_header_string', 20);
99: lv_format := p_input_string;
100: elsif p_output_file_type = 'HTML' then
101: hr_utility.set_location(gv_package_name || '.formated_header_string', 30);
102: lv_format := '
102: lv_format := '
127: lv_format varchar2(1000);
128: lv_bold varchar2(10);
129: BEGIN
130: lv_bold := nvl(p_bold,'N');
131: hr_utility.set_location(gv_package_name || '.formated_data_string', 10);
132: if p_output_file_type = 'CSV' then
133: hr_utility.set_location(gv_package_name || '.formated_data_string', 20);
134: lv_format := gc_csv_data_delimiter || p_input_string ||
135: gc_csv_data_delimiter || gc_csv_delimiter;
129: BEGIN
130: lv_bold := nvl(p_bold,'N');
131: hr_utility.set_location(gv_package_name || '.formated_data_string', 10);
132: if p_output_file_type = 'CSV' then
133: hr_utility.set_location(gv_package_name || '.formated_data_string', 20);
134: lv_format := gc_csv_data_delimiter || p_input_string ||
135: gc_csv_data_delimiter || gc_csv_delimiter;
136: elsif p_output_file_type = 'HTML' then
137: if p_input_string is null then
134: lv_format := gc_csv_data_delimiter || p_input_string ||
135: gc_csv_data_delimiter || gc_csv_delimiter;
136: elsif p_output_file_type = 'HTML' then
137: if p_input_string is null then
138: hr_utility.set_location(gv_package_name || '.formated_data_string', 30);
139: lv_format := gv_html_start_data || ' ' || gv_html_end_data;
140: else
141: if lv_bold = 'Y' then
142: hr_utility.set_location(gv_package_name || '.formated_data_string', 40);
138: hr_utility.set_location(gv_package_name || '.formated_data_string', 30);
139: lv_format := gv_html_start_data || ' ' || gv_html_end_data;
140: else
141: if lv_bold = 'Y' then
142: hr_utility.set_location(gv_package_name || '.formated_data_string', 40);
143: lv_format := gv_html_start_data || ' ' || p_input_string
144: || '' || gv_html_end_data;
145: else
146: hr_utility.set_location(gv_package_name || '.formated_data_string', 50);
142: hr_utility.set_location(gv_package_name || '.formated_data_string', 40);
143: lv_format := gv_html_start_data || ' ' || p_input_string
144: || '' || gv_html_end_data;
145: else
146: hr_utility.set_location(gv_package_name || '.formated_data_string', 50);
147: lv_format := gv_html_start_data || p_input_string || gv_html_end_data;
148: end if;
149: end if;
150: end if;
148: end if;
149: end if;
150: end if;
151:
152: hr_utility.set_location(gv_package_name || '.formated_data_string', 60);
153: return lv_format;
154:
155: END formated_data_string;
156:
163: lv_format1 varchar2(32000);
164:
165: BEGIN
166:
167: hr_utility.set_location(gv_package_name || '.formated_header_state', 10);
168: lv_format1 :=
169: formated_data_string (p_input_string => 'Balance Name '
170: ,p_bold => 'Y'
171: ,p_output_file_type => p_output_file_type) ||
179: ,p_bold => 'Y'
180: ,p_output_file_type => p_output_file_type) ;
181:
182:
183: hr_utility.trace('Static Label1 = ' || lv_format1);
184:
185: return lv_format1 ;
186:
187: hr_utility.set_location(gv_package_name || '.formated_header_sec1', 40);
183: hr_utility.trace('Static Label1 = ' || lv_format1);
184:
185: return lv_format1 ;
186:
187: hr_utility.set_location(gv_package_name || '.formated_header_sec1', 40);
188:
189: END formated_header_sec1;
190:
191:
197: lv_format1 varchar2(32000);
198:
199: BEGIN
200:
201: hr_utility.set_location(gv_package_name || '.formated_header_state', 10);
202: lv_format1 :=
203: formated_data_string (p_input_string => 'Attribute Name '
204: ,p_bold => 'Y'
205: ,p_output_file_type => p_output_file_type) ||
210: ,p_bold => 'Y'
211: ,p_output_file_type => p_output_file_type) ;
212:
213:
214: hr_utility.trace('Static Label1 = ' || lv_format1);
215:
216: return lv_format1 ;
217:
218: hr_utility.set_location(gv_package_name || '.formated_header_sec2', 40);
214: hr_utility.trace('Static Label1 = ' || lv_format1);
215:
216: return lv_format1 ;
217:
218: hr_utility.set_location(gv_package_name || '.formated_header_sec2', 40);
219:
220: END formated_header_sec2;
221:
222:
229: lv_format1 varchar2(32000);
230:
231: BEGIN
232:
233: hr_utility.set_location(gv_package_name || '.formated_header_state', 10);
234: lv_format1 :=
235: formated_data_string (p_input_string => 'Attribute Name '
236: ,p_bold => 'Y'
237: ,p_output_file_type => p_output_file_type) ||
242: ,p_bold => 'Y'
243: ,p_output_file_type => p_output_file_type);
244:
245:
246: hr_utility.trace('Static Label1 = ' || lv_format1);
247:
248: return lv_format1 ;
249:
250: hr_utility.set_location(gv_package_name || '.formated_header_sec3', 40);
246: hr_utility.trace('Static Label1 = ' || lv_format1);
247:
248: return lv_format1 ;
249:
250: hr_utility.set_location(gv_package_name || '.formated_header_sec3', 40);
251:
252: END formated_header_sec3;
253:
254:
261: lv_format2 varchar2(32000);
262:
263: BEGIN
264:
265: hr_utility.set_location(gv_package_name || '.formated_header_sec4', 10);
266: lv_format1 :=
267: formated_data_string (p_input_string => 'Business Group Name '
268: ,p_bold => 'Y'
269: ,p_output_file_type => p_output_file_type) ||
285: ,p_output_file_type => p_output_file_type) ;
286:
287:
288:
289: hr_utility.trace('Static Label1 = ' || lv_format1);
290:
291: return lv_format1 ;
292:
293: hr_utility.set_location(gv_package_name || '.formated_header_sec4', 40);
289: hr_utility.trace('Static Label1 = ' || lv_format1);
290:
291: return lv_format1 ;
292:
293: hr_utility.set_location(gv_package_name || '.formated_header_sec4', 40);
294:
295: END formated_header_sec4;
296:
297:
311: lv_format2 varchar2(10000);
312:
313: BEGIN
314:
315: hr_utility.set_location(gv_package_name || '.formated_validation_detail', 10);
316: lv_format1 :=
317: formated_data_string (p_input_string => p_input_1
318: ,p_bold => 'N'
319: ,p_output_file_type => p_output_file_type) ||
331: ,p_output_file_type => p_output_file_type)
332: ;
333:
334:
335: hr_utility.trace('Static Label1 = ' || lv_format1);
336:
337: hr_utility.set_location(gv_package_name || '.formated_validation_details', 30);
338:
339: return lv_format1 ;
333:
334:
335: hr_utility.trace('Static Label1 = ' || lv_format1);
336:
337: hr_utility.set_location(gv_package_name || '.formated_validation_details', 30);
338:
339: return lv_format1 ;
340:
341: END formated_validation_detail;
390: l_valid_count number;
391: l_trunc_date date; /* Bug 3258868 */
392:
393: BEGIN
394: hr_utility.trace('Start of Procedure '||lv_package_stage);
395: hr_utility.set_location(lv_package_stage,10);
396:
397:
398:
391: l_trunc_date date; /* Bug 3258868 */
392:
393: BEGIN
394: hr_utility.trace('Start of Procedure '||lv_package_stage);
395: hr_utility.set_location(lv_package_stage,10);
396:
397:
398:
399: -- Validate if the attribute passed as parameter exists
397:
398:
399: -- Validate if the attribute passed as parameter exists
400:
401: hr_utility.set_location(lv_package_stage,30);
402:
403: l_trunc_date := NVL(p_start_date, fnd_date.canonical_to_date('0001/01/01 00:00:00') ) ;
404:
405: open c_get_valid_count(l_trunc_date,
407: p_attribute_id );
408: fetch c_get_valid_count into l_valid_count;
409: close c_get_valid_count;
410:
411: hr_utility.trace('Valid Count for '
412: ||p_attribute_id||' is '||to_char(l_valid_count));
413:
414: open c_get_attribute_count( p_attribute_id, p_business_group_id );
415: fetch c_get_attribute_count into l_attribute_count;
414: open c_get_attribute_count( p_attribute_id, p_business_group_id );
415: fetch c_get_attribute_count into l_attribute_count;
416: close c_get_attribute_count;
417:
418: hr_utility.trace('Attribute Count for '||p_attribute_id||' is '||to_char(l_attribute_count));
419:
420: if l_valid_count = l_attribute_count then
421:
422: hr_utility.set_location(lv_package_stage,40);
418: hr_utility.trace('Attribute Count for '||p_attribute_id||' is '||to_char(l_attribute_count));
419:
420: if l_valid_count = l_attribute_count then
421:
422: hr_utility.set_location(lv_package_stage,40);
423: lv_return_status := gv_valid;
424: else
425:
426: hr_utility.set_location(lv_package_stage,50);
422: hr_utility.set_location(lv_package_stage,40);
423: lv_return_status := gv_valid;
424: else
425:
426: hr_utility.set_location(lv_package_stage,50);
427: hr_utility.trace('Balance Status is Invalid for Attribute -> ' ||p_attribute_id);
428: lv_return_status := gv_invalid;
429: end if;
430:
423: lv_return_status := gv_valid;
424: else
425:
426: hr_utility.set_location(lv_package_stage,50);
427: hr_utility.trace('Balance Status is Invalid for Attribute -> ' ||p_attribute_id);
428: lv_return_status := gv_invalid;
429: end if;
430:
431: hr_utility.trace('End of Procedure ' || lv_package_stage);
427: hr_utility.trace('Balance Status is Invalid for Attribute -> ' ||p_attribute_id);
428: lv_return_status := gv_invalid;
429: end if;
430:
431: hr_utility.trace('End of Procedure ' || lv_package_stage);
432: return(lv_return_status);
433:
434:
435: EXCEPTION
433:
434:
435: EXCEPTION
436: WHEN others THEN
437: hr_utility.set_location(lv_package_stage,60);
438: hr_utility.trace('Invalid Attribute Name');
439: raise_application_error(-20101, 'Error in check_balance_status');
440: raise;
441: END check_balance_status;
434:
435: EXCEPTION
436: WHEN others THEN
437: hr_utility.set_location(lv_package_stage,60);
438: hr_utility.trace('Invalid Attribute Name');
439: raise_application_error(-20101, 'Error in check_balance_status');
440: raise;
441: END check_balance_status;
442:
453: lv_format2 varchar2(10000);
454:
455: BEGIN
456:
457: hr_utility.set_location(gv_package_name || '.formated_detail4', 10);
458: lv_format1 :=
459: formated_data_string (p_input_string => p_input_1
460: ,p_bold => 'N'
461: ,p_output_file_type => p_output_file_type) ||
470: ,p_output_file_type => p_output_file_type)
471: ;
472:
473:
474: hr_utility.trace('Static Label1 = ' || lv_format1);
475:
476: hr_utility.set_location(gv_package_name || '.formated__detail4', 30);
477:
478: return lv_format1 ;
472:
473:
474: hr_utility.trace('Static Label1 = ' || lv_format1);
475:
476: hr_utility.set_location(gv_package_name || '.formated__detail4', 30);
477:
478: return lv_format1 ;
479:
480: END formated_detail4;
492: lv_format2 varchar2(10000);
493:
494: BEGIN
495:
496: hr_utility.set_location(gv_package_name || '.formated_detail3', 10);
497: lv_format1 :=
498: formated_data_string (p_input_string => p_input_1
499: ,p_bold => 'N'
500: ,p_output_file_type => p_output_file_type) ||
506: ,p_output_file_type => p_output_file_type)
507: ;
508:
509:
510: hr_utility.trace('Static Label1 = ' || lv_format1);
511:
512: hr_utility.set_location(gv_package_name || '.formated__detail3', 30);
513:
514: return lv_format1 ;
508:
509:
510: hr_utility.trace('Static Label1 = ' || lv_format1);
511:
512: hr_utility.set_location(gv_package_name || '.formated__detail3', 30);
513:
514: return lv_format1 ;
515:
516: END formated_detail3;
531: lv_format2 varchar2(10000);
532:
533: BEGIN
534:
535: hr_utility.set_location(gv_package_name || '.formated_detail', 10);
536: lv_format1 :=
537: formated_data_string (p_input_string => p_input_1
538: ,p_bold => 'N'
539: ,p_output_file_type => p_output_file_type) ||
557: ,p_output_file_type => p_output_file_type)
558: ;
559:
560:
561: hr_utility.trace('Static Label1 = ' || lv_format1);
562:
563: hr_utility.set_location(gv_package_name || '.formated_detail', 30);
564:
565: return lv_format1 ;
559:
560:
561: hr_utility.trace('Static Label1 = ' || lv_format1);
562:
563: hr_utility.set_location(gv_package_name || '.formated_detail', 30);
564:
565: return lv_format1 ;
566:
567: END formated_detail;
826:
827: lvn_count number := 0;
828: lvc_message varchar2(32000);
829: BEGIN
830: hr_utility.set_location(gv_package_name || 'Get Legislation code', 10);
831:
832: lvc_date_time := to_char(sysdate,'mm/dd/yyyy HH:MI');
833:
834: lvn_business_group_id := fnd_global.per_business_group_id;
832: lvc_date_time := to_char(sysdate,'mm/dd/yyyy HH:MI');
833:
834: lvn_business_group_id := fnd_global.per_business_group_id;
835:
836: hr_utility.trace(' lvn_business_group_id = ' || lvn_business_group_id);
837:
838:
839: /* Get the Meaning of Valid and Invalid Status */
840:
865:
866:
867: /* STEP 1 : Get the Legislation Code */
868:
869: hr_utility.trace('P_OUTPUT_FILE_TYPE = ' || p_output_file_type );
870:
871: OPEN c_get_leg_cd( lvn_business_group_id );
872: FETCH c_get_leg_cd INTO lvc_legislation_code,lvc_business_group_name;
873: CLOSE c_get_leg_cd;
871: OPEN c_get_leg_cd( lvn_business_group_id );
872: FETCH c_get_leg_cd INTO lvc_legislation_code,lvc_business_group_name;
873: CLOSE c_get_leg_cd;
874:
875: hr_utility.trace('Lvc_legislation_code = ' || nvl(lvc_legislation_code,'NULL'));
876: hr_utility.set_location(gv_package_name || '', 20);
877:
878:
879:
872: FETCH c_get_leg_cd INTO lvc_legislation_code,lvc_business_group_name;
873: CLOSE c_get_leg_cd;
874:
875: hr_utility.trace('Lvc_legislation_code = ' || nvl(lvc_legislation_code,'NULL'));
876: hr_utility.set_location(gv_package_name || '', 20);
877:
878:
879:
880:
911:
912: if p_output_file_type ='HTML' then
913: lv_data_row := '
948: FND_FILE.PUT_LINE(FND_FILE.OUTPUT, '');
949: END IF;
950:
951: For i in c_seeded_att( lvc_legislation_code ) loop
952: hr_utility.trace( 'Attribute name :- ' || i.attribute_name);
953:
954: /* get the max date for attribute */
955:
956: open c_attrib_status( lvn_business_group_id ,
963: lvn_business_Group_id,
964: lvn_attribute_id,
965: lvc_legislation_code );
966:
967: hr_utility.trace('Returned status is ' || lvc_balance_status );
968: /* if the Status is INVALID then we will not give the valid date*/
969: IF lvc_balance_status = gv_invalid THEN
970: lvd_start_date := NULL;
971: END IF;
979:
980: if p_output_file_type ='HTML' then
981: lv_data_row := '
988:
989: /* STEP 5 : For USER DEFINED attributes*/
990:
991: For i in c_userdef_att( lvn_business_group_id ) loop
992: hr_utility.trace( 'Attribute name :- ' || i.attribute_name);
993:
994: /* get the attribute_id and max date for attribute */
995:
996: open c_attrib_status( lvn_business_group_id ,
1017:
1018: if p_output_file_type ='HTML' then
1019: lv_data_row := '
1061: FND_FILE.PUT_LINE(FND_FILE.OUTPUT, '');
1062: END IF;
1063:
1064: For i in c_seeded_att( lvc_legislation_code ) loop
1065: hr_utility.trace( 'Attribute name :- ' || i.attribute_name);
1066:
1067: /* write the balance and dimension name */
1068:
1069: FOR J IN c_attrib_bal(lvn_business_group_id, i.attribute_id,lvc_legislation_code) loop
1077:
1078: if p_output_file_type ='HTML' then
1079: lv_data_row := '
1084:
1085: END LOOP ; /* c_seeded_att */
1086:
1087: For i in c_userdef_att( lvn_business_group_id ) loop
1088: hr_utility.trace( 'Attribute name :- ' || i.attribute_name);
1089:
1090: /* write the balance and dimension name */
1091:
1092: FOR J IN c_attrib_bal(lvn_business_group_id, i.attribute_id,lvc_legislation_code) loop
1100:
1101: if p_output_file_type ='HTML' then
1102: lv_data_row := '
1116:
1117:
1118:
1119: /* STEP 8 Last section */
1120: hr_utility.trace('STEP 8 Validation Section ');
1121:
1122: FOR j in c_attribute_validation( lvn_business_group_id
1123: ,lvc_legislation_code )
1124: LOOP
1159:
1160: if p_output_file_type ='HTML' then
1161: lv_data_row := '
1178: END IF;
1179:
1180: end ebra_diagnostics;
1181: --begin
1182: --hr_utility.trace_on(null, 'ORACLE');
1183: end pay_ebra_diagnostics;