P_EWM_AvailableStock_Base
Helper View for Available Stock
P_EWM_AvailableStock_Base is a Composite CDS View that provides data about "Helper View for Available Stock" in SAP S/4HANA. It reads from 1 data source (I_EWM_AvailableStock) and exposes 39 fields with key fields ParentHandlingUnitUUID, StockItemUUID. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_EWM_AvailableStock | _AvailableStock | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_EWM_WhseSystIsDecentralized | _WhseSystemIsDecentralized | 1 = 1 |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| EndUserText.label | Helper View for Available Stock | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (39)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ParentHandlingUnitUUID | ParentHandlingUnitUUID | Parent | |
| KEY | StockItemUUID | StockItemUUID | GUID Stock | |
| EWMWarehouse | EWMWarehouse | Warehouse No. | ||
| ProductUUID | ProductUUID | UUID | ||
| StockDocumentCategory | StockDocumentCategory | Special Reference Stock Type | ||
| StockDocumentNumber | StockDocumentNumber | Stk Ref. Doc. | ||
| StockItemNumber | StockItemNumber | Ref. Doc. Itm | ||
| StockSegment | StockSegment | Stock Segment | ||
| CounterForStockSeparation | CounterForStockSeparation | Counter | ||
| EWMDocumentCategory | EWMDocumentCategory | Document Cat. | ||
| BatchUUID | BatchUUID | Target Grp GUID | ||
| Batch | Batch | Lot No. | ||
| EWMBatchIsInRestrictedUseStock | EWMBatchIsInRestrictedUseStock | Restricted-use | ||
| CountryOfOrigin | CountryOfOrigin | Country/Region of Origin | ||
| EWMStockType | EWMStockType | Stock Type | ||
| HandlingUnitNumber | HandlingUnitNumber | |||
| HandlingUnitOpenTaskInd | HandlingUnitOpenTaskInd | Open HU WT | ||
| HandlingUnitLogicalPosition | HandlingUnitLogicalPosition | Logical Pos. | ||
| EWMStorageType | EWMStorageType | Storage Type | ||
| EWMStorageBin | EWMStorageBin | Storage Bin | ||
| EWMResource | EWMResource | Resource | ||
| EWMStockOwner | EWMStockOwner | Character Field with Length 10 | ||
| StockOwnerPartnerRole | StockOwnerPartnerRole | Partner Role | ||
| EntitledToDisposeParty | EntitledToDisposeParty | Disposal Party | ||
| EntitledToDisposePartnerRole | EntitledToDisposePartnerRole | Partner Role | ||
| EWMStockUsage | EWMStockUsage | Usage | ||
| AvailableEWMStockQty | AvailableEWMStockQty | Quantity | ||
| EWMStockQuantityBaseUnit | EWMStockQuantityBaseUnit | UoM | ||
| StockKeepingAlternativeUoM | StockKeepingAlternativeUoM | Unit of measure | ||
| GoodsReceiptUTCDateTime | GoodsReceiptUTCDateTime | |||
| ShelfLifeExpirationDate | ShelfLifeExpirationDate | SLED/BBD | ||
| EWMStockIsBlockedForInventory | EWMStockIsBlockedForInventory | Inventory Act. | ||
| TranspUnitInternalNumber | TranspUnitInternalNumber | Internal TU No. | ||
| WhseQualityInspectionType | WhseQualityInspectionType | Insp. ID Type | ||
| QualityInspectionDocUUID | QualityInspectionDocUUID | Inspection Obj. | ||
| QualityInspecitionDocBin2Hex | ||||
| EWMStorageBinImprovable | EWMStorageBinImprovable | Bin Improvable | ||
| EWMQuantityIsRead | EWMQuantityIsRead | Read Quants | ||
| WarehouseSystemIsDecentralized | _WhseSystemIsDecentralized | WarehouseSystemIsDecentralized |
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 P_EWM_AvailableStock_Base.
-- 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 P_EWM_AvailableStock_Base AS
SELECT
ParentHandlingUnitUUID,
StockItemUUID,
EWMWarehouse,
ProductUUID,
StockDocumentCategory,
StockDocumentNumber,
StockItemNumber,
StockSegment,
CounterForStockSeparation,
EWMDocumentCategory,
BatchUUID,
Batch,
EWMBatchIsInRestrictedUseStock,
CountryOfOrigin,
EWMStockType,
HandlingUnitNumber,
HandlingUnitOpenTaskInd,
HandlingUnitLogicalPosition,
EWMStorageType,
EWMStorageBin,
EWMResource,
EWMStockOwner,
StockOwnerPartnerRole,
EntitledToDisposeParty,
EntitledToDisposePartnerRole,
EWMStockUsage,
AvailableEWMStockQty,
EWMStockQuantityBaseUnit,
StockKeepingAlternativeUoM,
GoodsReceiptUTCDateTime,
ShelfLifeExpirationDate,
EWMStockIsBlockedForInventory,
TranspUnitInternalNumber,
WhseQualityInspectionType,
QualityInspectionDocUUID,
bintohex(QualityInspectionDocUUID) AS QualityInspecitionDocBin2Hex,
EWMStorageBinImprovable,
EWMQuantityIsRead,
_WhseSystemIsDecentralized.WarehouseSystemIsDecentralized AS WarehouseSystemIsDecentralized
FROM I_EWM_AvailableStock AS _AvailableStock
LEFT OUTER JOIN I_EWM_WhseSystIsDecentralized AS _WhseSystemIsDecentralized ON 1 = 1 -- association [1..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