StockWeeklySnapshots
Source SQL File - Google Cloud Cortex Data Foundation
Google Cloud Cortex Foudantion - Cortex Reporting - (s4) - StockWeeklySnapshots
Overview
This reporting view provides a snapshot of weekly stock movements for SAP systems. It includes key information such as material number, plant, batch number, storage location, company code, fiscal year, fiscal period, and stock characteristics.
Data Sources
Source Table/View | Description |
---|---|
{{ project_id_tgt }}.{{ dataset_reporting_tgt }}.stock_weekly_snapshots |
This table contains the weekly stock snapshot data. |
{{ project_id_tgt }}.{{ dataset_reporting_tgt }}.CompaniesMD |
This table contains company-related information, such as company code and fiscal year variant. |
{{ project_id_tgt }}.{{ dataset_reporting_tgt }}.currency_decimal |
This table provides currency-related information, such as currency key and decimal places. |
Key Use Cases
- Analyzing weekly stock movements and trends.
- Identifying stock discrepancies and potential issues.
- Monitoring inventory levels and optimizing stock management.
- Providing insights for financial reporting and analysis.
Query Logic
The query retrieves data from the stock_weekly_snapshots
table and joins it with the CompaniesMD
and currency_decimal
tables to enrich the data with company and currency information. It also applies a CASE statement to determine the fiscal year and period based on the fiscal year variant and week end date.
Possible relation with SAP Transactions
Transaction Code | Transaction Description |
---|---|
MMBE | Display Material Master |
MB51 | Goods Movement: Display Stock Overview |
MB52 | Goods Movement: Display Stock on Hand List |
FBL3N | Display Line Items: G/L Accounts |
Data Lineage
Under Development
Table/View Fields
Field | Field Description | Description in SAP Dictionary (Comming soon) |
---|---|---|
Client_MANDT | Client ID | |
MaterialNumber_MATNR | Material Number | |
Plant_WERKS | Plant | |
BatchNumber_CHARG | Batch Number | |
StorageLocation_LGORT | Storage Location | |
CompanyCode_BUKRS | Company Code | |
CompanyText_BUTXT | Company Text | |
FiscalYear | Fiscal Year | |
FiscalPeriod | Fiscal Period | |
CalYear | Calendar Year | |
CalWeek | Calendar Week | |
WeekEndDate | Week End Date | |
BaseUnitOfMeasure_MEINS | Base Unit of Measure | |
CurrencyKey_WAERS | Currency Key | |
TotalWeeklyMovementQuantity | Total Weekly Movement Quantity | |
QuantityWeeklyCumulative | Quantity Weekly Cumulative | |
TotalWeeklyMovementAmount | Total Weekly Movement Amount | |
AmountWeeklyCumulative | Amount Weekly Cumulative | |
StockCharacteristic | Stock Characteristic |