DBA Data[Home] [Help]

APPS.PAY_BALANCE_TYPES_PKG dependencies on PAY_BALANCE_TYPES

Line 1: PACKAGE BODY PAY_BALANCE_TYPES_PKG as

1: PACKAGE BODY PAY_BALANCE_TYPES_PKG as
2: /* $Header: pyblt01t.pkb 120.1 2005/11/07 09:45:38 arashid noship $ */
3: --
4: -- dummy variable for values returned from cursors that are not needed
5: --

Line 44: FROM pay_balance_types_tl bttl,

40: p_reporting_name IN VARCHAR2,
41: p_balance_type_id IN NUMBER,
42: p_mode IN VARCHAR2) IS
43: SELECT 1
44: FROM pay_balance_types_tl bttl,
45: pay_balance_types bt
46: WHERE ((p_mode = 'BALANCE_NAME' and
47: upper(bttl.balance_name) = upper(translate(p_balance_name,
48: '_',' '))) or

Line 45: pay_balance_types bt

41: p_balance_type_id IN NUMBER,
42: p_mode IN VARCHAR2) IS
43: SELECT 1
44: FROM pay_balance_types_tl bttl,
45: pay_balance_types bt
46: WHERE ((p_mode = 'BALANCE_NAME' and
47: upper(bttl.balance_name) = upper(translate(p_balance_name,
48: '_',' '))) or
49: (p_mode = 'REPORTING_NAME' and

Line 59: l_package_name VARCHAR2(80) := 'PAY_BALANCE_TYPES_PKG.VALIDATE_TRANSLATION';

55: AND ( g_business_group_id = bt.business_group_id + 0 OR g_business_group_id is null )
56: AND ( g_legislation_code = bt.legislation_code OR g_legislation_code is null );
57:
58:
59: l_package_name VARCHAR2(80) := 'PAY_BALANCE_TYPES_PKG.VALIDATE_TRANSLATION';
60: l_name pay_balance_types.balance_name%type := balance_name;
61: l_dummy varchar2(100);
62:
63: BEGIN

Line 60: l_name pay_balance_types.balance_name%type := balance_name;

56: AND ( g_legislation_code = bt.legislation_code OR g_legislation_code is null );
57:
58:
59: l_package_name VARCHAR2(80) := 'PAY_BALANCE_TYPES_PKG.VALIDATE_TRANSLATION';
60: l_name pay_balance_types.balance_name%type := balance_name;
61: l_dummy varchar2(100);
62:
63: BEGIN
64: hr_utility.set_location (l_package_name,1);

Line 138: l_proc varchar2(72) := 'pay_balance_types_pkg.chk_balance_category';

134: ,p_business_group_id number default null
135: )
136: return boolean is
137: --
138: l_proc varchar2(72) := 'pay_balance_types_pkg.chk_balance_category';
139: l_leg_code pay_balance_types.legislation_code%type;
140: --
141: cursor get_legislation(p_bg_id number)
142: is

Line 139: l_leg_code pay_balance_types.legislation_code%type;

135: )
136: return boolean is
137: --
138: l_proc varchar2(72) := 'pay_balance_types_pkg.chk_balance_category';
139: l_leg_code pay_balance_types.legislation_code%type;
140: --
141: cursor get_legislation(p_bg_id number)
142: is
143: select pbg.legislation_code

Line 230: from pay_balance_types bt

226: v_bg_leg_code varchar2(30);
227: --
228: cursor csr_unique_check(p_mode varchar2) is
229: select bt.balance_type_id
230: from pay_balance_types bt
231: , per_business_groups_perf bg
232: where ((p_mode = 'BALANCE_NAME'
233: and upper(bt.balance_name) = upper(translate(p_balance_name,'_',' ')))
234: or (p_mode = 'REPORTING_NAME'

Line 461: CURSOR C IS SELECT rowid FROM pay_balance_types

457: x_base_balance_type_id number default null,
458: x_input_value_id number default null)
459: IS
460: --
461: CURSOR C IS SELECT rowid FROM pay_balance_types
462: WHERE balance_type_id = X_Balance_Type_Id;
463: --
464: CURSOR C2 IS SELECT pay_balance_types_s.nextval FROM sys.dual;
465: --

Line 464: CURSOR C2 IS SELECT pay_balance_types_s.nextval FROM sys.dual;

460: --
461: CURSOR C IS SELECT rowid FROM pay_balance_types
462: WHERE balance_type_id = X_Balance_Type_Id;
463: --
464: CURSOR C2 IS SELECT pay_balance_types_s.nextval FROM sys.dual;
465: --
466: BEGIN
467: --
468: -- Make sure balance type is valid ie. unique name only one remuneration

Line 485: hr_utility.set_location('pay_balance_types_pkg.insert_row', 10);

481: ,x_business_group_id) then
482: --
483: if x_balance_category_id is null then
484: --
485: hr_utility.set_location('pay_balance_types_pkg.insert_row', 10);
486: hr_utility.set_message(801, 'PAY_34261_CAT_IS_MANDATORY');
487: hr_utility.raise_error;
488: --
489: end if;

Line 498: INSERT INTO pay_balance_types

494: FETCH C2 INTO X_Balance_Type_Id;
495: CLOSE C2;
496: end if;
497: --
498: INSERT INTO pay_balance_types
499: (balance_type_id,
500: business_group_id,
501: legislation_code,
502: currency_code,

Line 575: insert into PAY_BALANCE_TYPES_TL (

571: --
572: -- **************************************************************************
573: -- insert into MLS table (TL)
574: --
575: insert into PAY_BALANCE_TYPES_TL (
576: BALANCE_TYPE_ID,
577: BALANCE_NAME,
578: REPORTING_NAME,
579: LAST_UPDATE_DATE,

Line 595: from PAY_BALANCE_TYPES_TL T

591: from FND_LANGUAGES L
592: where L.INSTALLED_FLAG in ('I', 'B')
593: and not exists
594: (select NULL
595: from PAY_BALANCE_TYPES_TL T
596: where T.BALANCE_TYPE_ID = X_Balance_Type_Id
597: and T.LANGUAGE = L.LANGUAGE_CODE);
598: --
599: --

Line 608: 'pay_balance_types_pkg.insert_row');

604: if (C%NOTFOUND) then
605: CLOSE C;
606: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
607: hr_utility.set_message_token('PROCEDURE',
608: 'pay_balance_types_pkg.insert_row');
609: hr_utility.set_message_token('STEP','1');
610: hr_utility.raise_error;
611: end if;
612: CLOSE C;

Line 669: CURSOR C IS SELECT * FROM pay_balance_types

665: x_base_balance_type_id number default null,
666: x_input_value_id number default null)
667: IS
668: --
669: CURSOR C IS SELECT * FROM pay_balance_types
670: WHERE rowid = X_Rowid FOR UPDATE of Balance_Type_Id NOWAIT;
671: --
672: --
673: -- ***************************************************************************

Line 680: from PAY_BALANCE_TYPES_TL

676: cursor csr_balance_type_tl is
677: select BALANCE_NAME,
678: REPORTING_NAME,
679: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
680: from PAY_BALANCE_TYPES_TL
681: where BALANCE_TYPE_ID = X_BALANCE_TYPE_ID
682: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
683: for update of BALANCE_TYPE_ID nowait;
684: --

Line 698: 'pay_balance_types_pkg.lock_row');

694: if (C%NOTFOUND) then
695: CLOSE C;
696: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
697: hr_utility.set_message_token('PROCEDURE',
698: 'pay_balance_types_pkg.lock_row');
699: hr_utility.set_message_token('STEP','1');
700: hr_utility.raise_error;
701: end if;
702: CLOSE C;

Line 730: -- hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.LOCK_TL_ROW');

726: --
727: --if (l_mls_count=0) then -- Trap system errors
728: -- close csr_balance_type_tl;
729: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
730: -- hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.LOCK_TL_ROW');
731: --end if;
732: --
733: -- ***************************************************************************
734: -- Remove trailing spaces.

Line 958: hr_utility.set_location('pay_balance_types_pkg.insert_row', 10);

954: ,x_business_group_id) then
955: --
956: if x_balance_category_id is null then
957: --
958: hr_utility.set_location('pay_balance_types_pkg.insert_row', 10);
959: hr_utility.set_message(801, 'PAY_34261_CAT_IS_MANDATORY');
960: hr_utility.raise_error;
961: --
962: end if;

Line 965: UPDATE pay_balance_types

961: --
962: end if;
963: end if;
964: --
965: UPDATE pay_balance_types
966: SET balance_type_id = X_Balance_Type_Id,
967: business_group_id = X_Business_Group_Id,
968: legislation_code = X_Legislation_Code,
969: currency_code = X_Currency_Code,

Line 1008: 'pay_balance_types_pkg.update_row');

1004: --
1005: if (SQL%NOTFOUND) then
1006: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1007: hr_utility.set_message_token('PROCEDURE',
1008: 'pay_balance_types_pkg.update_row');
1009: hr_utility.set_message_token('STEP','1');
1010: hr_utility.raise_error;
1011: end if;
1012: --

Line 1017: update PAY_BALANCE_TYPES_TL

1013: -- ****************************************************************************************
1014: --
1015: -- update MLS table (TL)
1016: --
1017: update PAY_BALANCE_TYPES_TL
1018: set BALANCE_NAME = X_BALANCE_NAME,
1019: REPORTING_NAME = X_REPORTING_NAME,
1020: LAST_UPDATE_DATE = sysdate,
1021: SOURCE_LANG = userenv('LANG')

Line 1028: hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.UPDATE_TL_ROW');

1024: --
1025: --
1026: if (sql%notfound) then -- trap system errors during update
1027: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
1028: hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.UPDATE_TL_ROW');
1029: end if;
1030: --
1031: -- ***************************************************************************************
1032: --

Line 1056: DELETE FROM pay_balance_types

1052: --
1053: -- Remove balance feeds, balance classifications and defined balances.
1054: balance_type_cascade_delete(X_Balance_Type_Id);
1055: --
1056: DELETE FROM pay_balance_types
1057: WHERE rowid = X_Rowid;
1058: --
1059: if (SQL%NOTFOUND) then
1060: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');

Line 1062: 'pay_balance_types_pkg.delete_row');

1058: --
1059: if (SQL%NOTFOUND) then
1060: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1061: hr_utility.set_message_token('PROCEDURE',
1062: 'pay_balance_types_pkg.delete_row');
1063: hr_utility.set_message_token('STEP','1');
1064: hr_utility.raise_error;
1065: end if;
1066: --

Line 1078: delete from PAY_BALANCE_TYPES_TL

1074: -- for all other date track modes the data should remain untouched
1075: --
1076: --if p_delete_mode = 'ZAP' then
1077:
1078: delete from PAY_BALANCE_TYPES_TL
1079: where BALANCE_TYPE_ID = X_BALANCE_TYPE_ID;
1080: --
1081: if sql%notfound then -- trap system errors during deletion
1082: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');

Line 1083: hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.DELETE_TL_ROW');

1079: where BALANCE_TYPE_ID = X_BALANCE_TYPE_ID;
1080: --
1081: if sql%notfound then -- trap system errors during deletion
1082: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
1083: hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.DELETE_TL_ROW');
1084: end if;
1085:
1086: --end if;
1087: --

Line 1098: delete from PAY_BALANCE_TYPES_TL T

1094: ------------------------------------------------------------------------------------
1095: procedure ADD_LANGUAGE
1096: is
1097: begin
1098: delete from PAY_BALANCE_TYPES_TL T
1099: where not exists
1100: (select NULL
1101: from PAY_BALANCE_TYPES B
1102: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID

Line 1101: from PAY_BALANCE_TYPES B

1097: begin
1098: delete from PAY_BALANCE_TYPES_TL T
1099: where not exists
1100: (select NULL
1101: from PAY_BALANCE_TYPES B
1102: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
1103: );
1104:
1105: update PAY_BALANCE_TYPES_TL T set (

Line 1105: update PAY_BALANCE_TYPES_TL T set (

1101: from PAY_BALANCE_TYPES B
1102: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
1103: );
1104:
1105: update PAY_BALANCE_TYPES_TL T set (
1106: BALANCE_NAME,
1107: REPORTING_NAME
1108: ) = (select
1109: B.BALANCE_NAME,

Line 1111: from PAY_BALANCE_TYPES_TL B

1107: REPORTING_NAME
1108: ) = (select
1109: B.BALANCE_NAME,
1110: B.REPORTING_NAME
1111: from PAY_BALANCE_TYPES_TL B
1112: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
1113: and B.LANGUAGE = T.SOURCE_LANG)
1114: where (
1115: T.BALANCE_TYPE_ID,

Line 1120: from PAY_BALANCE_TYPES_TL SUBB, PAY_BALANCE_TYPES_TL SUBT

1116: T.LANGUAGE
1117: ) in (select
1118: SUBT.BALANCE_TYPE_ID,
1119: SUBT.LANGUAGE
1120: from PAY_BALANCE_TYPES_TL SUBB, PAY_BALANCE_TYPES_TL SUBT
1121: where SUBB.BALANCE_TYPE_ID = SUBT.BALANCE_TYPE_ID
1122: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
1123: and (SUBB.BALANCE_NAME <> SUBT.BALANCE_NAME
1124: or SUBB.REPORTING_NAME <> SUBT.REPORTING_NAME

Line 1129: insert into PAY_BALANCE_TYPES_TL (

1125: or (SUBB.REPORTING_NAME is null and SUBT.REPORTING_NAME is not null)
1126: or (SUBB.REPORTING_NAME is not null and SUBT.REPORTING_NAME is null)
1127: ));
1128:
1129: insert into PAY_BALANCE_TYPES_TL (
1130: BALANCE_TYPE_ID,
1131: BALANCE_NAME,
1132: REPORTING_NAME,
1133: LAST_UPDATE_DATE,

Line 1151: from PAY_BALANCE_TYPES_TL B, FND_LANGUAGES L

1147: B.CREATED_BY,
1148: B.CREATION_DATE,
1149: L.LANGUAGE_CODE,
1150: B.SOURCE_LANG
1151: from PAY_BALANCE_TYPES_TL B, FND_LANGUAGES L
1152: where L.INSTALLED_FLAG in ('I', 'B')
1153: and B.LANGUAGE = userenv('LANG')
1154: and not exists
1155: (select NULL

Line 1156: from PAY_BALANCE_TYPES_TL T

1152: where L.INSTALLED_FLAG in ('I', 'B')
1153: and B.LANGUAGE = userenv('LANG')
1154: and not exists
1155: (select NULL
1156: from PAY_BALANCE_TYPES_TL T
1157: where T.BALANCE_TYPE_ID = B.BALANCE_TYPE_ID
1158: and T.LANGUAGE = L.LANGUAGE_CODE);
1159: end ADD_LANGUAGE;
1160: --

Line 1167: FROM pay_balance_types

1163: is
1164: result varchar2(255);
1165: Begin
1166: SELECT count(*) INTO result
1167: FROM pay_balance_types
1168: WHERE nvl(BALANCE_NAME,'~null~') = nvl(X_B_BALANCE_NAME,'~null~')
1169: and nvl(LEGISLATION_CODE,'~null~') = nvl(X_B_LEGISLATION_CODE,'~null~')
1170: and BUSINESS_GROUP_ID is NULL;
1171: --

Line 1174: hr_utility.set_message_token('PROCEDURE','PAY_BALANCE_TYPES_PKG.UNIQUE_CHK');

1170: and BUSINESS_GROUP_ID is NULL;
1171: --
1172: IF (result>1) THEN
1173: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1174: hr_utility.set_message_token('PROCEDURE','PAY_BALANCE_TYPES_PKG.UNIQUE_CHK');
1175: hr_utility.set_message_token('STEP','1');
1176: hr_utility.raise_error;
1177: END IF;
1178: EXCEPTION

Line 1181: hr_utility.set_message_token('PROCEDURE','PAY_BALANCE_TYPES_PKG.UNIQUE_CHK');

1177: END IF;
1178: EXCEPTION
1179: when NO_DATA_FOUND then
1180: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1181: hr_utility.set_message_token('PROCEDURE','PAY_BALANCE_TYPES_PKG.UNIQUE_CHK');
1182: hr_utility.set_message_token('STEP','1');
1183: hr_utility.raise_error;
1184: end unique_chk;
1185: --------------------------------------------------------------------------------

Line 1198: from pay_balance_types

1194: -- statement.
1195: --
1196: cursor csr_bal_id is
1197: select balance_type_id
1198: from pay_balance_types
1199: where nvl(balance_name,'~null~')=nvl(x_b_balance_name,'~null~')
1200: and nvl(legislation_code,'~null~') = nvl(x_b_legislation_code,'~null~')
1201: and business_group_id is null
1202: ;

Line 1212: from pay_balance_types_tl

1208: ,p_language in varchar2
1209: ) is
1210: select balance_name
1211: , language
1212: from pay_balance_types_tl
1213: where balance_type_id = p_balance_type_id
1214: and p_language in (language, source_lang)
1215: ;
1216: --

Line 1253: UPDATE pay_balance_types_tl

1249: end if;
1250: end loop;
1251: end if;
1252:
1253: UPDATE pay_balance_types_tl
1254: SET balance_name = nvl(x_balance_name,balance_name),
1255: reporting_name = nvl(x_reporting_name,reporting_name),
1256: last_update_date = Sysdate,
1257: last_updated_by = decode(x_owner,'SEED',1,0),

Line 1276: END PAY_BALANCE_TYPES_PKG;

1272: end if;
1273: end if;
1274: end TRANSLATE_ROW;
1275: --------------------------------------------------------------------------------
1276: END PAY_BALANCE_TYPES_PKG;