P_KZ_VATRetOutDoc
Selection for outgoing documents
P_KZ_VATRetOutDoc is a Composite CDS View that provides data about "Selection for outgoing documents" in SAP S/4HANA. It reads from 2 data sources (P_KZ_BillingMaterialDetails, P_KZ_JournalEntryItemLdngLdgr) and exposes 46 fields. Part of development package GLO_FIN_IS_VAT_KZ_RETURN.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_KZ_BillingMaterialDetails | BillingMaterial | left_outer |
| P_KZ_JournalEntryItemLdngLdgr | DocumentItem | left_outer |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PKZVATRETOUTDOC | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (46)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| CompanyCode | LogItems | CompanyCode | Receiver Company Code | |
| AccountingDocument | LogItems | AccountingDocument | Journal Entry | |
| FiscalYear | LogItems | FiscalYear | G/L Fiscal Year | |
| TaxCode | LogItems | TaxCode | Tax Code | |
| TaxRate | LogItems | TaxRate | Tax Rate | |
| AmountSign | LogItems | AmountSign | ||
| NegativeSign | LogItems | NegativeSign | ||
| AmountInCompanyCodeCurrency | P_KZ_JournalEntryItemLdngLdgr | AmountInCompanyCodeCurrency | Local Crcy Amt | |
| TaxBaseAmountInCoCodeCrcy | LogItems | TaxBaseAmountInCoCodeCrcy | TxBaseAmt CoCodeCrcy | |
| TaxAmountInCoCodeCrcy | LogItems | TaxAmountInCoCodeCrcy | Tax Amount in Company Code Currency | |
| TaxBaseAmountInCoCodeCrcyABS | ||||
| AmountInCompanyCodeCurrencyABS | ||||
| TaxBaseAmountInCoCodeCrcyTot | LogItems | TaxBaseAmountInCoCodeCrcy | TxBaseAmt CoCodeCrcy | |
| TaxAmountInCoCodeCrcyTot | LogItems | TaxAmountInCoCodeCrcy | Tax Amount in Company Code Currency | |
| TransactionTypeDetermination | LogItems | TransactionTypeDetermination | Transaction Key | |
| PostingDate | LogItems | PostingDate | Posting Date for GR | |
| TaxReportingDate | LogItems | TaxReportingDate | Tax Reporting Date | |
| AccountingDocumentType | LogItems | AccountingDocumentType | Journal Entry Type | |
| IsReversal | LogItems | IsReversal | Reversal doc. | |
| IsReversed | LogItems | IsReversed | Reversed? | |
| OriginalReferenceDocument | LogItems | OriginalReferenceDocument | Reference Key | |
| ReferenceDocumentType | LogItems | ReferenceDocumentType | Reference Document Type | |
| DocumentReferenceID | LogItems | DocumentReferenceID | Reference | |
| BusinessTransactionType | LogItems | BusinessTransactionType | Bus.transaction | |
| SenderLogicalSystem | LogItems | SenderLogicalSystem | Sender Logical System | |
| AccountingDocumentHeaderText | LogItems | AccountingDocumentHeaderText | Doc.Header Text | |
| AccountingDocCreatedByUser | LogItems | AccountingDocCreatedByUser | User which created overhead document | |
| Reference1InDocumentHeader | LogItems | Reference1InDocumentHeader | Reference 1 | |
| Reference2InDocumentHeader | LogItems | Reference2InDocumentHeader | Reference 2 | |
| DocumentItemText | LogItems | DocumentItemText | Text | |
| CompanyCodeCurrency | LogItems | CompanyCodeCurrency | Local Currency | |
| Currency | LogItems | Currency | Valuation Crcy | |
| StatryRptgEntity | LogItems | StatryRptgEntity | Reporting Entity | |
| StatryRptCategory | LogItems | StatryRptCategory | Report ID | |
| StatryRptRunID | LogItems | StatryRptRunID | Report Run ID | |
| AccountingDocumentItem | LogItems | AccountingDocumentItem | Posting View Item | |
| KZ_VATReturnSectionType | LogItems | KZ_VATReturnSectionType | ||
| Material | P_KZ_BillingMaterialDetails | Material | Vehicle Model | |
| PurchasingDocument | P_KZ_JournalEntryItemLdngLdgr | PurchasingDocument | Purchasing Document | |
| PurchasingDocumentItem | P_KZ_JournalEntryItemLdngLdgr | PurchasingDocumentItem | Purchasing Doc. Item | |
| MaterialNameelseendasMaterialName | ||||
| ActivityendasActivity | ||||
| KZ_MaterialSubGroup | P_KZ_BillingMaterialDetails | KZ_MaterialSubGroup | ||
| AnalyticBaseUnit | P_KZ_BillingMaterialDetails | BaseUnit | Unit of Measure | |
| AnalyticBillingQuantity | P_KZ_BillingMaterialDetails | BillingQuantity | Invoiced Qty | |
| AnalyticMaterialName | P_KZ_BillingMaterialDetails | MaterialName | Material Description |
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_KZ_VATRetOutDoc.
-- 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: PKZVATRETOUTDOC
CREATE VIEW P_KZ_VATRetOutDoc AS
SELECT
LogItems.CompanyCode AS CompanyCode,
LogItems.AccountingDocument AS AccountingDocument,
LogItems.FiscalYear AS FiscalYear,
LogItems.TaxCode AS TaxCode,
LogItems.TaxRate AS TaxRate,
LogItems.AmountSign AS AmountSign,
LogItems.NegativeSign AS NegativeSign,
DocumentItem.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
LogItems.TaxBaseAmountInCoCodeCrcy AS TaxBaseAmountInCoCodeCrcy,
LogItems.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy,
abs( LogItems.TaxBaseAmountInCoCodeCrcy ) AS TaxBaseAmountInCoCodeCrcyABS,
abs( DocumentItem.AmountInCompanyCodeCurrency ) AS AmountInCompanyCodeCurrencyABS,
LogItems.TaxBaseAmountInCoCodeCrcy AS TaxBaseAmountInCoCodeCrcyTot,
LogItems.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcyTot,
LogItems.TransactionTypeDetermination AS TransactionTypeDetermination,
LogItems.PostingDate AS PostingDate,
LogItems.TaxReportingDate AS TaxReportingDate,
LogItems.AccountingDocumentType AS AccountingDocumentType,
LogItems.IsReversal AS IsReversal,
LogItems.IsReversed AS IsReversed,
LogItems.OriginalReferenceDocument AS OriginalReferenceDocument,
LogItems.ReferenceDocumentType AS ReferenceDocumentType,
LogItems.DocumentReferenceID AS DocumentReferenceID,
LogItems.BusinessTransactionType AS BusinessTransactionType,
LogItems.SenderLogicalSystem AS SenderLogicalSystem,
LogItems.AccountingDocumentHeaderText AS AccountingDocumentHeaderText,
LogItems.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
LogItems.Reference1InDocumentHeader AS Reference1InDocumentHeader,
LogItems.Reference2InDocumentHeader AS Reference2InDocumentHeader,
LogItems.DocumentItemText AS DocumentItemText,
LogItems.CompanyCodeCurrency AS CompanyCodeCurrency,
LogItems.Currency AS Currency,
LogItems.StatryRptgEntity AS StatryRptgEntity,
LogItems.StatryRptCategory AS StatryRptCategory,
LogItems.StatryRptRunID AS StatryRptRunID,
LogItems.AccountingDocumentItem AS AccountingDocumentItem,
LogItems.KZ_VATReturnSectionType AS KZ_VATReturnSectionType,
BillingMaterial.Material AS Material,
DocumentItem.PurchasingDocument AS PurchasingDocument,
DocumentItem.PurchasingDocumentItem AS PurchasingDocumentItem,
case BillingMaterial.KZ_MaterialSubGroup when 'MIN' then BillingMaterial.MaterialName else '' end as MaterialName AS MaterialNameelseendasMaterialName,
case BillingMaterial.Activity when '' then '1' else BillingMaterial.Activity end as Activity AS ActivityendasActivity,
BillingMaterial.KZ_MaterialSubGroup AS KZ_MaterialSubGroup,
BillingMaterial.BaseUnit AS AnalyticBaseUnit,
BillingMaterial.BillingQuantity AS AnalyticBillingQuantity,
BillingMaterial.MaterialName AS AnalyticMaterialName
LEFT OUTER JOIN P_KZ_JournalEntryItemLdngLdgr AS DocumentItem ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_KZ_BillingMaterialDetails AS BillingMaterial ON /* join condition not captured in parsed metadata */
;
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