DBA Data[Home] [Help]

APPS.PAY_DEFINED_BALANCES_PKG dependencies on PAY_DEFINED_BALANCES

Line 1: PACKAGE BODY PAY_DEFINED_BALANCES_PKG as

1: PACKAGE BODY PAY_DEFINED_BALANCES_PKG as
2: /* $Header: pydfb01t.pkb 120.1 2006/03/10 02:30:52 alogue noship $ */
3: --
4: -----------------------------------------------------------------------------
5: -- Name --

Line 26: from pay_defined_balances dfb

22: ) is
23: --
24: cursor csr_unique_defined_balance is
25: select dfb.defined_balance_id
26: from pay_defined_balances dfb
27: where dfb.balance_type_id = p_balance_type_id
28: and dfb.balance_dimension_id = p_balance_dimension_id
29: and nvl(dfb.business_group_id,nvl(p_business_group_id,0)) =
30: nvl(p_business_group_id,0)

Line 147: -- Description - sets the value of save_run_balance on pay_defined_balances,

143: end delete_defined_balance;
144: --
145: -----------------------------------------------------------------------------
146: -- function set_save_run_bals_flag
147: -- Description - sets the value of save_run_balance on pay_defined_balances,
148: -- the value is determined by the values of save_run_balance_enabled on
149: -- pay_balance_categories_f and pay_balance_dimensions.
150: -----------------------------------------------------------------------------
151: function set_save_run_bals_flag(p_balance_category_id number

Line 175: l_save_run_bal_flag pay_defined_balances.save_run_balance%type;

171: and dim.dimension_type = 'R';
172: --
173: l_cat_flag pay_balance_categories_f.save_run_balance_enabled%type;
174: l_dim_flag pay_balance_dimensions.save_run_balance_enabled%type;
175: l_save_run_bal_flag pay_defined_balances.save_run_balance%type;
176: --
177: BEGIN
178: open get_cat_flag(p_balance_category_id, p_effective_date);
179: fetch get_cat_flag into l_cat_flag;

Line 398: CURSOR C IS SELECT rowid FROM pay_defined_balances

394: x_effective_date date default null,
395: x_mode varchar2 default null)
396: IS
397: --
398: CURSOR C IS SELECT rowid FROM pay_defined_balances
399: WHERE defined_balance_id = X_Defined_Balance_Id;
400: --
401: CURSOR C2 IS SELECT pay_defined_balances_s.nextval FROM sys.dual;
402: --

Line 401: CURSOR C2 IS SELECT pay_defined_balances_s.nextval FROM sys.dual;

397: --
398: CURSOR C IS SELECT rowid FROM pay_defined_balances
399: WHERE defined_balance_id = X_Defined_Balance_Id;
400: --
401: CURSOR C2 IS SELECT pay_defined_balances_s.nextval FROM sys.dual;
402: --
403: CURSOR C3 IS SELECT count(*) from pay_defined_balances
404: WHERE Balance_Type_Id = X_Balance_Type_Id
405: AND Grossup_Allowed_Flag = 'Y';

Line 403: CURSOR C3 IS SELECT count(*) from pay_defined_balances

399: WHERE defined_balance_id = X_Defined_Balance_Id;
400: --
401: CURSOR C2 IS SELECT pay_defined_balances_s.nextval FROM sys.dual;
402: --
403: CURSOR C3 IS SELECT count(*) from pay_defined_balances
404: WHERE Balance_Type_Id = X_Balance_Type_Id
405: AND Grossup_Allowed_Flag = 'Y';
406: --
407: cursor get_bal_cat_id(p_bal_type number)

Line 420: l_save_run_bal_flag pay_defined_balances.save_run_balance%type;

416: from fnd_sessions
417: where session_id = userenv('sessionid');
418: --
419: l_exists number ;
420: l_save_run_bal_flag pay_defined_balances.save_run_balance%type;
421: l_bal_cat_id pay_balance_categories_f.balance_category_id%type;
422: l_eff_date date;
423: --
424: BEGIN

Line 425: hr_utility.set_location('Entering pay_defined_balances_pkg.insert_row', 5);

421: l_bal_cat_id pay_balance_categories_f.balance_category_id%type;
422: l_eff_date date;
423: --
424: BEGIN
425: hr_utility.set_location('Entering pay_defined_balances_pkg.insert_row', 5);
426: --
427: -- Make sure that defined balance is unique.
428: chk_defined_balance
429: (X_Rowid,

Line 434: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 10);

430: X_Business_Group_Id,
431: X_Legislation_Code,
432: X_Balance_Type_Id,
433: X_Balance_Dimension_Id);
434: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 10);
435: --
436: if (X_Defined_Balance_Id is NULL) then
437: OPEN C2;
438: FETCH C2 INTO X_Defined_Balance_Id;

Line 447: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 15);

443: FETCH C3 INTO l_exists;
444: if ( (l_exists = 0 and X_Grossup_Allowed_Flag = 'Y')
445: or (X_Grossup_Allowed_Flag = 'N') ) then
446: --
447: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 15);
448: --
449: -- check whether save_run_balance can be automatically derived
450: -- from the category and dimension flags.
451: --

Line 456: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 20);

452: if x_balance_category_id is null then -- could be called from serverside
453: --
454: -- get bal cat id for the balance type, if there is one
455: --
456: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 20);
457: --
458: open get_bal_cat_id(x_balance_type_id);
459: fetch get_bal_cat_id into l_bal_cat_id;
460: if get_bal_cat_id%notfound then

Line 470: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 25);

466: --
467: -- row returned, so if the effective date is null, default it.
468: --
469: if x_effective_date is null then
470: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 25);
471: open get_eff_date;
472: fetch get_eff_date into l_eff_date;
473: if get_eff_date%notfound then
474: l_eff_date := trunc(sysdate);

Line 477: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 30);

473: if get_eff_date%notfound then
474: l_eff_date := trunc(sysdate);
475: end if;
476: else
477: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 30);
478: l_eff_date := x_effective_date;
479: end if;
480: end if;
481: else -- x_balance_category is not null

Line 482: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 35);

478: l_eff_date := x_effective_date;
479: end if;
480: end if;
481: else -- x_balance_category is not null
482: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 35);
483: l_bal_cat_id := x_balance_category_id;
484: --
485: if x_effective_date is null then
486: hr_utility.set_message(801, 'PAY_34262_CAT_EFF_DATE_NULL');

Line 489: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 40);

485: if x_effective_date is null then
486: hr_utility.set_message(801, 'PAY_34262_CAT_EFF_DATE_NULL');
487: hr_utility.raise_error;
488: else
489: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 40);
490: l_eff_date := x_effective_date;
491: end if;
492: end if;
493: --

Line 498: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 45);

494: l_save_run_bal_flag := set_save_run_bals_flag(l_bal_cat_id
495: ,l_eff_date
496: ,x_balance_dimension_id);
497: --
498: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 45);
499: --
500: INSERT INTO pay_defined_balances
501: (defined_balance_id,
502: business_group_id,

Line 500: INSERT INTO pay_defined_balances

496: ,x_balance_dimension_id);
497: --
498: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 45);
499: --
500: INSERT INTO pay_defined_balances
501: (defined_balance_id,
502: business_group_id,
503: legislation_code,
504: balance_type_id,

Line 528: 'pay_defined_balances_pkg.insert_row');

524: if (C%NOTFOUND) then
525: CLOSE C;
526: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
527: hr_utility.set_message_token('PROCEDURE',
528: 'pay_defined_balances_pkg.insert_row');
529: hr_utility.set_message_token('STEP','1');
530: hr_utility.raise_error;
531: end if;
532: CLOSE C;

Line 546: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 50);

542: --
543: -- if the variable l_bal_cat_id is null, then no need to try and insert
544: -- attribute_defaults
545: --
546: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 50);
547: if l_bal_cat_id is not null then
548: --
549: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 55);
550: insert_default_attrib_wrapper

Line 549: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 55);

545: --
546: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 50);
547: if l_bal_cat_id is not null then
548: --
549: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 55);
550: insert_default_attrib_wrapper
551: (p_balance_dimension_id => x_balance_dimension_id
552: ,p_balance_category_id => l_bal_cat_id
553: ,p_def_bal_bg_id => x_business_group_id

Line 558: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 60);

554: ,p_def_bal_leg_code => x_legislation_code
555: ,p_defined_balance_id => x_defined_balance_id
556: ,p_effective_date => l_eff_date
557: );
558: hr_utility.set_location('pay_defined_balances_pkg.insert_row', 60);
559: end if;
560: end if;
561: else
562: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');

Line 564: 'pay_defined_balances_pkg.insert_row');

560: end if;
561: else
562: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
563: hr_utility.set_message_token('PROCEDURE',
564: 'pay_defined_balances_pkg.insert_row');
565: hr_utility.set_message_token('STEP','1');
566: hr_utility.raise_error;
567: end if;
568: END Insert_Row;

Line 593: CURSOR C IS SELECT * FROM pay_defined_balances

589: X_Force_Latest_Balance_Flag VARCHAR2,
590: X_Legislation_Subgroup VARCHAR2,
591: X_Grossup_Allowed_Flag VARCHAR2) IS
592: --
593: CURSOR C IS SELECT * FROM pay_defined_balances
594: WHERE rowid = X_Rowid FOR UPDATE of Defined_Balance_Id NOWAIT;
595: --
596: Recinfo C%ROWTYPE;
597: --

Line 606: 'pay_defined_balances_pkg.lock_row');

602: if (C%NOTFOUND) then
603: CLOSE C;
604: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
605: hr_utility.set_message_token('PROCEDURE',
606: 'pay_defined_balances_pkg.lock_row');
607: hr_utility.set_message_token('STEP','1');
608: hr_utility.raise_error;
609: end if;
610: CLOSE C;

Line 675: CURSOR C3 IS SELECT count(*) from pay_defined_balances

671: X_Grossup_Allowed_Flag VARCHAR2) IS
672: --
673: l_exists number;
674: --
675: CURSOR C3 IS SELECT count(*) from pay_defined_balances
676: WHERE Balance_Type_Id = X_Balance_Type_Id
677: AND Grossup_Allowed_Flag = 'Y';
678: --
679: BEGIN

Line 686: UPDATE pay_defined_balances

682: FETCH C3 INTO l_exists;
683: if ( (l_exists = 0 and X_Grossup_Allowed_Flag = 'Y')
684: or (X_Grossup_Allowed_Flag = 'N') ) then
685: --
686: UPDATE pay_defined_balances
687: SET defined_balance_id = X_Defined_Balance_Id,
688: business_group_id = X_Business_Group_Id,
689: legislation_code = X_Legislation_Code,
690: balance_type_id = X_Balance_Type_Id,

Line 700: 'pay_defined_balances_pkg.update_row');

696: --
697: if (SQL%NOTFOUND) then
698: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
699: hr_utility.set_message_token('PROCEDURE',
700: 'pay_defined_balances_pkg.update_row');
701: hr_utility.set_message_token('STEP','1');
702: hr_utility.raise_error;
703: end if;
704: --

Line 708: 'pay_defined_balances_pkg.update_row');

704: --
705: else
706: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
707: hr_utility.set_message_token('PROCEDURE',
708: 'pay_defined_balances_pkg.update_row');
709: hr_utility.set_message_token('STEP','1');
710: hr_utility.raise_error;
711: end if;
712: --

Line 739: DELETE FROM pay_defined_balances

735: --
736: -- Remove any latest balances for the defined balance.
737: delete_defined_balance(X_Defined_Balance_Id);
738: --
739: DELETE FROM pay_defined_balances
740: WHERE rowid = X_Rowid;
741: --
742: if (SQL%NOTFOUND) then
743: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');

Line 745: 'pay_defined_balances_pkg.delete_row');

741: --
742: if (SQL%NOTFOUND) then
743: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
744: hr_utility.set_message_token('PROCEDURE',
745: 'pay_defined_balances_pkg.delete_row');
746: hr_utility.set_message_token('STEP','1');
747: hr_utility.raise_error;
748: end if;
749: --

Line 756: -- Called from trigger pay_defined_balances_bru to prevent the update of --

752: -----------------------------------------------------------------------------
753: -- Name --
754: -- verify_save_run_bal_flag_upd --
755: -- Purpose --
756: -- Called from trigger pay_defined_balances_bru to prevent the update of --
757: -- SAVE_RUN_BALANCE flag from 'Y' to 'N' or null, when valid run --
758: -- balances exist for the defined balance.
759: -- Arguments --
760: -- See below. --

Line 810: END PAY_DEFINED_BALANCES_PKG;

806: hr_utility.set_location('Leaving: pay_defined_balance_pkg.verify_save_run_bal_flag_upd', 30);
807: --
808: END verify_save_run_bal_flag_upd;
809: -----------------------------------------------------------------------------
810: END PAY_DEFINED_BALANCES_PKG;