Arun_Stock_Sel

DDL: ARUN_STOCK_SEL SQL: ARUN_V_STOCK_SEL Type: view

Stock Selection for Supply Assignment

Arun_Stock_Sel is a CDS View that provides data about "Stock Selection for Supply Assignment" in SAP S/4HANA. It reads from 4 data sources (Arun_Stock_Bdbs, mara, Arun_Stock_Lines, Arun_Open_Delivery) and exposes 21 fields.

Data Sources (4)

SourceAliasJoin Type
Arun_Stock_Bdbs b left_outer
mara m left_outer
Arun_Stock_Lines s from
Arun_Open_Delivery v left_outer

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName ARUN_V_STOCK_SEL view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label Stock Selection for Supply Assignment view

Fields (21)

KeyFieldSource TableSource FieldDescription
Material Arun_Stock_Lines Material Vehicle Model
Plant Arun_Stock_Lines Plant Valuation Area
CompanyCode Arun_Stock_Lines CompanyCode Receiver Company Code
StorageLocation Arun_Stock_Lines StorageLocation StorageLocation
Batch Arun_Stock_Lines Batch Lot No.
Supplier Arun_Stock_Lines Supplier Supplier
ShelfExpDate Arun_Stock_Lines ShelfExpDate SLED/BBD
MfgDate Arun_Stock_Lines MfgDate Date of Manuf.
BatchCreationDate Arun_Stock_Lines BatchCreationDate Entry Date
LastGRDate Arun_Stock_Lines LastGRDate Last goods rec.
StockSegment Arun_Stock_Lines StockSegment Stock Segment
SeasonYear Arun_Stock_Lines SeasonYear Season Year
Season Arun_Stock_Lines Season Season
SCollection Arun_Stock_Lines SCollection Collection
Theme Arun_Stock_Lines Theme Theme
StockQty Arun_Stock_Lines StockQty
StockSource
StockQtyendendasOpenStockQty
MaterialBaseUnit Arun_Stock_Lines MaterialBaseUnit Valuation Unit
ArunFixBatch Arun_Stock_Lines ArunFixBatch Assign Batches
SegmentStrategy Arun_Stock_Lines SegmentStrategy Segment. Strategy

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 Arun_Stock_Sel.
-- 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.
-- SQL view name: ARUN_V_STOCK_SEL

CREATE VIEW Arun_Stock_Sel AS
SELECT
  s.Material AS Material,
  s.Plant AS Plant,
  s.CompanyCode AS CompanyCode,
  s.StorageLocation AS StorageLocation,
  s.Batch AS Batch,
  s.Supplier AS Supplier,
  s.ShelfExpDate AS ShelfExpDate,
  s.MfgDate AS MfgDate,
  s.BatchCreationDate AS BatchCreationDate,
  s.LastGRDate AS LastGRDate,
  s.StockSegment AS StockSegment,
  s.SeasonYear AS SeasonYear,
  s.Season AS Season,
  s.SCollection AS SCollection,
  s.Theme AS Theme,
  s.StockQty AS StockQty,
  case when s.Batch = '' then 'S' else 'C' end AS StockSource,
  case when b.AllocQty is not null then case when v.deliveryQuantity is not null then s.StockQty - b.AllocQty - v.deliveryQuantity else s.StockQty - b.AllocQty end else case when v.deliveryQuantity is not null then s.StockQty - v.deliveryQuantity else s.StockQty end end as OpenStockQty AS StockQtyendendasOpenStockQty,
  s.MaterialBaseUnit AS MaterialBaseUnit,
  s.ArunFixBatch AS ArunFixBatch,
  s.SegmentStrategy AS SegmentStrategy
FROM Arun_Stock_Lines AS s
LEFT OUTER JOIN Arun_Stock_Bdbs AS b ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN Arun_Open_Delivery AS v ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN mara AS m ON /* join condition not captured in parsed metadata */
;