33: noDataFound exception;
34:
35: BEGIN
36:
37: hr_utility.trace('Entering '||l_proc);
38:
39: hr_utility.trace('p_payroll_action_id ='||p_payroll_action_id);
40: hr_utility.trace('p_process_type ='||p_process_type);
41: hr_utility.trace('p_assignment_set_id ='||p_assignment_set_id);
35: BEGIN
36:
37: hr_utility.trace('Entering '||l_proc);
38:
39: hr_utility.trace('p_payroll_action_id ='||p_payroll_action_id);
40: hr_utility.trace('p_process_type ='||p_process_type);
41: hr_utility.trace('p_assignment_set_id ='||p_assignment_set_id);
42: hr_utility.trace('p_element_set_id ='||p_element_set_id);
43: if p_assignment_set_id is null then
36:
37: hr_utility.trace('Entering '||l_proc);
38:
39: hr_utility.trace('p_payroll_action_id ='||p_payroll_action_id);
40: hr_utility.trace('p_process_type ='||p_process_type);
41: hr_utility.trace('p_assignment_set_id ='||p_assignment_set_id);
42: hr_utility.trace('p_element_set_id ='||p_element_set_id);
43: if p_assignment_set_id is null then
44: lv_assignment_set_id := 'NULL';
37: hr_utility.trace('Entering '||l_proc);
38:
39: hr_utility.trace('p_payroll_action_id ='||p_payroll_action_id);
40: hr_utility.trace('p_process_type ='||p_process_type);
41: hr_utility.trace('p_assignment_set_id ='||p_assignment_set_id);
42: hr_utility.trace('p_element_set_id ='||p_element_set_id);
43: if p_assignment_set_id is null then
44: lv_assignment_set_id := 'NULL';
45: else
38:
39: hr_utility.trace('p_payroll_action_id ='||p_payroll_action_id);
40: hr_utility.trace('p_process_type ='||p_process_type);
41: hr_utility.trace('p_assignment_set_id ='||p_assignment_set_id);
42: hr_utility.trace('p_element_set_id ='||p_element_set_id);
43: if p_assignment_set_id is null then
44: lv_assignment_set_id := 'NULL';
45: else
46: lv_assignment_set_id := p_assignment_set_id;
44: lv_assignment_set_id := 'NULL';
45: else
46: lv_assignment_set_id := p_assignment_set_id;
47: end if;
48: hr_utility.trace('lv_assignment_set_id ='||lv_assignment_set_id);
49:
50: if p_element_set_id is null then
51: lv_element_set_id := 'NULL';
52: else
51: lv_element_set_id := 'NULL';
52: else
53: lv_element_set_id := p_element_set_id;
54: end if;
55: hr_utility.trace('lv_element_set_id ='||lv_element_set_id);
56:
57: -- Original Query without Assignment Set and Element Set
58: --
59: /*
308: )
309: ORDER BY 1,2,13, 5, 7, 9, 11';
310: end if; /*Bug# 5886859 ending here*/
311:
312: hr_utility.trace('lenght of l_query = '||to_char(length(l_query)));
313:
314: hr_utility.trace ('Processing '||p_payroll_action_id);
315:
316: hr_utility.trace('setting l_qryCtx');
310: end if; /*Bug# 5886859 ending here*/
311:
312: hr_utility.trace('lenght of l_query = '||to_char(length(l_query)));
313:
314: hr_utility.trace ('Processing '||p_payroll_action_id);
315:
316: hr_utility.trace('setting l_qryCtx');
317:
318: l_qryCtx := dbms_xmlgen.newcontext(l_query);
312: hr_utility.trace('lenght of l_query = '||to_char(length(l_query)));
313:
314: hr_utility.trace ('Processing '||p_payroll_action_id);
315:
316: hr_utility.trace('setting l_qryCtx');
317:
318: l_qryCtx := dbms_xmlgen.newcontext(l_query);
319:
320: hr_utility.trace('calling xml l_qryCtx');
316: hr_utility.trace('setting l_qryCtx');
317:
318: l_qryCtx := dbms_xmlgen.newcontext(l_query);
319:
320: hr_utility.trace('calling xml l_qryCtx');
321:
322: tmp_clob := dbms_xmlgen.getxml(l_qryCtx);
323:
324: rowKount := dbms_xmlgen.getnumrowsprocessed(l_qryCtx);
321:
322: tmp_clob := dbms_xmlgen.getxml(l_qryCtx);
323:
324: rowKount := dbms_xmlgen.getnumrowsprocessed(l_qryCtx);
325: hr_utility.trace('rowKount = '||rowKount);
326:
327: --storage_limit := DBMS_LOB.GET_STORAGE_LIMIT();
328: --hr_utility.trace ('storage_limit '||to_char(storage_limit));
329:
324: rowKount := dbms_xmlgen.getnumrowsprocessed(l_qryCtx);
325: hr_utility.trace('rowKount = '||rowKount);
326:
327: --storage_limit := DBMS_LOB.GET_STORAGE_LIMIT();
328: --hr_utility.trace ('storage_limit '||to_char(storage_limit));
329:
330: if rowKount = 0 then
331: debug_mesg := 'In get_xmldoc_clob Query return: No Data Found';
332: raise noDataFound;
331: debug_mesg := 'In get_xmldoc_clob Query return: No Data Found';
332: raise noDataFound;
333: else
334: clob_length := dbms_lob.getlength(tmp_clob);
335: hr_utility.trace('clob length '||to_char(clob_length));
336: end if;
337:
338: DBMS_XMLGEN.closeContext(l_qryCtx);
339: hr_utility.trace('Leaving '||l_proc);
335: hr_utility.trace('clob length '||to_char(clob_length));
336: end if;
337:
338: DBMS_XMLGEN.closeContext(l_qryCtx);
339: hr_utility.trace('Leaving '||l_proc);
340: return tmp_clob;
341:
342: EXCEPTION
343: when noDataFound then
343: when noDataFound then
344: if debug_mesg IS NULL THEN
345: debug_mesg := 'In get_xmldoc_clob Exception : noDataFound';
346: end if;
347: hr_utility.trace(debug_mesg) ;
348: hr_utility.raise_error;
349: WHEN others THEN
350: if debug_mesg IS NULL THEN
351: debug_mesg := 'In get_xmldoc_clob Exception : OTHERS';
344: if debug_mesg IS NULL THEN
345: debug_mesg := 'In get_xmldoc_clob Exception : noDataFound';
346: end if;
347: hr_utility.trace(debug_mesg) ;
348: hr_utility.raise_error;
349: WHEN others THEN
350: if debug_mesg IS NULL THEN
351: debug_mesg := 'In get_xmldoc_clob Exception : OTHERS';
352: end if;
349: WHEN others THEN
350: if debug_mesg IS NULL THEN
351: debug_mesg := 'In get_xmldoc_clob Exception : OTHERS';
352: end if;
353: hr_utility.trace(debug_mesg) ;
354: raise;
355: END;
356:
357: --begin
354: raise;
355: END;
356:
357: --begin
358: --hr_utility.trace_on(null, 'payextract');
359:
360: END PAY_PAYROLL_EXTRACT;