I_SupDmndAllDocRetSlsOrd
View for Return Sales Orders
I_SupDmndAllDocRetSlsOrd is a Basic CDS View that provides data about "View for Return Sales Orders" in SAP S/4HANA. It reads from 7 data sources and exposes 31 fields.
Data Sources (7)
| Source | Alias | Join Type |
|---|---|---|
| kna1 | kna1 | inner |
| I_SupDmndMaterialPlant | marc | inner |
| vbak | vbak | from |
| vbap | vbap | inner |
| vbep | vbep | inner |
| vbkd | vbkd | left_outer |
| I_SDDocumentCompletePartners | vbpa_sp | left_outer |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.sqlViewName | ISUPDMNDADRETSO | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| EndUserText.label | View for Return Sales Orders | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| SupplyNumber | ||||
| SupplyItem | ||||
| SupplyScheduleLine | ||||
| AssignedSupplyType | ||||
| SupAssgmtSource | ||||
| SupplyDeliveryDate | vbep | mbdat | Mat.Avail.Date | |
| ProductAvailabilityDate | vbep | mbdat | Mat.Avail.Date | |
| RequestedDeliveryDate | vbep | mbdat | Mat.Avail.Date | |
| dlvqty_buendasOpenSupplyQuantity | ||||
| BaseUnit | vbap | meins | Valuation Unit | |
| Material | vbap | matnr | Vehicle Model | |
| MaterialGroup | vbap | matkl | Product Sold Group | |
| Plant | vbap | werks | Receiving Plant | |
| OrderType | vbak | auart | Sales Doc. Type | |
| MaterialType | I_SupDmndMaterialPlant | MaterialType | Material Type | |
| StockSegment | vbap | sgt_rcat | Req. Segment | |
| CrossPlantConfigurableProduct | I_SupDmndMaterialPlant | CrossPlantConfigurableProduct | Cross-plant CP | |
| SalesOrganization | vbak | vkorg | SD Sales Org. | |
| DistributionChannel | vbak | vtweg | RefDistCh-Cust/Mat. | |
| Division | vbak | spart | Source supplier | |
| SalesDistrict | vbkd | bzirk | Sales District | |
| PurchasingOrganization | ||||
| PurchasingGroup | ||||
| Batch | ||||
| StorageLocation | ||||
| Customer | ||||
| CompanyCode | vbak | bukrs_vf | CCodeToBeBilled | |
| SDDocumentReason | vbak | augru | Sales Document Reason | |
| SalesDocumentRjcnReason | vbap | abgru | RejectionReason | |
| NetPriceAmount | vbap | netpr | Price | |
| DocumentCurrency | vbap | waerk | Doc. Currency |
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 I_SupDmndAllDocRetSlsOrd.
-- 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 I_SupDmndAllDocRetSlsOrd AS
SELECT
cast(vbap.vbeln as abap.char(12)) AS SupplyNumber,
cast(vbap.posnr as abap.char(6)) AS SupplyItem,
cast(vbep.etenr as abap.char(4)) AS SupplyScheduleLine,
'R' AS AssignedSupplyType,
'R' AS SupAssgmtSource,
vbep.mbdat AS SupplyDeliveryDate,
vbep.mbdat AS ProductAvailabilityDate,
vbep.mbdat AS RequestedDeliveryDate,
case when vbep.umvkn != 0 and vbep.umvkn != 1 then cast( vbep.wmeng * division(vbep.umvkz,vbep.umvkn,3) as ovr_conf_so_sl_qty ) - vbep.dlvqty_bu else vbep.wmeng - vbep.dlvqty_bu end as OpenSupplyQuantity AS dlvqty_buendasOpenSupplyQuantity,
vbap.meins AS BaseUnit,
vbap.matnr AS Material,
vbap.matkl AS MaterialGroup,
vbap.werks AS Plant,
vbak.auart AS OrderType,
marc.MaterialType AS MaterialType,
vbap.sgt_rcat AS StockSegment,
marc.CrossPlantConfigurableProduct AS CrossPlantConfigurableProduct,
vbak.vkorg AS SalesOrganization,
vbak.vtweg AS DistributionChannel,
vbak.spart AS Division,
vbkd.bzirk AS SalesDistrict,
cast('' as ekorg ) AS PurchasingOrganization,
cast('' as ekgrp ) AS PurchasingGroup,
cast('' as charg_d ) AS Batch,
cast('' as lgort_d ) AS StorageLocation,
coalesce( vbpa_sp.Customer, vbak.kunnr ) AS Customer,
vbak.bukrs_vf AS CompanyCode,
vbak.augru AS SDDocumentReason,
vbap.abgru AS SalesDocumentRjcnReason,
vbap.netpr AS NetPriceAmount,
vbap.waerk AS DocumentCurrency
FROM vbak
INNER JOIN vbap ON /* join condition not captured in parsed metadata */
INNER JOIN vbep ON /* join condition not captured in parsed metadata */
INNER JOIN kna1 ON /* join condition not captured in parsed metadata */
INNER JOIN I_SupDmndMaterialPlant AS marc ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN vbkd ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SDDocumentCompletePartners AS vbpa_sp ON /* join condition not captured in parsed metadata */
;
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