C_SalesOrderByMonth
Sales Order by Month
C_SalesOrderByMonth is a Consumption CDS View that provides data about "Sales Order by Month" in SAP S/4HANA. It reads from 2 data sources (I_Customer, I_SalesOrderByMonthCube) and exposes 24 fields with key fields SalesOrder, YearMonth. Part of development package VDM_SD_ANALYTICS.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_Customer | I_Customer | left_outer |
| I_SalesOrderByMonthCube | I_SalesOrderByMonthCube | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_ExchangeRateType | kurst | |
| P_DisplayCurrency | vdm_v_display_currency |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| EndUserText.label | Sales Order by Month | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| AbapCatalog.sqlViewName | CSDSLSORDBYMNTH | view |
Fields (24)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesOrder | SalesOrder | ||
| KEY | YearMonth | |||
| SalesOrderType | SalesOrderType | |||
| CalendarMonth | CalendarMonth | |||
| _CalendarMonth | _CalendarMonth | |||
| CalendarMonthName | ||||
| SoldToParty | SoldToParty | |||
| _SoldToParty | _SoldToParty | |||
| AuthorizationGroup | AuthorizationGroup | |||
| SalesOrganization | SalesOrganization | |||
| _SalesOrganization | _SalesOrganization | |||
| DistributionChannel | DistributionChannel | |||
| _DistributionChannel | _DistributionChannel | |||
| OrganizationDivision | OrganizationDivision | |||
| _OrganizationDivision | _OrganizationDivision | |||
| SalesOffice | SalesOffice | |||
| _SalesOffice | _SalesOffice | |||
| SalesGroup | SalesGroup | |||
| _SalesGroup | _SalesGroup | |||
| DisplayCurrency | DisplayCurrency | |||
| IncomingSalesOrdersNetAmtInDC | IncomingSalesOrdersNetAmtInDC | Net Value of Current Year | ||
| ComprnIncgSlsOrdersNetAmtInDC | ComprnIncgSlsOrdersNetAmtInDC | Net Value of Previous Year | ||
| NumberOfSalesOrders | NumberOfSalesOrders | Number of Current Year | ||
| ComparisonNumberOfSalesOrders | ComparisonNumberOfSalesOrders | Number of Previous Year |
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@EndUserText.label: 'Sales Order by Month'
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@AbapCatalog.sqlViewName: 'CSDSLSORDBYMNTH'
define view C_SalesOrderByMonth
with parameters
@Consumption.defaultValue: 'M'
P_ExchangeRateType: kurst,
P_DisplayCurrency: vdm_v_display_currency
as select from I_SalesOrderByMonthCube(
P_Date: $session.system_date,
P_NumberOfMonths: 4,
P_ExchangeRateType: $parameters.P_ExchangeRateType,
P_DisplayCurrency: $parameters.P_DisplayCurrency
)
left outer join I_Customer
on I_Customer.Customer = I_SalesOrderByMonthCube.SoldToParty
{
key SalesOrder,
// YearMonth,
// The cast is used to fix the UI hover label issue
@Consumption.labelElement: 'CalendarMonthName'
key cast( YearMonth as ovp_year_month ) as YearMonth,
SalesOrderType,
@ObjectModel.foreignKey.association: '_CalendarMonth'
CalendarMonth,
_CalendarMonth,
@Semantics.text: true
_CalendarMonth._Text[1: Language=$session.system_language].CalendarMonthName,
@ObjectModel.foreignKey.association: '_SoldToParty'
// @Consumption.valueHelpDefinition: [ { entity: { name: 'I_Customer_VH', element: 'Customer' } } ]
@Consumption.valueHelpDefinition: [ { entity: { name: 'D_CustomerCVH', element: 'Customer' } } ]
SoldToParty,
_SoldToParty,
@UI.hidden: true
AuthorizationGroup,
@ObjectModel.foreignKey.association: '_SalesOrganization'
SalesOrganization,
_SalesOrganization,
@ObjectModel.foreignKey.association: '_DistributionChannel'
DistributionChannel,
_DistributionChannel,
@ObjectModel.foreignKey.association: '_OrganizationDivision'
OrganizationDivision,
_OrganizationDivision,
@ObjectModel.foreignKey.association: '_SalesOffice'
SalesOffice,
_SalesOffice,
@ObjectModel.foreignKey.association: '_SalesGroup'
SalesGroup,
_SalesGroup,
@Semantics.currencyCode: true
DisplayCurrency,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
@EndUserText.label: 'Net Value of Current Year'
IncomingSalesOrdersNetAmtInDC,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
@EndUserText.label: 'Net Value of Previous Year'
ComprnIncgSlsOrdersNetAmtInDC,
@DefaultAggregation: #SUM
@EndUserText.label: 'Number of Current Year'
NumberOfSalesOrders,
@DefaultAggregation: #SUM
@EndUserText.label: 'Number of Previous Year'
ComparisonNumberOfSalesOrders
}
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