50:
51: ----------------------------------------------------------------------------------------------------
52: --* The following code checks if user has permissions to transfer the deal (company authorization)
53: ----------------------------------------------------------------------------------------------------
54: XTR_IMPORT_DEAL_DATA.CHECK_USER_AUTH(ARec_Interface.external_deal_id,
55: ARec_Interface.deal_type,
56: ARec_Interface.company_code,
57: user_error);
58:
99: G_Ni_Main_Rec.dealer_code,
100: G_Ni_Main_Rec.currency);
101:
102: If Nvl(ARec_Interface.override_limit,'N') = 'N' and v_limit_log_return <> 0 then
103: xtr_import_deal_data.log_interface_errors(ARec_Interface.external_deal_id,ARec_Interface.deal_type,
104: 'OverrideLimit','XTR_LIMIT_EXCEEDED');
105: limit_error := TRUE;
106: else
107: limit_error := FALSE;
183:
184: l_has_transactions:=true;
185:
186: if l_transaction.amount_a is null then
187: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,
188: ARec_Interface.Deal_Type,
189: 'AmountA',
190: 'XTR_MANDATORY',
191: l_transaction.transaction_no);
192: error := TRUE;
193: end if;
194:
195: if l_transaction.amount_b is null and l_transaction.amount_c is null then
196: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,
197: ARec_Interface.Deal_Type,
198: 'AmountB',
199: 'XTR_MANDATORY_FACEVALUE',
200: l_transaction.transaction_no);
201: error := TRUE;
202: end if;
203:
204: if l_transaction.option_a is null then
205: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,
206: ARec_Interface.Deal_Type,
207: 'OptionA',
208: 'XTR_MANDATORY',
209: l_transaction.transaction_no);
213:
214: END LOOP;
215:
216: if not(l_has_transactions) then
217: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,
218: ARec_Interface.Deal_Type,
219: 'ExternalDealId',
220: 'XTR_MANDATORY_TRANSACTIONS');
221: error := TRUE;
227:
228: error := FALSE; /* Defaulting it to No errors */
229:
230: if ARec_Interface.dealer_code is null then
231: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
232: 'DealerCode','XTR_MANDATORY');
233: error := TRUE;
234: end if;
235:
233: error := TRUE;
234: end if;
235:
236: if ARec_Interface.company_code is null then
237: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
238: 'CompanyCode','XTR_MANDATORY');
239: error := TRUE;
240: end if;
241:
239: error := TRUE;
240: end if;
241:
242: if ARec_Interface.portfolio_code is null then
243: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
244: 'PortfolioCode','XTR_MANDATORY');
245: error := TRUE;
246: end if;
247:
245: error := TRUE;
246: end if;
247:
248: if ARec_Interface.year_calc_type is null then
249: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
250: 'YearCalcType','XTR_MANDATORY');
251: error := TRUE;
252: end if;
253:
251: error := TRUE;
252: end if;
253:
254: if ARec_Interface.basis_type is null then
255: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
256: 'BasisType','XTR_MANDATORY');
257: error := TRUE;
258: end if;
259:
257: error := TRUE;
258: end if;
259:
260: if ARec_Interface.rounding_type is null then
261: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
262: 'RoundingType','XTR_MANDATORY');
263: error := TRUE;
264: end if;
265:
263: error := TRUE;
264: end if;
265:
266: if ARec_Interface.day_count_type is null then
267: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
268: 'DayCountType','XTR_MANDATORY');
269: error := TRUE;
270: end if;
271:
269: error := TRUE;
270: end if;
271:
272: if ARec_Interface.date_a is null then
273: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
274: 'DateA','XTR_MANDATORY');
275: error := TRUE;
276: end if;
277:
275: error := TRUE;
276: end if;
277:
278: if ARec_Interface.cparty_code is null then
279: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
280: 'CpartyCode','XTR_MANDATORY');
281: error := TRUE;
282: end if;
283:
281: error := TRUE;
282: end if;
283:
284: if ARec_Interface.deal_subtype is null then
285: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
286: 'DealSubtype','XTR_MANDATORY');
287: error := TRUE;
288: end if;
289:
287: error := TRUE;
288: end if;
289:
290: if ARec_Interface.product_type is null then
291: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
292: 'ProductType','XTR_MANDATORY');
293: error := TRUE;
294: end if;
295:
293: error := TRUE;
294: end if;
295:
296: if ARec_Interface.date_b is null then
297: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
298: 'DateB','XTR_MANDATORY');
299: error := TRUE;
300: end if;
301:
299: error := TRUE;
300: end if;
301:
302: if ARec_Interface.date_c is null then
303: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
304: 'DateC','XTR_MANDATORY');
305: error := TRUE;
306: end if;
307:
305: error := TRUE;
306: end if;
307:
308: if ARec_Interface.currency_a is null then
309: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
310: 'CurrencyA','XTR_MANDATORY');
311: error := TRUE;
312: end if;
313:
311: error := TRUE;
312: end if;
313:
314: if ARec_Interface.rate_a is null then
315: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
316: 'RateA','XTR_MANDATORY');
317: error := TRUE;
318: end if;
319:
317: error := TRUE;
318: end if;
319:
320: if ARec_Interface.account_no_a is null then
321: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
322: 'AccountNoA','XTR_MANDATORY');
323: error := TRUE;
324: end if;
325:
324: end if;
325:
326: if ARec_Interface.brokerage_code is null and
327: (ARec_Interface.rate_c is not null or ARec_Interface.amount_c is not null) then
328: xtr_import_deal_data.log_interface_errors(ARec_Interface.External_Deal_Id,ARec_Interface.Deal_Type,
329: 'BrokerageCode','XTR_MANDATORY_BROKERAGE');
330: error := TRUE;
331: end if;
332:
394:
395: FOR l_transaction IN GET_TRANSACTIONS LOOP
396:
397: if (l_transaction.amount_a<=0) then
398: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
399: ARec_Interface.Deal_Type,
400: 'AmountA',
401: 'XTR_VALUE_GE_ZERO',
402: l_transaction.transaction_no);
403: l_error := l_error +1;
404: end if;
405:
406: if ( l_transaction.amount_b<0) then
407: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
408: ARec_Interface.Deal_Type,
409: 'AmountB',
410: 'XTR_VALUE_GE_ZERO',
411: l_transaction.transaction_no);
412: l_error := l_error +1;
413: end if;
414:
415: if ( l_transaction.amount_c<0) then
416: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
417: ARec_Interface.Deal_Type,
418: 'AmountC',
419: 'XTR_VALUE_GE_ZERO',
420: l_transaction.transaction_no);
419: 'XTR_VALUE_GE_ZERO',
420: l_transaction.transaction_no);
421: l_error := l_error +1;
422: elsif not ( val_consideration(l_transaction.amount_b,l_transaction.amount_c,ARec_Interface.basis_type)) then
423: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
424: ARec_Interface.Deal_Type,
425: 'AmountC',
426: 'XTR_INV_CONSIDERATION',
427: l_transaction.transaction_no);
433:
434: if l_err_deal_subtype <> TRUE then
435:
436: if not ( val_serial_number(l_transaction.value_a,l_transaction.amount_a)) then
437: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
438: ARec_Interface.Deal_Type,
439: 'ValueA',
440: 'XTR_INV_SERIAL_NUMBER',
441: l_transaction.transaction_no);
443: end if;
444: end if;
445:
446: if ( l_transaction.option_a not in ('Y','N')) then
447: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
448: ARec_Interface.Deal_Type,
449: 'OptionA',
450: 'XTR_INV_AVAILABLE',
451: l_transaction.transaction_no);
456: /*-------------------------------------------------------------------------------*/
457: /* Transaction Flexfields Validation */
458: /*-------------------------------------------------------------------------------*/
459:
460: if not ( xtr_import_deal_data.val_transaction_desc_flex(l_transaction,'XTR_RT_DESC_FLEX',l_err_segment)) then
461: l_error := l_error +1;
462: if l_err_segment is not null and l_err_segment = 'Attribute16' then
463: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
464: ARec_Interface.Deal_Type,
459:
460: if not ( xtr_import_deal_data.val_transaction_desc_flex(l_transaction,'XTR_RT_DESC_FLEX',l_err_segment)) then
461: l_error := l_error +1;
462: if l_err_segment is not null and l_err_segment = 'Attribute16' then
463: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
464: ARec_Interface.Deal_Type,
465: l_err_segment,
466: 'XTR_INV_DESC_FLEX_API',
467: l_transaction.transaction_no);
465: l_err_segment,
466: 'XTR_INV_DESC_FLEX_API',
467: l_transaction.transaction_no);
468: elsif l_err_segment is not null and l_err_segment = 'AttributeCategory' then
469: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
470: ARec_Interface.Deal_Type,
471: l_err_segment,
472: 'XTR_INV_DESC_FLEX_CONTEXT',
473: l_transaction.transaction_no);
471: l_err_segment,
472: 'XTR_INV_DESC_FLEX_CONTEXT',
473: l_transaction.transaction_no);
474: else
475: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
476: ARec_Interface.Deal_Type,
477: l_err_segment,
478: 'XTR_INV_DESC_FLEX',
479: l_transaction.transaction_no);
502: BEGIN
503:
504: /* This procedure will include all the column validations */
505: if not ( val_deal_subtype(ARec_Interface.deal_subtype)) then
506: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
507: ARec_Interface.Deal_Type,
508: 'DealSubtype',
509: 'XTR_INV_DEAL_SUBTYPE');
510: l_error := l_error +1;
511: l_err_deal_subtype := TRUE;
512: end if;
513:
514: if not ( val_cparty_code(ARec_Interface.company_code, ARec_Interface.cparty_code)) then
515: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
516: ARec_Interface.Deal_Type,
517: 'CpartyCode',
518: 'XTR_INV_CPARTY_CODE');
519: l_error := l_error +1;
524:
525: if not ( val_portfolio_code(ARec_Interface.company_code,
526: ARec_Interface.cparty_code,
527: ARec_Interface.portfolio_code)) then
528: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
529: ARec_Interface.Deal_Type,
530: 'PortfolioCode',
531: 'XTR_INV_PORT_CODE');
532: l_error := l_error +1;
534: end if;
535: /*
536:
537: if not ( val_risk_party_code(ARec_Interface.acceptor_code)) then
538: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
539: ARec_Interface.Deal_Type,
540: 'AcceptorCode',
541: 'XTR_INV_RISK_PARTY_CODE');
542: l_error := l_error +1;
542: l_error := l_error +1;
543: end if;
544:
545: if not ( val_risk_party_code(ARec_Interface.drawer_code)) then
546: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
547: ARec_Interface.Deal_Type,
548: 'DrawerCode',
549: 'XTR_INV_RISK_PARTY_CODE');
550: l_error := l_error +1;
550: l_error := l_error +1;
551: end if;
552:
553: if not ( val_risk_party_code(ARec_Interface.endorser_code)) then
554: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
555: ARec_Interface.Deal_Type,
556: 'EndorserCode',
557: 'XTR_INV_RISK_PARTY_CODE');
558: l_error := l_error +1;
564: ARec_Interface.company_code,
565: ARec_Interface.acceptor_code,
566: ARec_Interface.endorser_code,
567: ARec_Interface.drawer_code)) then
568: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
569: ARec_Interface.Deal_Type,
570: 'LimitCode',
571: 'XTR_INV_LIMIT_CODE');
572: l_error := l_error +1;
573: end if;
574: end if;
575:
576: if not (val_currencies(ARec_Interface.currency_a)) then
577: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
578: ARec_Interface.Deal_Type,
579: 'CurrencyA',
580: 'XTR_INV_CURR');
581: l_error := l_error +1;
583: end if;
584:
585: if l_err_deal_subtype <> TRUE then
586: if not ( val_product_type(ARec_Interface.product_type,g_ni_deal_subtype)) then
587: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
588: ARec_Interface.Deal_Type,
589: 'ProductType',
590: 'XTR_INV_PRODUCT_TYPE');
591: l_error := l_error +1;
592: end if;
593: end if;
594:
595: if not ( val_brokerage_code(ARec_Interface.brokerage_code)) then
596: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
597: ARec_Interface.Deal_Type,
598: 'BrokerageCode',
599: 'XTR_INV_BROKERAGE_CODE');
600: l_error := l_error +1;
605: if not ( val_cparty_ref(ARec_Interface.cparty_account_no,
606: ARec_Interface.cparty_ref,
607: ARec_Interface.cparty_code,
608: ARec_Interface.currency_a)) then
609: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
610: ARec_Interface.Deal_Type,
611: 'CpartyAccountNo', -- CE BANK MIGRATION
612: 'XTR_INV_CPARTY_REF');
613: l_error := l_error +1;
614: end if;
615: end if;
616:
617: if not ( val_dealer_code(ARec_Interface.dealer_code)) then
618: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
619: ARec_Interface.Deal_Type,
620: 'DealerCode',
621: 'XTR_INV_DEALER_CODE');
622: l_error := l_error +1;
625: if l_err_currency_a <> TRUE then
626: if not ( val_comp_acct_no(ARec_Interface.company_code,
627: ARec_Interface.currency_a,
628: ARec_Interface.account_no_a)) then
629: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
630: ARec_Interface.Deal_Type,
631: 'AccountNoA',
632: 'XTR_INV_COMP_ACCT_NO');
633: l_error := l_error +1;
635: end if;
636:
637: if ARec_Interface.dual_authorization_by is not null and
638: not ( val_dealer_code(ARec_Interface.dual_authorization_by)) then
639: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
640: ARec_Interface.Deal_Type,
641: 'DualAuthorizationBy',
642: 'XTR_INV_DUAL_AUTH_BY');
643: l_error := l_error +1;
643: l_error := l_error +1;
644: end if;
645:
646: if not ( val_deal_date(ARec_Interface.date_a)) then
647: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
648: ARec_Interface.Deal_Type,
649: 'DateA',
650: 'XTR_INV_DEAL_DATE');
651: l_error := l_error +1;
652: l_err_deal_date := TRUE;
653: end if;
654:
655: if not ( val_client_code(ARec_Interface.client_code)) then
656: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
657: ARec_Interface.Deal_Type,
658: 'ClientCode',
659: 'XTR_INV_CLIENT_CODE');
660: l_error := l_error +1;
660: l_error := l_error +1;
661: end if;
662:
663: if not ( val_deal_linking_code(ARec_Interface.deal_linking_code)) then
664: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
665: ARec_Interface.Deal_Type,
666: 'DealLinkingCode',
667: 'XTR_INV_LINKING_CODE');
668: l_error := l_error +1;
669: end if;
670:
671:
672: if not ( val_pricing_model(ARec_Interface.pricing_model)) then
673: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
674: ARec_Interface.Deal_Type,
675: 'PricingModel',
676: 'XTR_INV_PRICING_MODEL');
677: l_error := l_error +1;
677: l_error := l_error +1;
678: end if;
679:
680: if not ( val_market_data_set(ARec_Interface.market_data_set)) then
681: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
682: ARec_Interface.Deal_Type,
683: 'MarketDataSet',
684: 'XTR_INV_MKT_DATA_SET');
685: l_error := l_error +1;
689: /*WDK: new message */
690:
691:
692: if not ( val_rounding_type(ARec_Interface.rounding_type)) then
693: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
694: ARec_Interface.Deal_Type,
695: 'RoundingType',
696: 'XTR_INV_ROUNDING_TYPE');
697: l_error := l_error +1;
697: l_error := l_error +1;
698: end if;
699:
700: if not ( val_day_count_type(ARec_Interface.day_count_type)) then
701: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
702: ARec_Interface.Deal_Type,
703: 'DayCountType',
704: 'XTR_INV_DAY_COUNT_TYPE');
705: l_error := l_error +1;
706: end if;
707:
708: if not ( val_start_date(ARec_Interface.date_a,
709: ARec_Interface.date_b)) then
710: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
711: ARec_Interface.Deal_Type,
712: 'DateB',
713: 'XTR_INV_START_DATE');
714: l_error := l_error +1;
715: end if;
716:
717: if not ( val_maturity_date(ARec_Interface.date_b,
718: ARec_Interface.date_c)) then
719: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
720: ARec_Interface.Deal_Type,
721: 'DateC',
722: 'XTR_INV_MATURITY_DATE');
723: l_error := l_error +1;
723: l_error := l_error +1;
724: end if;
725:
726: if not ( val_year_calc_type(ARec_Interface.year_calc_type)) then
727: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
728: ARec_Interface.Deal_Type,
729: 'YearCalcType',
730: 'XTR_INV_DAY_COUNT_BASIS');
731: l_error := l_error +1;
731: l_error := l_error +1;
732: end if;
733:
734: if not ( val_basis_type(ARec_Interface.basis_type)) then
735: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
736: ARec_Interface.Deal_Type,
737: 'BasisType',
738: 'XTR_INV_BASIS_TYPE');
739: l_error := l_error +1;
742: GET_DAYS_RUN;
743:
744: if not ( val_trans_rate(ARec_Interface.rate_a,
745: ARec_Interface.currency_a)) then
746: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
747: ARec_Interface.Deal_Type,
748: 'RateA',
749: 'XTR_VALUE_GE_ZERO'); -- bug 2798328
750: -- 'XTR_INV_TRANS_RATE');
751: l_error := l_error +1;
752: end if;
753:
754: if not ( val_client_settle(ARec_Interface.settle_action_reqd)) then
755: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
756: ARec_Interface.Deal_Type,
757: 'SettleActionReqd',
758: 'XTR_INV_CLIENT_SETTLE');
759: l_error := l_error +1;
760: end if;
761:
762: if not ( val_year_calc_day_count_combo(ARec_Interface.year_calc_type,
763: ARec_Interface.day_count_type)) then
764: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
765: ARec_Interface.Deal_Type,
766: 'DayCountType',
767: 'XTR_CHK_30_BOTH');
768: l_error := l_error +1;
769: end if;
770:
771: if l_err_deal_subtype <> TRUE then
772: if not ( val_principal_tax_code(ARec_Interface.schedule_a)) then
773: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
774: ARec_Interface.Deal_Type,
775: 'ScheduleA',
776: 'XTR_INV_PRINCIPAL_TAX_CODE');
777: l_error := l_error +1;
777: l_error := l_error +1;
778: end if;
779:
780: if not ( val_interest_tax_code(ARec_Interface.schedule_b)) then
781: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
782: ARec_Interface.Deal_Type,
783: 'ScheduleB',
784: 'XTR_INV_INTEREST_TAX_CODE');
785: l_error := l_error +1;
786: end if;
787: end if;
788:
789: if ( ARec_Interface.option_a not in ('Y','N')) then
790: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
791: ARec_Interface.Deal_Type,
792: 'OptionA',
793: 'XTR_INV_DEFAULT_TAX_CODE');
794: l_error := l_error +1;
803: /*-------------------------------------------------------------------------------*/
804: /* Flexfields Validation */
805: /*-------------------------------------------------------------------------------*/
806:
807: if not ( xtr_import_deal_data.val_desc_flex(ARec_Interface,'XTR_DEALS_DESC_FLEX',l_err_segment)) then
808: l_error := l_error +1;
809: if l_err_segment is not null and l_err_segment = 'Attribute16' then
810: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
811: ARec_Interface.Deal_Type,
806:
807: if not ( xtr_import_deal_data.val_desc_flex(ARec_Interface,'XTR_DEALS_DESC_FLEX',l_err_segment)) then
808: l_error := l_error +1;
809: if l_err_segment is not null and l_err_segment = 'Attribute16' then
810: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
811: ARec_Interface.Deal_Type,
812: l_err_segment,
813: 'XTR_INV_DESC_FLEX_API');
814: elsif l_err_segment is not null and l_err_segment = 'AttributeCategory' then
811: ARec_Interface.Deal_Type,
812: l_err_segment,
813: 'XTR_INV_DESC_FLEX_API');
814: elsif l_err_segment is not null and l_err_segment = 'AttributeCategory' then
815: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
816: ARec_Interface.Deal_Type,
817: l_err_segment,
818: 'XTR_INV_DESC_FLEX_CONTEXT');
819: else
816: ARec_Interface.Deal_Type,
817: l_err_segment,
818: 'XTR_INV_DESC_FLEX_CONTEXT');
819: else
820: xtr_import_deal_data.log_interface_errors( ARec_Interface.External_Deal_Id,
821: ARec_Interface.Deal_Type,
822: l_err_segment,
823: 'XTR_INV_DESC_FLEX');
824: end if;
1517: open get_tolerance;
1518: fetch get_tolerance into l_tolerance;
1519: if get_tolerance%NOTFOUND then
1520: close get_tolerance;
1521: XTR_IMPORT_DEAL_DATA.log_deal_warning(FND_MESSAGE.GET_STRING('XTR','XTR_598')); -- rate not within acceptable tolerance
1522: return;
1523: end if;
1524: close get_tolerance;
1525:
1531: v_err_code,
1532: v_err_level);
1533:
1534: if (v_err_code is not null) then
1535: XTR_IMPORT_DEAL_DATA.log_deal_warning(FND_MESSAGE.GET_STRING('XTR','XTR_598')); -- rate not within acceptable tolerance
1536: end if;
1537: END chk_trans_rate;
1538:
1539:
1578: If nvl(l_dummy,0) > 0 then
1579: FND_MESSAGE.Set_Name ('XTR', 'XTR_IMPORT_BEFORE_REVAL');
1580: FND_MESSAGE.Set_Token ('DATE',l_date);
1581: l_logMessage:=FND_MESSAGE.Get;
1582: XTR_IMPORT_DEAL_DATA.log_deal_warning(l_logMessage);
1583: End If;
1584: END;
1585:
1586: PROCEDURE CHK_ACCRL_DATE(P_COMPANY IN VARCHAR2) IS
1623: If nvl(l_dummy,0) > 0 then
1624: FND_MESSAGE.Set_Name ('XTR', 'XTR_IMPORT_BEFORE_ACCRUAL');
1625: FND_MESSAGE.Set_Token ('DATE',l_date);
1626: l_logMessage:=FND_MESSAGE.Get;
1627: XTR_IMPORT_DEAL_DATA.log_deal_warning(l_logMessage);
1628: End If;
1629: END;
1630:
1631: BEGIN CHK_TRANS_RATE(ARec_interface.rate_a,ARec_interface.currency_a); -- bug 2798328
2381:
2382: open HCE;
2383: fetch HCE INTO G_HC_RATE;
2384: if HCE%NOTFOUND then
2385: xtr_import_deal_data.log_interface_errors(G_Ni_Main_Rec.External_Deal_Id,p_user_deal_type,
2386: 'CurrencyA','XTR_886'); -- Unable to find spot rate data
2387: p_error:=true;
2388: end if;
2389: close HCE;
2390:
2391: open RND_FAC;
2392: fetch RND_FAC INTO L_ROUNDING_FACTOR;
2393: if RND_FAC%NOTFOUND then
2394: xtr_import_deal_data.log_interface_errors(G_Ni_Main_Rec.External_Deal_Id,p_user_deal_type,
2395: 'CompanyCode','XTR_880');--Unable to find home currency data
2396: p_error:=true;
2397: end if;
2398: close RND_FAC;
2430: G_Ni_Deal_type,
2431: G_Ni_Main_Rec.currency,
2432: G_Ni_Parcel_Rec(i).interest,
2433: G_Ni_Parcel_Rec(i).original_amount)) then
2434: xtr_import_deal_data.log_interface_errors( G_Ni_Main_Rec.External_Deal_Id,
2435: p_user_deal_type,
2436: 'AmountD',
2437: 'XTR_INV_INTEREST',
2438: G_Ni_Parcel_Rec(i).parcel_split_no); --This value temporarily holds the interface transaction_no
2549: open RND_FAC;
2550: fetch RND_FAC into l_roundfac;
2551: if RND_FAC%NOTFOUND then
2552: close RND_FAC;
2553: xtr_import_deal_data.log_interface_errors(G_Ni_Main_Rec.External_Deal_Id,p_user_deal_type,
2554: 'CompanyCode','XTR_880');--Unable to find home currency data
2555: p_error := true;
2556: end if;
2557: close RND_FAC;
2566: fetch HCE INTO G_Ni_Main_Rec.START_HCE_AMOUNT, G_Ni_Main_Rec.MATURITY_HCE_AMOUNT,
2567: G_Ni_Main_Rec.INTEREST_HCE_AMOUNT, G_Ni_Main_Rec.BROKERAGE_AMOUNT_HCE;
2568: if HCE%NOTFOUND then
2569: close HCE;
2570: xtr_import_deal_data.log_interface_errors(G_Ni_Main_Rec.External_Deal_Id,p_user_deal_type,
2571: 'CurrencyA','XTR_886'); -- Unable to find spot rate data
2572: p_error := true;
2573: end if;
2574: close HCE;
2616: l_dummy_num,
2617: l_err_code,
2618: l_level);
2619: if (nvl(l_level,'X')='E') then
2620: xtr_import_deal_data.log_interface_errors(G_Ni_Main_Rec.External_Deal_Id,p_user_deal_type,
2621: 'CurrencyA','XTR_886'); -- Unable to find spot rate data
2622: p_error := true;
2623: end if;
2624: end if;