P_AU_STRPPAYTTMESRPTGDOC3
AU PTR Documents
P_AU_STRPPAYTTMESRPTGDOC3 is a Composite CDS View that provides data about "AU PTR Documents" in SAP S/4HANA. It reads from 1 data source (P_AU_StRpPaytTmesRptgDoc2) and exposes 33 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. It has 2 associations to related views. Part of development package GLO_FIN_IS_AU.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_AU_StRpPaytTmesRptgDoc2 | P_AU_StRpPaytTmesRptgDoc2 | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_AU_InvoiceIssueDateType | fiau_invoice_issue_date_type | |
| P_FromReportingDate | figen_rep_date_from | |
| P_ToReportingDate | figen_rep_date_to |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PurchaseContract | _ContractTerms | _ContractTerms.PurchaseContract = docs.PurchaseContract |
| [0..1] | I_PurchasingDocument | _PurchaseTerms | _PurchaseTerms.PurchasingDocument = docs.PurchaseOrder |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view |
Fields (33)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | docs | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | docs | AccountingDocument | Journal Entry |
| KEY | FiscalYear | docs | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocumentItem | docs | AccountingDocumentItem | Posting View Item |
| PostingDate | docs | PostingDate | Posting Date for GR | |
| CompanyCodeName | docs | CompanyCodeName | Company Name | |
| VATRegistration | docs | VATRegistration | VAT Registration No. | |
| Supplier | docs | Supplier | Supplier | |
| BusinessPartner | docs | BusinessPartner | Issuing Authority | |
| SupplierInvoice | docs | SupplierInvoice | ||
| SupplierInvoiceFiscalYear | docs | SupplierInvoiceFiscalYear | ||
| InvoiceReference | docs | InvoiceReference | Invoice Reference | |
| InvoiceReferenceFiscalYear | docs | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | |
| BPTaxNumber | docs | BPTaxNumber | Tax Number | |
| PurchaseOrder | docs | PurchaseOrder | Purchasing Document | |
| PurchaseContract | docs | PurchaseContract | Purchasing Doc. | |
| PaymentDate | docs | PaymentDate | Payment Date | |
| AU_PartialPaymentFlag | docs | AU_PartialPaymentFlag | ||
| InvoiceIssueDate | docs | InvoiceIssueDate | ||
| LastGoodsReceiptPostingDate | docs | LastGoodsReceiptPostingDate | ||
| ReportingDate | docs | ReportingDate | ||
| SupplierInvoiceOrigin | docs | SupplierInvoiceOrigin | IV category | |
| AU_SelfInvoiceFlag | docs | AU_SelfInvoiceFlag | ||
| PaymentTermsendendasPaymentTerms | ||||
| AccountingDocumentType | docs | AccountingDocumentType | Journal Entry Type | |
| SupplierAccountGroup | docs | SupplierAccountGroup | Account group | |
| TradingPartner | docs | TradingPartner | Trading Partner | |
| DebitCreditCode | docs | DebitCreditCode | Single-Character Flag | |
| CompanyCodeCurrency | docs | CompanyCodeCurrency | Local Currency | |
| AU_AccountingDocumentType | docs | AU_AccountingDocumentType | ||
| AmountInCompanyCodeCurrency | docs | AmountInCompanyCodeCurrency | Local Crcy Amt | |
| _PTRSmallBusiness | docs | _PTRSmallBusiness | ||
| _ReportedItemsLog | docs | _ReportedItemsLog |
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_AU_STRPPAYTTMESRPTGDOC3.
-- 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.
-- Parameters: P_AU_InvoiceIssueDateType : fiau_invoice_issue_date_type, P_FromReportingDate : figen_rep_date_from, P_ToReportingDate : figen_rep_date_to
CREATE VIEW P_AU_STRPPAYTTMESRPTGDOC3 AS
SELECT
docs.CompanyCode AS CompanyCode,
docs.AccountingDocument AS AccountingDocument,
docs.FiscalYear AS FiscalYear,
docs.AccountingDocumentItem AS AccountingDocumentItem,
docs.PostingDate AS PostingDate,
docs.CompanyCodeName AS CompanyCodeName,
docs.VATRegistration AS VATRegistration,
docs.Supplier AS Supplier,
docs.BusinessPartner AS BusinessPartner,
docs.SupplierInvoice AS SupplierInvoice,
docs.SupplierInvoiceFiscalYear AS SupplierInvoiceFiscalYear,
docs.InvoiceReference AS InvoiceReference,
docs.InvoiceReferenceFiscalYear AS InvoiceReferenceFiscalYear,
docs.BPTaxNumber AS BPTaxNumber,
docs.PurchaseOrder AS PurchaseOrder,
docs.PurchaseContract AS PurchaseContract,
docs.PaymentDate AS PaymentDate,
docs.AU_PartialPaymentFlag AS AU_PartialPaymentFlag,
docs.InvoiceIssueDate AS InvoiceIssueDate,
docs.LastGoodsReceiptPostingDate AS LastGoodsReceiptPostingDate,
docs.ReportingDate AS ReportingDate,
docs.SupplierInvoiceOrigin AS SupplierInvoiceOrigin,
docs.AU_SelfInvoiceFlag AS AU_SelfInvoiceFlag,
case when docs.InvcHasMultiplePurchaseOrders = 1 then docs.PaymentTerms when docs.InvcHasMultiplePurchaseOrders = 0 or docs.InvcHasMultiplePurchaseOrders is null then case when docs.SupplierInvoice = '' or docs.SupplierInvoice is null then docs.PaymentTerms when _ContractTerms.PaymentTerms is not initial and _ContractTerms.PaymentTerms is not null then _ContractTerms.PaymentTerms when _PurchaseTerms.PaymentTerms is not initial and _PurchaseTerms.PaymentTerms is not null then _PurchaseTerms.PaymentTerms else docs.PaymentTerms end end as PaymentTerms AS PaymentTermsendendasPaymentTerms,
docs.AccountingDocumentType AS AccountingDocumentType,
docs.SupplierAccountGroup AS SupplierAccountGroup,
docs.TradingPartner AS TradingPartner,
docs.DebitCreditCode AS DebitCreditCode,
docs.CompanyCodeCurrency AS CompanyCodeCurrency,
docs.AU_AccountingDocumentType AS AU_AccountingDocumentType,
docs.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
docs._PTRSmallBusiness AS _PTRSmallBusiness,
docs._ReportedItemsLog AS _ReportedItemsLog
FROM P_AU_StRpPaytTmesRptgDoc2
LEFT OUTER JOIN I_PurchaseContract AS _ContractTerms ON _ContractTerms.PurchaseContract = docs.PurchaseContract -- association [0..1]
LEFT OUTER JOIN I_PurchasingDocument AS _PurchaseTerms ON _PurchaseTerms.PurchasingDocument = docs.PurchaseOrder -- 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