C_StRpSalesInvoiceCube
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)
| Source | Alias | Join Type |
|---|---|---|
| P_StRpSalesInvoiceItem | P_StRpSalesInvoiceItem | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | datum |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | C_ProdCommodityCodeForKeyDate | _CommodityCode | P_StRpSalesInvoiceItem.Material = _CommodityCode.Product and P_StRpSalesInvoiceItem.Country = _CommodityCode.Country and P_StRpSalesInvoiceItem.ValidityStartDate = _CommodityCode.ValidityStartDate |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
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