P_CAScrtyDepReqCalculateAmount

DDL: P_CASCRTYDEPREQCALCULATEAMOUNT SQL: PCALREQAMT Type: view COMPOSITE

P_CAScrtyDepReqCalculateAmount is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_CAScrtyDepReqCalDocAmt, I_CASecurityDeposit) and exposes 15 fields with key fields CASecurityDeposit, CADocumentNumber. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
P_CAScrtyDepReqCalDocAmt DocumentAmt inner
I_CASecurityDeposit SecurityDeposit 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 PCALREQAMT 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 (15)

KeyFieldSource TableSource FieldDescription
KEY CASecurityDeposit I_CASecurityDeposit CASecurityDeposit XSRF
KEY CADocumentNumber P_CAScrtyDepReqCalDocAmt CADocumentNumber Document Number
CAAmountInTransactionCurrency
CAPaidAmountInTransCurrency
CAPaymentAmountInPaytCurrency
CAReleasedAmtInPaymentCurrency
CAReversedAmtInTransCurrency
AmountInRefundCurrency
CAInterestAmtInPaymentCurrency
TransactionCurrency I_CASecurityDeposit 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_CAScrtyDepReqCalculateAmount.
-- 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: PCALREQAMT

CREATE VIEW P_CAScrtyDepReqCalculateAmount AS
SELECT
  SecurityDeposit.CASecurityDeposit AS CASecurityDeposit,
  DocumentAmt.CADocumentNumber AS CADocumentNumber,
  cast( coalesce(abs(CAAmountInTransactionCurrency), 0) as secdep_doc_amt_kk ) AS CAAmountInTransactionCurrency,
  cast( coalesce(abs(PayTransAmt.CAPaidAmountInTransCurrency), 0) as paid_kk ) AS CAPaidAmountInTransCurrency,
  cast( coalesce(abs(CAPaymentAmountInPaytCurrency), 0) as paid_kk ) AS CAPaymentAmountInPaytCurrency,
  cast( coalesce(abs(CAReleasedAmtInPaymentCurrency), 0) as rel_part_kk ) AS CAReleasedAmtInPaymentCurrency,
  cast( coalesce(abs(CAReversedAmtInTransCurrency), 0) as secdep_reversed_amt_kk ) AS CAReversedAmtInTransCurrency,
  cast( coalesce(abs(AmountInRefundCurrency), 0) as secdep_return_amt_kk ) AS AmountInRefundCurrency,
  cast( coalesce(abs(CAInterestAmtInPaymentCurrency), 0) as sec_interest_kk ) AS CAInterestAmtInPaymentCurrency,
  SecurityDeposit.TransactionCurrency AS TransactionCurrency,
  PaidReleasedAmt.PaymentCurrency AS PaymentCurrency,
  ReturnAmount.RefundCurrency AS RefundCurrency
FROM I_CASecurityDeposit AS SecurityDeposit
INNER JOIN P_CAScrtyDepReqCalDocAmt AS DocumentAmt ON /* join condition not captured in parsed metadata */
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]
;