I_RO_SAFTPurchaseInvoice
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. Part of development package GLO_LOG_SAFT_RO.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_AccountingDocument | _AccountingDocument | from |
| I_RO_SAFTPurInvoiceSupplier | _Supplier | inner |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| SourceAccountingDocument | I_AccountingDocument | AccountingDocument | ||
| FiscalPeriod | I_AccountingDocument | FiscalPeriod | ||
| FiscalYear | I_AccountingDocument | FiscalYear | ||
| TaxReportingDate | I_AccountingDocument | TaxReportingDate | ||
| InvoiceDate | I_AccountingDocument | DocumentDate | ||
| AccountingDocumentType | I_AccountingDocument | AccountingDocumentType | ||
| AccountingDocCreatedByUser | I_AccountingDocument | AccountingDocCreatedByUser | ||
| DocumentReferenceID | I_AccountingDocument | DocumentReferenceID | ||
| AccountingDocument | _InvLineItem | AccountingDocument | ||
| AccountingDocumentItem | _InvLineItem | AccountingDocumentItem | ||
| AccountingDocumentItemRef | _InvLineItem | AccountingDocumentItemRef | ||
| TargetGLAccount | _InvLineItem | TargetGLAccount | ||
| CompanyCode | _InvLineItem | CompanyCode | ||
| DocumentText | _InvLineItem | DocumentItemText | ||
| SalesOrder | _InvLineItem | SalesOrder | ||
| RO_SAFTAnalysisType | _InvLineItem | RO_SAFTAnalysisType | ||
| CostCenter | _InvLineItem | CostCenter | ||
| SalesOrderDate | _InvLineItem | SalesOrderDate | ||
| OriginSDDocument | _InvLineItem | OriginSDDocument | ||
| Product | _InvLineItem | Product | ||
| ProductDescription | _InvLineItem | ProductDescription | ||
| Quantity | _InvLineItem | Quantity | ||
| ProductPriceUnitQuantity | _InvLineItem | ProductPriceUnitQuantity | ||
| BaseUnit | _InvLineItem | BaseUnit | ||
| SourceUnitOfMeasureFactor | _InvLineItem | SourceUnitOfMeasureFactor | ||
| AlternativeUnit | _InvLineItem | AlternativeUnit | ||
| QuantityNumerator | _InvLineItem | QuantityNumerator | ||
| QuantityDenominator | _InvLineItem | QuantityDenominator | ||
| ConversionFactor | _InvLineItem | ConversionFactor | ||
| MaterialType | _InvLineItem | MaterialType | ||
| TotalAmountInLocalCurrency | _InvLineItem | TotalAmountInLocalCurrency | ||
| TransactionCurrency | _InvLineItem | TransactionCurrency | ||
| TotalAmountInSourceCurrency | _InvLineItem | TotalAmountInSourceCurrency | ||
| TaxAmountInDocCry | _InvLineItem | TaxAmountInDocCry | ||
| ExchangeRate | ||||
| DebitCreditCode | _InvLineItem | DebitCreditCode | ||
| RO_SAFTTaxType | _InvLineItem | RO_SAFTTaxType | ||
| RO_SAFTTaxCode | _InvLineItem | RO_SAFTTaxCode | ||
| TaxRateInPercent | _InvLineItem | TaxRateInPercent | ||
| TaxRate | _InvLineItem | TaxRate | ||
| RO_SAFTTaxBaseDescription | _InvLineItem | RO_SAFTTaxBaseDescription | ||
| TotalTaxAmount | _InvLineItem | TotalTaxAmount | ||
| SDTransactionCurrency | _InvLineItem | SDTransactionCurrency | ||
| TaxAmountInTransCrcy | _InvLineItem | TaxAmountInTransCrcy | ||
| TaxExchangeRate | ||||
| TaxExemptCode | _InvLineItem | TaxExemptCode | ||
| GenerationYear | _InvLineItem | GenerationYear | ||
| PaymentTerms | _PaymentTerm | PaymentTerms | ||
| EvaldReceiptSettlementIsActive | _PaymentTerm | EvaldReceiptSettlementIsActive | ||
| PostingDate | _PaymentTerm | PostingDate | ||
| ActiveSupplier | I_RO_SAFTPurInvoiceSupplier | ActiveSupplier | ||
| VATRegistration | I_RO_SAFTPurInvoiceSupplier | VATRegistration | ||
| StreetName | I_RO_SAFTPurInvoiceSupplier | StreetName | ||
| CityName | I_RO_SAFTPurInvoiceSupplier | CityName | ||
| PostalCode | I_RO_SAFTPurInvoiceSupplier | PostalCode | ||
| Region | I_RO_SAFTPurInvoiceSupplier | Region | ||
| Country | I_RO_SAFTPurInvoiceSupplier | Country | ||
| AddressObjectTypeText | I_RO_SAFTPurInvoiceSupplier | AddressObjectTypeText |
// active core entity
@AbapCatalog: {
sqlViewName: 'IROSAFTPURINV',
preserveKey: true,
compiler.compareFilter:true
}
@VDM.viewType: #COMPOSITE
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #REQUIRED
}
@EndUserText.label: 'RO SAFT Purchase Invoice'
@Analytics.dataCategory: #DIMENSION
@ObjectModel: {
usageType: { sizeCategory: #XXL,
dataClass: #MIXED,
serviceQuality: #D },
supportedCapabilities: [#ANALYTICAL_PROVIDER, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE],
modelingPattern: #ANALYTICAL_CUBE }
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions:true
@Analytics.internalName:#LOCAL
//@Metadata.ignorePropagatedAnnotations: true
define view I_RO_SAFTPurchaseInvoice as select from I_AccountingDocument as _AccountingDocument
inner join I_RO_SAFTPurInvoiceSupplier as _Supplier on _Supplier.AccountingDocument = _AccountingDocument.AccountingDocument
and _Supplier.CompanyCode = _AccountingDocument.CompanyCode
and _Supplier.FiscalYear = _AccountingDocument.FiscalYear
//and _Supplier.EG_TaxType = '6'
association [0..1] to I_RO_SAFTPurInvoiceLineItem as _InvLineItem on _AccountingDocument.AccountingDocument = _InvLineItem.AccountingDocument
and _AccountingDocument.CompanyCode = _InvLineItem.CompanyCode
and _AccountingDocument.FiscalYear = _InvLineItem.FiscalYear
association [0..1] to I_RO_SAFTPurInvcPaymentTerm as _PaymentTerm on _AccountingDocument.AccountingDocument = _PaymentTerm.AccountingDocument
and _AccountingDocument.CompanyCode = _PaymentTerm.CompanyCode
and _AccountingDocument.FiscalYear = _PaymentTerm.FiscalYear
{
_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,
// case
// when _AccountingDocument.AlternativeReferenceDocument is not initial
// then cast(_AccountingDocument.AlternativeReferenceDocument as fis_xblnr_alt_wo_exit preserving type) // as ReferenceDocumentName
// when _AccountingDocument.DocumentReferenceID is not initial
// then _AccountingDocument.DocumentReferenceID
// else
// _AccountingDocument.AccountingDocument
// end as AlternativeReferenceDocument,
concat(
concat( _AccountingDocument.CompanyCode, _AccountingDocument.FiscalYear ),
concat( _AccountingDocument.AccountingDocumentType, _AccountingDocument.AccountingDocument )
) as BusinessTransactionTypeName,
_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.FiscalYear as FiscalYear,
_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,
@Semantics.quantity.unitOfMeasure : 'BaseUnit'
_InvLineItem.Quantity as Quantity,
_InvLineItem.ProductPriceUnitQuantity as ProductPriceUnitQuantity,
_InvLineItem.BaseUnit as BaseUnit,
_InvLineItem.SourceUnitOfMeasureFactor as SourceUnitOfMeasureFactor,
_InvLineItem.AlternativeUnit as AlternativeUnit,
@Semantics.quantity.unitOfMeasure : 'AlternativeUnit'
_InvLineItem.QuantityNumerator as QuantityNumerator,
@Semantics.quantity.unitOfMeasure : 'AlternativeUnit'
_InvLineItem.QuantityDenominator as QuantityDenominator,
_InvLineItem.ConversionFactor as ConversionFactor,
_InvLineItem.MaterialType as MaterialType, //GoodsServicesID
@Semantics.amount.currencyCode : 'TransactionCurrency'
_InvLineItem.TotalAmountInLocalCurrency as TotalAmountInLocalCurrency,
_InvLineItem.TransactionCurrency as TransactionCurrency,
@Semantics.amount.currencyCode : 'TransactionCurrency'
_InvLineItem.TotalAmountInSourceCurrency as TotalAmountInSourceCurrency,
@Semantics.amount.currencyCode : 'TransactionCurrency'
_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,
@Semantics.amount.currencyCode : 'SDTransactionCurrency'
_InvLineItem.TotalTaxAmount as TotalTaxAmount,
_InvLineItem.SDTransactionCurrency as SDTransactionCurrency,
@Semantics.amount.currencyCode : '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.AccountingDocCreatedByUser as AccountingDocCreatedByUser,
_PaymentTerm.PostingDate as PostingDate,
// _PaymentTerm.BusinessTransactionTypeName as BusinessTransactionTypeName,
_Supplier.ActiveSupplier as ActiveSupplier,
// _Supplier.TaxType as VendorTaxType, //Same name as TaxType
_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
}
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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