C_StRpSalesInvoiceCube

DDL: C_STRPSALESINVOICECUBE SQL: CSALEINVLCUBE Type: view CONSUMPTION

Consumption view for TR Sales list

C_StRpSalesInvoiceCube is a Consumption CDS View (Cube) that provides data about "Consumption view for TR Sales list" in SAP S/4HANA. It reads from 1 data source (P_StRpSalesInvoiceItem) and exposes 21 fields with key fields CompanyCode, BillingDocument, BillingDocumentItem, FiscalYear, StatryRptCategory. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
P_StRpSalesInvoiceItem P_StRpSalesInvoiceItem from

Parameters (1)

NameTypeDefault
P_KeyDate datum

Associations (1)

CardinalityTargetAliasCondition
[0..1] C_ProdCommodityCodeForKeyDate _CommodityCode P_StRpSalesInvoiceItem.Material = _CommodityCode.Product and P_StRpSalesInvoiceItem.Country = _CommodityCode.Country and P_StRpSalesInvoiceItem.ValidityStartDate = _CommodityCode.ValidityStartDate

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CSALEINVLCUBE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Consumption view for TR Sales list view
VDM.viewType #CONSUMPTION view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.allowExtensions true view
AccessControl.blocking #BLOCKED_DATA_INCLUDED view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY BillingDocument BillingDocument SD Document
KEY BillingDocumentItem BillingDocumentItem Item
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY StatryRptCategory StatryRptCategory Report ID
KEY StatryRptgEntity StatryRptgEntity Reporting Entity
KEY StatryRptRunID StatryRptRunID Report Run ID
KEY AccountingDocument AccountingDocument Journal Entry
PayerParty PayerParty Payer
CustomerCountry CustomerCountry Venue: Ctry/Reg
DocumentReferenceID DocumentReferenceID Reference
BillingDocumentDate BillingDocumentDate Billing Date
Material Material Vehicle Model
Plant Plant Valuation Area
Country P_StRpSalesInvoiceItem Country Venue: Ctry/Reg
CommodityCode
CustomerName CustomerName Name of Customer
BillingQuantityUnit BillingQuantityUnit Sales Unit
Quantity Quantity Value
ValidityStartDateendasValidityStartDate
UnitOfMeasureLongName _UnitofMeasure UnitOfMeasureLongName

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 C_StRpSalesInvoiceCube.
-- 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: CSALEINVLCUBE
-- Parameters: P_KeyDate : datum

CREATE VIEW C_StRpSalesInvoiceCube AS
SELECT
  CompanyCode,
  BillingDocument,
  BillingDocumentItem,
  FiscalYear,
  StatryRptCategory,
  StatryRptgEntity,
  StatryRptRunID,
  AccountingDocument,
  PayerParty,
  CustomerCountry,
  DocumentReferenceID,
  BillingDocumentDate,
  Material,
  Plant,
  P_StRpSalesInvoiceItem.Country AS Country,
  _CommodityCode(P_KeyDate:$parameters.P_KeyDate).CommodityCode AS CommodityCode,
  CustomerName,
  BillingQuantityUnit,
  Quantity,
  case when P_StRpSalesInvoiceItem.ValidityStartDate is initial or P_StRpSalesInvoiceItem.ValidityStartDate = '00000000' or P_StRpSalesInvoiceItem.ValidityStartDate = ' ' then MeterReadingSystemDate else P_StRpSalesInvoiceItem.ValidityStartDate end as ValidityStartDate AS ValidityStartDateendasValidityStartDate,
  _UnitofMeasure.UnitOfMeasureLongName AS UnitOfMeasureLongName
FROM P_StRpSalesInvoiceItem
LEFT OUTER JOIN C_ProdCommodityCodeForKeyDate AS _CommodityCode ON P_StRpSalesInvoiceItem.Material = _CommodityCode.Product AND P_StRpSalesInvoiceItem.Country = _CommodityCode.Country AND P_StRpSalesInvoiceItem.ValidityStartDate = _CommodityCode.ValidityStartDate  -- association [0..1]
;