Arun_Stock_Sel
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)
| Source | Alias | Join Type |
|---|---|---|
| Arun_Stock_Bdbs | b | left_outer |
| mara | m | left_outer |
| Arun_Stock_Lines | s | from |
| Arun_Open_Delivery | v | left_outer |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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 */
;
Learn More
- CDS View Annotations — A Complete Guide
- 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 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