DBA Data[Home] [Help]

APPS.PAY_US_MAGTAPE_REPORTING dependencies on HR_UTILITY

Line 67: hr_utility.set_location('pay_us_magtape_reporting.bal_db_item - opening cursor', 1);

63: l_defined_balance_id pay_defined_balances.defined_balance_id%type;
64: --
65: begin
66: --
67: hr_utility.set_location('pay_us_magtape_reporting.bal_db_item - opening cursor', 1);
68: open csr_defined_balance;
69: fetch csr_defined_balance into l_defined_balance_id;
70: if csr_defined_balance%notfound then
71: close csr_defined_balance;

Line 73: raise hr_utility.hr_error;

69: fetch csr_defined_balance into l_defined_balance_id;
70: if csr_defined_balance%notfound then
71: close csr_defined_balance;
72: g_message_text := 'Balance DB item does not exist';
73: raise hr_utility.hr_error;
74: else
75: hr_utility.set_location('pay_us_magtape_reporting.bal_db_item - fetched from cursor', 2);
76: close csr_defined_balance;
77: end if;

Line 75: hr_utility.set_location('pay_us_magtape_reporting.bal_db_item - fetched from cursor', 2);

71: close csr_defined_balance;
72: g_message_text := 'Balance DB item does not exist';
73: raise hr_utility.hr_error;
74: else
75: hr_utility.set_location('pay_us_magtape_reporting.bal_db_item - fetched from cursor', 2);
76: close csr_defined_balance;
77: end if;
78: --
79: return (l_defined_balance_id);

Line 109: hr_utility.set_location('pay_us_magtape_reporting.lookup_jurisdiction_code - opening cursor', 1);

105: l_jurisdiction_code pay_state_rules.jurisdiction_code%type;
106: --
107: begin
108: --
109: hr_utility.set_location('pay_us_magtape_reporting.lookup_jurisdiction_code - opening cursor', 1);
110: open csr_jurisdiction_code;
111: fetch csr_jurisdiction_code into l_jurisdiction_code;
112: if csr_jurisdiction_code%notfound then
113: close csr_jurisdiction_code;

Line 115: raise hr_utility.hr_error;

111: fetch csr_jurisdiction_code into l_jurisdiction_code;
112: if csr_jurisdiction_code%notfound then
113: close csr_jurisdiction_code;
114: g_message_text := 'Cannot find jurisdiction code';
115: raise hr_utility.hr_error;
116: else
117: hr_utility.set_location('pay_us_magtape_reporting.lookup_jurisdiction_code - fetched from cursor', 2);
118: close csr_jurisdiction_code;
119: end if;

Line 117: hr_utility.set_location('pay_us_magtape_reporting.lookup_jurisdiction_code - fetched from cursor', 2);

113: close csr_jurisdiction_code;
114: g_message_text := 'Cannot find jurisdiction code';
115: raise hr_utility.hr_error;
116: else
117: hr_utility.set_location('pay_us_magtape_reporting.lookup_jurisdiction_code - fetched from cursor', 2);
118: close csr_jurisdiction_code;
119: end if;
120: --
121: return (l_jurisdiction_code);

Line 143: hr_utility.set_location('pay_us_magtape_reporting.error_payroll_action - updating pay_ payrol_actions', 1);

139: begin
140: --
141: -- Sets the payroll action to a status of 'E'rror.
142: --
143: hr_utility.set_location('pay_us_magtape_reporting.error_payroll_action - updating pay_ payrol_actions', 1);
144: update pay_payroll_actions PA
145: set PA.action_status = 'E'
146: where PA.payroll_action_id = p_payroll_action_id;
147: --

Line 148: hr_utility.set_location('pay_us_magtape_reporting.error_payroll_action - updated pay_ payrol_actions', 2);

144: update pay_payroll_actions PA
145: set PA.action_status = 'E'
146: where PA.payroll_action_id = p_payroll_action_id;
147: --
148: hr_utility.set_location('pay_us_magtape_reporting.error_payroll_action - updated pay_ payrol_actions', 2);
149: commit;
150: --
151: end error_payroll_action;
152: --

Line 177: hr_utility.set_location('pay_us_magtape_reporting.update_action_statuses - updating pay_ payrol_actions', 1);

173: begin
174: --
175: -- Sets the payroll action to a status of 'C'omplete.
176: --
177: hr_utility.set_location('pay_us_magtape_reporting.update_action_statuses - updating pay_ payrol_actions', 1);
178: update pay_payroll_actions PA
179: set PA.action_status = 'C'
180: where PA.payroll_action_id = p_payroll_action_id;
181: --

Line 184: hr_utility.set_location('pay_us_magtape_reporting.update_action_statuses - updating pay_ assignment_actions', 2);

180: where PA.payroll_action_id = p_payroll_action_id;
181: --
182: -- Sets all successfully processed assignment actions to 'C'omplete.
183: --
184: hr_utility.set_location('pay_us_magtape_reporting.update_action_statuses - updating pay_ assignment_actions', 2);
185: update pay_assignment_actions AA
186: set AA.action_status = 'C'
187: where AA.payroll_action_id = p_payroll_action_id
188: and AA.action_status = 'U';

Line 190: hr_utility.set_location('pay_us_magtape_reporting.update_action_statuses - commiting', 3);

186: set AA.action_status = 'C'
187: where AA.payroll_action_id = p_payroll_action_id
188: and AA.action_status = 'U';
189: --
190: hr_utility.set_location('pay_us_magtape_reporting.update_action_statuses - commiting', 3);
191: commit;
192: --
193: end update_action_statuses;
194: --

Line 265: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - default settings for Federal W2', 1);

261: if p_report_type = 'W2' and p_state = 'FED' then
262: --
263: -- Default settings for Federal W2.
264: --
265: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - default settings for Federal W2', 1);
266: p_period_start := p_year_start;
267: p_period_end := p_year_end;
268: p_defined_balance_id := bal_db_item('GROSS_EARNINGS_PER_GRE_YTD');
269: p_group_by_gre := TRUE;

Line 280: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - default settings for State W2', 2);

276: elsif p_report_type = 'W2' and p_state <> 'FED' then
277: --
278: -- Default settings for State W2.
279: --
280: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - default settings for State W2', 2);
281: p_period_start := p_year_start;
282: p_period_end := p_year_end;
283: p_defined_balance_id := bal_db_item('SIT_GROSS_PER_JD_GRE_YTD');
284: p_group_by_gre := TRUE;

Line 303: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - NY last quarter', 3);

299: -- Period is one of the first 3 quarters of tax year.
300: --
301: if instr(to_char(p_quarter_end,'MM'), '12') = 0 then
302: --
303: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - NY last quarter', 3);
304: p_period_start := p_quarter_start;
305: p_period_end := p_quarter_end;
306: p_defined_balance_id := bal_db_item('SUI_ER_GROSS_PER_JD_GRE_QTD');
307: --

Line 312: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - in NY ', 3);

308: -- Period is the last quarter of the year.
309: --
310: else
311: --
312: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - in NY ', 3);
313: p_period_start := p_year_start;
314: p_period_end := p_year_end;
315: p_defined_balance_id := bal_db_item('SIT_GROSS_PER_JD_GRE_YTD');
316: --

Line 330: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - defalut setting for SQWL ', 4);

326: -- Default settings for State Quarterly Wage Listing.
327: --
328: else
329: --
330: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - defalut setting for SQWL ', 4);
331: p_period_start := p_quarter_start;
332: p_period_end := p_quarter_end;
333: p_defined_balance_id := bal_db_item('SUI_ER_GROSS_PER_JD_GRE_QTD');
334: p_group_by_gre := TRUE;

Line 345: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - invalid report ', 4);

341: -- An invalid report type has been passed so fail.
342: --
343: else
344: --
345: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - invalid report ', 4);
346: raise hr_utility.hr_error;
347: --
348: end if;
349: --

Line 346: raise hr_utility.hr_error;

342: --
343: else
344: --
345: hr_utility.set_location('pay_us_magtape_reporting.get_selection_information - invalid report ', 4);
346: raise hr_utility.hr_error;
347: --
348: end if;
349: --
350: end get_selection_information;

Line 383: hr_utility.set_location('pay_us_magtape_reporting.create_payroll_action - getting nextval', 1);

379: --
380: begin
381: --
382: -- Get the next payroll_action_id value from the sequence.
383: hr_utility.set_location('pay_us_magtape_reporting.create_payroll_action - getting nextval', 1);
384: --
385: select pay_payroll_actions_s.nextval
386: into l_payroll_action_id
387: from sys.dual;

Line 396: hr_utility.set_location('pay_us_magtape_reporting.create_payroll_action - creating payroll action', 2);

392: -- identify each report e.g. FED-W2 on 31-DEC-1995.
393: --
394:
395: -- SQWLD - append p_media_type to parameter string, so redo can detect it
396: hr_utility.set_location('pay_us_magtape_reporting.create_payroll_action - creating payroll action', 2);
397: insert into pay_payroll_actions
398: (payroll_action_id
399: ,action_type
400: ,business_group_id

Line 469: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - creating assignment action', 1);

465: -- assignment action has to be sequenced within the other assignment actions
466: -- according to the date of the payroll action so that the derivation of
467: -- any balances based on the assignment action is correct.
468: --
469: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - creating assignment action', 1);
470: hrassact.inassact(p_payroll_action_id, p_assignment_id);
471: --
472: -- Get the assignment_action_id of the newly created assignment action.
473: --

Line 474: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - opening csr_assignment_action', 2);

470: hrassact.inassact(p_payroll_action_id, p_assignment_id);
471: --
472: -- Get the assignment_action_id of the newly created assignment action.
473: --
474: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - opening csr_assignment_action', 2);
475: open csr_assignment_action;
476: fetch csr_assignment_action into l_assignment_action_id;
477: close csr_assignment_action;
478: --

Line 480: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - updating pay_assignment_actions', 3);

476: fetch csr_assignment_action into l_assignment_action_id;
477: close csr_assignment_action;
478: --
479: --
480: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - updating pay_assignment_actions', 3);
481: update pay_assignment_actions AA
482: set AA.tax_unit_id = p_tax_unit_id
483: where AA.assignment_action_id = l_assignment_action_id;
484: --

Line 487: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - updated pay_assignment_actions', 4);

483: where AA.assignment_action_id = l_assignment_action_id;
484: --
485: -- Return id of new row.
486: --
487: hr_utility.set_location('pay_us_magtape_reporting.create_assignment_action - updated pay_assignment_actions', 4);
488: return (l_assignment_action_id);
489: --
490: end create_assignment_action;
491: --

Line 693: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - get selection_information', 1);

689: -- Return details used to control the selection of people to report on ie.
690: -- the SQL statement to run, the period over which to look for the people,
691: -- how to group the people, etc...
692: --
693: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - get selection_information', 1);
694: get_selection_information
695: (p_report_type,
696: p_state,
697: p_quarter_start,

Line 712: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - get jurisdiction code', 2);

708: --
709: -- Get the jurisdiction code for the state if appropriate.
710: --
711: if l_jurisdiction_context then
712: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - get jurisdiction code', 2);
713: l_jurisdiction_code := lookup_jurisdiction_code(p_state);
714: end if;
715: --
716: -- Open up a cursor for processing a SQL statement.

Line 732: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - get chunk size', 3);

728: --------------------------------------------------------------------
729: -- Get CHUNK_SIZE or default to 20 if CHUNK_SIZE does not exist
730: --------------------------------------------------------------------
731: BEGIN
732: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - get chunk size', 3);
733: SELECT parameter_value
734: INTO l_chunk_size
735: FROM pay_action_parameters
736: WHERE parameter_name = 'CHUNK_SIZE';

Line 755: hr_utility.trace('COMMITTED');

751: --
752: if cnt = l_chunk_size then
753: cnt := 0;
754: commit;
755: hr_utility.trace('COMMITTED');
756: end if;
757: --
758: cnt := cnt + 1;
759: hr_utility.trace('CNT:::: '||cnt||'CHUNK SIZE::: '||l_chunk_size);

Line 759: hr_utility.trace('CNT:::: '||cnt||'CHUNK SIZE::: '||l_chunk_size);

755: hr_utility.trace('COMMITTED');
756: end if;
757: --
758: cnt := cnt + 1;
759: hr_utility.trace('CNT:::: '||cnt||'CHUNK SIZE::: '||l_chunk_size);
760: --
761: -- Fetch next row from the appropriate cursor.
762: --
763: --

Line 766: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - fetching from c_federal', 4);

762: --
763: --
764: IF l_state = 'FED' THEN
765: --
766: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - fetching from c_federal', 4);
767: FETCH c_federal INTO l_person_id,
768: l_assignment_id,
769: l_tax_unit_id,
770: l_effective_end_date;

Line 775: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - fetching from c_state', 4);

771: EXIT WHEN c_federal%NOTFOUND;
772: --
773: ELSE
774: --
775: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - fetching from c_state', 4);
776: FETCH c_state INTO l_person_id,
777: l_assignment_id,
778: l_tax_unit_id,
779: l_effective_end_date;

Line 811: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - setting tax_unit_id context', 5);

807: --
808: -- Set up TAX_UNIT_ID context if appropriate.
809: --
810: if l_tax_unit_context then
811: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - setting tax_unit_id context', 5);
812: pay_balance_pkg.set_context('TAX_UNIT_ID',l_tax_unit_id);
813: end if;
814: --
815: -- Set up JURISDICTION_CODE context if appropriate.

Line 818: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - setting jurisdiction_code context', 6);

814: --
815: -- Set up JURISDICTION_CODE context if appropriate.
816: --
817: if l_jurisdiction_context then
818: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - setting jurisdiction_code context', 6);
819: pay_balance_pkg.set_context('JURISDICTION_CODE',l_jurisdiction_code);
820: end if;
821: --
822: --

Line 825: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - check balance', 7);

821: --
822: --
823: -- Check the balance.
824: --
825: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - check balance', 7);
826:
827: l_value := pay_balance_pkg.get_value
828: (l_defined_balance_id,
829: l_assignment_id,

Line 843: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - creating payroll action id', 8);

839: --
840: if not l_payroll_action_created then
841: --
842: -- Create payroll action for the magnetic tape report.
843: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - creating payroll action id', 8);
844: --
845: -- SQWLD - add p_media_type parameter
846: l_payroll_action_id := create_payroll_action
847: (p_report_type,

Line 863: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - creating assignment action id', 9);

859: --
860: -- Create the assignment action to represnt the person / tax unit
861: -- combination.
862: --
863: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - creating assignment action id', 9);
864: l_assignment_action_id := create_assignment_action
865: (l_payroll_action_id,
866: l_assignment_id,
867: l_tax_unit_id);

Line 910: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - updating pay_payroll_actions', 10);

906: --
907: -- Update the population status of the payroll action to indicate that all
908: -- the assignment actions have been created for it.
909: --
910: hr_utility.set_location('pay_us_magtape_reporting.generate_people_list - updating pay_payroll_actions', 10);
911: update pay_payroll_actions PPA
912: set PPA.action_population_status = 'C'
913: where PPA.payroll_action_id = l_payroll_action_id;
914: --

Line 955: hr_utility.set_location('pay_us_magtape_reporting.redo - get parameters', 1);

951: begin
952: --
953: -- Derive the rest of the parameters from the payroll_action_id
954: --
955: hr_utility.set_location('pay_us_magtape_reporting.redo - get parameters', 1);
956: select PA.effective_date,
957: ltrim(substr(PA.legislative_parameters, 11,5)),
958: ltrim(substr(PA.legislative_parameters, 17,5)),
959: to_char(PA.effective_date,'YYYY'),

Line 976: hr_utility.set_location('pay_us_magtape_reporting.redo - update pay_payroll_actions', 2);

972: from pay_payroll_actions PA
973: where PA.payroll_action_id = p_payroll_action_id;
974:
975: --
976: hr_utility.set_location('pay_us_magtape_reporting.redo - update pay_payroll_actions', 2);
977: update pay_payroll_actions pa
978: set PA.action_status = 'M'
979: where PA.payroll_action_id = p_payroll_action_id;
980:

Line 981: hr_utility.set_location('pay_us_magtape_reporting.redo - update pay_assignment_actions', 3);

977: update pay_payroll_actions pa
978: set PA.action_status = 'M'
979: where PA.payroll_action_id = p_payroll_action_id;
980:
981: hr_utility.set_location('pay_us_magtape_reporting.redo - update pay_assignment_actions', 3);
982: update pay_assignment_actions AA
983: set AA.action_status = 'M'
984: where AA.payroll_action_id = p_payroll_action_id;
985:

Line 994: hr_utility.set_location('pay_us_magtape_reporting.redo - run_magtape', 4);

990: END LOOP;
991:
992: -- Start the generic magnetic tape process.
993: --
994: hr_utility.set_location('pay_us_magtape_reporting.redo - run_magtape', 4);
995: run_magtape(l_effective_date,
996: l_report_type,
997: p_payroll_action_id,
998: l_state,

Line 1005: hr_utility.set_location('pay_us_magtape_reporting.redo - update pay_assignment_actions', 5);

1001: l_trans_legal_co_id,
1002: l_media_type);
1003:
1004: --
1005: hr_utility.set_location('pay_us_magtape_reporting.redo - update pay_assignment_actions', 5);
1006: update pay_assignment_actions AA
1007: set AA.action_status = 'C'
1008: where AA.payroll_action_id = p_payroll_action_id;
1009:

Line 1020: when hr_utility.hr_error then

1016: -- Traps all exceptions raised within the procedure, extracts the message
1017: -- text associated with the exception and sets this up for SRS to read.
1018: --
1019: exception
1020: when hr_utility.hr_error then
1021: --
1022: -- If a payroll action exists then error it.
1023: --
1024: if p_payroll_action_id is not null then

Line 1114: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - get report format', 1);

1110:
1111: --
1112: -- Get the format to be used to produce the report.
1113: --
1114: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - get report format', 1);
1115: -- SQWLD - pass p_media_type parameter
1116: l_format := lookup_format(p_effective_date,
1117: p_report_type,
1118: p_state,

Line 1123: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - determine filename', 2);

1119: p_media_type);
1120: --
1121: -- Determine the name of the output filename
1122: --
1123: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - determine filename', 2);
1124:
1125: if p_report_type = 'W2' and p_state = 'FED' then
1126:
1127: l_magfilename := p_state || p_report_type || '_' ||

Line 1149: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - determine reporting quarter', 3);

1145: l_sumfilename := p_report_type;
1146:
1147: end if;
1148:
1149: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - determine reporting quarter', 3);
1150: if substr(p_reporting_quarter, 1, 2) = '03' then
1151: l_date := 'March 31';
1152: elsif substr(p_reporting_quarter, 1, 2) = '06' then
1153: l_date := 'June 30';

Line 1188: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - submit request', 4);

1184: -- the process is registered with SRS. This process is run as a sub request
1185: -- of the process running this PLSQL. This should result in the PLSQL
1186: -- process being paused while the magnetic tape process runs.
1187: --
1188: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - submit request', 4);
1189: l_request_id :=
1190: fnd_request.submit_request
1191: ('PAY'
1192: ,program => 'PYUMAG'

Line 1286: raise hr_utility.hr_error;

1282: -- If it has not then handle the error.
1283: --
1284: if l_request_id = 0 then
1285: g_message_text := 'Failed to submit concurrent request';
1286: raise hr_utility.hr_error;
1287: end if;
1288: --
1289: -- Request has been accepted so update payroll action with the
1290: -- request details.

Line 1292: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - update pay_payroll_actions', 5);

1288: --
1289: -- Request has been accepted so update payroll action with the
1290: -- request details.
1291: --
1292: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - update pay_payroll_actions', 5);
1293: update pay_payroll_actions PPA
1294: set PPA.request_id = l_request_id
1295: where PPA.payroll_action_id = p_payroll_action_id;
1296: --

Line 1303: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - wait for process to finish', 6);

1299: commit;
1300: --
1301: -- Wait for process to finish and get its status..
1302: --
1303: hr_utility.set_location('pay_us_magtape_reporting.run_magtape - wait for process to finish', 6);
1304: -- l_wait := fnd_concurrent.wait_for_request
1305: -- (request_id => l_request_id
1306: -- ,interval => 5
1307: -- ,max_wait => 9999999 /* until child finishes */

Line 1318: -- raise hr_utility.hr_error;

1314: -- Process has failed.
1315: --
1316: -- if not (l_dev_phase = 'COMPLETE' and l_dev_status = 'NORMAL') then
1317: -- g_message_text := 'Magnetic tape process has failed';
1318: -- raise hr_utility.hr_error;
1319: -- end if;
1320: --
1321: end run_magtape;
1322: --

Line 1385: hr_utility.set_location('pay_us_magtape_reporting.get dates', 1);

1381: --
1382: elsif p_report_type = 'SQWL' then
1383: p_rep_year := p_year;
1384: p_rep_quarter := p_quarter || to_char(to_date(p_year, 'YYYY'),'YY');
1385: hr_utility.set_location('pay_us_magtape_reporting.get dates', 1);
1386: l_rep_quarter := p_quarter || to_char(to_date(p_year, 'YYYY'),'YYYY');
1387: hr_utility.set_location('pay_us_magtape_reporting.get dates', 2);
1388: hr_utility.trace('l_rep_quarter'||l_rep_quarter);
1389: p_period_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));

Line 1387: hr_utility.set_location('pay_us_magtape_reporting.get dates', 2);

1383: p_rep_year := p_year;
1384: p_rep_quarter := p_quarter || to_char(to_date(p_year, 'YYYY'),'YY');
1385: hr_utility.set_location('pay_us_magtape_reporting.get dates', 1);
1386: l_rep_quarter := p_quarter || to_char(to_date(p_year, 'YYYY'),'YYYY');
1387: hr_utility.set_location('pay_us_magtape_reporting.get dates', 2);
1388: hr_utility.trace('l_rep_quarter'||l_rep_quarter);
1389: p_period_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));
1390: hr_utility.set_location('pay_us_magtape_reporting.get dates', 3);
1391: p_quarter_start := add_months(p_period_end, -3) + 1;

Line 1388: hr_utility.trace('l_rep_quarter'||l_rep_quarter);

1384: p_rep_quarter := p_quarter || to_char(to_date(p_year, 'YYYY'),'YY');
1385: hr_utility.set_location('pay_us_magtape_reporting.get dates', 1);
1386: l_rep_quarter := p_quarter || to_char(to_date(p_year, 'YYYY'),'YYYY');
1387: hr_utility.set_location('pay_us_magtape_reporting.get dates', 2);
1388: hr_utility.trace('l_rep_quarter'||l_rep_quarter);
1389: p_period_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));
1390: hr_utility.set_location('pay_us_magtape_reporting.get dates', 3);
1391: p_quarter_start := add_months(p_period_end, -3) + 1;
1392: hr_utility.set_location('pay_us_magtape_reporting.get dates', 4);

Line 1390: hr_utility.set_location('pay_us_magtape_reporting.get dates', 3);

1386: l_rep_quarter := p_quarter || to_char(to_date(p_year, 'YYYY'),'YYYY');
1387: hr_utility.set_location('pay_us_magtape_reporting.get dates', 2);
1388: hr_utility.trace('l_rep_quarter'||l_rep_quarter);
1389: p_period_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));
1390: hr_utility.set_location('pay_us_magtape_reporting.get dates', 3);
1391: p_quarter_start := add_months(p_period_end, -3) + 1;
1392: hr_utility.set_location('pay_us_magtape_reporting.get dates', 4);
1393: p_quarter_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));
1394: hr_utility.set_location('pay_us_magtape_reporting.get dates', 5);

Line 1392: hr_utility.set_location('pay_us_magtape_reporting.get dates', 4);

1388: hr_utility.trace('l_rep_quarter'||l_rep_quarter);
1389: p_period_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));
1390: hr_utility.set_location('pay_us_magtape_reporting.get dates', 3);
1391: p_quarter_start := add_months(p_period_end, -3) + 1;
1392: hr_utility.set_location('pay_us_magtape_reporting.get dates', 4);
1393: p_quarter_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));
1394: hr_utility.set_location('pay_us_magtape_reporting.get dates', 5);
1395: end if;
1396: --

Line 1394: hr_utility.set_location('pay_us_magtape_reporting.get dates', 5);

1390: hr_utility.set_location('pay_us_magtape_reporting.get dates', 3);
1391: p_quarter_start := add_months(p_period_end, -3) + 1;
1392: hr_utility.set_location('pay_us_magtape_reporting.get dates', 4);
1393: p_quarter_end := last_day(to_date(l_rep_quarter, 'MMYYYY'));
1394: hr_utility.set_location('pay_us_magtape_reporting.get dates', 5);
1395: end if;
1396: --
1397: p_year_start := to_date('01-01-'||p_rep_year, 'DD-MM-YYYY');
1398: p_year_end := to_date('31-12-'||p_rep_year, 'DD-MM-YYYY');

Line 1446: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique -opening cursor', 1);

1442: begin
1443: --
1444: -- Check report has not already been run.
1445: --
1446: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique -opening cursor', 1);
1447: open csr_payroll_action;
1448: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique -fetching cursor', 2);
1449: fetch csr_payroll_action into l_payroll_action_id;
1450: if csr_payroll_action%found then

Line 1448: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique -fetching cursor', 2);

1444: -- Check report has not already been run.
1445: --
1446: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique -opening cursor', 1);
1447: open csr_payroll_action;
1448: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique -fetching cursor', 2);
1449: fetch csr_payroll_action into l_payroll_action_id;
1450: if csr_payroll_action%found then
1451: close csr_payroll_action;
1452: g_message_text := 'Report has already been run';

Line 1453: raise hr_utility.hr_error;

1449: fetch csr_payroll_action into l_payroll_action_id;
1450: if csr_payroll_action%found then
1451: close csr_payroll_action;
1452: g_message_text := 'Report has already been run';
1453: raise hr_utility.hr_error;
1454: else
1455: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique - report unique', 3);
1456: close csr_payroll_action;
1457: end if;

Line 1455: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique - report unique', 3);

1451: close csr_payroll_action;
1452: g_message_text := 'Report has already been run';
1453: raise hr_utility.hr_error;
1454: else
1455: hr_utility.set_location('pay_us_magtape_reporting.check_report_unique - report unique', 3);
1456: close csr_payroll_action;
1457: end if;
1458: --
1459: end check_report_unique;

Line 1506: hr_utility.trace('lookup_format, p_media_type: <' || p_media_type || '>');

1502: --
1503: begin
1504: --
1505:
1506: hr_utility.trace('lookup_format, p_media_type: <' || p_media_type || '>');
1507:
1508: -- BHOMAN _ hard-coded support for SD diskette format
1509: -- if p_report_type = 'SQWL' AND p_state in ('SD') AND p_media_type = 'PD' then
1510: -- return 'SDSQWLD';

Line 1519: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - get format', 1);

1515: -- Get the diskette format.
1516: --
1517: --
1518: open csr_disk_format;
1519: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - get format', 1);
1520: fetch csr_disk_format into l_format;
1521: if csr_disk_format%notfound then
1522: close csr_disk_format;
1523: g_message_text := 'Cannot find format for report';

Line 1524: raise hr_utility.hr_error;

1520: fetch csr_disk_format into l_format;
1521: if csr_disk_format%notfound then
1522: close csr_disk_format;
1523: g_message_text := 'Cannot find format for report';
1524: raise hr_utility.hr_error;
1525: else
1526: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - found format', 2);
1527: close csr_disk_format;
1528: end if;

Line 1526: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - found format', 2);

1522: close csr_disk_format;
1523: g_message_text := 'Cannot find format for report';
1524: raise hr_utility.hr_error;
1525: else
1526: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - found format', 2);
1527: close csr_disk_format;
1528: end if;
1529: else -- not SQWLD and diskette
1530: -- Get the tape format.

Line 1533: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - get format', 1);

1529: else -- not SQWLD and diskette
1530: -- Get the tape format.
1531: --
1532: open csr_tape_format;
1533: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - get format', 1);
1534: fetch csr_tape_format into l_format;
1535: if csr_tape_format%notfound then
1536: close csr_tape_format;
1537: g_message_text := 'Cannot find format for report';

Line 1538: raise hr_utility.hr_error;

1534: fetch csr_tape_format into l_format;
1535: if csr_tape_format%notfound then
1536: close csr_tape_format;
1537: g_message_text := 'Cannot find format for report';
1538: raise hr_utility.hr_error;
1539: else
1540: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - found format', 2);
1541: close csr_tape_format;
1542: end if;

Line 1540: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - found format', 2);

1536: close csr_tape_format;
1537: g_message_text := 'Cannot find format for report';
1538: raise hr_utility.hr_error;
1539: else
1540: hr_utility.set_location('pay_us_magtape_reporting.lookup_format - found format', 2);
1541: close csr_tape_format;
1542: end if;
1543: end if;
1544: --

Line 1607: hr_utility.set_location('pay_us_magtape_reporting.run - get dates', 1);

1603: begin
1604: --
1605: -- Derive the start and end dates of the period being reported on.
1606: --
1607: hr_utility.set_location('pay_us_magtape_reporting.run - get dates', 1);
1608: get_dates(p_report_type,
1609: p_quarter,
1610: p_year,
1611: c_period_end,

Line 1621: hr_utility.set_location('pay_us_magtape_reporting.run - check report unique', 2);

1617: c_reporting_quarter);
1618: --
1619: -- Make sure the report has not already been run.
1620: --
1621: hr_utility.set_location('pay_us_magtape_reporting.run - check report unique', 2);
1622: check_report_unique(p_business_group_id,
1623: c_period_end,
1624: p_report_type,
1625: p_state);

Line 1631: hr_utility.set_location('pay_us_magtape_reporting.run - get report format', 3);

1627:
1628: --
1629: -- Get the format to be used to produce the report.
1630: --
1631: hr_utility.set_location('pay_us_magtape_reporting.run - get report format', 3);
1632: l_format := lookup_format(c_period_end,
1633: p_report_type,
1634: p_state,
1635: p_media_type);

Line 1653: hr_utility.set_location('pay_us_magtape_reporting.run - generate people list', 4);

1649: -- run. If there are no people to report on then there is no need to
1650: -- submit the process to produce the report. The variable
1651: -- l_payroll_action_id holds the ID of the created payroll action.
1652: --
1653: hr_utility.set_location('pay_us_magtape_reporting.run - generate people list', 4);
1654: l_payroll_action_id := generate_people_list(p_report_type,
1655: p_state,
1656: l_trans_legal_co_id,
1657: p_business_group_id,

Line 1676: hr_utility.set_location('pay_us_magtape_reporting.run - initiate archiving', 5);

1672: if l_payroll_action_id is not null then
1673: --
1674: -- Initiate archiving
1675: --
1676: hr_utility.set_location('pay_us_magtape_reporting.run - initiate archiving', 5);
1677: pay_magtape_extract.arch_main('S',
1678: l_payroll_action_id);
1679: --
1680: -- Start the generic magnetic tape process.

Line 1682: hr_utility.set_location('pay_us_magtape_reporting.run - run magtape', 6);

1678: l_payroll_action_id);
1679: --
1680: -- Start the generic magnetic tape process.
1681: --
1682: hr_utility.set_location('pay_us_magtape_reporting.run - run magtape', 6);
1683: run_magtape(c_period_end,
1684: p_report_type,
1685: l_payroll_action_id,
1686: p_state,

Line 1701: hr_utility.raise_error;

1697: -- Set up message explaining why report was not produced.
1698: --
1699: g_message_text := 'There are no employees that match ' ||
1700: 'the criteria for the report';
1701: hr_utility.raise_error;
1702: --
1703: end if;
1704: --
1705: -- Process completed successfully.

Line 1709: hr_utility.set_location('pay_us_magtape_reporting.run - update action status', 6);

1705: -- Process completed successfully.
1706: --
1707: -- Update the status of the payroll and assignments actions.
1708: --
1709: hr_utility.set_location('pay_us_magtape_reporting.run - update action status', 6);
1710: update_action_statuses(l_payroll_action_id);
1711: --
1712: -- Set up success return code.
1713: --

Line 1720: when hr_utility.hr_error then

1716: -- Traps all exceptions raised within the procedure, extracts the message
1717: -- text associated with the exception and sets this up for SRS to read.
1718: --
1719: exception
1720: when hr_utility.hr_error then
1721: --
1722: -- If a payroll action exists then error it.
1723: --
1724: if l_payroll_action_id is not null then