129: slask2 varchar2(100);
130:
131: begin
132:
133: --fa_rx_conc_mesg_pkg.log('IN HERE IN HERE 1');
134:
135: ret := TRUE;
136:
137: fa_whatif_deprn_pkg.t_request_id.delete;
185:
186: if h_check = 'NO' then
187: fnd_message.set_name('OFA','FA_BOOK_AMORTIZED_NOT_ALLOW');
188: h_mesg_str := fnd_message.get;
189: fa_rx_conc_mesg_pkg.log(h_mesg_str);
190:
191: retcode := 2;
192: return FALSE;
193: end if;
192: return FALSE;
193: end if;
194: end if;
195:
196: --fa_rx_conc_mesg_pkg.log('IN HERE IN HERE 2');
197:
198: -- SELECT VALUES THAT WILL REMAIN CONSTANT FOR ALL ASSETS:
199: -- FLEX STRUCTURES, PRECISION, LOGIN_ID
200:
259: close c_segs;
260:
261: -- end aggregate selects.
262:
263: --fa_rx_conc_mesg_pkg.log('IN HERE IN HERE 3');
264:
265: if (upper(X_hypo) in ('NO', 'N')) then
266:
267: h_count := 0;
318: fa_whatif_deprn_pkg.g_deprn.delete;
319: fnd_message.set_name('OFA','FA_WHATIF_ASSET_NORMAL_MODE');
320: fnd_message.set_token('ASSET_ID',X_assets(h_count),FALSE);
321: h_mesg_str := fnd_message.get;
322: fa_rx_conc_mesg_pkg.log(h_mesg_str);
323: return (FALSE);
324: end if;
325:
326:
380: fa_whatif_deprn_pkg.g_deprn.delete;
381: fnd_message.set_name('OFA','FA_WHATIF_ASSET_ADJ_MODE');
382: fnd_message.set_token('ASSET_ID',X_assets(h_count),FALSE);
383: h_mesg_str := fnd_message.get;
384: fa_rx_conc_mesg_pkg.log(h_mesg_str);
385: return (FALSE);
386: end if;
387: end if; -- (X_prorate_conv is not null) or
388:
415: fa_whatif_deprn_pkg.g_deprn.delete;
416: fnd_message.set_name('OFA','FA_WHATIF_ASSET_COMMIT');
417: fnd_message.set_token('ASSET_ID',X_assets(h_count),FALSE);
418: h_mesg_str := fnd_message.get;
419: fa_rx_conc_mesg_pkg.log(h_mesg_str);
420: return (FALSE);
421: end if;
422:
423: h_count := h_count + 1;
425:
426: else
427: -- HYPOTHETICAL ASSET
428:
429: --fa_rx_conc_mesg_pkg.log('IN HERE IN HERE');
430:
431: ret := fa_whatif_deprn_pkg.whatif_deprn_asset (
432: X_asset_id => 0,
433: X_mode => 'HYPOTHETICAL',
464: X_ltd_prod => null,
465: retcode => retcode,
466: errbuf => errbuf);
467:
468: --fa_rx_conc_mesg_pkg.log('OUT');
469:
470: if (ret = FALSE) then
471: retcode := 2;
472:
472:
473: fa_whatif_deprn_pkg.g_deprn.delete;
474: fnd_message.set_name('OFA','FA_WHATIF_ASSET_NORMAL_MODE');
475: h_mesg_str := fnd_message.get;
476: fa_rx_conc_mesg_pkg.log(h_mesg_str);
477: return (FALSE);
478: end if;
479:
480: if (X_adjusted_rate is not null) then
546:
547: exception when others then
548:
549: if SQLCODE <> 0 then
550: fa_Rx_conc_mesg_pkg.log(SQLERRM);
551: end if;
552:
553: fa_whatif_deprn_pkg.g_deprn.delete;
554: fnd_message.set_name('OFA',h_mesg_name);
555: if h_mesg_name like 'FA_WHATIF_ASSET%' then
556: fnd_message.set_token('ASSET_ID',X_assets(h_count),FALSE);
557: end if;
558: h_mesg_str := fnd_message.get;
559: fa_rx_conc_mesg_pkg.log(h_mesg_str);
560:
561: retcode := 2;
562: return FALSE;
563:
667: h_check := 1;
668: fnd_message.set_name('OFA','FA_WHATIF_ASSET_EXP_AMT');
669: fnd_message.set_token('ASSET_NUM',h_asset_number,FALSE);
670: h_mesg_str := fnd_message.get;
671: fa_rx_conc_mesg_pkg.log(h_mesg_str);
672: else
673: close c_check_amortized;
674: h_check := 0;
675: end if;
697: if h_check > 0 then
698: fnd_message.set_name('OFA','FA_WHATIF_ASSET_NO_DEPRN_YET');
699: fnd_message.set_token('ASSET_NUM',h_asset_number,FALSE);
700: h_mesg_str := fnd_message.get;
701: fa_rx_conc_mesg_pkg.log(h_mesg_str);
702: end if;
703: end if;
704:
705:
736:
737: exception when others then
738:
739: if SQLCODE <> 0 then
740: fa_Rx_conc_mesg_pkg.log(SQLERRM);
741: end if;
742: fnd_message.set_name('OFA',h_mesg_name);
743: if h_mesg_name like 'FA_WHATIF_ASSET%' then
744: fnd_message.set_token('ASSET_ID',h_asset_id,FALSE);
743: if h_mesg_name like 'FA_WHATIF_ASSET%' then
744: fnd_message.set_token('ASSET_ID',h_asset_id,FALSE);
745: end if;
746: h_mesg_str := fnd_message.get;
747: fa_rx_conc_mesg_pkg.log(h_mesg_str);
748:
749: retcode := 2;
750: return FALSE;
751: