P_CAScrtyDepCalculateAmount

DDL: P_CASCRTYDEPCALCULATEAMOUNT SQL: PCALDEPAMT Type: view COMPOSITE Package: ODATA_O2C_FICA_SCRTY_DEP_MNG

Calculate Deposit Amounts

P_CAScrtyDepCalculateAmount is a Composite CDS View that provides data about "Calculate Deposit Amounts" in SAP S/4HANA. It reads from 1 data source (P_CAScrtyDepCalDocAmt) and exposes 13 fields with key field CASecurityDeposit. It has 3 associations to related views. Part of development package ODATA_O2C_FICA_SCRTY_DEP_MNG.

Data Sources (1)

SourceAliasJoin Type
P_CAScrtyDepCalDocAmt DocumentAmt from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_Currency _TransactionCurrency $projection.TransactionCurrency = _TransactionCurrency.Currency
[1..1] I_Currency _RefundCurrency $projection.RefundCurrency = _RefundCurrency.Currency
[1..1] I_Currency _PaymentCurrency $projection.PaymentCurrency = _PaymentCurrency.Currency

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PCALDEPAMT view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY CASecurityDeposit P_CAScrtyDepCalDocAmt CASecurityDeposit
CAAmountInTransactionCurrency
CAReversedAmtInTransCurrency
CAPaymentAmountInPaytCurrency
CAReleasedAmtInPaymentCurrency
AmountInRefundCurrency
CAInterestAmtInPaymentCurrency
TransactionCurrency P_CAScrtyDepCalDocAmt TransactionCurrency Transaction Currency
PaymentCurrency PaidReleasedAmt PaymentCurrency Payment Currency
RefundCurrency ReturnAmount RefundCurrency
_TransactionCurrency _TransactionCurrency
_RefundCurrency _RefundCurrency
_PaymentCurrency _PaymentCurrency

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_CAScrtyDepCalculateAmount.
-- 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: PCALDEPAMT

CREATE VIEW P_CAScrtyDepCalculateAmount AS
SELECT
  DocumentAmt.CASecurityDeposit AS CASecurityDeposit,
  cast( coalesce(abs(DocumentAmt.CAAmountInTransactionCurrency), 0) as secdep_doc_amt_kk ) AS CAAmountInTransactionCurrency,
  cast( coalesce(abs(CAReversedAmtInTransCurrency), 0) as secdep_reversed_amt_kk ) AS CAReversedAmtInTransCurrency,
  cast( coalesce(abs(PaidReleasedAmt.CAPaymentAmountInPaytCurrency), 0) as paid_kk ) AS CAPaymentAmountInPaytCurrency,
  cast( coalesce(abs(PaidReleasedAmt.CAReleasedAmtInPaymentCurrency), 0) as rel_part_kk ) AS CAReleasedAmtInPaymentCurrency,
  cast( coalesce(abs(AmountInRefundCurrency), 0) as secdep_return_amt_kk ) AS AmountInRefundCurrency,
  cast( coalesce(abs(CAInterestAmtInPaymentCurrency), 0) as sec_interest_kk ) AS CAInterestAmtInPaymentCurrency,
  DocumentAmt.TransactionCurrency AS TransactionCurrency,
  PaidReleasedAmt.PaymentCurrency AS PaymentCurrency,
  ReturnAmount.RefundCurrency AS RefundCurrency
FROM P_CAScrtyDepCalDocAmt AS DocumentAmt
LEFT OUTER JOIN I_Currency AS _TransactionCurrency ON TransactionCurrency = _TransactionCurrency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _RefundCurrency ON RefundCurrency = _RefundCurrency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _PaymentCurrency ON PaymentCurrency = _PaymentCurrency.Currency  -- association [1..1]
;