10: WHERE UPPER(payment_type_name) = UPPER(X_Payment_Type_Name)
11: AND UPPER(Territory_Code) = UPPER(X_Territory_Code)
12: AND (Rowid <> X_Rowid OR X_Rowid is NULL);
13: IF (SQL%FOUND) THEN
14: hr_utility.set_message(801,'HR_6714_PAYM_ALREADY_EXISTS');
15: hr_utility.raise_error;
16: END IF;
17: EXCEPTION
18: when NO_DATA_FOUND then
11: AND UPPER(Territory_Code) = UPPER(X_Territory_Code)
12: AND (Rowid <> X_Rowid OR X_Rowid is NULL);
13: IF (SQL%FOUND) THEN
14: hr_utility.set_message(801,'HR_6714_PAYM_ALREADY_EXISTS');
15: hr_utility.raise_error;
16: END IF;
17: EXCEPTION
18: when NO_DATA_FOUND then
19: null;
124: OPEN C;
125: FETCH C INTO X_Rowid;
126: if (C%NOTFOUND) then
127: CLOSE C;
128: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
129: hr_utility.set_message_token('PROCEDURE','Insert_Row');
130: hr_utility.set_message_token('STEP','1');
131: hr_utility.raise_error;
132: end if;
125: FETCH C INTO X_Rowid;
126: if (C%NOTFOUND) then
127: CLOSE C;
128: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
129: hr_utility.set_message_token('PROCEDURE','Insert_Row');
130: hr_utility.set_message_token('STEP','1');
131: hr_utility.raise_error;
132: end if;
133: CLOSE C;
126: if (C%NOTFOUND) then
127: CLOSE C;
128: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
129: hr_utility.set_message_token('PROCEDURE','Insert_Row');
130: hr_utility.set_message_token('STEP','1');
131: hr_utility.raise_error;
132: end if;
133: CLOSE C;
134: END Insert_Row;
127: CLOSE C;
128: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
129: hr_utility.set_message_token('PROCEDURE','Insert_Row');
130: hr_utility.set_message_token('STEP','1');
131: hr_utility.raise_error;
132: end if;
133: CLOSE C;
134: END Insert_Row;
135:
182: l_package_name VARCHAR2(80) := 'PAY_PAYMENT_TYPES_PKG.VALIDATE_TRANSLATION';
183:
184: BEGIN
185:
186: hr_utility.set_location (l_package_name,10);
187:
188: IF (payment_type_id IS NOT NULL) THEN
189: -- We know this record is in the database, and can use
190: -- full validation
188: IF (payment_type_id IS NOT NULL) THEN
189: -- We know this record is in the database, and can use
190: -- full validation
191: OPEN c_trans_check(language, payment_type_name,payment_type_id);
192: hr_utility.set_location (l_package_name,20);
193: FETCH c_trans_check INTO g_dummy;
194:
195: IF c_trans_check%NOTFOUND THEN
196: hr_utility.set_location (l_package_name,30);
192: hr_utility.set_location (l_package_name,20);
193: FETCH c_trans_check INTO g_dummy;
194:
195: IF c_trans_check%NOTFOUND THEN
196: hr_utility.set_location (l_package_name,30);
197: CLOSE c_trans_check;
198: ELSE
199: hr_utility.set_location (l_package_name,40);
200: CLOSE c_trans_check;
195: IF c_trans_check%NOTFOUND THEN
196: hr_utility.set_location (l_package_name,30);
197: CLOSE c_trans_check;
198: ELSE
199: hr_utility.set_location (l_package_name,40);
200: CLOSE c_trans_check;
201: fnd_message.set_name('PAY','HR_TRANSLATION_EXISTS');
202: fnd_message.raise_error;
203: END IF;
202: fnd_message.raise_error;
203: END IF;
204: ELSE
205: OPEN c_translation_exists(language, payment_type_name);
206: hr_utility.set_location (l_package_name,50);
207: FETCH c_translation_exists INTO g_dummy;
208:
209: IF c_translation_exists%NOTFOUND THEN
210: hr_utility.set_location (l_package_name,60);
206: hr_utility.set_location (l_package_name,50);
207: FETCH c_translation_exists INTO g_dummy;
208:
209: IF c_translation_exists%NOTFOUND THEN
210: hr_utility.set_location (l_package_name,60);
211: CLOSE c_translation_exists;
212: ELSE
213: hr_utility.set_location (l_package_name,70);
214: CLOSE c_translation_exists;
209: IF c_translation_exists%NOTFOUND THEN
210: hr_utility.set_location (l_package_name,60);
211: CLOSE c_translation_exists;
212: ELSE
213: hr_utility.set_location (l_package_name,70);
214: CLOSE c_translation_exists;
215: fnd_message.set_name('PAY','HR_TRANSLATION_EXISTS');
216: fnd_message.raise_error;
217: END IF;
215: fnd_message.set_name('PAY','HR_TRANSLATION_EXISTS');
216: fnd_message.raise_error;
217: END IF;
218: END IF;
219: hr_utility.set_location ('Leaving:'||l_package_name,80);
220:
221: END validate_translation;
222:
223: --
264: OPEN C;
265: FETCH C INTO Recinfo;
266: if (C%NOTFOUND) then
267: CLOSE C;
268: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
269: hr_utility.set_message_token('PROCEDURE','Lock_Row');
270: hr_utility.set_message_token('STEP','1');
271: hr_utility.raise_error;
272: end if;
265: FETCH C INTO Recinfo;
266: if (C%NOTFOUND) then
267: CLOSE C;
268: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
269: hr_utility.set_message_token('PROCEDURE','Lock_Row');
270: hr_utility.set_message_token('STEP','1');
271: hr_utility.raise_error;
272: end if;
273: CLOSE C;
266: if (C%NOTFOUND) then
267: CLOSE C;
268: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
269: hr_utility.set_message_token('PROCEDURE','Lock_Row');
270: hr_utility.set_message_token('STEP','1');
271: hr_utility.raise_error;
272: end if;
273: CLOSE C;
274: --
267: CLOSE C;
268: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
269: hr_utility.set_message_token('PROCEDURE','Lock_Row');
270: hr_utility.set_message_token('STEP','1');
271: hr_utility.raise_error;
272: end if;
273: CLOSE C;
274: --
275: /** sbilling **/
295: -- end if;
296: -- end loop;
297: ----
298: --if (l_mls_count=0) then -- Trap system errors
299: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
300: -- hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.LOCK_TL_ROW');
301: --end if;
302: --
303: -- ***************************************************************************
296: -- end loop;
297: ----
298: --if (l_mls_count=0) then -- Trap system errors
299: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
300: -- hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.LOCK_TL_ROW');
301: --end if;
302: --
303: -- ***************************************************************************
304: --
396: validation_value = X_Validation_Value
397: WHERE rowid = X_rowid;
398:
399: if (SQL%NOTFOUND) then
400: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
401: hr_utility.set_message_token('PROCEDURE','Update_Row');
402: hr_utility.set_message_token('STEP','1');
403: hr_utility.raise_error;
404: end if;
397: WHERE rowid = X_rowid;
398:
399: if (SQL%NOTFOUND) then
400: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
401: hr_utility.set_message_token('PROCEDURE','Update_Row');
402: hr_utility.set_message_token('STEP','1');
403: hr_utility.raise_error;
404: end if;
405: --
398:
399: if (SQL%NOTFOUND) then
400: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
401: hr_utility.set_message_token('PROCEDURE','Update_Row');
402: hr_utility.set_message_token('STEP','1');
403: hr_utility.raise_error;
404: end if;
405: --
406: -- ****************************************************************************************
399: if (SQL%NOTFOUND) then
400: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
401: hr_utility.set_message_token('PROCEDURE','Update_Row');
402: hr_utility.set_message_token('STEP','1');
403: hr_utility.raise_error;
404: end if;
405: --
406: -- ****************************************************************************************
407: --
415: where PAYMENT_TYPE_ID = X_PAYMENT_TYPE_ID
416: and userenv('LANG') in (LANGUAGE, SOURCE_LANG);
417: --
418: if (sql%notfound) then -- trap system errors during update
419: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
420: hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UPDATE_TL_ROW');
421: end if;
422: --
423: -- ***************************************************************************************
416: and userenv('LANG') in (LANGUAGE, SOURCE_LANG);
417: --
418: if (sql%notfound) then -- trap system errors during update
419: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
420: hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UPDATE_TL_ROW');
421: end if;
422: --
423: -- ***************************************************************************************
424: --
429: DELETE FROM PAY_PAYMENT_TYPES
430: WHERE rowid = X_Rowid;
431:
432: if (SQL%NOTFOUND) then
433: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE','Delete_Row');
435: hr_utility.set_message_token('STEP','1');
436: hr_utility.raise_error;
437: end if;
430: WHERE rowid = X_Rowid;
431:
432: if (SQL%NOTFOUND) then
433: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE','Delete_Row');
435: hr_utility.set_message_token('STEP','1');
436: hr_utility.raise_error;
437: end if;
438: --
431:
432: if (SQL%NOTFOUND) then
433: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE','Delete_Row');
435: hr_utility.set_message_token('STEP','1');
436: hr_utility.raise_error;
437: end if;
438: --
439: -- ********************************************************************************
432: if (SQL%NOTFOUND) then
433: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE','Delete_Row');
435: hr_utility.set_message_token('STEP','1');
436: hr_utility.raise_error;
437: end if;
438: --
439: -- ********************************************************************************
440: --
443: delete from PAY_PAYMENT_TYPES_TL
444: where PAYMENT_TYPE_ID = X_PAYMENT_TYPE_ID;
445: --
446: if sql%notfound then -- trap system errors during deletion
447: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
448: hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.DELETE_TL_ROW');
449: end if;
450: --
451: -- ********************************************************************************
444: where PAYMENT_TYPE_ID = X_PAYMENT_TYPE_ID;
445: --
446: if sql%notfound then -- trap system errors during deletion
447: hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
448: hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.DELETE_TL_ROW');
449: end if;
450: --
451: -- ********************************************************************************
452: --
528: WHERE UPPER(payment_type_name) = UPPER(X_Payment_Type_Name)
529: AND UPPER(territory_code) = UPPER(x_territory_code);
530: --
531: IF (result>1) THEN
532: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
533: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
534: hr_utility.set_message_token('STEP','1');
535: hr_utility.raise_error;
536: END IF;
529: AND UPPER(territory_code) = UPPER(x_territory_code);
530: --
531: IF (result>1) THEN
532: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
533: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
534: hr_utility.set_message_token('STEP','1');
535: hr_utility.raise_error;
536: END IF;
537: EXCEPTION
530: --
531: IF (result>1) THEN
532: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
533: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
534: hr_utility.set_message_token('STEP','1');
535: hr_utility.raise_error;
536: END IF;
537: EXCEPTION
538: when NO_DATA_FOUND then
531: IF (result>1) THEN
532: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
533: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
534: hr_utility.set_message_token('STEP','1');
535: hr_utility.raise_error;
536: END IF;
537: EXCEPTION
538: when NO_DATA_FOUND then
539: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
535: hr_utility.raise_error;
536: END IF;
537: EXCEPTION
538: when NO_DATA_FOUND then
539: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
540: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
541: hr_utility.set_message_token('STEP','1');
542: hr_utility.raise_error;
543: end unique_chk;
536: END IF;
537: EXCEPTION
538: when NO_DATA_FOUND then
539: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
540: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
541: hr_utility.set_message_token('STEP','1');
542: hr_utility.raise_error;
543: end unique_chk;
544: --
537: EXCEPTION
538: when NO_DATA_FOUND then
539: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
540: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
541: hr_utility.set_message_token('STEP','1');
542: hr_utility.raise_error;
543: end unique_chk;
544: --
545: procedure TRANSLATE_ROW(x_b_payment_type_name in VARCHAR2,
538: when NO_DATA_FOUND then
539: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
540: hr_utility.set_message_token('PROCEDURE','PAY_PAYMENT_TYPES_PKG.UNIQUE_CHK');
541: hr_utility.set_message_token('STEP','1');
542: hr_utility.raise_error;
543: end unique_chk;
544: --
545: procedure TRANSLATE_ROW(x_b_payment_type_name in VARCHAR2,
546: x_territory_code in VARCHAR2,
565: WHERE nvl(upper(x_territory_code),'~null~') = nvl(upper(ppt.territory_code),'~null~')
566: AND nvl(upper(x_b_payment_type_name),'~null~') = nvl(upper(ppt.payment_type_name),'~null~'));
567: --
568: if (sql%notfound) then -- trap system errors during update
569: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
570: -- hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.TRANSLATE_ROW');
571: -- hr_utility.set_message_token('STEP','1');
572: -- hr_utility.raise_error;
573: null;
566: AND nvl(upper(x_b_payment_type_name),'~null~') = nvl(upper(ppt.payment_type_name),'~null~'));
567: --
568: if (sql%notfound) then -- trap system errors during update
569: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
570: -- hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.TRANSLATE_ROW');
571: -- hr_utility.set_message_token('STEP','1');
572: -- hr_utility.raise_error;
573: null;
574: end if;
567: --
568: if (sql%notfound) then -- trap system errors during update
569: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
570: -- hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.TRANSLATE_ROW');
571: -- hr_utility.set_message_token('STEP','1');
572: -- hr_utility.raise_error;
573: null;
574: end if;
575: end TRANSLATE_ROW;
568: if (sql%notfound) then -- trap system errors during update
569: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
570: -- hr_utility.set_message_token ('PROCEDURE','PAY_PAYMENT_TYPES_PKG.TRANSLATE_ROW');
571: -- hr_utility.set_message_token('STEP','1');
572: -- hr_utility.raise_error;
573: null;
574: end if;
575: end TRANSLATE_ROW;
576: ------------------------------------------------------------------------------
683: OPEN C;
684: FETCH C INTO X_PAYMENT_TYPE_ID;
685: if (C%NOTFOUND) then
686: -- CLOSE C;
687: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
688: -- hr_utility.set_message_token('PROCEDURE','Insert_Row');
689: -- hr_utility.set_message_token('STEP','1');
690: -- hr_utility.raise_error;
691: null;
684: FETCH C INTO X_PAYMENT_TYPE_ID;
685: if (C%NOTFOUND) then
686: -- CLOSE C;
687: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
688: -- hr_utility.set_message_token('PROCEDURE','Insert_Row');
689: -- hr_utility.set_message_token('STEP','1');
690: -- hr_utility.raise_error;
691: null;
692: end if;
685: if (C%NOTFOUND) then
686: -- CLOSE C;
687: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
688: -- hr_utility.set_message_token('PROCEDURE','Insert_Row');
689: -- hr_utility.set_message_token('STEP','1');
690: -- hr_utility.raise_error;
691: null;
692: end if;
693: CLOSE C;
686: -- CLOSE C;
687: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
688: -- hr_utility.set_message_token('PROCEDURE','Insert_Row');
689: -- hr_utility.set_message_token('STEP','1');
690: -- hr_utility.raise_error;
691: null;
692: end if;
693: CLOSE C;
694: -- Bug # 6124985.