StockInHand
Source SQL File - Google Cloud Cortex Data Foundation
Google Cloud Cortex Foudantion - Cortex Reporting - (s4) - StockInHand
Overview
This reporting view provides a consolidated view of stock in hand information from various sources in SAP systems, including unrestricted stock, stock in transfer, quality inspection stock, blocked stock, and special stock. It combines data from tables such as MARD, MSKA, MATDOC, MSLB, MSKU, and MKOL to provide a comprehensive view of stock levels across different locations, storage types, and stock reasons.
Data Sources
Source Table/View | Description |
---|---|
MARD | Material Master: General Data |
MSKA | Sales Order Stock |
MATDOC | Material Document |
MSLB | Special Stock at Vendor Location |
MSKU | Special Stock at Customer Location |
MKOL | Special Stock in Vendor Consignment |
Key Use Cases
- Stock analysis and reporting
- Inventory management
- Sales and distribution planning
- Production and materials planning
Query Logic
The query uses a series of UNNEST operations to transpose the stock quantity and stock type information from the source tables into a single column. It then combines the data from the different source tables using a UNION ALL operation to create a consolidated view of stock in hand.
Possible relation with SAP Transactions
Transaction Code | Transaction Description |
---|---|
MMBE | Display Material Stock/Requirements List |
MB52 | Stock Overview: Plant |
MB5B | Stock Overview: Material |
CO09 | Display Production Order |
Data Lineage
Under Development
Table/View Fields
Field | Field Description | Description in SAP Dictionary (Comming soon) |
---|---|---|
Client_MANDT | Client | |
ArticleNumber_MATNR | Article Number | |
Site_WERKS | Site | |
StorageLocation_LGORT | Storage Location | |
BatchNumber_CHARG | Batch Number | |
SpecialStockIndicator_SOBKZ | Special Stock Indicator | |
SDDocumentNumber_VBELN | SD Document Number | |
SDDocumentItemNumber_POSNR | SD Document Item Number | |
VendorAccountNumber_LIFNR | Vendor Account Number | |
CustomerNumber_KUNNR | Customer Number | |
Qty | Quantity | |
StockType | Stock Type |