C_PT_SAFTPaymentDocValueC
Total Amount of Payment Document - Cube
C_PT_SAFTPaymentDocValueC is a Consumption CDS View (Cube) that provides data about "Total Amount of Payment Document - Cube" in SAP S/4HANA. It reads from 5 data sources (I_AccountingDocumentType, I_ClrgInfoRelationForAcctgDoc, P_PT_BusinessPartner_Delivery, I_PT_DgtlSgntrNmbrRngeAcctg, I_PT_SAFTPaymentTotal) and exposes 24 fields with key fields CompanyCode, ClearingAccountingDocument, FiscalYear, BusinessPartnerCustomer. It has 3 associations to related views. Part of development package GLO_FIN_IS_SAFT_PT.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_AccountingDocumentType | AcctDoc | inner |
| I_ClrgInfoRelationForAcctgDoc | Clear | inner |
| P_PT_BusinessPartner_Delivery | CustInfo | inner |
| I_PT_DgtlSgntrNmbrRngeAcctg | NrRange | inner |
| I_PT_SAFTPaymentTotal | PayTotal | inner |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_SAFTAccountingTaxCheck | _TotalItems | _TotalItems.AccountingDocument = Doc.AccountingDocument and _TotalItems.CompanyCode = Doc.CompanyCode and _TotalItems.FiscalYear = Doc.FiscalYear |
| [0..1] | I_SAFTCustTaxRegnNmbr | _CustLand | Doc.Customer = _CustLand.CustomerNum and Doc.DelivOfGoodsDestCountry = _CustLand.Country |
| [0..1] | P_PT_SAFTTAXLAND | _CustLandExists | Doc.Customer = _CustLandExists.Customer |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Analytics.internalName | #LOCAL | view | |
| Metadata.allowExtensions | true | view | |
| Analytics.dataCategory | #CUBE | view | |
| EndUserText.label | Total Amount of Payment Document - Cube | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (24)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | Doc | CompanyCode | Receiver Company Code |
| KEY | ClearingAccountingDocument | Doc | AccountingDocument | Journal Entry |
| KEY | FiscalYear | Doc | FiscalYear | G/L Fiscal Year |
| KEY | BusinessPartnerCustomer | |||
| FiscalPeriod | Doc | FiscalPeriod | Tax period | |
| DocumentDate | Doc | DocumentDate | Journal Entry Date | |
| PostingDate | Doc | PostingDate | Posting Date for GR | |
| CompanyCodeCurrency | Doc | CompanyCodeCurrency | Local Currency | |
| AccountingDocumentCategory | Doc | AccountingDocumentCategory | Journal Entry Category | |
| AccountingDocumentType | Doc | AccountingDocumentType | Journal Entry Type | |
| PortugueseCustomerWithVersion | ||||
| Supplier | Doc | Supplier | Supplier | |
| NetAmount | Net Total | |||
| GrossAmount | Gross Total | |||
| SettlementAmount | Settlement Amount | |||
| ExchangeRateendasExchangeRate | ||||
| ReferenceDocumentType | Doc | ReferenceDocumentType | Reference Document Type | |
| OriginalReferenceDocument | Doc | OriginalReferenceDocument | Reference Key | |
| _CompanyCodeCurrency | Doc | _CompanyCodeCurrency | ||
| _TotalItems | _TotalItems | |||
| _AccountingDocumentCategory | Doc | _AccountingDocumentCategory | ||
| _CompanyCode | Doc | _CompanyCode | ||
| _AccountingDocumentType | Doc | _AccountingDocumentType | ||
| _FiscalYear | Doc | _FiscalYear |
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 C_PT_SAFTPaymentDocValueC.
-- 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.
CREATE VIEW C_PT_SAFTPaymentDocValueC AS
SELECT
Doc.CompanyCode AS CompanyCode,
Doc.AccountingDocument AS ClearingAccountingDocument,
Doc.FiscalYear AS FiscalYear,
'999999990' AS BusinessPartnerCustomer,
Doc.FiscalPeriod AS FiscalPeriod,
Doc.DocumentDate AS DocumentDate,
Doc.PostingDate AS PostingDate,
Doc.CompanyCodeCurrency AS CompanyCodeCurrency,
Doc.AccountingDocumentCategory AS AccountingDocumentCategory,
Doc.AccountingDocumentType AS AccountingDocumentType,
cast( '' as sipt_kunnr_with_version ) AS PortugueseCustomerWithVersion,
Doc.Supplier AS Supplier,
abs(PayTotal.TotalCreditAmount - PayTotal.TotalDebitAmount + PayTotal.SettlementAmount) AS NetAmount,
abs(PayTotal.TotalCreditAmount - PayTotal.TotalDebitAmount + PayTotal.SettlementAmount) AS GrossAmount,
abs(PayTotal.SettlementAmount) AS SettlementAmount,
case when PayTotal.TransactionCurrency <> Doc.CompanyCodeCurrency and PayTotal.TransactionCurrency is not initial then PayTotal.ExchangeRate end as ExchangeRate AS ExchangeRateendasExchangeRate,
Doc.ReferenceDocumentType AS ReferenceDocumentType,
Doc.OriginalReferenceDocument AS OriginalReferenceDocument,
Doc._CompanyCodeCurrency AS _CompanyCodeCurrency,
Doc._AccountingDocumentCategory AS _AccountingDocumentCategory,
Doc._CompanyCode AS _CompanyCode,
Doc._AccountingDocumentType AS _AccountingDocumentType,
Doc._FiscalYear AS _FiscalYear
INNER JOIN I_PT_SAFTPaymentTotal AS PayTotal ON /* join condition not captured in parsed metadata */
INNER JOIN I_ClrgInfoRelationForAcctgDoc AS Clear ON /* join condition not captured in parsed metadata */
INNER JOIN I_AccountingDocumentType AS AcctDoc ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_DgtlSgntrNmbrRngeAcctg AS NrRange ON /* join condition not captured in parsed metadata */
INNER JOIN P_PT_BusinessPartner_Delivery AS CustInfo ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SAFTAccountingTaxCheck AS _TotalItems ON _TotalItems.AccountingDocument = Doc.AccountingDocument AND _TotalItems.CompanyCode = Doc.CompanyCode AND _TotalItems.FiscalYear = Doc.FiscalYear -- association [0..1]
LEFT OUTER JOIN I_SAFTCustTaxRegnNmbr AS _CustLand ON Doc.Customer = _CustLand.CustomerNum AND Doc.DelivOfGoodsDestCountry = _CustLand.Country -- association [0..1]
LEFT OUTER JOIN P_PT_SAFTTAXLAND AS _CustLandExists ON Doc.Customer = _CustLandExists.Customer -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA