C_SlsDocItemCustomerMaterialVH
Customer Material
C_SlsDocItemCustomerMaterialVH is a Consumption CDS View that provides data about "Customer Material" in SAP S/4HANA. It reads from 3 data sources (I_CustomerMaterial_2, I_Product, I_ProductSalesDelivery) and exposes 9 fields with key fields MaterialByCustomer, Customer, Material, SalesOrganization, DistributionChannel. Part of development package ODATA_SD_S4H_COMMON.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CustomerMaterial_2 | CustomerMaterial | from |
| I_Product | Product | inner |
| I_ProductSalesDelivery | ProductSalesDelivery | inner |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CSLSITMCUSTMATVH | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Search.searchable | true | view | |
| Consumption.ranked | true | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.dataCategory | #VALUE_HELP | view | |
| EndUserText.label | Customer Material | view |
Fields (9)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialByCustomer | I_CustomerMaterial_2 | MaterialByCustomer | |
| KEY | Customer | I_CustomerMaterial_2 | Customer | |
| KEY | Material | I_CustomerMaterial_2 | Product | |
| KEY | SalesOrganization | I_CustomerMaterial_2 | SalesOrganization | |
| KEY | DistributionChannel | I_CustomerMaterial_2 | DistributionChannel | |
| MaterialDescriptionByCustomer | I_CustomerMaterial_2 | MaterialDescriptionByCustomer | Customer Material Description | |
| BaseUnit | I_Product | BaseUnit | ||
| SalesMeasureUnit | I_ProductSalesDelivery | SalesMeasureUnit | ||
| _Customer | _Customer |
@AbapCatalog: {
sqlViewName: 'CSLSITMCUSTMATVH',
compiler.compareFilter: true,
preserveKey: true }
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@Search: {
searchable: true
}
@Consumption.ranked: true
@ObjectModel:{
usageType:{
dataClass: #MASTER,
serviceQuality: #B,
sizeCategory: #L },
dataCategory: #VALUE_HELP
}
@EndUserText.label: 'Customer Material'
define view C_SlsDocItemCustomerMaterialVH
as select from I_CustomerMaterial_2 as CustomerMaterial
inner join I_ProductSalesDelivery as ProductSalesDelivery on CustomerMaterial.Product = ProductSalesDelivery.Product
and CustomerMaterial.SalesOrganization = ProductSalesDelivery.ProductSalesOrg
and CustomerMaterial.DistributionChannel = ProductSalesDelivery.ProductDistributionChnl
inner join I_Product as Product on CustomerMaterial.Product = Product.Product
{
@Search: {
defaultSearchElement: true,
ranking: #HIGH,
fuzzinessThreshold: 0.8
}
@UI.lineItem: [{ position: 10, importance: #HIGH }]
key CustomerMaterial.MaterialByCustomer,
key CustomerMaterial.Customer,
key CustomerMaterial.Product as Material,
key CustomerMaterial.SalesOrganization,
key CustomerMaterial.DistributionChannel,
@Search: {
defaultSearchElement: true,
ranking: #LOW,
fuzzinessThreshold: 0.8
}
@EndUserText.label: 'Customer Material Description'
@UI.lineItem: [{ position: 20, importance: #HIGH }]
CustomerMaterial.MaterialDescriptionByCustomer,
@Consumption.hidden: true
Product.BaseUnit,
@Consumption.hidden: true
ProductSalesDelivery.SalesMeasureUnit,
@Consumption.filter.hidden: true
@EndUserText.label: 'Sales Unit'
@UI.lineItem: [{ position: 30, importance: #HIGH }]
cast( case
when CustomerMaterial.SalesUnit is not initial
then CustomerMaterial.SalesUnit
when ProductSalesDelivery.SalesMeasureUnit is not initial
then ProductSalesDelivery.SalesMeasureUnit
else
Product.BaseUnit
end as reqd_qty_unit ) as RequestedQuantityUnit,
_Customer
}
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