DBA Data[Home] [Help]

APPS.PAY_US_MMREF_REPORTING dependencies on PAY_US_MMREF_REPORTING

Line 1: PACKAGE BODY pay_us_mmref_reporting AS

1: PACKAGE BODY pay_us_mmref_reporting AS
2: /* $Header: pyusmmye.pkb 120.18.12010000.4 2008/08/06 08:34:13 ubhat ship $ */
3: /*REM +======================================================================+
4: REM | Copyright (c) 1997 Oracle Corporation |
5: REM | Redwood Shores, California, USA |

Line 8: REM Package Body Name : pay_us_mmref_reporting

4: REM | Copyright (c) 1997 Oracle Corporation |
5: REM | Redwood Shores, California, USA |
6: REM | All rights reserved. |
7: REM +======================================================================+
8: REM Package Body Name : pay_us_mmref_reporting
9: REM Package File Name : pay_us_mmref_reporting.pkb
10: REM Description : This package declares functions and procedures to support
11: REM the genration of magnetic W2 reports for US legislative requirements
12: REM incorporating magtape resilience and the new end-of-year processing.

Line 9: REM Package File Name : pay_us_mmref_reporting.pkb

5: REM | Redwood Shores, California, USA |
6: REM | All rights reserved. |
7: REM +======================================================================+
8: REM Package Body Name : pay_us_mmref_reporting
9: REM Package File Name : pay_us_mmref_reporting.pkb
10: REM Description : This package declares functions and procedures to support
11: REM the genration of magnetic W2 reports for US legislative requirements
12: REM incorporating magtape resilience and the new end-of-year processing.
13: REM

Line 151: ('pay_us_mmref_reporting.bal_db_item - opening cursor', 10);

147: AND UE.legislation_code = 'US'; /* Bug:2296797 */
148: l_defined_balance_id pay_defined_balances.defined_balance_id%TYPE;
149: BEGIN
150: hr_utility.set_location
151: ('pay_us_mmref_reporting.bal_db_item - opening cursor', 10);
152: -- Open the cursor
153: OPEN csr_defined_balance;
154: -- Fetch the value
155: FETCH csr_defined_balance

Line 160: ('pay_us_mmref_reporting.bal_db_item - no rows found from cursor', 20);

156: INTO l_defined_balance_id;
157: IF csr_defined_balance%NOTFOUND THEN
158: CLOSE csr_defined_balance;
159: hr_utility.set_location
160: ('pay_us_mmref_reporting.bal_db_item - no rows found from cursor', 20);
161: hr_utility.raise_error;
162: ELSE
163: hr_utility.set_location
164: ('pay_us_mmref_reporting.bal_db_item - fetched from cursor', 30);

Line 164: ('pay_us_mmref_reporting.bal_db_item - fetched from cursor', 30);

160: ('pay_us_mmref_reporting.bal_db_item - no rows found from cursor', 20);
161: hr_utility.raise_error;
162: ELSE
163: hr_utility.set_location
164: ('pay_us_mmref_reporting.bal_db_item - fetched from cursor', 30);
165: CLOSE csr_defined_balance;
166: END IF;
167: /* Return the value to the call */
168: RETURN (l_defined_balance_id);

Line 201: ('pay_us_mmref_reporting.get_report_parameters', 10);

197: p_business_group_id IN OUT nocopy NUMBER
198: ) IS
199: BEGIN
200: hr_utility.set_location
201: ('pay_us_mmref_reporting.get_report_parameters', 10);
202: SELECT ppa.start_date,
203: ppa.effective_date,
204: ppa.business_group_id,
205: ppa.report_qualifier,

Line 220: ('pay_us_mmref_reporting.get_report_parameters', 20);

216: INTO p_state_code
217: FROM pay_us_states
218: WHERE state_abbrev = p_state_abbrev;
219: hr_utility.set_location
220: ('pay_us_mmref_reporting.get_report_parameters', 20);
221: ELSE
222: p_state_code := '';
223: hr_utility.set_location
224: ('pay_us_mmref_reporting.get_report_parameters', 30);

Line 224: ('pay_us_mmref_reporting.get_report_parameters', 30);

220: ('pay_us_mmref_reporting.get_report_parameters', 20);
221: ELSE
222: p_state_code := '';
223: hr_utility.set_location
224: ('pay_us_mmref_reporting.get_report_parameters', 30);
225: END IF;
226: IF p_state_abbrev = 'FED' AND p_report_type = 'W2' THEN
227: p_report_type := 'FEDW2';
228: ELSIF p_report_type = 'W2' THEN

Line 232: ('pay_us_mmref_reporting.get_report_parameters', 40);

228: ELSIF p_report_type = 'W2' THEN
229: p_report_type := 'STW2';
230: END IF;
231: hr_utility.set_location
232: ('pay_us_mmref_reporting.get_report_parameters', 40);
233: END get_report_parameters;
234: -------------------------------------------------------------------------
235: -- Name : get_balance_value
236: --

Line 260: ('pay_us_mmref_reporting.get_balance_value', 10);

256: ) RETURN NUMBER IS
257: l_jurisdiction_code VARCHAR2(20);
258: BEGIN
259: hr_utility.set_location
260: ('pay_us_mmref_reporting.get_balance_value', 10);
261: pay_balance_pkg.set_context('TAX_UNIT_ID', p_tax_unit_id);
262: IF p_state_abbrev <> 'FED' THEN
263: SELECT jurisdiction_code
264: INTO l_jurisdiction_code

Line 268: ('pay_us_mmref_reporting.get_balance_value', 15);

264: INTO l_jurisdiction_code
265: FROM pay_state_rules
266: WHERE state_code = p_state_abbrev;
267: hr_utility.set_location
268: ('pay_us_mmref_reporting.get_balance_value', 15);
269: pay_balance_pkg.set_context('JURISDICTION_CODE', l_jurisdiction_code);
270: END IF;
271: hr_utility.trace(p_balance_name);
272: hr_utility.trace('Context');

Line 276: ('pay_us_mmref_reporting.get_balance_value', 20);

272: hr_utility.trace('Context');
273: hr_utility.trace('Tax Unit Id: '|| p_tax_unit_id);
274: hr_utility.trace('Jurisdiction: '|| l_jurisdiction_code);
275: hr_utility.set_location
276: ('pay_us_mmref_reporting.get_balance_value', 20);
277: RETURN pay_balance_pkg.get_value(bal_db_item(p_balance_name),
278: p_assignment_id, p_effective_date);
279: END get_balance_value;
280: --------------------------------------------------------------------------

Line 585: hr_utility.set_location('pay_us_mmref_reporting.preprocess_check', 10);

581: CLOSE c_gre_payroll_action;
582:
583: /* end of Transmitter Checking */
584:
585: hr_utility.set_location('pay_us_mmref_reporting.preprocess_check', 10);
586:
587: FOR gre_rec IN c_get_gre LOOP
588: /* set l_gre to gre Fethched */
589:

Line 722: hr_utility.set_location('pay_us_mmref_reporting.preprocess_check', 99);

718:
719: /* Code commented to fix Bug # 3069840
720:
721: IF p_report_type = 'FEDW2' THEN --federal W2
722: hr_utility.set_location('pay_us_mmref_reporting.preprocess_check', 99);
723: OPEN c_gre_fed(gre_rec.gre);
724: ELSIF p_report_type = 'STW2' THEN --state W2
725: OPEN c_gre_state(gre_rec.gre);
726: END IF;

Line 736: hr_utility.set_location('pay_us_mmref_reporting.preprocess_check',20);

732: -- Start feching Persons for GRE
733: FETCH c_gre_fed INTO l_person
734: ,l_assignment
735: ,l_asg_effective_dt;
736: hr_utility.set_location('pay_us_mmref_reporting.preprocess_check',20);
737: hr_utility.trace('GRE:' || TO_CHAR(l_gre));
738: hr_utility.trace('Assignment ID:' || TO_CHAR(l_assignment));
739: hr_utility.trace('Person ID:' || TO_CHAR(l_person));
740: hr_utility.trace('Effective Date:' || TO_CHAR(l_asg_effective_dt));

Line 764: hr_utility.trace('pay_us_mmref_reporting.preprocess_check');

760: END IF;
761: END IF; -- report type = 'STW2' and etc
762:
763:
764: hr_utility.trace('pay_us_mmref_reporting.preprocess_check');
765: hr_utility.trace('GRE - '||to_char(l_gre));
766:
767: -- get the balance for person
768:

Line 902: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor', 10);

898: p_state_code VARCHAR2(2);
899: p_report_type VARCHAR2(30);
900: BEGIN
901:
902: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor', 10);
903: get_report_parameters(
904: p_pactid,
905: p_year_start,
906: p_year_end,

Line 912: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor', 20);

908: p_state_code,
909: p_report_type,
910: p_business_group_id
911: );
912: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor', 20);
913: IF preprocess_check(p_pactid,
914: p_year_start,
915: p_year_end,
916: p_business_group_id,

Line 947: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',

943: and hoi.org_information_context =
944: ''1099R Magnetic Report Rules'')
945: ORDER BY paf.person_id
946: ';
947: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',
948: 30);
949: ELSIF p_report_type = 'STW2' and p_state_abbrev = 'IN' THEN
950: p_sqlstr := 'SELECT DISTINCT '||
951: 'to_number(paa.serial_number) '||

Line 1015: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',

1011: 'and hoi.org_information_context = '||
1012: '''1099R Magnetic Report Rules'' '||
1013: ') '||
1014: 'order by to_number(paa.serial_number)';
1015: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',
1016: 40);
1017: ELSIF p_report_type = 'STW2' and p_state_abbrev = 'OH' THEN
1018: p_sqlstr := 'SELECT DISTINCT '||
1019: 'to_number(paa.serial_number) '||

Line 1083: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',

1079: 'and hoi.org_information_context = '||
1080: '''1099R Magnetic Report Rules'' '||
1081: ') '||
1082: 'order by to_number(paa.serial_number)';
1083: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',
1084: 40);
1085:
1086: ELSIF p_report_type = 'STW2' THEN
1087: p_sqlstr := '

Line 1133: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',

1129: and hoi.org_information_context =
1130: ''1099R Magnetic Report Rules''
1131: )
1132: order by to_number(paa.serial_number)';
1133: hr_utility.set_location( 'pay_us_mmref_reporting.range_cursor',
1134: 40);
1135: END IF;
1136: END IF;
1137: END range_cursor;

Line 1557: hr_utility.set_location( 'pay_us_mmref_reporting.create_assignement_act',

1553: l_gre_id := -1;
1554: l_error_flag := 'N';
1555:
1556: -- Get the report parameters. These define the report being run.
1557: hr_utility.set_location( 'pay_us_mmref_reporting.create_assignement_act',
1558: 10);
1559: get_report_parameters(
1560: p_pactid,
1561: l_year_start,

Line 1571: hr_utility.set_location( 'pay_us_mmref_reporting.create_assignement_act',

1567: );
1568: --Currently all reports group by GRE
1569: l_group_by_gre := TRUE;
1570: --Open the appropriate cursor
1571: hr_utility.set_location( 'pay_us_mmref_reporting.create_assignement_act',
1572: 20);
1573: IF l_report_type = 'FEDW2' THEN
1574: OPEN c_federal;
1575: --

Line 1597: 'pay_us_mmref_reporting.create_assignement_act', 30);

1593: l_tax_unit_id,
1594: l_effective_end_date,
1595: l_assignment_action_id;
1596: hr_utility.set_location(
1597: 'pay_us_mmref_reporting.create_assignement_act', 30);
1598: EXIT WHEN c_federal%NOTFOUND;
1599: ELSIF l_report_type = 'STW2' and l_state_abbrev = 'PR' THEN
1600: FETCH c_pr_state INTO l_person_id,
1601: l_assignment_id,

Line 1607: 'pay_us_mmref_reporting.create_assignement_act', 40);

1603: l_effective_end_date,
1604: l_assignment_action_id,
1605: l_w2_box17;
1606: hr_utility.set_location(
1607: 'pay_us_mmref_reporting.create_assignement_act', 40);
1608: EXIT WHEN c_pr_state%NOTFOUND;
1609: -- Check the state Tax rules if new gre
1610: -- Set the Error Flag to Y so that Action Creation will Error
1611: -- At the End

Line 1633: 'pay_us_mmref_reporting.create_assignement_act', 40);

1629: l_effective_end_date,
1630: l_assignment_action_id,
1631: l_w2_box17;
1632: hr_utility.set_location(
1633: 'pay_us_mmref_reporting.create_assignement_act', 40);
1634: EXIT WHEN c_state_indiana%NOTFOUND;
1635: -- Check the state Tax rules if new gre
1636: -- Set the Error Flag to Y so that Action Creation will Error
1637: -- At the End

Line 1660: 'pay_us_mmref_reporting.create_assignement_act', 40);

1656: l_effective_end_date,
1657: l_assignment_action_id,
1658: l_w2_box17;
1659: hr_utility.set_location(
1660: 'pay_us_mmref_reporting.create_assignement_act', 40);
1661: EXIT WHEN c_state_ohio%NOTFOUND;
1662: -- Check the state Tax rules if new gre
1663: -- Set the Error Flag to Y so that Action Creation will Error
1664: -- At the End

Line 1686: 'pay_us_mmref_reporting.create_assignement_act', 40);

1682: l_effective_end_date,
1683: l_assignment_action_id,
1684: l_w2_box17;
1685: hr_utility.set_location(
1686: 'pay_us_mmref_reporting.create_assignement_act', 40);
1687: EXIT WHEN c_state%NOTFOUND;
1688: -- Check the state Tax rules if new gre
1689: -- Set the Error Flag to Y so that Action Creation will Error
1690: -- At the End

Line 1717: 'pay_us_mmref_reporting.create_assignement_act', 50);

1713: (NOT l_group_by_gre AND
1714: l_person_id = l_prev_person_id)) THEN
1715: --Do Nothing
1716: hr_utility.set_location(
1717: 'pay_us_mmref_reporting.create_assignement_act', 50);
1718: NULL;
1719: ELSE
1720: --Create the assignment action for the record
1721: hr_utility.trace('Assignment Fetched - ');

Line 1792: 'pay_us_mmref_reporting.create_assignement_act', 60);

1788: SELECT pay_assignment_actions_s.nextval
1789: INTO lockingactid
1790: FROM dual;
1791: hr_utility.set_location(
1792: 'pay_us_mmref_reporting.create_assignement_act', 60);
1793: hr_nonrun_asact.insact(lockingactid, l_assignment_id, p_pactid,
1794: p_chunk, l_tax_unit_id);
1795: hr_utility.set_location(
1796: 'pay_us_mmref_reporting.create_assignement_act', 70);

Line 1796: 'pay_us_mmref_reporting.create_assignement_act', 70);

1792: 'pay_us_mmref_reporting.create_assignement_act', 60);
1793: hr_nonrun_asact.insact(lockingactid, l_assignment_id, p_pactid,
1794: p_chunk, l_tax_unit_id);
1795: hr_utility.set_location(
1796: 'pay_us_mmref_reporting.create_assignement_act', 70);
1797: --update serial number for highly compensated people for the
1798: --state W2.
1799: /*IF l_report_type = 'STW2' THEN
1800: hr_utility.set_location(

Line 1801: 'pay_us_mmref_reporting.create_assignement_act', 80);

1797: --update serial number for highly compensated people for the
1798: --state W2.
1799: /*IF l_report_type = 'STW2' THEN
1800: hr_utility.set_location(
1801: 'pay_us_mmref_reporting.create_assignement_act', 80);
1802: IF l_w2_box17 > 9999999.99 THEN
1803: UPDATE pay_assignment_actions
1804: SET serial_number = 999999
1805: WHERE assignment_action_id = lockingactid;

Line 1810: 'pay_us_mmref_reporting.create_assignement_act', 90);

1806: END IF;
1807: END IF;*/ -- 4490252
1808: hr_nonrun_asact.insint(lockingactid, l_assignment_action_id);
1809: hr_utility.set_location(
1810: 'pay_us_mmref_reporting.create_assignement_act', 90);
1811: hr_utility.trace('Interlock Created - ');
1812: hr_utility.trace('Locking Action : '|| to_char(lockingactid));
1813: hr_utility.trace('Locked Action : '|| to_char(l_assignment_action_id));
1814: --Store the current person/GRE for comparision during the

Line 2175: l_proc varchar2(100) := 'pay_us_mmref_reporting.get_report_category';

2171: p_effective_date date
2172: ) RETURN varchar2 IS
2173:
2174: --
2175: l_proc varchar2(100) := 'pay_us_mmref_reporting.get_report_category';
2176: l_code varchar2(2);
2177: l_ue_id NUMBER;
2178: --
2179: --

Line 2263: l_proc varchar2(100) := 'pay_us_mmref_reporting.get_report_category';

2259: FUNCTION get_report_category_mt ( p_business_group_id number,
2260: p_effective_date date
2261: ) RETURN varchar2 IS
2262: --
2263: l_proc varchar2(100) := 'pay_us_mmref_reporting.get_report_category';
2264: l_code varchar2(2);
2265: l_ue_id NUMBER;
2266: --
2267: CURSOR c_get_user_entity_id IS

Line 2364: hr_utility.trace('In Procedure PAY_US_MMREF_REPORTING.GET_TAX_UNIT_INFO' );

2360: l_payroll_action_id NUMBER;
2361: l_tax_jurisdiction_code VARCHAR2(200);
2362:
2363: BEGIN
2364: hr_utility.trace('In Procedure PAY_US_MMREF_REPORTING.GET_TAX_UNIT_INFO' );
2365: OPEN c_get_tax_unit_info(tax_unit_id,
2366: p_tax_year);
2367: FETCH c_get_tax_unit_info INTO l_federal_EIN,
2368: l_tax_unit_name;

Line 2991: END pay_us_mmref_reporting;

2987: END get_w2_er_arch_bal;
2988:
2989: --BEGIN
2990: -- hr_utility.trace_on(NULL,'FEDW2MT');
2991: END pay_us_mmref_reporting;