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 I_BankFeeServiceCube.
-- 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.
-- Parameters: P_DisplayCurrency : vdm_v_display_currency, P_KeyDate : vdm_v_key_date, P_ExchangeRateType : fxm_exchange_rate_type
CREATE VIEW I_BankFeeServiceCube AS
SELECT
BkSrvcBillgStmntUUID,
EndDateYearMonth,
Sender,
ReceiverIdentifier,
AccountLevel,
_BankAccount.BankAccountNumber AS BankAccountNumber,
BankFeeService,
FeeType,
BankFeeStatement,
StartDateYearMonth,
BankAccountInternalID,
SenderName,
SenderCountry,
BankFeeReceiverName,
ReceiverCountry,
CompanyCode,
CompanyCodeCountry,
Bank,
BankCountry,
_BankAccount.IBAN AS IBAN,
_BankAccount.BankAccountType AS BankAccountType,
_BankAccount.BusinessArea AS BusinessArea,
_BankAccount.Segment AS Segment,
_BankAccount.ControllingArea AS ControllingArea,
_BankAccount.ProfitCenter AS ProfitCenter,
_BankGroup.BankHeadquarterName AS BankHeadquarterName,
CompensationMethod,
TaxCalculationMethod,
TaxDesignation,
BankFeeHostCurrency,
BankFeeSettlmtCrcy,
ReportIdentifier,
BankFeeServiceDescription,
BankFeeSubService,
BankFeeSubServiceIssuer,
BankFeeSrvcComCode,
BankFeeSrvcComCodeIssuer,
BankFeeSrvcType,
BankFeeSrvcChrgMeth,
TotalSettlmtVolume,
BankFeeSrvcUnitPriceAmount,
PriceCurrency,
PaymentMethod,
OriginalChargePriceCurrency,
OriginalChargePrice,
$parameters.P_ExchangeRateType AS ExchangeRateType,
$parameters.P_DisplayCurrency AS DisplayCurrency,
TotalTaxAmountCurrency,
TotalTaxAmount,
CompensationCurrency,
CompensationAmount,
BankFeeConditionID,
ValidFrom,
ConditionArea,
BankFeeSrvcPricingStatus,
CalculatedPrice,
_Condition.Currency AS Currency,
_Condition.BankFeeConditionPricingType AS BankFeeConditionPricingType,
case when BankFeeConditionID is initial then cast ('' as fclm_unified_bank_service_id ) else _Condition.UnifiedBankServiceIdentifier end AS UnifiedBankServiceIdentifier,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).BankFeeSrvcPrcgStsCriticality AS BankFeeSrvcPrcgStsCriticality,
cast('0' as fclm_brm_bsb_validation_reason ) AS BankFeeSrvcValidationReason,
case when BankFeeSrvcPricingStatus = '3' then cast( '' as boolean preserving type ) else cast( 'X' as boolean preserving type ) end AS BkFeeValidationReasonIsHidden,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).CalculatedAmountInDspCrcy AS CalculatedAmountInDspCrcy,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).CalculatedDiffAmountInDspCrcy AS CalculatedDiffAmountInDspCrcy,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).CalculatedDiffAmountInCndnCrcy AS CalculatedDiffAmountInCndnCrcy,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).PaymentTransactionTypeGroup AS PaymentTransactionTypeGroup,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).PaymentExternalTransacType AS PaymentExternalTransacType,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).BankFeeCalculatedQuantity AS BankFeeCalculatedQuantity,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).BankFeeDifferentQuantity AS BankFeeDifferentQuantity,
cast(0 as abap.dec(20,2) ) AS BankFeeQuantityDiffPercent,
cast('0' as fclm_brm_bsb_cal_volume_source ) AS CalculatedVolumeSource,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).BankFeeUnitPriceIsHidden AS BankFeeUnitPriceIsHidden,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).BankFeeCndnUnitPriceValue AS BankFeeCndnUnitPriceValue,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).BankFeeSrvcUnitPriceInDspCrcy AS BankFeeSrvcUnitPriceInDspCrcy,
cast( 0 as abap.dec(22,8) ) AS BankFeeUnitPriceDifferenceVal,
cast( 0 as abap.curr(22,2) ) AS BkFeeUntPrDiffAmtInDspCrcy,
cast('0' as abap.dec( 20, 2 ) ) AS BankFeeUnitPriceDiffPct,
cast( '%' as unit ) AS BankFeeDiffPercentageUnit,
cast( 0 as abap.curr(22,2) ) AS BkFeeCndnUntPriceInDspCrcy,
cast( 0 as abap.int1 ) AS UnitPriceCriticality,
cast ( BankFeeSrvcUnitPriceAmount as abap.dec(24,6) ) AS BankFeeBilledUnitPriceValue,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).ChargePriceInDC AS ChargePriceInDC,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).TaxInDC AS TaxInDC,
_Difference( P_DisplayCurrency:$parameters.P_DisplayCurrency, P_KeyDate:$parameters.P_KeyDate , P_ExchangeRateType:$parameters.P_ExchangeRateType).CompensationInDC AS CompensationInDC
FROM I_BankFeeService AS BankFeeService
LEFT OUTER JOIN I_BankAccountWithBGN AS _BankGroup ON BankAccountInternalID = _BankGroup.BankAccountInternalID -- association [0..1]
LEFT OUTER JOIN I_BankAccount AS _BankAccount ON BankAccountInternalID = _BankAccount.BankAccountInternalID -- association [0..1]
LEFT OUTER JOIN I_BankFeeCondition AS _Condition ON BankFeeConditionID = _Condition.BankFeeConditionID AND ConditionArea = _Condition.ConditionArea AND ValidFrom = _Condition.ValidityStartDate -- association [0..1]
LEFT OUTER JOIN I_BankFeeSrvcPrcDifference AS _Difference ON BkSrvcBillgStmntUUID = _Difference.BkSrvcBillgStmntUUID -- association [0..1]
;