P_CACollectRelateDocForRequest

DDL: P_CACOLLECTRELATEDOCFORREQUEST SQL: PCOLLRELDOC Type: view COMPOSITE Package: ODATA_O2C_FICA_SCRTY_DEP_MNG

Collect related documents for a specific request

P_CACollectRelateDocForRequest is a Composite CDS View that provides data about "Collect related documents for a specific request" in SAP S/4HANA. It reads from 3 data sources (I_CAInterestSupplement, I_CADocumentBPItem, I_CADocumentBPItem) and exposes 14 fields with key fields CASecurityDeposit, CADocumentNumber, CASubItemNumber, CAPaymentBPItemNumber, CAPaymentDocumentSubItem. Part of development package ODATA_O2C_FICA_SCRTY_DEP_MNG.

Data Sources (3)

SourceAliasJoin Type
I_CAInterestSupplement InterestDoc left_outer
I_CADocumentBPItem PayToReturn left_outer
I_CADocumentBPItem RequestToPayReverse inner

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PCOLLRELDOC 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 (14)

KeyFieldSource TableSource FieldDescription
KEY CASecurityDeposit RequestDoc CASecurityDeposit XSRF
KEY CADocumentNumber RequestDoc CADocumentNumber Document Number
KEY CASubItemNumber I_CADocumentBPItem CASubItemNumber Subitem
KEY CAPaymentBPItemNumber I_CADocumentBPItem CABPItemNumber Item
KEY CAPaymentDocumentSubItem I_CADocumentBPItem CASubItemNumber Subitem
KEY CAReturnDocumentNumber I_CADocumentBPItem CAClearingDocumentNumber Clearing Doc.
KEY CAInterestDocument I_CAInterestSupplement CAInterestDocument Interest Doc.No
CAAuthorizationGroup
CAAmountInTransactionCurrency I_CADocumentBPItem CAAmountInTransactionCurrency Amount
CAPaidAmountInTransCurrency I_CADocumentBPItem CAAmountInTransactionCurrency Amount
AmountInRefundCurrency I_CADocumentBPItem CAClearingAmountInClearingCrcy Clearing Amount
TransactionCurrency I_CADocumentBPItem TransactionCurrency Transaction Currency
PaymentCurrency
RefundCurrency

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_CACollectRelateDocForRequest.
-- 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: PCOLLRELDOC

CREATE VIEW P_CACollectRelateDocForRequest AS
SELECT
  RequestDoc.CASecurityDeposit AS CASecurityDeposit,
  RequestDoc.CADocumentNumber AS CADocumentNumber,
  RequestToPayReverse.CASubItemNumber AS CASubItemNumber,
  PayToReturn.CABPItemNumber AS CAPaymentBPItemNumber,
  PayToReturn.CASubItemNumber AS CAPaymentDocumentSubItem,
  PayToReturn.CAClearingDocumentNumber AS CAReturnDocumentNumber,
  InterestDoc.CAInterestDocument AS CAInterestDocument,
  RequestDoc._SecurityDeposit.CAAuthorizationGroup AS CAAuthorizationGroup,
  RequestToPayReverse.CAAmountInTransactionCurrency AS CAAmountInTransactionCurrency,
  RequestToPayReverse.CAAmountInTransactionCurrency AS CAPaidAmountInTransCurrency,
  PayToReturn.CAClearingAmountInClearingCrcy AS AmountInRefundCurrency,
  RequestToPayReverse.TransactionCurrency AS TransactionCurrency,
  cast(PayToReturn.TransactionCurrency as farp_fwaer) AS PaymentCurrency,
  cast(PayToReturn.CAClearingCurrency as secdep_return_waers_kk) AS RefundCurrency
INNER JOIN I_CADocumentBPItem AS RequestToPayReverse ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CADocumentBPItem AS PayToReturn ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CAInterestSupplement AS InterestDoc ON /* join condition not captured in parsed metadata */
;