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.2 2011/01/09 18:14:00 priupadh ship $ */
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 235: from pay_balance_types bt

231: v_bg_leg_code varchar2(30);
232: --
233: cursor csr_unique_check(p_mode varchar2) is
234: select bt.balance_type_id
235: from pay_balance_types bt
236: , per_business_groups_perf bg
237: where ((p_mode = 'BALANCE_NAME'
238: and upper(bt.balance_name) = upper(translate(p_balance_name,'_',' ')))
239: or (p_mode = 'REPORTING_NAME'

Line 466: CURSOR C IS SELECT rowid FROM pay_balance_types

462: x_base_balance_type_id number default null,
463: x_input_value_id number default null)
464: IS
465: --
466: CURSOR C IS SELECT rowid FROM pay_balance_types
467: WHERE balance_type_id = X_Balance_Type_Id;
468: --
469: CURSOR C2 IS SELECT pay_balance_types_s.nextval FROM sys.dual;
470: --

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

465: --
466: CURSOR C IS SELECT rowid FROM pay_balance_types
467: WHERE balance_type_id = X_Balance_Type_Id;
468: --
469: CURSOR C2 IS SELECT pay_balance_types_s.nextval FROM sys.dual;
470: --
471: BEGIN
472: --
473: -- Make sure balance type is valid ie. unique name only one remuneration

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

486: ,x_business_group_id) then
487: --
488: if x_balance_category_id is null then
489: --
490: hr_utility.set_location('pay_balance_types_pkg.insert_row', 10);
491: hr_utility.set_message(801, 'PAY_34261_CAT_IS_MANDATORY');
492: hr_utility.raise_error;
493: --
494: end if;

Line 503: INSERT INTO pay_balance_types

499: FETCH C2 INTO X_Balance_Type_Id;
500: CLOSE C2;
501: end if;
502: --
503: INSERT INTO pay_balance_types
504: (balance_type_id,
505: business_group_id,
506: legislation_code,
507: currency_code,

Line 580: insert into PAY_BALANCE_TYPES_TL (

576: --
577: -- **************************************************************************
578: -- insert into MLS table (TL)
579: --
580: insert into PAY_BALANCE_TYPES_TL (
581: BALANCE_TYPE_ID,
582: BALANCE_NAME,
583: REPORTING_NAME,
584: LAST_UPDATE_DATE,

Line 600: from PAY_BALANCE_TYPES_TL T

596: from FND_LANGUAGES L
597: where L.INSTALLED_FLAG in ('I', 'B')
598: and not exists
599: (select NULL
600: from PAY_BALANCE_TYPES_TL T
601: where T.BALANCE_TYPE_ID = X_Balance_Type_Id
602: and T.LANGUAGE = L.LANGUAGE_CODE);
603: --
604: --

Line 613: 'pay_balance_types_pkg.insert_row');

609: if (C%NOTFOUND) then
610: CLOSE C;
611: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
612: hr_utility.set_message_token('PROCEDURE',
613: 'pay_balance_types_pkg.insert_row');
614: hr_utility.set_message_token('STEP','1');
615: hr_utility.raise_error;
616: end if;
617: CLOSE C;

Line 674: CURSOR C IS SELECT * FROM pay_balance_types

670: x_base_balance_type_id number default null,
671: x_input_value_id number default null)
672: IS
673: --
674: CURSOR C IS SELECT * FROM pay_balance_types
675: WHERE rowid = X_Rowid FOR UPDATE of Balance_Type_Id NOWAIT;
676: --
677: --
678: -- ***************************************************************************

Line 685: from PAY_BALANCE_TYPES_TL

681: cursor csr_balance_type_tl is
682: select BALANCE_NAME,
683: REPORTING_NAME,
684: decode(LANGUAGE, userenv('LANG'), 'Y', 'N') BASELANG
685: from PAY_BALANCE_TYPES_TL
686: where BALANCE_TYPE_ID = X_BALANCE_TYPE_ID
687: and userenv('LANG') in (LANGUAGE, SOURCE_LANG)
688: for update of BALANCE_TYPE_ID nowait;
689: --

Line 703: 'pay_balance_types_pkg.lock_row');

699: if (C%NOTFOUND) then
700: CLOSE C;
701: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
702: hr_utility.set_message_token('PROCEDURE',
703: 'pay_balance_types_pkg.lock_row');
704: hr_utility.set_message_token('STEP','1');
705: hr_utility.raise_error;
706: end if;
707: CLOSE C;

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

731: --
732: --if (l_mls_count=0) then -- Trap system errors
733: -- close csr_balance_type_tl;
734: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
735: -- hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.LOCK_TL_ROW');
736: --end if;
737: --
738: -- ***************************************************************************
739: -- Remove trailing spaces.

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

959: ,x_business_group_id) then
960: --
961: if x_balance_category_id is null then
962: --
963: hr_utility.set_location('pay_balance_types_pkg.insert_row', 10);
964: hr_utility.set_message(801, 'PAY_34261_CAT_IS_MANDATORY');
965: hr_utility.raise_error;
966: --
967: end if;

Line 970: UPDATE pay_balance_types

966: --
967: end if;
968: end if;
969: --
970: UPDATE pay_balance_types
971: SET balance_type_id = X_Balance_Type_Id,
972: business_group_id = X_Business_Group_Id,
973: legislation_code = X_Legislation_Code,
974: currency_code = X_Currency_Code,

Line 1013: 'pay_balance_types_pkg.update_row');

1009: --
1010: if (SQL%NOTFOUND) then
1011: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1012: hr_utility.set_message_token('PROCEDURE',
1013: 'pay_balance_types_pkg.update_row');
1014: hr_utility.set_message_token('STEP','1');
1015: hr_utility.raise_error;
1016: end if;
1017: --

Line 1022: update PAY_BALANCE_TYPES_TL

1018: -- ****************************************************************************************
1019: --
1020: -- update MLS table (TL)
1021: --
1022: update PAY_BALANCE_TYPES_TL
1023: set BALANCE_NAME = X_BALANCE_NAME,
1024: REPORTING_NAME = X_REPORTING_NAME,
1025: LAST_UPDATE_DATE = sysdate,
1026: SOURCE_LANG = userenv('LANG')

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

1029: --
1030: --
1031: if (sql%notfound) then -- trap system errors during update
1032: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
1033: hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.UPDATE_TL_ROW');
1034: end if;
1035: --
1036: -- ***************************************************************************************
1037: --

Line 1061: DELETE FROM pay_balance_types

1057: --
1058: -- Remove balance feeds, balance classifications and defined balances.
1059: balance_type_cascade_delete(X_Balance_Type_Id);
1060: --
1061: DELETE FROM pay_balance_types
1062: WHERE rowid = X_Rowid;
1063: --
1064: if (SQL%NOTFOUND) then
1065: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');

Line 1067: 'pay_balance_types_pkg.delete_row');

1063: --
1064: if (SQL%NOTFOUND) then
1065: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1066: hr_utility.set_message_token('PROCEDURE',
1067: 'pay_balance_types_pkg.delete_row');
1068: hr_utility.set_message_token('STEP','1');
1069: hr_utility.raise_error;
1070: end if;
1071: --

Line 1083: delete from PAY_BALANCE_TYPES_TL

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

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

1084: where BALANCE_TYPE_ID = X_BALANCE_TYPE_ID;
1085: --
1086: if sql%notfound then -- trap system errors during deletion
1087: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
1088: hr_utility.set_message_token ('PROCEDURE','PAY_BALANCE_TYPES_PKG.DELETE_TL_ROW');
1089: end if;
1090:
1091: --end if;
1092: --

Line 1103: delete from PAY_BALANCE_TYPES_TL T

1099: ------------------------------------------------------------------------------------
1100: procedure ADD_LANGUAGE
1101: is
1102: begin
1103: delete from PAY_BALANCE_TYPES_TL T
1104: where not exists
1105: (select NULL
1106: from PAY_BALANCE_TYPES B
1107: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID

Line 1106: from PAY_BALANCE_TYPES B

1102: begin
1103: delete from PAY_BALANCE_TYPES_TL T
1104: where not exists
1105: (select NULL
1106: from PAY_BALANCE_TYPES B
1107: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
1108: );
1109:
1110: update PAY_BALANCE_TYPES_TL T set (

Line 1110: update PAY_BALANCE_TYPES_TL T set (

1106: from PAY_BALANCE_TYPES B
1107: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
1108: );
1109:
1110: update PAY_BALANCE_TYPES_TL T set (
1111: BALANCE_NAME,
1112: REPORTING_NAME
1113: ) = (select
1114: B.BALANCE_NAME,

Line 1116: from PAY_BALANCE_TYPES_TL B

1112: REPORTING_NAME
1113: ) = (select
1114: B.BALANCE_NAME,
1115: B.REPORTING_NAME
1116: from PAY_BALANCE_TYPES_TL B
1117: where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
1118: and B.LANGUAGE = T.SOURCE_LANG)
1119: where (
1120: T.BALANCE_TYPE_ID,

Line 1125: from PAY_BALANCE_TYPES_TL SUBB, PAY_BALANCE_TYPES_TL SUBT

1121: T.LANGUAGE
1122: ) in (select
1123: SUBT.BALANCE_TYPE_ID,
1124: SUBT.LANGUAGE
1125: from PAY_BALANCE_TYPES_TL SUBB, PAY_BALANCE_TYPES_TL SUBT
1126: where SUBB.BALANCE_TYPE_ID = SUBT.BALANCE_TYPE_ID
1127: and SUBB.LANGUAGE = SUBT.SOURCE_LANG
1128: and (SUBB.BALANCE_NAME <> SUBT.BALANCE_NAME
1129: or SUBB.REPORTING_NAME <> SUBT.REPORTING_NAME

Line 1134: insert into PAY_BALANCE_TYPES_TL (

1130: or (SUBB.REPORTING_NAME is null and SUBT.REPORTING_NAME is not null)
1131: or (SUBB.REPORTING_NAME is not null and SUBT.REPORTING_NAME is null)
1132: ));
1133:
1134: insert into PAY_BALANCE_TYPES_TL (
1135: BALANCE_TYPE_ID,
1136: BALANCE_NAME,
1137: REPORTING_NAME,
1138: LAST_UPDATE_DATE,

Line 1156: from PAY_BALANCE_TYPES_TL B, FND_LANGUAGES L

1152: B.CREATED_BY,
1153: B.CREATION_DATE,
1154: L.LANGUAGE_CODE,
1155: B.SOURCE_LANG
1156: from PAY_BALANCE_TYPES_TL B, FND_LANGUAGES L
1157: where L.INSTALLED_FLAG in ('I', 'B')
1158: and B.LANGUAGE = userenv('LANG')
1159: and not exists
1160: (select NULL

Line 1161: from PAY_BALANCE_TYPES_TL T

1157: where L.INSTALLED_FLAG in ('I', 'B')
1158: and B.LANGUAGE = userenv('LANG')
1159: and not exists
1160: (select NULL
1161: from PAY_BALANCE_TYPES_TL T
1162: where T.BALANCE_TYPE_ID = B.BALANCE_TYPE_ID
1163: and T.LANGUAGE = L.LANGUAGE_CODE);
1164: end ADD_LANGUAGE;
1165: --

Line 1172: FROM pay_balance_types

1168: is
1169: result varchar2(255);
1170: Begin
1171: SELECT count(*) INTO result
1172: FROM pay_balance_types
1173: WHERE nvl(BALANCE_NAME,'~null~') = nvl(X_B_BALANCE_NAME,'~null~')
1174: and nvl(LEGISLATION_CODE,'~null~') = nvl(X_B_LEGISLATION_CODE,'~null~')
1175: and BUSINESS_GROUP_ID is NULL;
1176: --

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

1175: and BUSINESS_GROUP_ID is NULL;
1176: --
1177: IF (result>1) THEN
1178: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1179: hr_utility.set_message_token('PROCEDURE','PAY_BALANCE_TYPES_PKG.UNIQUE_CHK');
1180: hr_utility.set_message_token('STEP','1');
1181: hr_utility.raise_error;
1182: END IF;
1183: EXCEPTION

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

1182: END IF;
1183: EXCEPTION
1184: when NO_DATA_FOUND then
1185: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1186: hr_utility.set_message_token('PROCEDURE','PAY_BALANCE_TYPES_PKG.UNIQUE_CHK');
1187: hr_utility.set_message_token('STEP','1');
1188: hr_utility.raise_error;
1189: end unique_chk;
1190: --------------------------------------------------------------------------------

Line 1203: from pay_balance_types

1199: -- statement.
1200: --
1201: cursor csr_bal_id is
1202: select balance_type_id
1203: from pay_balance_types
1204: where nvl(balance_name,'~null~')=nvl(x_b_balance_name,'~null~')
1205: and nvl(legislation_code,'~null~') = nvl(x_b_legislation_code,'~null~')
1206: and business_group_id is null
1207: ;

Line 1217: from pay_balance_types_tl

1213: ,p_language in varchar2
1214: ) is
1215: select balance_name
1216: , language
1217: from pay_balance_types_tl
1218: where balance_type_id = p_balance_type_id
1219: and p_language in (language, source_lang)
1220: ;
1221: --

Line 1258: UPDATE pay_balance_types_tl

1254: end if;
1255: end loop;
1256: end if;
1257:
1258: UPDATE pay_balance_types_tl
1259: SET balance_name = nvl(x_balance_name,balance_name),
1260: reporting_name = nvl(x_reporting_name,reporting_name),
1261: last_update_date = Sysdate,
1262: last_updated_by = decode(x_owner,'SEED',1,0),

Line 1281: END PAY_BALANCE_TYPES_PKG;

1277: end if;
1278: end if;
1279: end TRANSLATE_ROW;
1280: --------------------------------------------------------------------------------
1281: END PAY_BALANCE_TYPES_PKG;