I_RO_SAFTPurchaseInvoice

DDL: I_RO_SAFTPURCHASEINVOICE Type: view COMPOSITE

RO SAFT Purchase Invoice

I_RO_SAFTPurchaseInvoice is a Composite CDS View (Dimension) that provides data about "RO SAFT Purchase Invoice" in SAP S/4HANA. It reads from 2 data sources (I_AccountingDocument, I_RO_SAFTPurInvoiceSupplier) and exposes 58 fields. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_AccountingDocument _AccountingDocument from
I_RO_SAFTPurInvoiceSupplier _Supplier inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_RO_SAFTPurInvoiceLineItem _InvLineItem _AccountingDocument.AccountingDocument = _InvLineItem.AccountingDocument and _AccountingDocument.CompanyCode = _InvLineItem.CompanyCode and _AccountingDocument.FiscalYear = _InvLineItem.FiscalYear
[0..1] I_RO_SAFTPurInvcPaymentTerm _PaymentTerm _AccountingDocument.AccountingDocument = _PaymentTerm.AccountingDocument and _AccountingDocument.CompanyCode = _PaymentTerm.CompanyCode and _AccountingDocument.FiscalYear = _PaymentTerm.FiscalYear

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName IROSAFTPURINV view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label RO SAFT Purchase Invoice view
Analytics.dataCategory #DIMENSION view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.allowExtensions true view
Analytics.internalName #LOCAL view

Fields (58)

KeyFieldSource TableSource FieldDescription
SourceAccountingDocument I_AccountingDocument AccountingDocument Journal Entry
FiscalPeriod I_AccountingDocument FiscalPeriod Tax period
FiscalYear I_AccountingDocument FiscalYear G/L Fiscal Year
TaxReportingDate I_AccountingDocument TaxReportingDate Tax Reporting Date
InvoiceDate I_AccountingDocument DocumentDate Journal Entry Date
AccountingDocumentType I_AccountingDocument AccountingDocumentType Journal Entry Type
AccountingDocCreatedByUser I_AccountingDocument AccountingDocCreatedByUser User which created overhead document
DocumentReferenceID I_AccountingDocument DocumentReferenceID Reference
AccountingDocument _InvLineItem AccountingDocument Journal Entry
AccountingDocumentItem _InvLineItem AccountingDocumentItem Posting View Item
AccountingDocumentItemRef _InvLineItem AccountingDocumentItemRef Position
TargetGLAccount _InvLineItem TargetGLAccount G/L Account
CompanyCode _InvLineItem CompanyCode Receiver Company Code
DocumentText _InvLineItem DocumentItemText Text
SalesOrder _InvLineItem SalesOrder SD Document
RO_SAFTAnalysisType _InvLineItem RO_SAFTAnalysisType
CostCenter _InvLineItem CostCenter Cost Center
SalesOrderDate _InvLineItem SalesOrderDate Document Date
OriginSDDocument _InvLineItem OriginSDDocument Originating Doc
Product _InvLineItem Product Product Sold
ProductDescription _InvLineItem ProductDescription Description
Quantity _InvLineItem Quantity Value
ProductPriceUnitQuantity _InvLineItem ProductPriceUnitQuantity
BaseUnit _InvLineItem BaseUnit Unit of Measure
SourceUnitOfMeasureFactor _InvLineItem SourceUnitOfMeasureFactor
AlternativeUnit _InvLineItem AlternativeUnit Base UoM
QuantityNumerator _InvLineItem QuantityNumerator Units / Quantity - Base Unit of Measure
QuantityDenominator _InvLineItem QuantityDenominator Units / Quantity - Alt Unit of Measure
ConversionFactor _InvLineItem ConversionFactor
MaterialType _InvLineItem MaterialType Material Type
TotalAmountInLocalCurrency _InvLineItem TotalAmountInLocalCurrency RNPT Item Amount
TransactionCurrency _InvLineItem TransactionCurrency Transaction Currency
TotalAmountInSourceCurrency _InvLineItem TotalAmountInSourceCurrency
TaxAmountInDocCry _InvLineItem TaxAmountInDocCry
ExchangeRate
DebitCreditCode _InvLineItem DebitCreditCode Single-Character Flag
RO_SAFTTaxType _InvLineItem RO_SAFTTaxType
RO_SAFTTaxCode _InvLineItem RO_SAFTTaxCode
TaxRateInPercent _InvLineItem TaxRateInPercent
TaxRate _InvLineItem TaxRate Tax Rate
RO_SAFTTaxBaseDescription _InvLineItem RO_SAFTTaxBaseDescription
TotalTaxAmount _InvLineItem TotalTaxAmount Tax Amount
SDTransactionCurrency _InvLineItem SDTransactionCurrency
TaxAmountInTransCrcy _InvLineItem TaxAmountInTransCrcy TaxAmt in Tran. Crcy
TaxExchangeRate
TaxExemptCode _InvLineItem TaxExemptCode
GenerationYear _InvLineItem GenerationYear
PaymentTerms _PaymentTerm PaymentTerms Pyt Terms
EvaldReceiptSettlementIsActive _PaymentTerm EvaldReceiptSettlementIsActive ERS
PostingDate _PaymentTerm PostingDate Posting Date for GR
ActiveSupplier I_RO_SAFTPurInvoiceSupplier ActiveSupplier Vendor no.
VATRegistration I_RO_SAFTPurInvoiceSupplier VATRegistration VAT Registration No.
StreetName I_RO_SAFTPurInvoiceSupplier StreetName Text
CityName I_RO_SAFTPurInvoiceSupplier CityName Name
PostalCode I_RO_SAFTPurInvoiceSupplier PostalCode Postal Code
Region I_RO_SAFTPurInvoiceSupplier Region Venue Region
Country I_RO_SAFTPurInvoiceSupplier Country Venue: Ctry/Reg
AddressObjectTypeText I_RO_SAFTPurInvoiceSupplier AddressObjectTypeText

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_RO_SAFTPurchaseInvoice.
-- 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.

CREATE VIEW I_RO_SAFTPurchaseInvoice AS
SELECT
  _AccountingDocument.AccountingDocument AS SourceAccountingDocument,
  _AccountingDocument.FiscalPeriod AS FiscalPeriod,
  _AccountingDocument.FiscalYear AS FiscalYear,
  _AccountingDocument.TaxReportingDate AS TaxReportingDate,
  _AccountingDocument.DocumentDate AS InvoiceDate,
  _AccountingDocument.AccountingDocumentType AS AccountingDocumentType,
  _AccountingDocument.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
  _AccountingDocument.DocumentReferenceID AS DocumentReferenceID,
  _InvLineItem.AccountingDocument AS AccountingDocument,
  _InvLineItem.AccountingDocumentItem AS AccountingDocumentItem,
  _InvLineItem.AccountingDocumentItemRef AS AccountingDocumentItemRef,
  _InvLineItem.TargetGLAccount AS TargetGLAccount,
  _InvLineItem.CompanyCode AS CompanyCode,
  _InvLineItem.DocumentItemText AS DocumentText,
  _InvLineItem.SalesOrder AS SalesOrder,
  _InvLineItem.RO_SAFTAnalysisType AS RO_SAFTAnalysisType,
  _InvLineItem.CostCenter AS CostCenter,
  _InvLineItem.SalesOrderDate AS SalesOrderDate,
  _InvLineItem.OriginSDDocument AS OriginSDDocument,
  _InvLineItem.Product AS Product,
  _InvLineItem.ProductDescription AS ProductDescription,
  _InvLineItem.Quantity AS Quantity,
  _InvLineItem.ProductPriceUnitQuantity AS ProductPriceUnitQuantity,
  _InvLineItem.BaseUnit AS BaseUnit,
  _InvLineItem.SourceUnitOfMeasureFactor AS SourceUnitOfMeasureFactor,
  _InvLineItem.AlternativeUnit AS AlternativeUnit,
  _InvLineItem.QuantityNumerator AS QuantityNumerator,
  _InvLineItem.QuantityDenominator AS QuantityDenominator,
  _InvLineItem.ConversionFactor AS ConversionFactor,
  _InvLineItem.MaterialType AS MaterialType,
  _InvLineItem.TotalAmountInLocalCurrency AS TotalAmountInLocalCurrency,
  _InvLineItem.TransactionCurrency AS TransactionCurrency,
  _InvLineItem.TotalAmountInSourceCurrency AS TotalAmountInSourceCurrency,
  _InvLineItem.TaxAmountInDocCry AS TaxAmountInDocCry,
  cast(round(_InvLineItem.ExchangeRate, 4) as saft_ro_exchange_rate) AS ExchangeRate,
  _InvLineItem.DebitCreditCode AS DebitCreditCode,
  _InvLineItem.RO_SAFTTaxType AS RO_SAFTTaxType,
  _InvLineItem.RO_SAFTTaxCode AS RO_SAFTTaxCode,
  _InvLineItem.TaxRateInPercent AS TaxRateInPercent,
  _InvLineItem.TaxRate AS TaxRate,
  _InvLineItem.RO_SAFTTaxBaseDescription AS RO_SAFTTaxBaseDescription,
  _InvLineItem.TotalTaxAmount AS TotalTaxAmount,
  _InvLineItem.SDTransactionCurrency AS SDTransactionCurrency,
  _InvLineItem.TaxAmountInTransCrcy AS TaxAmountInTransCrcy,
  cast(round(_InvLineItem.ExchangeRate, 4) as saft_ro_exchange_rate) AS TaxExchangeRate,
  _InvLineItem.TaxExemptCode AS TaxExemptCode,
  _InvLineItem.GenerationYear AS GenerationYear,
  _PaymentTerm.PaymentTerms AS PaymentTerms,
  _PaymentTerm.EvaldReceiptSettlementIsActive AS EvaldReceiptSettlementIsActive,
  _PaymentTerm.PostingDate AS PostingDate,
  _Supplier.ActiveSupplier AS ActiveSupplier,
  _Supplier.VATRegistration AS VATRegistration,
  _Supplier.StreetName AS StreetName,
  _Supplier.CityName AS CityName,
  _Supplier.PostalCode AS PostalCode,
  _Supplier.Region AS Region,
  _Supplier.Country AS Country,
  _Supplier.AddressObjectTypeText AS AddressObjectTypeText
FROM I_AccountingDocument AS _AccountingDocument
INNER JOIN I_RO_SAFTPurInvoiceSupplier AS _Supplier ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_RO_SAFTPurInvoiceLineItem AS _InvLineItem ON _AccountingDocument.AccountingDocument = _InvLineItem.AccountingDocument AND _AccountingDocument.CompanyCode = _InvLineItem.CompanyCode AND _AccountingDocument.FiscalYear = _InvLineItem.FiscalYear  -- association [0..1]
LEFT OUTER JOIN I_RO_SAFTPurInvcPaymentTerm AS _PaymentTerm ON _AccountingDocument.AccountingDocument = _PaymentTerm.AccountingDocument AND _AccountingDocument.CompanyCode = _PaymentTerm.CompanyCode AND _AccountingDocument.FiscalYear = _PaymentTerm.FiscalYear  -- association [0..1]
;