I_PT_SAFTAcctgDownPaymentHdr
SAF-T PT Accounting DownPayment Header
I_PT_SAFTAcctgDownPaymentHdr is a Composite CDS View that provides data about "SAF-T PT Accounting DownPayment Header" in SAP S/4HANA. It reads from 5 data sources (I_PT_AcctgDocDgtlSgntr, I_PT_SAFTInvoiceType, I_CustomerPaymentTerms, I_PT_SAFTDownPaymentFinance, P_PT_SAFTTAXLAND) and exposes 47 fields with key field PortugueseInvoiceNumber. It has 2 associations to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_PT_AcctgDocDgtlSgntr | b | inner |
| I_PT_SAFTInvoiceType | c | inner |
| I_CustomerPaymentTerms | CustomerPayTerms | left_outer |
| I_PT_SAFTDownPaymentFinance | d | inner |
| P_PT_SAFTTAXLAND | t | left_outer |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PT_SAFTAcctgDocCustAddrHist | _CustHist | _CustHist.AccountingDocument = a.AccountingDocument and _CustHist.CompanyCode = a.CompanyCode and _CustHist.FiscalYear = a.FiscalYear and _CustHist.Customer = a.Customer |
| [0..1] | I_PT_SAFTAcctgOneTimeCustomer | _OneTimeAccount | _OneTimeAccount.CompanyCode = a.CompanyCode and _OneTimeAccount.AccountingDocument = a.AccountingDocument and _OneTimeAccount.FiscalYear = a.FiscalYear |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IPTSAFTACCTGDPH | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | SAF-T PT Accounting DownPayment Header | view |
Fields (47)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PortugueseInvoiceNumber | I_PT_AcctgDocDgtlSgntr | PortugueseInvoiceNumber | |
| PortugueseInvoiceDate | I_PT_AcctgDocDgtlSgntr | PortugueseInvoiceDate | Date | |
| DocumentType | I_PT_SAFTInvoiceType | CustomerInvoiceType | SAF-T Inv. Type | |
| DownPaymentType | I_PT_SAFTDownPaymentFinance | DownPaymentType | Down Payment | |
| DownPaymentIsNetProcedure | I_PT_SAFTDownPaymentFinance | DownPaymentIsNetProcedure | Indicator: Down Payment in Net Procedure? | |
| CreatedByUserendasLastChangedByUser | ||||
| PTDgtlSgntrSystemDateTimeText | I_PT_AcctgDocDgtlSgntr | PTDgtlSgntrSystemDateTimeText | Sys. Date-Time | |
| PortugueseDigitalSignature | I_PT_AcctgDocDgtlSgntr | PortugueseDigitalSignature | Digital Signature | |
| PortugueseDgtlSgntrKeyVersion | I_PT_AcctgDocDgtlSgntr | PortugueseDgtlSgntrKeyVersion | Key Version | |
| AccountingDocumentItem | a | AccountingDocumentItem | Posting View Item | |
| AccountingDocument | a | AccountingDocument | Journal Entry | |
| CompanyCode | a | CompanyCode | Receiver Company Code | |
| FiscalYear | a | FiscalYear | G/L Fiscal Year | |
| ReverseDocument | a | ReverseDocument | Reversed With | |
| IsReversed | a | IsReversed | Reversed? | |
| ReverseDocumentFiscalYear | a | ReverseDocumentFiscalYear | Year | |
| AccountingDocumentCreationDate | a | AccountingDocumentCreationDate | Journal Entry Date | |
| CreationTime | a | CreationTime | Time of Change | |
| ReversalReason | a | ReversalReason | Reversal Reason | |
| AmountInTransactionCurrency | a | AmountInTransactionCurrency | Pt Crcy Amt | |
| AccountingDocumentCategory | a | AccountingDocumentCategory | Journal Entry Category | |
| FiscalPeriod | a | FiscalPeriod | Tax period | |
| DocumentDate | a | DocumentDate | Journal Entry Date | |
| PostingDate | a | PostingDate | Posting Date for GR | |
| AccountingDocumentType | a | AccountingDocumentType | Journal Entry Type | |
| CompanyCodeCurrency | a | CompanyCodeCurrency | Local Currency | |
| CreatedByUser | a | CreatedByUser | User Name | |
| ExchangeRateelse0endasExchangeRate | ||||
| TotalGrossAmount | I_PT_AcctgDocDgtlSgntr | TotalGrossAmount | Total Gross Amount | |
| TotalTaxAmount | ||||
| Customer | a | Customer | Sold-to Party | |
| CustomerPaymentTerms | a | CustomerPaymentTerms | Pyt Terms | |
| CashDiscount1DueDate | a | CashDiscount1DueDate | Cash Discount 1 | |
| CashDiscount2DueDate | a | CashDiscount2DueDate | Cash Discount 2 | |
| CashDiscountAmtInCoCodeCrcy | ||||
| IsOneTimeAccount | a | IsOneTimeAccount | One-time acct | |
| PT_SeriesDocumentNumber | I_PT_AcctgDocDgtlSgntr | PT_SeriesDocumentNumber | ATCUD Code | |
| PT_SeriesDocumentType | I_PT_AcctgDocDgtlSgntr | PT_SeriesDocumentType | SAF-T Document Type | |
| _OneTimeAccount | _OneTimeAccount | |||
| _CustHist | _CustHist | |||
| _TotalItems | _TotalItems | |||
| _AccountingDocumentCategory | _AccountingDocumentCategory | |||
| _CompanyCode | a | _CompanyCode | ||
| _OperationalAcctgDocItem | _OperationalAcctgDocItem | |||
| _ReversalDocument | _ReversalDocument | |||
| _RevReason | _RevReason | |||
| _FiscalYear | _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 I_PT_SAFTAcctgDownPaymentHdr.
-- 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: IPTSAFTACCTGDPH
CREATE VIEW I_PT_SAFTAcctgDownPaymentHdr AS
SELECT
b.PortugueseInvoiceNumber AS PortugueseInvoiceNumber,
b.PortugueseInvoiceDate AS PortugueseInvoiceDate,
c.CustomerInvoiceType AS DocumentType,
d.DownPaymentType AS DownPaymentType,
d.DownPaymentIsNetProcedure AS DownPaymentIsNetProcedure,
case when a.ReverseDocument is not initial and a.IsReversed <> '' then _ReversalDocument.AccountingDocCreatedByUser else a.CreatedByUser end as LastChangedByUser AS CreatedByUserendasLastChangedByUser,
b.PTDgtlSgntrSystemDateTimeText AS PTDgtlSgntrSystemDateTimeText,
b.PortugueseDigitalSignature AS PortugueseDigitalSignature,
b.PortugueseDgtlSgntrKeyVersion AS PortugueseDgtlSgntrKeyVersion,
a.AccountingDocumentItem AS AccountingDocumentItem,
a.AccountingDocument AS AccountingDocument,
a.CompanyCode AS CompanyCode,
a.FiscalYear AS FiscalYear,
a.ReverseDocument AS ReverseDocument,
a.IsReversed AS IsReversed,
a.ReverseDocumentFiscalYear AS ReverseDocumentFiscalYear,
a.AccountingDocumentCreationDate AS AccountingDocumentCreationDate,
a.CreationTime AS CreationTime,
a.ReversalReason AS ReversalReason,
a.AmountInTransactionCurrency AS AmountInTransactionCurrency,
a.AccountingDocumentCategory AS AccountingDocumentCategory,
a.FiscalPeriod AS FiscalPeriod,
a.DocumentDate AS DocumentDate,
a.PostingDate AS PostingDate,
a.AccountingDocumentType AS AccountingDocumentType,
a.CompanyCodeCurrency AS CompanyCodeCurrency,
a.CreatedByUser AS CreatedByUser,
case when a.TransactionCurrency <> a._CompanyCode.Currency and a.TransactionCurrency is not initial then a.ExchangeRate else 0 end as ExchangeRate AS ExchangeRateelse0endasExchangeRate,
b.TotalGrossAmount AS TotalGrossAmount,
abs(coalesce(_TotalItems.TaxAmountInCoCodeCrcy,0)) AS TotalTaxAmount,
a.Customer AS Customer,
a.CustomerPaymentTerms AS CustomerPaymentTerms,
a.CashDiscount1DueDate AS CashDiscount1DueDate,
a.CashDiscount2DueDate AS CashDiscount2DueDate,
cast( division(( a.CashDiscountBaseAmount * a.CashDiscount1Percent),100, 2) as dmbtr ) AS CashDiscountAmtInCoCodeCrcy,
a.IsOneTimeAccount AS IsOneTimeAccount,
b.PT_SeriesDocumentNumber AS PT_SeriesDocumentNumber,
b.PT_SeriesDocumentType AS PT_SeriesDocumentType,
a._CompanyCode AS _CompanyCode
INNER JOIN I_PT_AcctgDocDgtlSgntr AS b ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTInvoiceType AS c ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTDownPaymentFinance AS d ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_PT_SAFTTAXLAND AS t ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CustomerPaymentTerms AS CustomerPayTerms ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PT_SAFTAcctgDocCustAddrHist AS _CustHist ON _CustHist.AccountingDocument = a.AccountingDocument AND _CustHist.CompanyCode = a.CompanyCode AND _CustHist.FiscalYear = a.FiscalYear AND _CustHist.Customer = a.Customer -- association [0..1]
LEFT OUTER JOIN I_PT_SAFTAcctgOneTimeCustomer AS _OneTimeAccount ON _OneTimeAccount.CompanyCode = a.CompanyCode AND _OneTimeAccount.AccountingDocument = a.AccountingDocument AND _OneTimeAccount.FiscalYear = a.FiscalYear -- 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