P_RU_VatSalesPurchaseLedgers5
P_RU_VatSalesPurchaseLedgers5 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, P_RU_VatReversalDocument1). It has 6 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_OperationalAcctgDocItem | BusinessPartnerItem | left_outer |
| P_RU_VatReversalDocument1 | P_RU_VatReversalDocument1 | left_outer |
Parameters (5)
| Name | Type | Default |
|---|---|---|
| P_StatryRptgEntity | srf_reporting_entity | |
| P_StatryRptCategory | srf_rep_cat_id | |
| P_StatryRptRunID | srf_report_run_id | |
| P_StartDate | datum | |
| P_EndDate | datum |
Associations (6)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_RU_ExtInvoiceTotalAmount | _ExtOriginalDocumentAmount | $projection.CompanyCode = _ExtOriginalDocumentAmount.CompanyCode and $projection.ExternalOriginalDocument = _ExtOriginalDocumentAmount.ExternalAccountingDocument and $projection.ExternalAcctgDocumentDate = _ExtOriginalDocumentAmount.ExternalAcctgDocumentDate |
| [0..1] | P_RU_BSET | _VatInTransitAmount | $projection.CompanyCode = _VatInTransitAmount.CompanyCode and $projection.OriginalDocument = _VatInTransitAmount.AccountingDocument and $projection.OriginalDocumentYear = _VatInTransitAmount.FiscalYear and $projection.TaxCode = _VatInTransitAmount.TaxCode |
| [0..1] | I_RU_ReverseDocuments | ReverseDocument | ReverseDocument.CompanyCode = VatSalesPurchaseLedgers.CompanyCode and ReverseDocument.AccountingDocument = VatSalesPurchaseLedgers.AccountingDocument and ReverseDocument.FiscalYear = VatSalesPurchaseLedgers.FiscalYear |
| [0..1] | I_SupplierInvoice | _SupplierInvoice | _SupplierInvoice.SupplierInvoice = VatSalesPurchaseLedgers.ReferenceDocumentNumber and _SupplierInvoice.FiscalYear = VatSalesPurchaseLedgers.ReferenceDocumentYear |
| [0..1] | I_RU_ImprtCstmsDecln | _ImprtCstmsDecln | _ImprtCstmsDecln.ImportCustomsDecln = VatSalesPurchaseLedgers.ReferenceDocumentNumber and _ImprtCstmsDecln.ImportCustomsDeclnItem = '00001' |
| [0..1] | I_RU_ImprtCstmsDecln | _ImprtCstmsDeclnMM | _ImprtCstmsDeclnMM.ImportCustomsDecln = VatSalesPurchaseLedgers.ImportCustomsDecln and _ImprtCstmsDeclnMM.ImportCustomsDeclnItem = '00001' |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | PRUVATSPLD5 | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
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_RU_VatSalesPurchaseLedgers5.
-- 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: PRUVATSPLD5
-- Parameters: P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id, P_StartDate : datum, P_EndDate : datum
CREATE VIEW P_RU_VatSalesPurchaseLedgers5 AS
SELECT * -- field list not available in parsed metadata
LEFT OUTER JOIN P_RU_VatReversalDocument1 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_OperationalAcctgDocItem AS BusinessPartnerItem ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_RU_ExtInvoiceTotalAmount AS _ExtOriginalDocumentAmount ON CompanyCode = _ExtOriginalDocumentAmount.CompanyCode AND ExternalOriginalDocument = _ExtOriginalDocumentAmount.ExternalAccountingDocument AND ExternalAcctgDocumentDate = _ExtOriginalDocumentAmount.ExternalAcctgDocumentDate -- association [0..1]
LEFT OUTER JOIN P_RU_BSET AS _VatInTransitAmount ON CompanyCode = _VatInTransitAmount.CompanyCode AND OriginalDocument = _VatInTransitAmount.AccountingDocument AND OriginalDocumentYear = _VatInTransitAmount.FiscalYear AND TaxCode = _VatInTransitAmount.TaxCode -- association [0..1]
LEFT OUTER JOIN I_RU_ReverseDocuments AS ReverseDocument ON ReverseDocument.CompanyCode = VatSalesPurchaseLedgers.CompanyCode AND ReverseDocument.AccountingDocument = VatSalesPurchaseLedgers.AccountingDocument AND ReverseDocument.FiscalYear = VatSalesPurchaseLedgers.FiscalYear -- association [0..1]
LEFT OUTER JOIN I_SupplierInvoice AS _SupplierInvoice ON _SupplierInvoice.SupplierInvoice = VatSalesPurchaseLedgers.ReferenceDocumentNumber AND _SupplierInvoice.FiscalYear = VatSalesPurchaseLedgers.ReferenceDocumentYear -- association [0..1]
LEFT OUTER JOIN I_RU_ImprtCstmsDecln AS _ImprtCstmsDecln ON _ImprtCstmsDecln.ImportCustomsDecln = VatSalesPurchaseLedgers.ReferenceDocumentNumber AND _ImprtCstmsDecln.ImportCustomsDeclnItem = '00001' -- association [0..1]
LEFT OUTER JOIN I_RU_ImprtCstmsDecln AS _ImprtCstmsDeclnMM ON _ImprtCstmsDeclnMM.ImportCustomsDecln = VatSalesPurchaseLedgers.ImportCustomsDecln AND _ImprtCstmsDeclnMM.ImportCustomsDeclnItem = '00001' -- 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