R_CustomerMaterialDraft
Customer Material - Draft
R_CustomerMaterialDraft is a Basic CDS View that provides data about "Customer Material - Draft" in SAP S/4HANA. It reads from 2 data sources (sdcustmat_d, sdraft_admin) and exposes 35 fields with key fields SalesOrganization, DistributionChannel, Product, Customer, DraftUUID. It has 2 associations to related views. Part of development package RAP_SD_CUSTOMER_MATERIAL.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| sdcustmat_d | CustomerMaterialDraft | from |
| sdraft_admin | sdraft_admin | inner |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Customer | _Customer | $projection.Customer = _Customer.Customer |
| [0..1] | E_CustomerMaterialDraft | _Extension | $projection.Product = _Extension.Material and $projection.Customer = _Extension.Customer and $projection.SalesOrganization = _Extension.SalesOrganization and $projection.DistributionChannel = _Extension.DistributionChannel and $projection.DraftUUID = _Extension.DraftUUID |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| EndUserText.label | Customer Material - Draft | view | |
| AbapCatalog.dataMaintenance | #RESTRICTED | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AbapCatalog.extensibility.extensible | true | view | |
| AbapCatalog.extensibility.elementSuffix | CMR | view | |
| AbapCatalog.extensibility.quota.maximumFields | 170 | view | |
| AbapCatalog.extensibility.quota.maximumBytes | 3400 | view |
Fields (35)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesOrganization | sdcustmat_d | salesorganization | Sales Organization |
| KEY | DistributionChannel | sdcustmat_d | distributionchannel | RefDistCh-Cust/Mat. |
| KEY | Product | sdcustmat_d | product | Product Sold |
| KEY | Customer | sdcustmat_d | customer | Sold-to Party |
| KEY | DraftUUID | sdcustmat_d | draftuuid | UUID |
| SalesOrganizationForEdit | sdcustmat_d | salesorganizationforedit | Sales Org. | |
| DistributionChannelForEdit | sdcustmat_d | distributionchannelforedit | RefDistCh-Cust/Mat. | |
| CustomerForEdit | sdcustmat_d | customerforedit | Customer | |
| ProductForEdit | sdcustmat_d | productforedit | Product | |
| MaterialByCustomer | sdcustmat_d | materialbycustomer | Customer Mat. | |
| MaterialDescriptionByCustomer | sdcustmat_d | materialdescriptionbycustomer | Customer Descr. | |
| CustomerMaterialSearchTerm | sdcustmat_d | customermaterialsearchterm | Search term | |
| RoundingProfile | sdcustmat_d | roundingprofile | Rnding Profile | |
| Plant | sdcustmat_d | plant | Valuation Area | |
| DeliveryPriority | sdcustmat_d | deliverypriority | Delivery Prior. | |
| MinDeliveryQtyInBaseUnit | sdcustmat_d | mindeliveryqtyinbaseunit | Min. Dely Qty | |
| BaseUnit | sdcustmat_d | baseunit | Unit of Measure | |
| PartialDeliveryIsAllowed | sdcustmat_d | partialdeliveryisallowed | Partial Deliv. | |
| MaxNmbrOfPartialDelivery | sdcustmat_d | maxnmbrofpartialdelivery | Max.Part.Deliv. | |
| UnderdelivTolrtdLmtRatioInPct | sdcustmat_d | underdelivtolrtdlmtratioinpct | Underdel. Tol. | |
| OverdelivTolrtdLmtRatioInPct | sdcustmat_d | overdelivtolrtdlmtratioinpct | Overdeliv. Tol. | |
| UnlimitedOverdeliveryIsAllowed | sdcustmat_d | unlimitedoverdeliveryisallowed | Unlimited Tol. | |
| CustomerMaterialItemUsage | sdcustmat_d | customermaterialitemusage | Item Usage | |
| SalesUnit | sdcustmat_d | salesunit | Unit | |
| SalesQtyToBaseQtyDnmntr | sdcustmat_d | salesqtytobaseqtydnmntr | Denominat. | |
| SalesQtyToBaseQtyNmrtr | sdcustmat_d | salesqtytobaseqtynmrtr | Numerator | |
| LastChangedByUser | sdcustmat_d | lastchangedbyuser | User Name | |
| LastChangeDateTime | sdcustmat_d | lastchangedatetime | Timestamp | |
| DraftEntityCreationDateTime | sdcustmat_d | draftentitycreationdatetime | Draft Created On | |
| DraftEntityLastChangeDateTime | sdcustmat_d | draftentitylastchangedatetime | Draft Last Changed On | |
| DraftAdministrativeDataUUID | sdcustmat_d | draftadministrativedatauuid | UUID | |
| DraftEntityOperationCode | sdcustmat_d | draftentityoperationcode | Draft - Operation Code | |
| HasActiveEntity | sdcustmat_d | hasactiveentity | TRUE | |
| DraftFieldChanges | sdcustmat_d | draftfieldchanges | Field Changes | |
| _Customer | _Customer |
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 R_CustomerMaterialDraft.
-- 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.
CREATE VIEW R_CustomerMaterialDraft AS
SELECT
CustomerMaterialDraft.salesorganization AS SalesOrganization,
CustomerMaterialDraft.distributionchannel AS DistributionChannel,
CustomerMaterialDraft.product AS Product,
CustomerMaterialDraft.customer AS Customer,
CustomerMaterialDraft.draftuuid AS DraftUUID,
CustomerMaterialDraft.salesorganizationforedit AS SalesOrganizationForEdit,
CustomerMaterialDraft.distributionchannelforedit AS DistributionChannelForEdit,
CustomerMaterialDraft.customerforedit AS CustomerForEdit,
CustomerMaterialDraft.productforedit AS ProductForEdit,
CustomerMaterialDraft.materialbycustomer AS MaterialByCustomer,
CustomerMaterialDraft.materialdescriptionbycustomer AS MaterialDescriptionByCustomer,
CustomerMaterialDraft.customermaterialsearchterm AS CustomerMaterialSearchTerm,
CustomerMaterialDraft.roundingprofile AS RoundingProfile,
CustomerMaterialDraft.plant AS Plant,
CustomerMaterialDraft.deliverypriority AS DeliveryPriority,
CustomerMaterialDraft.mindeliveryqtyinbaseunit AS MinDeliveryQtyInBaseUnit,
CustomerMaterialDraft.baseunit AS BaseUnit,
CustomerMaterialDraft.partialdeliveryisallowed AS PartialDeliveryIsAllowed,
CustomerMaterialDraft.maxnmbrofpartialdelivery AS MaxNmbrOfPartialDelivery,
CustomerMaterialDraft.underdelivtolrtdlmtratioinpct AS UnderdelivTolrtdLmtRatioInPct,
CustomerMaterialDraft.overdelivtolrtdlmtratioinpct AS OverdelivTolrtdLmtRatioInPct,
CustomerMaterialDraft.unlimitedoverdeliveryisallowed AS UnlimitedOverdeliveryIsAllowed,
CustomerMaterialDraft.customermaterialitemusage AS CustomerMaterialItemUsage,
CustomerMaterialDraft.salesunit AS SalesUnit,
CustomerMaterialDraft.salesqtytobaseqtydnmntr AS SalesQtyToBaseQtyDnmntr,
CustomerMaterialDraft.salesqtytobaseqtynmrtr AS SalesQtyToBaseQtyNmrtr,
CustomerMaterialDraft.lastchangedbyuser AS LastChangedByUser,
CustomerMaterialDraft.lastchangedatetime AS LastChangeDateTime,
CustomerMaterialDraft.draftentitycreationdatetime AS DraftEntityCreationDateTime,
CustomerMaterialDraft.draftentitylastchangedatetime AS DraftEntityLastChangeDateTime,
CustomerMaterialDraft.draftadministrativedatauuid AS DraftAdministrativeDataUUID,
CustomerMaterialDraft.draftentityoperationcode AS DraftEntityOperationCode,
CustomerMaterialDraft.hasactiveentity AS HasActiveEntity,
CustomerMaterialDraft.draftfieldchanges AS DraftFieldChanges
FROM sdcustmat_d AS CustomerMaterialDraft
INNER JOIN sdraft_admin ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer -- association [0..1]
LEFT OUTER JOIN E_CustomerMaterialDraft AS _Extension ON Product = _Extension.Material AND Customer = _Extension.Customer AND SalesOrganization = _Extension.SalesOrganization AND DistributionChannel = _Extension.DistributionChannel AND DraftUUID = _Extension.DraftUUID -- 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