Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_FinancialTransactionManage.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PFINTRSMANAGE
-- Parameters: P_KeyDate : vdm_v_key_date
CREATE VIEW P_FinancialTransactionManage AS
SELECT
FinancialTransaction.CompanyCode AS CompanyCode,
FinancialTransaction.FinancialTransaction AS FinancialTransaction,
FinancialTransaction.TreasuryFinancialObject AS TreasuryFinancialObject,
cast ( concat( FinancialTransaction.CompanyCode, concat('/', cast( ltrim( FinancialTransaction.FinancialTransaction, '0' ) as tb_rfha ) ) ) as ftr_fin_trans_nmbr_with_cocode ) AS FinTransWithCompanyCode,
cast ( FinancialTransaction.CreatedByUser as cruser preserving type ) AS CreatedByUser,
cast ( FinancialTransaction.FinTransCreationDate as ftr_creation_date preserving type ) AS FinTransCreationDate,
cast ( FinancialTransaction.FinTransCreationTime as createtime preserving type ) AS FinTransCreationTime,
LastChangedByUser,
cast ( FinancialTransaction.LastChangeDate as chdate preserving type) AS LastChangeDate,
cast ( FinancialTransaction.FinInstrumentLastChangedTime as ftr_last_changed_time preserving type) AS FinInstrumentLastChangedTime,
TreasuryContractType,
FinancialTransaction.FinancialInstrProductCategory AS FinancialInstrProductCategory,
FinancialTransaction.FinancialInstrumentProductType AS FinancialInstrumentProductType,
_FinancialInstrProdType._FinancialInstrProdTypeSuplmnt.TradeFinanceCategory AS TradeFinanceCategory,
cast ( _FinancialInstrProdType._FinancialInstrProdTypeSuplmnt.TreasurySettlementType as ftr_prod_settlfl preserving type ) AS TreasurySettlementType,
FinancialTransaction.FinInstrTransactionCategory AS FinInstrTransactionCategory,
FinancialInstrTransactionType,
FinInstrLastActiveActivity,
_CurrentActivity._ActivityCategory2.FinTransGenActivityCategory AS FinTransGenActivityCategory,
_CurrentActivity._ActivityCategory2.FinancialInstrActivityCategory AS FinancialInstrActivityCategory,
FinancialTransaction.Counterparty AS Counterparty,
Portfolio,
FinancialInstrumentAssignment,
FinancialInstrumentReference,
FinancialInstrCharacteristic,
TreasuryValuationClass,
HedgingClassification,
HedgeRequestIdentifier,
ProfitCenter,
CostCenter,
FinancialTransaction.WBSElementInternalID AS WBSElementInternalID,
Segment,
OnBehalfOfCompany,
TreasuryFacilityCompanyCode,
TreasuryFacility,
FinancialInstrumentStatus,
FuturesAccount,
FinTransIsRiskMitigating,
FinancialTransaction.TermStartDate AS TermStartDate,
_CurrentActivity.FinTransActyConclusionDate AS FinTransActyConclusionDate,
_CurrentActivity.Trader AS Trader,
_CurrentActivity.FinInstrExternalReference AS FinInstrExternalReference,
cast( case when _CurrentActivity.FinTransNoticeDate is not initial then _CurrentActivity.FinTransNoticeDate else _CurrentActivity.TermEndDate end as tb_delfz ) as TermEndDate AS TermEndDateendastb_delfzasTermEndDate,
TreasuryFinanceProject,
FinancialTransaction.ClassificationOfFinInstr AS ClassificationOfFinInstr,
FinancialTransaction.UniqueProductIdentifier AS UniqueProductIdentifier,
FinancialTransaction.InternationalSecuritiesIdnNmbr AS InternationalSecuritiesIdnNmbr,
FinancialTransaction.ReportTrackingNumber AS ReportTrackingNumber,
TransCondition.FinConditionInterestCategory AS FinConditionInterestCategory,
TransCondition.InterestCalculationMethod AS InterestCalculationMethod,
TransCondition.ConditionPercentageRate AS ConditionPercentageRate,
TransCondition.InterestReference AS InterestReference,
CFCondition.FinCndnUpperLimitPctgRate AS FinCndnUpperLimitPctgRate,
CFCondition.FinCndnLowerLimitPctgRate AS FinCndnLowerLimitPctgRate,
TransCondition.FwdRateAgrmtHdgPerdStrtDte AS FwdRateAgrmtHdgPerdStrtDte,
_CurrentActivity.LetterOfCredit AS LetterOfCredit,
_CurrentActivity.TreasuryBeneficiary AS TreasuryBeneficiary,
_CurrentActivity.TreasuryAdvisingBank AS TreasuryAdvisingBank,
_CurrentActivity.TreasuryApplicant AS TreasuryApplicant,
_CurrentActivity.TreasuryIssuingBank AS TreasuryIssuingBank,
_CurrentActivity.BankGuaranteeNumber AS BankGuaranteeNumber,
_CurrentActivity.BankGuaranteeType AS BankGuaranteeType,
case when FinancialTransaction.FinancialInstrProductCategory = '760' then Option.SecurityClass else FinancialTransaction.SecurityClass end as SecurityClass AS SecurityClassendasSecurityClass,
case when FinancialTransaction.FinancialInstrProductCategory = '760' then Option.SecurityAccount else FinancialTransaction.SecurityAccount end as SecurityAccount AS SecurityAccountendasSecurityAccount,
case when FinancialTransaction.FinancialInstrProductCategory = '760' then Option.SecurityExchange else SecurityMainFlow.SecurityExchange end as SecurityExchange AS SecurityExchangeendasSecurityExchange,
SecurityMainFlow.CalculationDate AS CalculationDate,
case when FinancialTransaction.FinancialInstrProductCategory = '760' and Option.OptnUndrlgTreasuryContractType = '2' then Option.QuotationCurrency else SecurityMainFlow.QuotationCurrency end as QuotationCurrency AS QuotationCurrencyendasQuotationCurrency,
TrsyTradedAmountBuySellCode,
cast ( _CurrentActivity.FinTransFixingDate as ftr_fixing_date preserving type ) AS FinTransFixingDate,
_CurrentActivity.ForeignExchangeFixingReference AS ForeignExchangeFixingReference,
cast ( _CurrentActivity.ExchangeRate as ftr_fx_forward_rate preserving type ) AS ExchangeRate,
_CurrentActivity.SpotExchangeRate AS SpotExchangeRate,
_CurrentActivity.SwapExchangeRate AS SwapExchangeRate,
_CurrentActivity.LiquidityEffectValue AS LiquidityEffectValue,
case when FinancialTransaction.FinancialInstrProductCategory = '600' then _CurrentActivity.CurrencyPair when FinancialTransaction.FinancialInstrProductCategory = '760' and Option.FinancialInstrProductCategory = '600' then Option.CurrencyPair end as CurrencyPair AS CurrencyPairendasCurrencyPair,
cast ( CashSettlementFlow.FinTransFlowPaytAmt as tb_cash_settlement_amount preserving type ) AS CashSettlementAmount,
cast ( CashSettlementFlow.FinTransFlowPaytAmtCrcy as tb_cash_settlement_currency preserving type ) AS CashSettlementCurrency,
cast ( CashSettlementFlow.FinTransFlowPaymentDate as ftr_cash_settlement_payt_date preserving type ) AS CashSettlementPaymentDate,
Option.OptionExpirationDate AS OptionExpirationDate,
Option.OptionExerciseType AS OptionExerciseType,
Option.OptionUnderlyingProductType AS OptionUnderlyingProductType,
Option.OptionUndrlgTransactionType AS OptionUndrlgTransactionType,
Option.OptionSettlementType AS OptionSettlementType,
Option.OptionUndrlgFXStrikeRate AS OptionUndrlgFXStrikeRate,
Option.OptionPutCallCode AS OptionPutCallCode,
cast ( _CurrentActivity.FinTransExerciseDate as ftr_exercise_date ) AS FinTransExerciseDate,
PremiumFlow.PremiumPriceQuotedInPointsRate AS PremiumPriceQuotedInPointsRate,
PremiumFlow.PremiumPriceQuotedInPercent AS PremiumPriceQuotedInPercent,
PremiumFlow.OptionPremiumNotation AS OptionPremiumNotation,
cast ( PremiumFlow.FinTransFlowPaytAmt as ftr_premium_amount ) AS FinTransPremiumAmount,
cast ( PremiumFlow.FinTransFlowPaytAmtCrcy as ftr_premium_currency preserving type ) AS FinTransPremiumAmountCurrency,
cast ( PremiumFlow.FinTransFlowPaymentDate as ftr_premium_payment_date preserving type ) AS FinTransPremiumPaymentDate,
Option.OptionUnderlyingTermStartDate AS OptionUnderlyingTermStartDate,
Option.OptionUnderlyingTermEndDate AS OptionUnderlyingTermEndDate,
Option.FinancialTransactionFromExer AS FinancialTransactionFromExer,
Facility.TotalAmountInTransactionCrcy AS TotalAmountInTransactionCrcy,
Facility.CreditLineCurrency AS CreditLineCurrency,
Facility.FcltyTermEndExceededIsAllowed AS FcltyTermEndExceededIsAllowed,
Reference.FinTransReferenceCategory AS FinTransReferenceCategory,
Reference.FinTransReferenceNumber AS FinTransReferenceNumber
FROM I_FinancialTransaction AS FinancialTransaction
;