P_RU_VatSalesPurchaseLedgers5

DDL: P_RU_VATSALESPURCHASELEDGERS5 SQL: PRUVATSPLD5 Type: view CONSUMPTION

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)

SourceAliasJoin Type
I_OperationalAcctgDocItem BusinessPartnerItem left_outer
P_RU_VatReversalDocument1 P_RU_VatReversalDocument1 left_outer

Parameters (5)

NameTypeDefault
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)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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]
;