I_SupDmndAllDocRetSlsOrd

DDL: I_SUPDMNDALLDOCRETSLSORD Type: view BASIC

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)

SourceAliasJoin 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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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 */
;