DBA Data[Home] [Help]

APPS.FA_DEPRN_OVERRIDE_BRIUD dependencies on FND_MESSAGE

Line 124: fnd_message.set_name('OFA', 'FA_INVALID_DELETE_STATUS');

120:
121: IF fa_std_types.deprn_override_trigger_enabled THEN -- manually access the data
122: IF DELETING THEN
123: IF (:old.status <> 'NEW' AND :old.status <> 'POST') THEN
124: fnd_message.set_name('OFA', 'FA_INVALID_DELETE_STATUS');
125: raise_application_error(-20000,fnd_message.get);
126: END IF;
127:
128: ELSIF UPDATING THEN

Line 125: raise_application_error(-20000,fnd_message.get);

121: IF fa_std_types.deprn_override_trigger_enabled THEN -- manually access the data
122: IF DELETING THEN
123: IF (:old.status <> 'NEW' AND :old.status <> 'POST') THEN
124: fnd_message.set_name('OFA', 'FA_INVALID_DELETE_STATUS');
125: raise_application_error(-20000,fnd_message.get);
126: END IF;
127:
128: ELSIF UPDATING THEN
129: -- Bug 7308424: we allow update from POSTED to POST after calling rollback from the form.

Line 133: fnd_message.set_name('OFA', 'FA_NO_UPDATES');

129: -- Bug 7308424: we allow update from POSTED to POST after calling rollback from the form.
130: IF :old.status = 'POSTED' AND validate_posted_record AND :new.status = 'POST' THEN
131: NULL;
132: ELSIF :old.status = 'POSTED' AND NOT VAlidate_posted_record AND :new.status = 'POST' THEN
133: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
134: raise_application_error(-20000,fnd_message.get);
135: ELSIF :old.status = 'POST' and :new.status = 'POSTED' THEN
136: NULL;
137: ELSIF :old.status = 'POST' and :new.status = 'NEW' THEN

Line 134: raise_application_error(-20000,fnd_message.get);

130: IF :old.status = 'POSTED' AND validate_posted_record AND :new.status = 'POST' THEN
131: NULL;
132: ELSIF :old.status = 'POSTED' AND NOT VAlidate_posted_record AND :new.status = 'POST' THEN
133: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
134: raise_application_error(-20000,fnd_message.get);
135: ELSIF :old.status = 'POST' and :new.status = 'POSTED' THEN
136: NULL;
137: ELSIF :old.status = 'POST' and :new.status = 'NEW' THEN
138: fnd_message.set_name('OFA', 'FA_NO_UPDATES');

Line 138: fnd_message.set_name('OFA', 'FA_NO_UPDATES');

134: raise_application_error(-20000,fnd_message.get);
135: ELSIF :old.status = 'POST' and :new.status = 'POSTED' THEN
136: NULL;
137: ELSIF :old.status = 'POST' and :new.status = 'NEW' THEN
138: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
139: raise_application_error(-20000,fnd_message.get);
140: END IF;
141: IF (:new.status <> 'NEW' AND :new.status <> 'POST') or (:new.status = 'NEW' and :old.status = 'POSTED') THEN
142: fnd_message.set_name('OFA', 'FA_NO_UPDATES');

Line 139: raise_application_error(-20000,fnd_message.get);

135: ELSIF :old.status = 'POST' and :new.status = 'POSTED' THEN
136: NULL;
137: ELSIF :old.status = 'POST' and :new.status = 'NEW' THEN
138: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
139: raise_application_error(-20000,fnd_message.get);
140: END IF;
141: IF (:new.status <> 'NEW' AND :new.status <> 'POST') or (:new.status = 'NEW' and :old.status = 'POSTED') THEN
142: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
143: raise_application_error(-20000,fnd_message.get);

Line 142: fnd_message.set_name('OFA', 'FA_NO_UPDATES');

138: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
139: raise_application_error(-20000,fnd_message.get);
140: END IF;
141: IF (:new.status <> 'NEW' AND :new.status <> 'POST') or (:new.status = 'NEW' and :old.status = 'POSTED') THEN
142: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
143: raise_application_error(-20000,fnd_message.get);
144: END IF;
145:
146: IF (:old.deprn_override_id <> :new.deprn_override_id

Line 143: raise_application_error(-20000,fnd_message.get);

139: raise_application_error(-20000,fnd_message.get);
140: END IF;
141: IF (:new.status <> 'NEW' AND :new.status <> 'POST') or (:new.status = 'NEW' and :old.status = 'POSTED') THEN
142: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
143: raise_application_error(-20000,fnd_message.get);
144: END IF;
145:
146: IF (:old.deprn_override_id <> :new.deprn_override_id
147: OR :old.book_type_code <> :new.book_type_code

Line 154: fnd_message.set_name('OFA', 'FA_NO_UPDATES');

150: OR :old.used_by <> :new.used_by
151: OR NVL(:old.subtraction_flag, ' ') <> NVL(:new.subtraction_flag, ' ')
152: OR NVL(:old.subtract_ytd_flag, ' ') <> NVL(:new.subtract_ytd_flag, ' ')
153: OR :new.transaction_header_id IS NOT NULL) THEN
154: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
155: raise_application_error(-20000,fnd_message.get);
156: END IF;
157: END IF;
158:

Line 155: raise_application_error(-20000,fnd_message.get);

151: OR NVL(:old.subtraction_flag, ' ') <> NVL(:new.subtraction_flag, ' ')
152: OR NVL(:old.subtract_ytd_flag, ' ') <> NVL(:new.subtract_ytd_flag, ' ')
153: OR :new.transaction_header_id IS NOT NULL) THEN
154: fnd_message.set_name('OFA', 'FA_NO_UPDATES');
155: raise_application_error(-20000,fnd_message.get);
156: END IF;
157: END IF;
158:
159: IF INSERTING THEN

Line 166: fnd_message.set_name('OFA','FA_INVALID_DATA');

162: IF :new.status IS NULL THEN
163: :new.status:= 'POST';
164: END IF;
165: IF (:new.status <> 'NEW' AND :new.status <> 'POST') THEN
166: fnd_message.set_name('OFA','FA_INVALID_DATA');
167: fnd_message.set_token('COLUMN','STATUS');
168: raise_application_error(-20000,fnd_message.get);
169: END IF;
170:

Line 167: fnd_message.set_token('COLUMN','STATUS');

163: :new.status:= 'POST';
164: END IF;
165: IF (:new.status <> 'NEW' AND :new.status <> 'POST') THEN
166: fnd_message.set_name('OFA','FA_INVALID_DATA');
167: fnd_message.set_token('COLUMN','STATUS');
168: raise_application_error(-20000,fnd_message.get);
169: END IF;
170:
171: /* This trigger is executed when you perform an an insert or update statement on the table FA_DEPRN_OVERRIDE.

Line 168: raise_application_error(-20000,fnd_message.get);

164: END IF;
165: IF (:new.status <> 'NEW' AND :new.status <> 'POST') THEN
166: fnd_message.set_name('OFA','FA_INVALID_DATA');
167: fnd_message.set_token('COLUMN','STATUS');
168: raise_application_error(-20000,fnd_message.get);
169: END IF;
170:
171: /* This trigger is executed when you perform an an insert or update statement on the table FA_DEPRN_OVERRIDE.
172: In this trigger, data validation (period_name and asset_id) is

Line 233: fnd_message.set_name('OFA','FA_INVALID_DATA');

229:
230:
231: /* data validation for used_by */
232: IF :new.used_by <> 'ADJUSTMENT' and :new.used_by <> 'DEPRECIATION' THEN
233: fnd_message.set_name('OFA','FA_INVALID_DATA');
234: fnd_message.set_token('COLUMN','USED_BY');
235: raise_application_error(-20000,fnd_message.get);
236: END IF;
237:

Line 234: fnd_message.set_token('COLUMN','USED_BY');

230:
231: /* data validation for used_by */
232: IF :new.used_by <> 'ADJUSTMENT' and :new.used_by <> 'DEPRECIATION' THEN
233: fnd_message.set_name('OFA','FA_INVALID_DATA');
234: fnd_message.set_token('COLUMN','USED_BY');
235: raise_application_error(-20000,fnd_message.get);
236: END IF;
237:
238:

Line 235: raise_application_error(-20000,fnd_message.get);

231: /* data validation for used_by */
232: IF :new.used_by <> 'ADJUSTMENT' and :new.used_by <> 'DEPRECIATION' THEN
233: fnd_message.set_name('OFA','FA_INVALID_DATA');
234: fnd_message.set_token('COLUMN','USED_BY');
235: raise_application_error(-20000,fnd_message.get);
236: END IF;
237:
238:
239: -- Subtract year to date flag

Line 243: fnd_message.set_name('OFA','FA_INVALID_DATA');

239: -- Subtract year to date flag
240: IF :new.subtract_ytd_flag IS NOT NULL
241: and :new.subtract_ytd_flag <> 'Y'
242: and :new.subtract_ytd_flag <> 'N' THEN
243: fnd_message.set_name('OFA','FA_INVALID_DATA');
244: fnd_message.set_token('COLUMN','SUBTRACT_YTD_FLAG');
245: raise_application_error(-20000,fnd_message.get);
246: END IF;
247:

Line 244: fnd_message.set_token('COLUMN','SUBTRACT_YTD_FLAG');

240: IF :new.subtract_ytd_flag IS NOT NULL
241: and :new.subtract_ytd_flag <> 'Y'
242: and :new.subtract_ytd_flag <> 'N' THEN
243: fnd_message.set_name('OFA','FA_INVALID_DATA');
244: fnd_message.set_token('COLUMN','SUBTRACT_YTD_FLAG');
245: raise_application_error(-20000,fnd_message.get);
246: END IF;
247:
248:

Line 245: raise_application_error(-20000,fnd_message.get);

241: and :new.subtract_ytd_flag <> 'Y'
242: and :new.subtract_ytd_flag <> 'N' THEN
243: fnd_message.set_name('OFA','FA_INVALID_DATA');
244: fnd_message.set_token('COLUMN','SUBTRACT_YTD_FLAG');
245: raise_application_error(-20000,fnd_message.get);
246: END IF;
247:
248:
249: /* Amount validation */

Line 251: fnd_message.set_name('OFA','FA_INVALID_COMBINATION');

247:
248:
249: /* Amount validation */
250: IF :new.deprn_amount is null and :new.bonus_deprn_amount is null THEN
251: fnd_message.set_name('OFA','FA_INVALID_COMBINATION');
252: fnd_message.set_token('COLUMN1','DEPRN_AMOUNT');
253: fnd_message.set_token('COLUMN2','BONUS_DEPRN_AMOUNT');
254: raise_application_error(-20000,fnd_message.get);
255: END IF;

Line 252: fnd_message.set_token('COLUMN1','DEPRN_AMOUNT');

248:
249: /* Amount validation */
250: IF :new.deprn_amount is null and :new.bonus_deprn_amount is null THEN
251: fnd_message.set_name('OFA','FA_INVALID_COMBINATION');
252: fnd_message.set_token('COLUMN1','DEPRN_AMOUNT');
253: fnd_message.set_token('COLUMN2','BONUS_DEPRN_AMOUNT');
254: raise_application_error(-20000,fnd_message.get);
255: END IF;
256:

Line 253: fnd_message.set_token('COLUMN2','BONUS_DEPRN_AMOUNT');

249: /* Amount validation */
250: IF :new.deprn_amount is null and :new.bonus_deprn_amount is null THEN
251: fnd_message.set_name('OFA','FA_INVALID_COMBINATION');
252: fnd_message.set_token('COLUMN1','DEPRN_AMOUNT');
253: fnd_message.set_token('COLUMN2','BONUS_DEPRN_AMOUNT');
254: raise_application_error(-20000,fnd_message.get);
255: END IF;
256:
257: IF :new.used_by = 'ADJUSTMENT' then

Line 254: raise_application_error(-20000,fnd_message.get);

250: IF :new.deprn_amount is null and :new.bonus_deprn_amount is null THEN
251: fnd_message.set_name('OFA','FA_INVALID_COMBINATION');
252: fnd_message.set_token('COLUMN1','DEPRN_AMOUNT');
253: fnd_message.set_token('COLUMN2','BONUS_DEPRN_AMOUNT');
254: raise_application_error(-20000,fnd_message.get);
255: END IF;
256:
257: IF :new.used_by = 'ADJUSTMENT' then
258: /* cannot declare 0 override amount for reporting books if it's going

Line 262: fnd_message.set_name('OFA','FA_INVALID_DATA');

258: /* cannot declare 0 override amount for reporting books if it's going
259: to be used for adjustments */
260: IF reporting_flag = TRUE THEN
261: IF :new.deprn_amount = 0 THEN
262: fnd_message.set_name('OFA','FA_INVALID_DATA');
263: fnd_message.set_token('COLUMN','DEPRN_AMOUNT');
264: raise_application_error(-20000,fnd_message.get);
265: ELSIF :new.bonus_deprn_amount = 0 THEN
266: fnd_message.set_name('OFA','FA_INVALID_DATA');

Line 263: fnd_message.set_token('COLUMN','DEPRN_AMOUNT');

259: to be used for adjustments */
260: IF reporting_flag = TRUE THEN
261: IF :new.deprn_amount = 0 THEN
262: fnd_message.set_name('OFA','FA_INVALID_DATA');
263: fnd_message.set_token('COLUMN','DEPRN_AMOUNT');
264: raise_application_error(-20000,fnd_message.get);
265: ELSIF :new.bonus_deprn_amount = 0 THEN
266: fnd_message.set_name('OFA','FA_INVALID_DATA');
267: fnd_message.set_token('COLUMN','BONUS_DEPRN_AMOUNT');

Line 264: raise_application_error(-20000,fnd_message.get);

260: IF reporting_flag = TRUE THEN
261: IF :new.deprn_amount = 0 THEN
262: fnd_message.set_name('OFA','FA_INVALID_DATA');
263: fnd_message.set_token('COLUMN','DEPRN_AMOUNT');
264: raise_application_error(-20000,fnd_message.get);
265: ELSIF :new.bonus_deprn_amount = 0 THEN
266: fnd_message.set_name('OFA','FA_INVALID_DATA');
267: fnd_message.set_token('COLUMN','BONUS_DEPRN_AMOUNT');
268: raise_application_error(-20000,fnd_message.get);

Line 266: fnd_message.set_name('OFA','FA_INVALID_DATA');

262: fnd_message.set_name('OFA','FA_INVALID_DATA');
263: fnd_message.set_token('COLUMN','DEPRN_AMOUNT');
264: raise_application_error(-20000,fnd_message.get);
265: ELSIF :new.bonus_deprn_amount = 0 THEN
266: fnd_message.set_name('OFA','FA_INVALID_DATA');
267: fnd_message.set_token('COLUMN','BONUS_DEPRN_AMOUNT');
268: raise_application_error(-20000,fnd_message.get);
269: END IF;
270: END IF;

Line 267: fnd_message.set_token('COLUMN','BONUS_DEPRN_AMOUNT');

263: fnd_message.set_token('COLUMN','DEPRN_AMOUNT');
264: raise_application_error(-20000,fnd_message.get);
265: ELSIF :new.bonus_deprn_amount = 0 THEN
266: fnd_message.set_name('OFA','FA_INVALID_DATA');
267: fnd_message.set_token('COLUMN','BONUS_DEPRN_AMOUNT');
268: raise_application_error(-20000,fnd_message.get);
269: END IF;
270: END IF;
271: END IF;

Line 268: raise_application_error(-20000,fnd_message.get);

264: raise_application_error(-20000,fnd_message.get);
265: ELSIF :new.bonus_deprn_amount = 0 THEN
266: fnd_message.set_name('OFA','FA_INVALID_DATA');
267: fnd_message.set_token('COLUMN','BONUS_DEPRN_AMOUNT');
268: raise_application_error(-20000,fnd_message.get);
269: END IF;
270: END IF;
271: END IF;
272:

Line 290: fnd_message.set_name('OFA','FA_OVERRIDE_DATA_EXISTS');

286: AND used_by = :new.used_by
287: AND (( used_by = 'ADJUSTMENT' and status <> 'POSTED') OR ( used_by = 'DEPRECIATION')) ;
288:
289: IF count_num > 0 THEN
290: fnd_message.set_name('OFA','FA_OVERRIDE_DATA_EXISTS');
291: raise_application_error(-20000,fnd_message.get);
292: END IF;
293:
294: SELECT count(*)

Line 291: raise_application_error(-20000,fnd_message.get);

287: AND (( used_by = 'ADJUSTMENT' and status <> 'POSTED') OR ( used_by = 'DEPRECIATION')) ;
288:
289: IF count_num > 0 THEN
290: fnd_message.set_name('OFA','FA_OVERRIDE_DATA_EXISTS');
291: raise_application_error(-20000,fnd_message.get);
292: END IF;
293:
294: SELECT count(*)
295: INTO count_num

Line 305: fnd_message.set_name('OFA','FA_OVERRIDE_DATA_EXISTS');

301: AND used_by = 'DEPRECIATION'
302: ;
303:
304: IF count_num > 0 THEN
305: fnd_message.set_name('OFA','FA_OVERRIDE_DATA_EXISTS');
306: raise_application_error(-20000,fnd_message.get);
307: END IF;
308:
309:

Line 306: raise_application_error(-20000,fnd_message.get);

302: ;
303:
304: IF count_num > 0 THEN
305: fnd_message.set_name('OFA','FA_OVERRIDE_DATA_EXISTS');
306: raise_application_error(-20000,fnd_message.get);
307: END IF;
308:
309:
310:

Line 348: fnd_message.set_name('OFA','FA_MEMBER_OVERRIDE_DATA_EXISTS');

344: AND ov.used_by = :new.used_by
345: AND ( (ov.used_by = 'DEPRECIATION') OR (ov.used_by = 'ADJUSTMENT' and ov.status <> 'POSTED') )
346: ;
347: IF count_num > 0 THEN
348: fnd_message.set_name('OFA','FA_MEMBER_OVERRIDE_DATA_EXISTS');
349: raise_application_error(-20000,fnd_message.get);
350: END IF;
351: ELSE
352: SELECT count(*) INTO count_num

Line 349: raise_application_error(-20000,fnd_message.get);

345: AND ( (ov.used_by = 'DEPRECIATION') OR (ov.used_by = 'ADJUSTMENT' and ov.status <> 'POSTED') )
346: ;
347: IF count_num > 0 THEN
348: fnd_message.set_name('OFA','FA_MEMBER_OVERRIDE_DATA_EXISTS');
349: raise_application_error(-20000,fnd_message.get);
350: END IF;
351: ELSE
352: SELECT count(*) INTO count_num
353: FROM fa_deprn_override

Line 361: fnd_message.set_name('OFA','FA_GROUP_OVERRIDE_DATA_EXISTS');

357: AND used_by = :new.used_by
358: AND ( (used_by = 'DEPRECIATION') OR (used_by = 'ADJUSTMENT' and status <> 'POSTED') );
359:
360: IF count_num > 0 THEN
361: fnd_message.set_name('OFA','FA_GROUP_OVERRIDE_DATA_EXISTS');
362: raise_application_error(-20000,fnd_message.get);
363: END IF;
364: END IF;
365:

Line 362: raise_application_error(-20000,fnd_message.get);

358: AND ( (used_by = 'DEPRECIATION') OR (used_by = 'ADJUSTMENT' and status <> 'POSTED') );
359:
360: IF count_num > 0 THEN
361: fnd_message.set_name('OFA','FA_GROUP_OVERRIDE_DATA_EXISTS');
362: raise_application_error(-20000,fnd_message.get);
363: END IF;
364: END IF;
365:
366: ELSIF l_tracking_method = 'CALCULATE' THEN

Line 368: fnd_message.set_name('OFA','FA_CANNOT_OVERRIDE_GROUP');

364: END IF;
365:
366: ELSIF l_tracking_method = 'CALCULATE' THEN
367: IF l_member_rollup_flag = 'Y' AND l_group_asset_id IS NULL THEN
368: fnd_message.set_name('OFA','FA_CANNOT_OVERRIDE_GROUP');
369: raise_application_error(-20000,fnd_message.get);
370: END IF;
371:
372: ELSE

Line 369: raise_application_error(-20000,fnd_message.get);

365:
366: ELSIF l_tracking_method = 'CALCULATE' THEN
367: IF l_member_rollup_flag = 'Y' AND l_group_asset_id IS NULL THEN
368: fnd_message.set_name('OFA','FA_CANNOT_OVERRIDE_GROUP');
369: raise_application_error(-20000,fnd_message.get);
370: END IF;
371:
372: ELSE
373: IF l_group_asset_id IS NOT NULL THEN

Line 374: fnd_message.set_name('OFA','FA_CANNOT_OVERRIDE_MEMBER');

370: END IF;
371:
372: ELSE
373: IF l_group_asset_id IS NOT NULL THEN
374: fnd_message.set_name('OFA','FA_CANNOT_OVERRIDE_MEMBER');
375: raise_application_error(-20000,fnd_message.get);
376: END IF;
377: END IF;
378:

Line 375: raise_application_error(-20000,fnd_message.get);

371:
372: ELSE
373: IF l_group_asset_id IS NOT NULL THEN
374: fnd_message.set_name('OFA','FA_CANNOT_OVERRIDE_MEMBER');
375: raise_application_error(-20000,fnd_message.get);
376: END IF;
377: END IF;
378:
379:

Line 392: fnd_message.set_name('OFA','FA_INVALID_DATA');

388: END IF; -- trigger_enabled
389:
390: EXCEPTION
391: WHEN no_data_found THEN
392: fnd_message.set_name('OFA','FA_INVALID_DATA');
393: fnd_message.set_token('COLUMN',invalid_column);
394: raise_application_error(-20000,fnd_message.get);
395:
396: END;

Line 393: fnd_message.set_token('COLUMN',invalid_column);

389:
390: EXCEPTION
391: WHEN no_data_found THEN
392: fnd_message.set_name('OFA','FA_INVALID_DATA');
393: fnd_message.set_token('COLUMN',invalid_column);
394: raise_application_error(-20000,fnd_message.get);
395:
396: END;

Line 394: raise_application_error(-20000,fnd_message.get);

390: EXCEPTION
391: WHEN no_data_found THEN
392: fnd_message.set_name('OFA','FA_INVALID_DATA');
393: fnd_message.set_token('COLUMN',invalid_column);
394: raise_application_error(-20000,fnd_message.get);
395:
396: END;