DBA Data[Home] [Help]

APPS.PAY_FR_DB_PAY_SETUP dependencies on HR_UTILITY

Line 3: g_debug boolean := hr_utility.debug_enabled;

1: package body pay_fr_db_pay_setup as
2: /* $Header: pyfrsetp.pkb 120.0 2005/05/29 05:09:32 appldev noship $ */
3: g_debug boolean := hr_utility.debug_enabled;
4: --
5: -------------------------------- create element -------------------------------
6: /*
7: NAME

Line 84: g_debug := hr_utility.debug_enabled;

80: v_rowid VARCHAR2(240);
81: v_termination_rule_code VARCHAR2(240);
82: --
83: begin
84: g_debug := hr_utility.debug_enabled;
85: --
86: if g_debug then
87: hr_utility.set_location('pay_db_pay_setup.create_element',1);
88: end if;

Line 87: hr_utility.set_location('pay_db_pay_setup.create_element',1);

83: begin
84: g_debug := hr_utility.debug_enabled;
85: --
86: if g_debug then
87: hr_utility.set_location('pay_db_pay_setup.create_element',1);
88: end if;
89: --
90: begin
91: -- Get the session date nb. this is defaulted to todays date

Line 101: hr_utility.set_location('pay_db_pay_setup.create_element',3);

97: when NO_DATA_FOUND then NULL;
98: end;
99: --
100: if g_debug then
101: hr_utility.set_location('pay_db_pay_setup.create_element',3);
102: end if;
103: --
104: -- Added the OR to the below SQL statement to fix an MLS
105: -- Problem related to the comparison of the Meaning with the

Line 146: hr_utility.set_location('pay_db_pay_setup.create_element',4);

142: -- business group for potential defaulting of input and output currency
143: if p_business_group_name is not NULL then
144: --
145: if g_debug then
146: hr_utility.set_location('pay_db_pay_setup.create_element',4);
147: end if;
148: --
149: select business_group_id,
150: currency_code,

Line 166: hr_utility.set_location('pay_db_pay_setup.create_element',5);

162: -- of input and output currency code for startup elements
163: elsif p_legislation_code is not NULL then
164: --
165: if g_debug then
166: hr_utility.set_location('pay_db_pay_setup.create_element',5);
167: end if;
168: --
169: if p_input_currency_code is null or p_output_currency_code is null then
170: --

Line 189: hr_utility.set_location('pay_db_pay_setup.create_element',6);

185: --
186: end if;
187: --
188: if g_debug then
189: hr_utility.set_location('pay_db_pay_setup.create_element',6);
190: end if;
191: --
192: -- Find the classification for the element
193: select ec.classification_id,

Line 241: hr_utility.set_location('pay_db_pay_setup.create_element',7);

237: p_bus_grp_currency_code => v_currency_code);
238:
239: --
240: if g_debug then
241: hr_utility.set_location('pay_db_pay_setup.create_element',7);
242: end if;
243: --
244: -- Create a row in pay_element_types
245:

Line 343: hr_utility.set_location('pay_db_pay_setup.create_element',8);

339: -- Create the application ownership for the element (in startup mode)
340: if v_mode <> 'USER' then
341: --
342: if g_debug then
343: hr_utility.set_location('pay_db_pay_setup.create_element',8);
344: end if;
345: --
346: insert into hr_application_ownerships
347: (KEY_NAME,

Line 358: hr_utility.set_location('pay_db_pay_setup.create_element',9);

354: --
355: end if;
356: --
357: if g_debug then
358: hr_utility.set_location('pay_db_pay_setup.create_element',9);
359: end if;
360: --
361: -- Create a PAY_VALUE and status processing rule if it is a payroll element
362: hr_elements.ins_3p_element_type(v_element_type_id,

Line 436: g_debug := hr_utility.debug_enabled;

432: from fnd_languages l
433: where l.installed_flag in ('I', 'B');
434: --
435: begin
436: g_debug := hr_utility.debug_enabled;
437: --
438: if g_debug then
439: hr_utility.set_location('pay_db_pay_setup.create_input_value',1);
440: hr_utility.trace('p_element_name**********: '||p_element_name);

Line 439: hr_utility.set_location('pay_db_pay_setup.create_input_value',1);

435: begin
436: g_debug := hr_utility.debug_enabled;
437: --
438: if g_debug then
439: hr_utility.set_location('pay_db_pay_setup.create_input_value',1);
440: hr_utility.trace('p_element_name**********: '||p_element_name);
441: end if;
442: --
443: -- Select the sequence number for input value. This can then be passed back

Line 440: hr_utility.trace('p_element_name**********: '||p_element_name);

436: g_debug := hr_utility.debug_enabled;
437: --
438: if g_debug then
439: hr_utility.set_location('pay_db_pay_setup.create_input_value',1);
440: hr_utility.trace('p_element_name**********: '||p_element_name);
441: end if;
442: --
443: -- Select the sequence number for input value. This can then be passed back
444: -- via the function for later use.

Line 450: hr_utility.set_location('pay_db_pay_setup.create_input_value',15);

446: into v_input_value_id
447: from dual;
448: --
449: if g_debug then
450: hr_utility.set_location('pay_db_pay_setup.create_input_value',15);
451: end if;
452: --
453: select l.language_code
454: into v_base_language

Line 459: hr_utility.set_location('pay_db_pay_setup.create_input_value',2);

455: from fnd_languages l
456: where l.installed_flag = 'B';
457: --
458: if g_debug then
459: hr_utility.set_location('pay_db_pay_setup.create_input_value',2);
460: end if;
461: --
462: -- Find the business_group_id for the business group
463: -- Also, take opportunity to select legislation code.

Line 482: hr_utility.set_location('pay_db_pay_setup.create_input_value',3);

478: v_legislation_code := p_legislation_code;
479: --
480: --
481: if g_debug then
482: hr_utility.set_location('pay_db_pay_setup.create_input_value',3);
483: end if;
484: --
485: -- Get warning or error flag
486: -- Bug 2831667 - either code or meaning must be provided

Line 489: hr_utility.set_message(801, 'HR_BAD_WARN_ERROR_ARGUMENT');

485: -- Get warning or error flag
486: -- Bug 2831667 - either code or meaning must be provided
487: --
488: if (p_warning_or_error is not null and p_warn_or_error_code is not null) then
489: hr_utility.set_message(801, 'HR_BAD_WARN_ERROR_ARGUMENT');
490: hr_utility.raise_error;
491: end if;
492: --
493: if p_warning_or_error is not null then

Line 490: hr_utility.raise_error;

486: -- Bug 2831667 - either code or meaning must be provided
487: --
488: if (p_warning_or_error is not null and p_warn_or_error_code is not null) then
489: hr_utility.set_message(801, 'HR_BAD_WARN_ERROR_ARGUMENT');
490: hr_utility.raise_error;
491: end if;
492: --
493: if p_warning_or_error is not null then
494: if g_debug then

Line 495: hr_utility.set_location('pay_db_pay_setup.create_input_value',5);

491: end if;
492: --
493: if p_warning_or_error is not null then
494: if g_debug then
495: hr_utility.set_location('pay_db_pay_setup.create_input_value',5);
496: end if;
497: --
498: select lookup_code
499: into v_warning_or_error

Line 515: hr_utility.set_message(801, 'HR_BAD_UOM_ARGUMENT');

511: --
512: -- Get the uom code: either code or meaning must be provided
513: if (p_uom is null and p_uom_code is null)
514: or (p_uom is not null and p_uom_code is not null) then
515: hr_utility.set_message(801, 'HR_BAD_UOM_ARGUMENT');
516: hr_utility.raise_error;
517: end if;
518: --
519: if p_uom_code is null then

Line 516: hr_utility.raise_error;

512: -- Get the uom code: either code or meaning must be provided
513: if (p_uom is null and p_uom_code is null)
514: or (p_uom is not null and p_uom_code is not null) then
515: hr_utility.set_message(801, 'HR_BAD_UOM_ARGUMENT');
516: hr_utility.raise_error;
517: end if;
518: --
519: if p_uom_code is null then
520: if g_debug then

Line 521: hr_utility.set_location('pay_db_pay_setup.create_input_value',8);

517: end if;
518: --
519: if p_uom_code is null then
520: if g_debug then
521: hr_utility.set_location('pay_db_pay_setup.create_input_value',8);
522: end if;
523: select lookup_code
524: into v_uom
525: from hr_lookups

Line 537: hr_utility.set_message(801, 'HR_BAD_UOM_ARGUMENT');

533: where lookup_code = p_uom_code
534: and lookup_type = 'UNITS';
535: exception
536: when no_data_found then
537: hr_utility.set_message(801, 'HR_BAD_UOM_ARGUMENT');
538: hr_utility.raise_error;
539: end;
540: end if;
541: --

Line 538: hr_utility.raise_error;

534: and lookup_type = 'UNITS';
535: exception
536: when no_data_found then
537: hr_utility.set_message(801, 'HR_BAD_UOM_ARGUMENT');
538: hr_utility.raise_error;
539: end;
540: end if;
541: --
542: begin

Line 553: hr_utility.set_location('pay_db_pay_setup.create_input_value',6);

549: when NO_DATA_FOUND then NULL;
550: end;
551: --
552: if g_debug then
553: hr_utility.set_location('pay_db_pay_setup.create_input_value',6);
554: end if;
555: --
556: -- Store the dates over which time the element type exists
557: if v_business_group_id is not NULL then

Line 577: hr_utility.set_location('pay_db_pay_setup.create_input_value',65);

573: effective_end_date; /* new bug 1576000 */
574: end if;
575:
576: if g_debug then
577: hr_utility.set_location('pay_db_pay_setup.create_input_value',65);
578: hr_utility.trace('p_element_name*******: '||p_element_name);
579: hr_utility.trace('v_business_group_id*******: '||v_business_group_id);
580: hr_utility.trace('v_legislation_code*******: '||v_legislation_code);
581: end if;

Line 578: hr_utility.trace('p_element_name*******: '||p_element_name);

574: end if;
575:
576: if g_debug then
577: hr_utility.set_location('pay_db_pay_setup.create_input_value',65);
578: hr_utility.trace('p_element_name*******: '||p_element_name);
579: hr_utility.trace('v_business_group_id*******: '||v_business_group_id);
580: hr_utility.trace('v_legislation_code*******: '||v_legislation_code);
581: end if;
582:

Line 579: hr_utility.trace('v_business_group_id*******: '||v_business_group_id);

575:
576: if g_debug then
577: hr_utility.set_location('pay_db_pay_setup.create_input_value',65);
578: hr_utility.trace('p_element_name*******: '||p_element_name);
579: hr_utility.trace('v_business_group_id*******: '||v_business_group_id);
580: hr_utility.trace('v_legislation_code*******: '||v_legislation_code);
581: end if;
582:
583: select min(et.effective_start_date),

Line 580: hr_utility.trace('v_legislation_code*******: '||v_legislation_code);

576: if g_debug then
577: hr_utility.set_location('pay_db_pay_setup.create_input_value',65);
578: hr_utility.trace('p_element_name*******: '||p_element_name);
579: hr_utility.trace('v_business_group_id*******: '||v_business_group_id);
580: hr_utility.trace('v_legislation_code*******: '||v_legislation_code);
581: end if;
582:
583: select min(et.effective_start_date),
584: max(et.effective_end_date),

Line 600: hr_utility.set_location('pay_db_pay_setup.create_input_value',68);

596: or (et.business_group_id is null and et.legislation_code is null))
597: group by et.legislation_subgroup, et.element_type_id;
598: --
599: if g_debug then
600: hr_utility.set_location('pay_db_pay_setup.create_input_value',68);
601: end if;
602: -- Default the start date to the session date if no date is supplied
603: if p_effective_start_date is not NULL then
604: v_effective_start_date := p_effective_start_date;

Line 633: hr_utility.set_location('pay_db_pay_setup.create_input_value',7);

629: v_effective_end_date := v_element_end_date;
630: end if;
631: --
632: if g_debug then
633: hr_utility.set_location('pay_db_pay_setup.create_input_value',7);
634: end if;
635: --
636: -- Create input value
637: --

Line 768: g_debug := hr_utility.debug_enabled;

764: v_currency_code varchar2(30);
765: v_org_pay_method_usage number;
766: --
767: begin
768: g_debug := hr_utility.debug_enabled;
769: --
770: if g_debug then
771: hr_utility.set_location('pay_db_pay_setup.create_payroll',1);
772: end if;

Line 771: hr_utility.set_location('pay_db_pay_setup.create_payroll',1);

767: begin
768: g_debug := hr_utility.debug_enabled;
769: --
770: if g_debug then
771: hr_utility.set_location('pay_db_pay_setup.create_payroll',1);
772: end if;
773: --
774: -- Select the sequence number for the payroll. This can then be passed back
775: -- via the function for later use.

Line 781: hr_utility.set_location('pay_db_pay_setup.create_payroll',2);

777: into v_payroll_id
778: from sys.dual;
779: --
780: if g_debug then
781: hr_utility.set_location('pay_db_pay_setup.create_payroll',2);
782: end if;
783: --
784: begin
785: -- Get the session date nb. this is defaulted to todays date

Line 813: hr_utility.set_location('pay_db_pay_setup.create_payroll',3);

809: v_effective_end_date := p_effective_end_date;
810: end if;
811: --
812: if g_debug then
813: hr_utility.set_location('pay_db_pay_setup.create_payroll',3);
814: end if;
815: --
816: -- Find the business_group_id for the business group and get the currency of
817: -- business group for potential defaulting of input and output currency

Line 828: hr_utility.set_location('pay_db_pay_setup.create_payroll',4);

824: from per_business_groups bg
825: where name = p_business_group_name;
826: --
827: if g_debug then
828: hr_utility.set_location('pay_db_pay_setup.create_payroll',4);
829: end if;
830: --
831: -- Find the organization_id for the organization. If it is not specified then
832: -- default it to the business group

Line 848: hr_utility.set_location('pay_db_pay_setup.create_payroll',5);

844: --
845: end if;
846: --
847: if g_debug then
848: hr_utility.set_location('pay_db_pay_setup.create_payroll',5);
849: end if;
850: --
851: -- Get the consolidation_set_id for the specified consolidation set
852: select cs.consolidation_set_id

Line 863: hr_utility.set_location('pay_db_pay_setup.create_payroll',6);

859: -- when the payroll is defined. This we only perform
860: -- following select if one is specified.
861: if p_dflt_payment_method is not null then
862: if g_debug then
863: hr_utility.set_location('pay_db_pay_setup.create_payroll',6);
864: end if;
865: select opm.org_payment_method_id
866: into v_dflt_payment_method_id
867: from pay_payment_types ppt,

Line 1139: g_debug := hr_utility.debug_enabled;

1135: v_pay_value_name varchar2(80);
1136: v_legislation_code varchar2(30);
1137: --
1138: begin
1139: g_debug := hr_utility.debug_enabled;
1140: --
1141: if g_debug then
1142: hr_utility.set_location('pay_db_pay_setup.create_element_link',1);
1143: end if;

Line 1142: hr_utility.set_location('pay_db_pay_setup.create_element_link',1);

1138: begin
1139: g_debug := hr_utility.debug_enabled;
1140: --
1141: if g_debug then
1142: hr_utility.set_location('pay_db_pay_setup.create_element_link',1);
1143: end if;
1144: --
1145: -- Get business group id. Select the sequence number for the element link.
1146: -- This can then be passed back via the function for later use.

Line 1157: hr_utility.set_location('pay_db_pay_setup.create_element_link',2);

1153: from per_business_groups bg
1154: where name = p_business_group_name;
1155: --
1156: if g_debug then
1157: hr_utility.set_location('pay_db_pay_setup.create_element_link',2);
1158: end if;
1159: --
1160: -- Get look up name for 'PAY VALUE'
1161: v_pay_value_name := hr_input_values.get_pay_value_name(v_legislation_code);

Line 1164: hr_utility.set_location('pay_db_pay_setup.create_element_link',3);

1160: -- Get look up name for 'PAY VALUE'
1161: v_pay_value_name := hr_input_values.get_pay_value_name(v_legislation_code);
1162: --
1163: if g_debug then
1164: hr_utility.set_location('pay_db_pay_setup.create_element_link',3);
1165: end if;
1166: --
1167: begin
1168: -- Get the session date nb. this is defaulted to todays date

Line 1196: hr_utility.set_location('pay_db_pay_setup.create_element_link',4);

1192: v_effective_end_date := p_effective_end_date;
1193: end if;
1194: --
1195: if g_debug then
1196: hr_utility.set_location('pay_db_pay_setup.create_element_link',4);
1197: end if;
1198: --
1199: -- Get information from element for defaulting
1200: select max(et.effective_end_date),

Line 1225: hr_utility.set_location('pay_db_pay_setup.create_element_link',5);

1221: et.qualifying_age, et.qualifying_length_of_service,
1222: et.qualifying_units;
1223: --
1224: if g_debug then
1225: hr_utility.set_location('pay_db_pay_setup.create_element_link',5);
1226: end if;
1227: --
1228: -- Find Job if it is specified
1229: if p_job_name is not NULL then

Line 1242: hr_utility.set_location('pay_db_pay_setup.create_element_link',6);

1238: --
1239: end if;
1240: --
1241: if g_debug then
1242: hr_utility.set_location('pay_db_pay_setup.create_element_link',6);
1243: end if;
1244: --
1245: -- Find Position if it is specified
1246: if p_position_name is not NULL then

Line 1259: hr_utility.set_location('pay_db_pay_setup.create_element_link',7);

1255: --
1256: end if;
1257: --
1258: if g_debug then
1259: hr_utility.set_location('pay_db_pay_setup.create_element_link',7);
1260: end if;
1261: --
1262: -- Find Grade if it is specified
1263: if p_grade_name is not NULL then

Line 1276: hr_utility.set_location('pay_db_pay_setup.create_element_link',8);

1272: --
1273: end if;
1274: --
1275: if g_debug then
1276: hr_utility.set_location('pay_db_pay_setup.create_element_link',8);
1277: end if;
1278: --
1279: -- Find People Group if it is specified
1280: if p_people_group_name is not NULL then

Line 1293: hr_utility.set_location('pay_db_pay_setup.create_element_link',9);

1289: --
1290: end if;
1291: --
1292: if g_debug then
1293: hr_utility.set_location('pay_db_pay_setup.create_element_link',9);
1294: end if;
1295: --
1296: -- Find Organization if it is specified
1297: if p_organization_name is not NULL then

Line 1310: hr_utility.set_location('pay_db_pay_setup.create_element_link',10);

1306: --
1307: end if;
1308: --
1309: if g_debug then
1310: hr_utility.set_location('pay_db_pay_setup.create_element_link',10);
1311: end if;
1312: --
1313: -- Find Payroll if it is specified
1314: if p_payroll_name is not NULL then

Line 1583: g_debug := hr_utility.debug_enabled;

1579: l_prim_ele pay_element_types_f.element_type_id%type;
1580: l_mode varchar2(30);
1581: --
1582: begin
1583: g_debug := hr_utility.debug_enabled;
1584: --
1585: if g_debug then
1586: hr_utility.set_location('pay_db_pay_setup.create_balance_type',1);
1587: end if;

Line 1586: hr_utility.set_location('pay_db_pay_setup.create_balance_type',1);

1582: begin
1583: g_debug := hr_utility.debug_enabled;
1584: --
1585: if g_debug then
1586: hr_utility.set_location('pay_db_pay_setup.create_balance_type',1);
1587: end if;
1588: --
1589: -- Find the business_group_id for the business group and get the currency of
1590: -- business group for potential defaulting of balance currency

Line 1595: hr_utility.set_location('pay_db_pay_setup.create_balance_type',2);

1591: -- RET 07-OCT-2002 - also get the leg for the bg
1592: if p_business_group_name is not NULL then
1593: --
1594: if g_debug then
1595: hr_utility.set_location('pay_db_pay_setup.create_balance_type',2);
1596: end if;
1597: --
1598: select business_group_id,
1599: currency_code,

Line 1613: hr_utility.set_location('pay_db_pay_setup.create_balance_type',3);

1609: -- of input and output currency code for startup elements
1610: elsif p_legislation_code is not NULL then
1611: --
1612: if g_debug then
1613: hr_utility.set_location('pay_db_pay_setup.create_balance_type',3);
1614: end if;
1615: --
1616: if p_currency_code is null then
1617: --

Line 1630: hr_utility.set_location('pay_db_pay_setup.create_balance_type',4);

1626: --
1627: end if;
1628: --
1629: if g_debug then
1630: hr_utility.set_location('pay_db_pay_setup.create_balance_type',4);
1631: end if;
1632: --
1633: -- Get the uom code
1634: if p_uom_code is null then

Line 1650: hr_utility.set_location('pay_db_pay_setup.create_balance_type',5);

1646: end if;
1647: end if;
1648: --
1649: if g_debug then
1650: hr_utility.set_location('pay_db_pay_setup.create_balance_type',5);
1651: end if;
1652: --
1653: -- Check the category
1654: --

Line 1660: hr_utility.set_message(801, 'PAY_34262_CAT_EFF_DATE_NULL');

1656: if P_effective_date is null then
1657: --
1658: -- a date must be passed through if entering a category
1659: --
1660: hr_utility.set_message(801, 'PAY_34262_CAT_EFF_DATE_NULL');
1661: hr_utility.raise_error;
1662: end if;
1663: --
1664: if p_bc_leg_code is not null then

Line 1661: hr_utility.raise_error;

1657: --
1658: -- a date must be passed through if entering a category
1659: --
1660: hr_utility.set_message(801, 'PAY_34262_CAT_EFF_DATE_NULL');
1661: hr_utility.raise_error;
1662: end if;
1663: --
1664: if p_bc_leg_code is not null then
1665: --

Line 1673: hr_utility.set_message(801,'PAY_34263_CAT_NOT_EXIST');

1669: --
1670: -- error category does not exist
1671: --
1672: close get_cat_id;
1673: hr_utility.set_message(801,'PAY_34263_CAT_NOT_EXIST');
1674: hr_utility.raise_error;
1675: else
1676: close get_cat_id;
1677: end if;

Line 1674: hr_utility.raise_error;

1670: -- error category does not exist
1671: --
1672: close get_cat_id;
1673: hr_utility.set_message(801,'PAY_34263_CAT_NOT_EXIST');
1674: hr_utility.raise_error;
1675: else
1676: close get_cat_id;
1677: end if;
1678: --

Line 1688: hr_utility.set_message(801,'PAY_34264_INV_BG_LEG');

1684: fetch get_bg_leg into v_leg_code;
1685: if get_bg_leg%notfound then
1686: --
1687: close get_bg_leg;
1688: hr_utility.set_message(801,'PAY_34264_INV_BG_LEG');
1689: hr_utility.raise_error;
1690: else
1691: close get_bg_leg;
1692: end if;

Line 1689: hr_utility.raise_error;

1685: if get_bg_leg%notfound then
1686: --
1687: close get_bg_leg;
1688: hr_utility.set_message(801,'PAY_34264_INV_BG_LEG');
1689: hr_utility.raise_error;
1690: else
1691: close get_bg_leg;
1692: end if;
1693: else -- p_business_group_id is null

Line 1701: hr_utility.set_message(801,'PAY_34265_INV_LEG');

1697: if p_bc_leg_code <> v_leg_code then
1698: --
1699: -- leg codes not same, cannot be compatible.
1700: --
1701: hr_utility.set_message(801,'PAY_34265_INV_LEG');
1702: hr_utility.raise_error;
1703: end if;
1704: else -- p_bc_leg_code is null - unusual to have generic category, but possible
1705: -- check that not a user category

Line 1702: hr_utility.raise_error;

1698: --
1699: -- leg codes not same, cannot be compatible.
1700: --
1701: hr_utility.set_message(801,'PAY_34265_INV_LEG');
1702: hr_utility.raise_error;
1703: end if;
1704: else -- p_bc_leg_code is null - unusual to have generic category, but possible
1705: -- check that not a user category
1706: open get_cat_id(p_balance_category, p_bc_leg_code, p_effective_date);

Line 1713: hr_utility.set_message(801,'PAY_34266_CAT_NOT_EXIST_G');

1709: --
1710: -- error category does not exist
1711: --
1712: close get_cat_id;
1713: hr_utility.set_message(801,'PAY_34266_CAT_NOT_EXIST_G');
1714: hr_utility.raise_error;
1715: else
1716: close get_cat_id;
1717: end if;

Line 1714: hr_utility.raise_error;

1710: -- error category does not exist
1711: --
1712: close get_cat_id;
1713: hr_utility.set_message(801,'PAY_34266_CAT_NOT_EXIST_G');
1714: hr_utility.raise_error;
1715: else
1716: close get_cat_id;
1717: end if;
1718: --

Line 1723: hr_utility.set_message(801,'PAY_34267_INV_CAT_LEG ');

1719: -- Error if the cat bg is not null, as user categories cannot be created, so
1720: -- this is a hacked category.
1721: --
1722: if l_cat_bg is not null then
1723: hr_utility.set_message(801,'PAY_34267_INV_CAT_LEG ');
1724: hr_utility.raise_error;
1725: end if;
1726: end if;
1727: end if;

Line 1724: hr_utility.raise_error;

1720: -- this is a hacked category.
1721: --
1722: if l_cat_bg is not null then
1723: hr_utility.set_message(801,'PAY_34267_INV_CAT_LEG ');
1724: hr_utility.raise_error;
1725: end if;
1726: end if;
1727: end if;
1728: --

Line 1762: hr_utility.set_message(801,'PAY_34268_BASE_BAL_NOT_EXIST');

1758: fetch get_base_balance into l_bt_id, l_bbt_id;
1759: if get_base_balance%notfound then
1760: --
1761: close get_base_balance;
1762: hr_utility.set_message(801,'PAY_34268_BASE_BAL_NOT_EXIST');
1763: hr_utility.raise_error;
1764: else
1765: close get_base_balance;
1766: if l_bbt_id is not null then

Line 1763: hr_utility.raise_error;

1759: if get_base_balance%notfound then
1760: --
1761: close get_base_balance;
1762: hr_utility.set_message(801,'PAY_34268_BASE_BAL_NOT_EXIST');
1763: hr_utility.raise_error;
1764: else
1765: close get_base_balance;
1766: if l_bbt_id is not null then
1767: --

Line 1771: hr_utility.set_message(801,'PAY_34269_INV_BASE_BAL');

1767: --
1768: -- raise error as this balance has itself a base balance, so cannot be used
1769: -- as a base balance.
1770: --
1771: hr_utility.set_message(801,'PAY_34269_INV_BASE_BAL');
1772: hr_utility.raise_error;
1773: end if;
1774: end if;
1775: end if;

Line 1772: hr_utility.raise_error;

1768: -- raise error as this balance has itself a base balance, so cannot be used
1769: -- as a base balance.
1770: --
1771: hr_utility.set_message(801,'PAY_34269_INV_BASE_BAL');
1772: hr_utility.raise_error;
1773: end if;
1774: end if;
1775: end if;
1776: --

Line 1785: hr_utility.set_message(801,'PAY_34270_PRIM_NULL_EFF_DATE');

1781: if p_effective_date is null then
1782: --
1783: -- a date must be passed in if a primary balance is to be inserted.
1784: --
1785: hr_utility.set_message(801,'PAY_34270_PRIM_NULL_EFF_DATE');
1786: hr_utility.raise_error;
1787: end if;
1788: --
1789: open get_primary_iv(p_primary_element_name

Line 1786: hr_utility.raise_error;

1782: --
1783: -- a date must be passed in if a primary balance is to be inserted.
1784: --
1785: hr_utility.set_message(801,'PAY_34270_PRIM_NULL_EFF_DATE');
1786: hr_utility.raise_error;
1787: end if;
1788: --
1789: open get_primary_iv(p_primary_element_name
1790: ,p_primary_iv_name

Line 1800: hr_utility.set_message(801,'PAY_34271_INV_PRIM_BAL');

1796: fetch get_primary_iv into l_prim_iv, l_prim_ele;
1797: if get_primary_iv%notfound then
1798: --
1799: close get_primary_iv;
1800: hr_utility.set_message(801,'PAY_34271_INV_PRIM_BAL');
1801: hr_utility.raise_error;
1802: else
1803: close get_primary_iv;
1804: end if;

Line 1801: hr_utility.raise_error;

1797: if get_primary_iv%notfound then
1798: --
1799: close get_primary_iv;
1800: hr_utility.set_message(801,'PAY_34271_INV_PRIM_BAL');
1801: hr_utility.raise_error;
1802: else
1803: close get_primary_iv;
1804: end if;
1805: end if;

Line 1901: g_debug := hr_utility.debug_enabled;

1897: v_session_date date;
1898: v_secondary_class varchar2(1);
1899: --
1900: begin
1901: g_debug := hr_utility.debug_enabled;
1902: --
1903: if g_debug then
1904: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',1);
1905: end if;

Line 1904: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',1);

1900: begin
1901: g_debug := hr_utility.debug_enabled;
1902: --
1903: if g_debug then
1904: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',1);
1905: end if;
1906: --
1907: begin
1908: -- Get the session date nb. this is defaulted to todays date

Line 1923: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',99);

1919: v_session_date := v_todays_date;
1920: end if;
1921: --
1922: if g_debug then
1923: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',99);
1924: end if;
1925: --
1926: -- Get sequence for
1927: select pay_balance_classifications_s.nextval

Line 1932: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',2);

1928: into v_balance_classification_id
1929: from sys.dual;
1930: --
1931: if g_debug then
1932: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',2);
1933: end if;
1934: --
1935: -- Get business group id
1936: if p_business_group_name is not NULL then

Line 1960: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',3);

1956: --
1957: end if;
1958: --
1959: if g_debug then
1960: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',3);
1961: end if;
1962: --
1963: -- Convert Add or Subtract to a number
1964: select fnd_number.canonical_to_number(lookup_code)

Line 1971: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',4);

1967: where lookup_type = 'ADD_SUBTRACT'
1968: and upper(meaning) = upper(p_scale);
1969: --
1970: if g_debug then
1971: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',4);
1972: end if;
1973: --
1974: -- Get balance information
1975: select bt.balance_type_id,

Line 1987: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',5);

1983: and nvl(bt.legislation_code,nvl(p_legislation_code,'-1'))
1984: = nvl(p_legislation_code,'-1');
1985: --
1986: if g_debug then
1987: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',5);
1988: end if;
1989: --
1990: -- Find the classification for the balance NB. only primary classifications
1991: -- are allowed

Line 2029: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',7);

2025: -1,
2026: v_todays_date);
2027: --
2028: if g_debug then
2029: hr_utility.set_location('pay_db_pay_setup.create_balance_classification',7);
2030: end if;
2031: --
2032: -- CREATE BALANCE FEEDS
2033: if v_secondary_class = 'N' then

Line 2114: g_debug := hr_utility.debug_enabled;

2110: v_dfb_legislation_subgroup pay_defined_balances.legislation_subgroup%type;
2111: v_dfb_business_group_id pay_defined_balances.business_group_id%type;
2112: --
2113: begin
2114: g_debug := hr_utility.debug_enabled;
2115: --
2116: if g_debug then
2117: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',1);
2118: end if;

Line 2117: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',1);

2113: begin
2114: g_debug := hr_utility.debug_enabled;
2115: --
2116: if g_debug then
2117: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',1);
2118: end if;
2119: --
2120: -- Get business group id
2121: if p_business_group_name is not NULL then

Line 2137: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',2);

2133: --
2134: end if;
2135: --
2136: if g_debug then
2137: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',2);
2138: hr_utility.trace('p_balance_dimension****: '||p_balance_dimension);
2139: hr_utility.trace('v_legislation_code****: '||v_legislation_code);
2140: end if;
2141: --

Line 2138: hr_utility.trace('p_balance_dimension****: '||p_balance_dimension);

2134: end if;
2135: --
2136: if g_debug then
2137: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',2);
2138: hr_utility.trace('p_balance_dimension****: '||p_balance_dimension);
2139: hr_utility.trace('v_legislation_code****: '||v_legislation_code);
2140: end if;
2141: --
2142: -- Get balance dimension making sure that it is for the correct legislation

Line 2139: hr_utility.trace('v_legislation_code****: '||v_legislation_code);

2135: --
2136: if g_debug then
2137: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',2);
2138: hr_utility.trace('p_balance_dimension****: '||p_balance_dimension);
2139: hr_utility.trace('v_legislation_code****: '||v_legislation_code);
2140: end if;
2141: --
2142: -- Get balance dimension making sure that it is for the correct legislation
2143: select bd.balance_dimension_id

Line 2156: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',3.5);

2152: --
2153: -- attempt to get the default value from category and dimensions
2154: --
2155: if g_debug then
2156: hr_utility.set_location('pay_db_pay_setup.create_defined_balance',3.5);
2157: end if;
2158: if p_effective_date is null then
2159: -- default the date from fnd_sessions, as a last resort use sysdate
2160: --

Line 2242: hr_utility.set_location('pay_db_pay_setup.create_defined_balance', 7);

2238: v_dfb_legislation_subgroup := v_bt_legislation_subgroup;
2239: end if;
2240: --
2241: if g_debug then
2242: hr_utility.set_location('pay_db_pay_setup.create_defined_balance', 7);
2243: end if;
2244: --
2245: -- A mutating table error will occur on pay_defined_balances if a defined
2246: -- balance is inserted here, while the old version of trigger

Line 2300: hr_utility.set_location('pay_db_pay_setup.create_defined_balance', 8);

2296: -- defaults table.
2297: --
2298: if v_bt_balance_category_id is not null then
2299: if g_debug then
2300: hr_utility.set_location('pay_db_pay_setup.create_defined_balance', 8);
2301: end if;
2302: --
2303: -- get the defined_balance_id just created.
2304: --

Line 2316: hr_utility.set_location('pay_db_pay_setup.create_defined_balance', 10);

2312: and nvl(legislation_code,nvl(v_dfb_legislation_code,'-1'))
2313: = nvl(v_dfb_legislation_code,'-1');
2314: --
2315: if g_debug then
2316: hr_utility.set_location('pay_db_pay_setup.create_defined_balance', 10);
2317: hr_utility.trace('l_defined_balance_id: '||to_char(l_defined_balance_id));
2318: end if;
2319: --
2320: -- see if any default attributes can be inserted.

Line 2317: hr_utility.trace('l_defined_balance_id: '||to_char(l_defined_balance_id));

2313: = nvl(v_dfb_legislation_code,'-1');
2314: --
2315: if g_debug then
2316: hr_utility.set_location('pay_db_pay_setup.create_defined_balance', 10);
2317: hr_utility.trace('l_defined_balance_id: '||to_char(l_defined_balance_id));
2318: end if;
2319: --
2320: -- see if any default attributes can be inserted.
2321: --

Line 2332: hr_utility.set_location('Leaving pay_db_pay_setup.create_defined_balance', 14);

2328: ,p_effective_date => l_eff_date
2329: );
2330: end if;
2331: if g_debug then
2332: hr_utility.set_location('Leaving pay_db_pay_setup.create_defined_balance', 14);
2333: end if;
2334: end create_defined_balance;
2335: --
2336: ------------------------ insert_customize_restriction ------------------------

Line 2368: g_debug := hr_utility.debug_enabled;

2364: v_rowid rowid;
2365:
2366: --
2367: begin
2368: g_debug := hr_utility.debug_enabled;
2369: --
2370: if g_debug then
2371: hr_utility.set_location('insert_customize_restriction',1);
2372: end if;

Line 2371: hr_utility.set_location('insert_customize_restriction',1);

2367: begin
2368: g_debug := hr_utility.debug_enabled;
2369: --
2370: if g_debug then
2371: hr_utility.set_location('insert_customize_restriction',1);
2372: end if;
2373: --
2374: -- Check that name is not already in use
2375: --

Line 2388: hr_utility.set_location('insert_customize_restriction',2);

2384: when NO_DATA_FOUND then NULL;
2385: end;
2386:
2387: if g_debug then
2388: hr_utility.set_location('insert_customize_restriction',2);
2389: end if;
2390: --
2391: if v_name_already_exists = 'Y' then
2392: hr_utility.set_message(801,'HR_6030_CUST_UNIQUE_NAME');

Line 2392: hr_utility.set_message(801,'HR_6030_CUST_UNIQUE_NAME');

2388: hr_utility.set_location('insert_customize_restriction',2);
2389: end if;
2390: --
2391: if v_name_already_exists = 'Y' then
2392: hr_utility.set_message(801,'HR_6030_CUST_UNIQUE_NAME');
2393: hr_utility.raise_error;
2394: end if;
2395: --
2396: if g_debug then

Line 2393: hr_utility.raise_error;

2389: end if;
2390: --
2391: if v_name_already_exists = 'Y' then
2392: hr_utility.set_message(801,'HR_6030_CUST_UNIQUE_NAME');
2393: hr_utility.raise_error;
2394: end if;
2395: --
2396: if g_debug then
2397: hr_utility.set_location('insert_customize_restriction',3);

Line 2397: hr_utility.set_location('insert_customize_restriction',3);

2393: hr_utility.raise_error;
2394: end if;
2395: --
2396: if g_debug then
2397: hr_utility.set_location('insert_customize_restriction',3);
2398: end if;
2399: --
2400:
2401: -- Select the application id for the form

Line 2415: hr_utility.set_location('insert_customize_restriction',5);

2411: where prp.form_name = f.form_name
2412: and prp.application_id = f.application_id);
2413: --
2414: if g_debug then
2415: hr_utility.set_location('insert_customize_restriction',5);
2416: end if;
2417: --
2418: -- Create a row in pay_customized_restrictions and pay_custom_restrictions_tl
2419: --

Line 2444: hr_utility.set_location('insert_customize_restriction',6);

2440:
2441:
2442: --
2443: if g_debug then
2444: hr_utility.set_location('insert_customize_restriction',6);
2445: end if;
2446: --
2447:
2448: return v_customized_restriction_id;