dg_iasap16
Transcript of dg_iasap16
COGNOS(R) ENTERPRISE BUSINESS INTELLIGENCEC O G N O S A N A L Y T I C A P P L I C A T I O N S
DEVELOPER GUIDE
THE NEXT LEVELOF PERFORMANCETM
INVENTORY ANALYSIS FOR SAP(R)
Cognos Analytic Applications Inventory Analysis for SAP Developer Guide
01-11-2001
e-Apps - Inventory
1.6
Type the text for the HTML TOC entry
Type the text for the HTML TOC entry
Type the text for the HTML TOC entry
Type the Title Bar text for online help
Cognos Analytic Applications Inventory Analysis for SAP (R) Version 1.6
Developer Guide
Product InformationThis document applies to Cognos Analytic Applications Inventory Analysis for SAP (R) Version 1.6 and may also apply to subsequent releases. To check for newer versions of this document, visit the Cognos support Web site (http://support.cognos.com).
CopyrightCopyright (C) 2003 Cognos Incorporated
While every attempt has been made to ensure that the information in this document is accurate and complete, some typographical errors or technical inaccuracies may exist. Cognos does not accept responsibility for any kind of loss resulting from the use of information contained in this document.
This document shows the publication date. The information contained in this document is subject to change without notice. Any improvements or changes to either the product or the document will be documented in subsequent editions.
U.S. Government Restricted Rights. The software and accompanying materials are provided with Restricted Rights. Use, duplication, or disclosure by the Government is subject to the restrictions in subparagraph (C)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013, or subparagraphs (C) (1) and (2) of the Commercial Computer Software - Restricted Rights at 48CFR52.227-19, as applicable. The Contractor is Cognos Corporation, 15 Wayside Road, Burlington, MA 01803.
This software/documentation contains proprietary information of Cognos Incorporated. All rights are reserved. Reverse engineering of this software is prohibited. No part of this software/documentation may be copied, photocopied, reproduced, stored in a retrieval system, transmitted in any form or by any means, or translated into another language without the prior written consent of Cognos Incorporated.
Cognos and the Cognos logo are trademarks of Cognos Incorporated in the United States and/or other countries. All other names are trademarks or registered trademarks of their respective companies.
Information about Cognos Products and Accessibility can be found at www.Cognos.com
Table of Contents
Welcome 5
Chapter 1: JobStream and Build Descriptions 7Dimensions 7Facts 7Build Relationships 8JobStream Descriptions 9
All Time 9Batch 13Business Area 16Customer 18Financial Currency Conversion 24Material 28Material Movement Activity 31Material Movement Document Class 34Material Reservation 37Material Storage 40Physical Inventory 42Plant 44Re-Ranking 48Stock Class 50Stock Overview 54Stock Usage Forecast 62Stock Usage Forecast Method 64Storage Bin 66Unit of Measure 68Valuation 71Vendor 73
Chapter 2: Entity Relationship Diagrams 77Material Movement 78Physical Inventory 79Material Reservation 80Stock Overview 81Stock Usage Forecast 82All Dimensions (I) 83All Dimensions (II) 84
Chapter 3: Data Mart Metadata 85All Time 85Batch 89Business Area 92Customer 93Financial Currency Conversion 101Material 103Material Movement Detail 108Material Movement Document 114Material Movement Document Class 116Material Reservation Detail 120Material Reservation Document 124Material Storage 126
Developer Guide 3
Physical Inventory Detail 129Physical Inventory Document 133Plant 134Stock Class 138Stock Opening Balance 140Stock Overview 148Stock Usage Forecast 154Stock Usage Forecast Method 156Stockout 157Storage Bin 158Unit of Measure 163Unit of Measure Conversion 165Valuation 168Vendor 170
Index 173
4 Cognos Analytic Applications Inventory Analysis for SAP(R)
Welcome
What Is in This DocumentThe Developer Guide contains reference material on the data warehouse architecture and the Cognos DecisionStream JobStreams used to deliver data to the data warehouse.
This book contains• a description of the fact build and dimension build logic and build relationships• entity relationship diagrams for all of the facts• data warehouse metadata tables
Other InformationOur documentation includes user guides, reference books, and other pieces to meet the needs of our varied audience.
The information is available in online book format (PDF). You can print selected pages, a section, or the whole book. Cognos grants you a non-exclusive, non-transferable license to use, copy, and reproduce the copyright materials, in printed or electronic format, solely for the purpose of providing internal training on, operating, and maintaining the Cognos software.
The online books are available from the Windows Start menu (Cognos). You can also read the product readme files and the installation guides directly from the Cognos product CDs.
The following documents contain related information, and may be referred to in this document.
Because Cognos Analytic Applications works closely with Cognos DecisionStream, you may need to consult the Cognos DecisionStream documentation as you work with the product.
Questions or Comments?For the fastest response to questions about using Cognos Analytic Applications, contact customer support.
For information about customer support locations and programs, visit the Cognos Support Web site (http://support.cognos.com).
Topic Location
How to install and configure Cognos Analytic Applications.
Installation Guide
How to use Cognos Analytic Applications to extract and load SAP data into a data warehouse.
User Guide
How to work with Cognos Analytic Applications reports
Report Administration Guide
Developer Guide 5
Welcome
6 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Most JobStreams correspond to one or more data warehouse tables and handle the extraction, transformation, and loading of data into the data warehouse. All data extractions have the following features:• There is one set of object code for the initial load and for changed data capture.• You can run data extractions at any interval; that is, daily, weekly, or monthly.• Using the Applications Console, you can override the start and end dates and times for
extracted data (Extract From Date/Time, Extract To Date/Time).• Overlapping data extraction periods doesn’t compromise data integrity.
DimensionsA JobStream for a dimension table consist of a fact build and a dimension build. A fact build is used to extract the source data. The data is then transformed and delivered into a temporary table in the datamart, usually called DEX table. The temporary table is used as a data source for the dimension build. The dimension build identifies Type II fields, generates the SID (surrogate key), and delivers the data into the waiting dimension table. All the dimension tables have a DIM_ID field that contains the concatenated natural key used to generate the SID.
FactsThere is usually a Document dimension that accompanies the fact table. The dimension and fact table are extracted together to reduce redundant processing. The JobStream for a fact table consist of a number of fact builds. A fact build is used to extract the source data necessary for both the Document and Detail tables. The data is then transformed and delivered into a temporary table in the datamart, usually called FEX table. The temporary table is used as a data source for subsequent fact builds.
A number of transformations are conducted in the final fact build. The fact build generates the SID for the Document dimension, Lookup the SID for the dimensions on the fact table, determine whether the input record has changed, and deliver the input records to the Document dimension and fact table.
The SID is generated using the NEXT_SID(char) user-defined function. A Lookup is used to see if the input record exists in the datamart. The Lookup joins the temporary table to the Document dimension. If Lookup fails, that is the input record does not exist in the datamart, then it is assigned the next SID.
The Lookup is also used to return the datamart record when the input records exist. A Derivation is used to compare the datamart record to the input record. A Boolean value is returned if any differences were detected. There is a separate Derivation for the Document dimension and the fact table. The Derivations are used in the delivery process.
The Document dimension and fact each have a Relational Table Delivery for new records and changed records. The deliveries for new records are APPEND only while the deliveries for changed records are UPDATE only. The output filter determines if the input record should be delivered to the datamart. Input records that are not new records and has not changed are discarded.
There are different flavors of builds for fact tables. One such implementation uses a second data source that replaces the Lookup. The input data from the data sources are then merged to determine if the record exists in the datamart. Both methods accomplish the same thing.
Developer Guide 7
Chapter 1: JobStream and Build Descriptions
JobStreams can vary depending on the complexity of the data sources and its transformation. They usually have the characteristics described above with the exception of ALL_TIME and FINANCIAL_CURRENCY.
Build RelationshipsThe following table lists the JobStreams that come with the Inventory Analysis for SAP application and the builds contained in each JobStream. The builds are listed in the order that they appear in the corresponding JobStream.
JobStream Fact Builds Dimension Builds
ALL_TIME FISCAL_B_01FISCAL_B_02FISCAL_B_03FISCAL_B_04
BATCH BATCH_B_01BATCH_B_02
BATCH_D_03
BUSINESS_AREA BUSINESS_AREA_B_01 BUSINESS_AREA_D_02
CUSTOMER CUSTOMER_B_01CUSTOMER_B_02CUSTOMER_B_03CUSTOMER_B_04CUSTOMER_HIER_B_02
CUSTOMER_D_05CUSTOMER_HIER_D_01
FINANCIAL_CURRENCY FINANCIAL_CURRENCY_B_01FINANCIAL_CURRENCY_B_02FINANCIAL_CURRENCY_B_03FINANCIAL_CURRENCY_B_04FINANCIAL_CURRENCY_B_05FINANCIAL_CURRENCY_B_06
MATERIAL MATERIAL_B_01MATERIAL_B_02
MATERIAL_D_03
MATERIAL_MOVEMENT_ACTIVITY MTRL_MVMNT_DTL_DOC_B_02MTRL_MVMNT_DTL_DOC_INS_B_01MTRL_MVMNT_DTL_DOC_UPDINS_B_01
MATERIAL_MOVEMENT_DOCUMENT_CLASS MOVEMENT_DOC_CLSS_B_01MOVEMENT_DOC_CLSS_B_02MOVEMENT_DOC_CLSS_B_03
MATERIAL_RESERVATION MTRL_RSRVTN_DTL_DOC_B_01MTRL_RSRVTN_DTL_DOC_B_02
MATERIAL_STORAGE MATERIAL_STORAGE_B_01 MATERIAL_STORAGE_D_02
PHYSICAL_INVENTORY PHYSICAL_INV_DTL_DOC_B_01PHYSICAL_INV_DTL_DOC_B_02
PLANT PLANT_B_01PLANT_B_02
PLANT_D_03
RE-RANKING
STOCK_CLASS STOCK_CLASS_B_01STOCK_CLASS_B_02
STOCK_OVERVIEW RANKING_TABLE_BSTOCKOUT_B_01STOCK_OPENING_BAL_BSTOCK_OVERVIEW_B
STOCK_USAGE_FORECAST STOCK_USAGE_FRCST_B_01STOCK_USAGE_FRCST_B_02
STOCK_USAGE_FORECAST_METHOD STK_USG_FRCST_MTHD_B_01 STK_USG_FRCST_MTHD_D_02
STORAGE_BIN STORAGE_BIN_B_01 STORAGE_BIN_D_02
8 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
JobStream DescriptionsThis section describes each JobStream in detail.
All Time
DescriptionThe Time dimension is probably the most important dimension in a data warehouse schema, because the majority of business questions that it supports look at historical changes in various business measures.
The All Time dimension is a combination of the Fiscal and Time calendars. Fiscal calendars represent the yearly period for accounting purposes within an organization. The Fiscal dimension is important in merged or multinational companies that are required to consider multiple fiscal calendars. This dimension is flexible enough to accommodate all fiscal calendars in an organization.
The All Time dimension brings the two logical entities, Fiscal and Time, together into a single super-entity using a process called denormalization. Denormalization is for faster query processing, an important requirement in data warehousing. Such a combination is called a cartesian product in the language of set theory. Being a cartesian, the All Time dimension contains a row for each day of the calendar year for each fiscal calendar variation (fiscal variant) supported. Hence, this dimension may have the same calendar day repeated multiple times, once for each fiscal variant. Because of this repetition, you must be careful while joining the All Time dimension to any of the fact tables in a query. You must define a fiscal variant in the query to prevent double-counting of fact records. To avoid double-counting in the majority of queries that do not need to look at fiscal calendars, a default fiscal variant exists in this data model to define the regular calendar year, with 12 monthly periods and four seasonal quarters. You can create additional fiscal variants to support financial analysis and planning for other financial calendars.
The key (DIM_ID) is composed of the following attributes:• FISCAL_VARIANT_CD• TIME_SID
All_Time is a non-CDC (Changed Data Capture) table dimension but with a unique and extremely important difference. That is, the All_Time processing only appends rows to the dimension. Any existing rows previously loaded cannot be re-created or modified.
Loading the All_Time dimension consists of four major steps:
1. Load the Time work table using database trigger and stored procedure.
2. Extract date dependant, calendar dependant and non-year dependant fiscal information.
3. Load the Fiscal work tables.
4. Load the All_Time dimension.
UNIT_OF_MEASURE UNIT_OF_MEASURE_B_01UNIT_OF_MEASURE_CNVRSN_B
UNIT_OF_MEASURE_D_02
VALUATION VALUATION_B_01 VALUATION_D_02
VENDOR VENDOR_B_01VENDOR_B_02VENDOR_B_03VENDOR_B_04VENDOR_HIER_B_02
VENDOR_D_05VENDOR_HIER_D_01
JobStream Fact Builds Dimension Builds
Developer Guide 9
Chapter 1: JobStream and Build Descriptions
Impact of Conformed DimensionThis is a shared dimension that is common to• Accounts Payable Analysis• Accounts Receivable Analysis• General Ledger Analysis• Inventory Analysis• Procurement Analysis• Sales Analysis
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
DependenciesNone.
Configuration Parameters• MART_BEGIN_DATE
This is the starting date of the data warehouse. It marks the earliest valid date which can be specified within the warehouse and must be set to accommodate the earliest date required for data extraction from the ERP. If multiple applications are being installed, this date must be set for the earliest requirement. Any date lower than what is specified for this parameters will be converted to the default 'low' date of 19000101.
• MART_END_DATEThis is the ending date of the data warehouse. It marks the latest valid date which can be specified within the warehouse and should be initially set to some date 10 or 20 years in the future. Any higher value will be converted to the default 'high' date of 99991231.
User Intervention:• Manual Table
In the event All_Time needs to be re-executed under one (1) of the scenarios mentioned below, the All_Time job must first be manually taken off-hold.
• Mart_Begin_Date/Mart_End_DateTo control the date range for which All_Time will be loaded, the Mart_Begin_Date/Mart_End_Date range may be set either specifically or by limiting the time span for which an extraction will be done.However, note that in the event All_Time has been previously loaded the Mart_Begin_Date will be ignored in cases where a given Fiscal_Variant_Cd already exists for the time frame specified. New rows will be appended beginning at the end of the existing range already loaded (determined by retrieving Maximum Time_Sid for Fiscal_Variant_Cd) and ending at the Mart_End_Date specified.
After initial load, All_Time processing should/will only be executed under one of the following 3 scenarios:
1. A new Fiscal_Variant_Cd needs to be added to All_Time (see Manual Table above).
2. The Mart_End_Date is moved forward into the future and All_Time needs to be loaded up to this date (see Manual Table above).
3. Sufficient time has elapsed so that the on-hold period has expired (occurs Automatically).
10 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Job Flow:1. ALL_TIME_J / INIT_P• Calls function ALL_TIME_VARS_F() to set the jobflow parameters• Truncates work-table TIME_EX1.• Inserts a single row into Work-table TIME_TRGGR_ACT_EX1. Insertion of this row causes
a database trigger on this table to execute, which in turn executes the stored procedure PROC_SPAN_ALL_TIME_DATE_RANGE using the Mart_Begin_Date and Mart_End_Date specified. This procedure then loads the Work-table TIME_EX1 for the entire date range specified. This table is then used as input during later processing.
2. ALL_TIME_J_B_01_SJ / FISCAL_B_01• Consists of 3 data sources
T009,T009B_DATE_DEPENDANTT009,T009B_NON_YEAR_DEPENDANTT009_CALENDAR_DEPENDANT
• Input Properties: allow duplicate keys• Extracts Date Dependant fiscal info from SAP tables T009 and T009B
FROM "T009B" T9B, "T009" T9WHERE T9B."PERIV" = T9."PERIV"AND T9."XJABH" = 'X'
• Extracts Calendar Dependant fiscal info from SAP tables T009 and T009BFROM "T009B" T9B, "T009" T9WHERE T9B."PERIV" = T9."PERIV"AND T9."XJABH" <> 'X'AND T9."XKALE" <> 'X'AND T9B."BDATJ" = '0000'
• Extracts Non-Year Dependant fiscal info from SAP table T009FROM "T009"WHERE "XKALE" = 'X'
• Lookup Fiscal Variant name on SAP table T009T and T001. NOTE: the un-checked "include unmatched members" check-box acts as a filter for the number of rows delivered to the Fiscal_Ex1 table. Only FISCAL_B_01 rows where the matching Fiscal_Variant_Cd is found by this lookup will be inserted by FISCAL_B_01.FROM "T009T" T9, "T001" T1 WHERE T9."SPRAS" = '{$U_LANGUAGE_CD}' AND T9."PERIV" = T1."PERIV"
• Output is FISCAL_EX1. Delivery type is Truncate. Filter on delivery is ToInteger(POSTING_PERIOD_NO) <= ToInteger(POSTING_PERIOD_CNT)
• SQL-Node POPULATE_NON_YR_ROWS:retrieves Non-Year rows from FISCAL_EX1, performs further transformations on these rows and inserts the transformed rows into FISCAL_EX1.
• SQL-Node POPULATE_CALENDAR_YR_ROWS:retrieves Calendar rows from FISCAL_EX1, performs further transformations on these rows and inserts the transformed rows into FISCAL_EX1.
• SQL-Node DELETE_CALENDAR_AND_NON_YR_ROWS:deletes all rows from FISCAL_EX1 retrieved by the two (2) SQL-Nodes above. These rows have now been replaced by the transformed rows generated by those SQL-Nodes.
3. ALL_TIME_J_B_02_SJ / FISCAL_B_02• Input Properties: allow duplicate keys • Extracts the Fiscal Variant, Fiscal Month, Year Offset, Calendar Day and Posting Period info
FROM FISCAL_EX1
• Lookup Fiscal_Sid FROM "FISCAL_EX1"
• Output is FISCAL_EX2.Delivery type is truncate.
Developer Guide 11
Chapter 1: JobStream and Build Descriptions
4. ALL_TIME_J_B_03_SJ / FISCAL_B_03• Input Properties: allow duplicate keys • Extracts Fiscal, Calendar and Posting info
FROM "FISCAL_EX2"ORDER BY "FISCAL_VARIANT_CD", "PST_PRD_END_DT"
• Output is FISCAL_EX3_INS.Delivery type is truncate.
5. ALL_TIME_J_B_04_SJ / FISCAL_B_04• Input Properties: allow duplicate keys • Pre-Procedure: Sets local variable values
$L_LAST_FISCAL_VARIANT_CD:= '-';$L_PREV_FISCAL_YEAR_VAL:= 0;$L_PREV_PST_PRD_END_DT:=0;$L_PST_PRD_STRT_DT:= 0;FISCAL_EX3_TIME_EX1
• Extracts Fiscal, Calendar and Posting infoFROM (FROM FISCAL_EX3 T4, ALL_TIME T5 WHERE T4.FISCAL_VARIANT_CD = T5.FISCAL_VARIANT_CD (+) AND T4.FISCAL_PERIOD_SID <>0 AND T4.FISCAL_PERIOD_SID <>99990101 GROUP BY T4.FISCAL_VARIANT_CD) T1,TIME_EX1 T2, FISCAL_EX3 T3WHERE T2.TIME_SID > T1.LAST_MAX_TIME_SID AND T3.FISCAL_VARIANT_CD = T1.FISCAL_VARIANT_CD AND T2.TIME_SID <> 0 AND T2.TIME_SID <> 99990101 AND T2.TIME_SID BETWEEN T3.PST_PRD_STRT_DT AND T3.PST_PRD_END_DTGROUP BY T2.TIME_SID, T2.CALENDAR_YEAR_VAL, T2.CALENDAR_QRTR_VAL, T2.CALENDAR_MONTH_VAL, T2.CALENDAR_WEEK_VAL, T2.CALENDAR_DAY_VAL, T2.CALENDAR_DT, T2.CALENDAR_WKDY_NM, T1.FISCAL_VARIANT_CDORDER BY T1.FISCAL_VARIANT_CD, T2.TIME_SID
• Output is ALL_TIME.Delivery type is Append.
Source Tables/Files• T009 Fiscal year variants• T009B Fiscal year variant periods• T001 Company Codes
Target Tables/Files• ALL_TIME
Work Tables• TIME_EX1• FISCAL_EX1• FISCAL_EX2• FISCAL_EX3_INS • TIME_TRGGR_ACT_EX1
12 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Stored Procedure• PROC_SPAN_ALL_TIME_DATE_RANGE
Loads Time_Ex1 work-table for the full date range specified between Mart_Begin_Date and Mart_End_Date inclusive.
Trigger• TRIGGER_DATE_RANGE on table TIME_TRGGR_ACT_EX1
Trigger executes on Insertion of row into this table. Executes stored procedure PROC_SPAN_ALL_TIME_DATE_RANGE (see above)
Notes/FiltersNone.
Validation1. Check Console Log Files.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check file FISCAL_B_01.REJ for records rejected; usually caused by inactive Fiscal Variants.
4. Check the table count and zero-sid rowsSELECT COUNT(*) FROM ALL_TIME;SELECT * FROM ALL_TIME WHERE CLNDR_FSCL_PRD_NO = 0;SELECT * FROM ALL_TIME WHERE FISCAL_VARIANT_CD = '-';
5. Check the fiscal variantsSELECT DISTINCT DFLT_FSCL_VRNT_CD FROM ALL_TIME;SELECT DISTINCT FISCAL_VARIANT_CD FROM ALL_TIME;
6. Check the contents of each fiscal variantSELECT FISCAL_VARIANT_CD, PST_PRD_STRT_DT, PST_PRD_END_DT FROM ALL_TIME WHERE FISCAL_PERIOD_SID > 0 ORDER BY FISCAL_VARIANT_CD;SELECT * FROM ALL_TIME WHERE FISCAL_PERIOD_SID > 0 ORDER BY FISCAL_VARIANT_CD;
Batch
DescriptionThis table is a grouping of material manufactured in a single production run that is managed together. In material management terminology, this group is known as a batch or lot. Companies use batches to identify and manage a group of materials with the same characteristics. Batch is an Incremental table and is unique to the Inventory Analysis Application.
The Batch key (DIM_ID) is composed of the following attributes:• BATCH_NO• PLANT_ID• MATERIAL_ID
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column BATCH_DIM_ID.
This is a CDC (Changed Data Capture) table dimension.
Developer Guide 13
Chapter 1: JobStream and Build Descriptions
Data extraction from the ERP source, for each run, is controlled/limited by the From/To extraction Dates as specified by the related Jobflow Properties in the Analytic Applications Console. Only those records which are new or modified since the last extraction will be selected for processing. Since this is an incremental dimension, the Mart Begin Date parameter should be set (via the console) to match the ERP's beginning date while this table is initially being loaded in order to ensure that all records are selected from the source.
Batch table is loaded using three stages.
1. Extracts combination of Batch, Plant & Material info from SAP tables MCHA and MCH1
2. Extracts Batch & Material info from SAP table MCH1. Plant is 'UNKNOWN'.
3. Loads target dimension
Impact of Conformed DimensionNone. This is unique to the Inventory Analysis application.
DependenciesNone.
Configuration Parameters:None.
User Intervention:User Interface• Pre-Run
Before initially loading this table, set the Mart Begin Date back to the ERP's beginning date in order to ensure that all source Batch records will be retrieved. In the console, set the parameter value to the necessary early date and save. For the duration of this table's initial load job(s), ensure that no other jobs are run.
• Post-RunWhen the Batch table initial load is complete, ensure that the Mart Begin Date parameter is properly reset to its defined configuration value.
CDC Dates• CDC_EXTRACT_FROM_DATE• CDC_EXTRACT_TO_DATE
To limit the volume of data retrieved from SAP, particularly during historical data loads, the CDC_ExtractFrom/To_Date range may be set either specifically or by limiting the time span for which an extraction will be done.
Job Flow1. BATCH_J / INIT_P• Calls function BATCH_VARS_F to set the jobflow parameters.
2. BATCH_J_B_01_SJ / BATCH_B_01• Input Properties: allow duplicate keys• Extracts Batch, Plant, and Material info from SAP tables MCHA and MCH1 for creation date
or changed date within the CDC Extract Date range:FROM MCHA LEFT OUTER JOIN MCH1 ON (MCHA.CHARG = MCH1.CHARG) AND (MCHA.MATNR = MCH1.MATNR) WHERE ((MCHA.ERSDA >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND MCHA.ERSDA <= date '{$S_CDC_EXTRACT_TO_FDATE}') OR (MCHA.LAEDA >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND MCHA.LAEDA <= date '{$S_CDC_EXTRACT_TO_FDATE}'))
• Output is BATCH_DEX.Delivery Type is Truncate
14 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
3. BATCH_J_B_02_SJ / BATCH_B_02• Input Properties: allow duplicate keys• Extracts Batch, Plant, and Material info from SAP table MCH1 for creation date or changed
date within the CDC Extract Date range:FROM MCH1 WHERE ((MCH1.ERSDA >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND MCH1.ERSDA <= date '{$S_CDC_EXTRACT_TO_FDATE}') OR (MCH1.LAEDA >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND MCH1.LAEDA <= date '{$S_CDC_EXTRACT_TO_FDATE}'))
• Output is BATCH_DEX.Delivery type is Append
4. BATCH_J_B_03_SJ / BATCH_D_03• Loads dimension BATCH from BATCH_DEX
5. BATCH_J / END_P• Post Procedure:
Update BATCH_SCD(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
Source Tables/Files• MCH1 Batches (if Batch Management Cross-Plant)• MCHA Batches
Target Tables/Files• BATCH
Work Tables• BATCH_DEX• BATCH_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check Console Log Files.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Developer Guide 15
Chapter 1: JobStream and Build Descriptions
Business Area
DescriptionThis is an organizational unit within financial accounting that represents a separate area of operations or responsibilities within an organization. Financial accounting transactions can be allocated to a specific business area.
Business Areas permit external reporting of key performance indicators across multiple companies by product lines and/or subsidiaries. Alternatively, business area can mean an organizational entity for which "balance sheets" as well as "profit and loss statements" can be created for internal reporting. Unlike the company identifier, the business area is not a legally independent entity and is therefore not subject to the legal requirements for external reporting.
The Business Area key (DIM_ID) is composed of one attribute:• BUSINESS_AREA_CD
Business Area is a Type 1 (non History Preserving) dimension.
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column BUSINESS_AR_DIM_ID.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading the Business Area dimension consists of two steps:
1. Extracting the business area information.
2. Loading the target dimension (creating surrogate key, created and changed dates).
Impact of Conformed DimensionThis is a conformed dimension, which is common to the following applications.• General Ledger Analysis• Inventory Analysis
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
Configuration ParametersNone.
DependenciesNone.
User InterventionNone.
Job Flow1. BUSINESS_AREA_J / INIT_P• Calls function BUSINESS_AREA_VARS_F() to set the job flow parameters.
16 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
2. BUSINESS_AREA_01_SJ / BUSINESS_AREA_B_01• Extracts Business Area and Consolidation Business Area from SAP table TGSB• Lookup BUSINESS_AREA_CD Name on SAP table TGSBT
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup CNSLDTN_BA_CD Name on SAP table TGSBT WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is BUSINESS_AREA_DEX Delivery type is truncate.
3. BUSINESS_AREA_01_S2 / BUSINESS_AREA_D_02• Loads dimension BUSINESS_AREA from BUSINESS_AREA_DEX• Output is BUSINESS_AREA.
Delivery type is update/insert.
4. BUSINESS_AREA_J / END_P• Post Procedure: Update BUSINESS_AREA_SCD (table used by stored procedures in
cases where the dimension is defined as Type 2 'history preserving').
Source Tables/Files• TGSB Business Areas• TGSBT Business Areas Names• TGSBL Text table for TGSBK
Target Tables/Files• BUSINESS_AREA
Work Tables• BUSINESS_AREA_DEX• BUSINESS_AREA_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Developer Guide 17
Chapter 1: JobStream and Build Descriptions
Customer
DescriptionThis describes customers, such as the ones being Sold-to, Billed-to, Shipped-to, Payers, Buyers, etc. Customers are relevant in the context of Sales, Financial Accounting, Customer Relationship Management, etc. A customer may be either a person or a company. Depending on the ERP implementation, a customer can have one or multiple addresses and any one of these addresses may be used in relation to a business transaction, such as a Sales Order.
The Customer key (DIM_ID) is composed of the following attributes:• CUSTOMER_NO• COMPANY_CD• SALES_ORG_CD• DSTR_CHNL_CD• DIVISION_CD
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column CUSTOMER _DIM_ID.
Customer is a CDC (Changed Data Capture) table dimension.
Data extraction from the ERP source, for each run, is controlled/limited by the From/To extraction Dates as specified by the related Jobflow Properties in the Analytic Applications Console. Only those records which are new or modified since the last extraction will be selected for processing. Since this is an incremental dimension, the Mart Begin Date parameter should be set (via the console) to match the ERP's beginning date while this table is initially being loaded in order to ensure that all records are selected from the source.
Loading of the customer dimension consists of three major steps.
1. Extract the Customer Hierarchy,
2. Extract the Customer information and join it to the Customer Hierarchy.
3. Load the Customer dimension.
Because of the customer key, which contains five attributes, the extraction of customer information is divided into three stages, based on the known/unknown component values:
1. The keys CUSTOMER NO, COMPANY CD, SALES ORG CD, DSTRBTN CNL CD, DIVISION CD are all known values (join information of KNA1,KNVV,TVKO).
2. The keys CUSTOMER NO, COMPANY CD have known values but SALES ORG CD, DSTRBTN CNL CD, DIVISION CD are unknown (joining of KNA1, KNB1).
3. The key CUSTOMER NO has a known value but COMPANY CD, SALES ORG CD, DSTRBTN CNL CD, DIVISION CD are unknown (KNA1 table only).
Impact of Conformed DimensionThis is a shared dimension that is common to• Accounts Receivable Analysis• Inventory Analysis• Sales Analysis
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
DependenciesNone.
18 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Configuration Parameters• COLLECTION_MANAGER_CD
This field is sourced using the SAP partner functions related to a customer. The list of available partner functions can be found from TPAR.PARVW. You can enter one or more values in this field. The values must be surrounded by single quotes with a comma between each. If more than one value is returned from SAP, only the first value will be displayed in the table field CUSTOMER.COLLECTION_MNGR_NM. You must use the language independent code.
• CREDIT_MANAGER_CDThis field is sourced using the SAP partner functions related to a customer. The list of available partner function codes can be found from TPAR.PARVW. You can enter one or more values in this field. The values must be surrounded by single quotes with a comma between each. If more than one value is returned from SAP, only the first value will be displayed in the table field CUSTOMER.CREDIT_MANAGER_NM. You must use the language independent code.
• CUSTOMER_HIER_TYPE This parameter is used to determine which Customer hierarchy will be loaded into the Customer Table. Only one hierarchy is supported. The default value is A. The list of available values can be found in THIT.HITYP.
User InterventionUser Interface• Pre-Run
Before initially loading this table, set the Mart Begin Date back to the ERP's beginning date in order to ensure that all source Customer records will be retrieved. In the console, set the parameter value to the necessary early date and save. For the duration of this table's initial load job(s), ensure that no other jobs are run.
• Post-RunWhen the Customer table initial load is complete, ensure that the Mart Begin Date parameter is properly reset to its defined configuration value.
CDC Dates• CDC_EXTRACT_FROM_DATE• CDC_EXTRACT_TO_DATE
To limit the volume of data retrieved from SAP, particularly during historical data loads, the CDC_ExtractFrom/To_Date range may be set either specifically or by limiting the time span for which an extraction will be done.
Job Flow1. CUSTOMER_J / INIT_P• Calls function CUSTOMER_VARS_F() to set the jobflow parameters.
2. CUSTOMER_J_B_01_SJ / CUSTOMER_HIER_D_01• Extracts Customer and Parent hierarchy info from SAP tables KNVH and KNA1.
FROM "KNVH", "KNA1" WHERE "KNA1"."KUNNR" = "KNVH"."KUNNR" AND "KNVH"."HITYP" = 'A'
• Output is CUSTOMER_HIER_DEX.Delivery type is truncate.
3. CUSTOMER_J_B_02_SJ / CUSTOMER_HIER_B_02• Input Properties: allow duplicate keys• Extracts the Parent, Customer, Level number and the five levels of the hierarchy from table
CUSTOMER_HIER_DEX• Output is CUSTOMER_HIER_AEX.
Delivery type is truncate.
Developer Guide 19
Chapter 1: JobStream and Build Descriptions
4. CUSTOMER_J_B_03_SJ / CUSTOMER_B_01• Consists of 3 data sources• Input Properties: merge duplicate keys• Extracts the Customer number from SAP table KNA1
FROM "KNA1"WHERE ("KNA1"."ERDAT" >= date'{$S_CDC_EXTRACT_FROM_FDATE}' AND"KNA1"."ERDAT" <= date '{$S_CDC_EXTRACT_TO_FDATE}')
• Extracts the Customer number from SAP table KNVVFROM "KNVV"WHERE ("KNVV"."ERDAT" >= date'{$S_CDC_EXTRACT_FROM_FDATE}' AND "KNVV"."ERDAT" <= date '{$S_CDC_EXTRACT_TO_FDATE}')
• Extracts the 'changed' Customer numbers from SAP table CDHDRFROM "CDHDR"WHERE ("CDHDR"."OBJECTCLAS" = 'DEBI') AND ("CDHDR"."UDATE" >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND "CDHDR"."UDATE" <= date '{$S_CDC_EXTRACT_TO_FDATE}')
• Output is CUSTOMER_EX1.Delivery type is truncate.
20 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
5. CUSTOMER_J_B_04_SJ / CUSTOMER_B_02• Step 1 in which CUSTOMER NO, COMPANY CD, SALES ORG CD, DSTRBTN CNL CD,
DIVISION CD are all known values.• Input Properties: allow duplicate keys• Extracts Customer name, address, region, currency, etc. from SAP tables KNA1, KNVV and
TVKOFROM "KNVV" INNER JOIN "KNA1" ON "KNA1"."KUNNR" = "KNVV"."KUNNR" INNER JOIN "TVKO" ON "KNVV"."VKORG" = "TVKO"."VKORG"
• Lookup the Customer's hierarchy on table CUSTOMER_EX1.• Lookup Dunning Level description name on SAP table KNB5• Lookup GL Account and External Customer Reference on SAP table KNB1.• Lookup the Customer's hierarchy level info on table CUSTOMER_HIER_AEX.• Lookup country name on SAP table T005T.
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Group name on SAP table T151T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Customer Type name on SAP table T077X.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Customer Classification name on SAP table TKUKT.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Industry description on SAP table T016T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Payment Terms days on SAP table T052.• Lookup Customer Credit Limit and Risk Category on SAP table KNKK.• Lookup Company Credit Limit and Risk Category on SAP tables KNKK and T001.
FROM "KNKK" INNER JOIN "T001" ON "T001"."KKBER" = "KNKK"."KKBER"
• Lookup Collection Manager on SAP tables KNVP and P0002FROM "PA0002" INNER JOIN "KNVP" ON "PA0002"."PERNR" = "KNVP"."PERNR" AND "KNVP"."PARVW" IN ({$U_COLLECTION_MANAGER_CD})
• Lookup Credit Manager on SAP tables KNVP and P0002FROM "PA0002" INNER JOIN "KNVP" ON "PA0002"."PERNR" = "KNVP"."PERNR" AND "KNVP"."PARVW" IN ({$U_CREDIT_MANAGER_CD})
• Lookup County name on SAP table T005FFROM "T005F" WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Region name on SAP table T005FUFROM "T005U" WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Sales District name on SAP table T171TFROM "T171T" WHERE "SPRAS" = '{$U_LANGUAGE_CD}
• Lookup Dunning Block Reason on SAP tables KNB5 and T040TFROM "KNB5", "T040T" WHERE "KNB5"."MANSP" = "T040T"."MANSP" AND "T040T"."SPRAS" = '{$U_LANGUAGE_CD}'
• Output is CUSTOMER_EX2.Delivery type is truncate.
Developer Guide 21
Chapter 1: JobStream and Build Descriptions
6. CUSTOMER_J_B_05_SJ / CUSTOMER_B_03• Step 2 in which only CUSTOMER NO, COMPANY CD have known values.• Input Properties: allow duplicate keys• Extracts Customer name, address, region, currency, etc. from SAP tables KNA1 and KNB1.
FROM "KNA1", "KNB1"WHERE "KNA1"."KUNNR" = "KNB1"."KUNNR"
• Lookup the Customer's hierarchy on table CUSTOMER_EX1• Lookup Dunning Level description name on SAP table KNB5• Lookup country name on SAP table T005T.
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Customer Type name on SAP table T077X.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Customer Classification name on SAP table TKUKT.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Industry description on SAP table T016T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Company Credit Limit and Risk Category on SAP tables KNKK and T001.FROM "KNKK" INNER JOIN "T001" ON "T001"."KKBER" = "KNKK"."KKBER"
• Lookup County name on SAP table T005FFROM "T005F" WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Region name on SAP table T005FUFROM "T005U" WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Dunning Block Reason on SAP tables KNB5 and T040TFROM "KNB5", "T040T" WHERE "KNB5"."MANSP" = "T040T"."MANSP" AND "T040T"."SPRAS" = '{$U_LANGUAGE_CD}'
• Output is Append to CUSTOMER_EX2.
7. CUSTOMER_J_B_06_SJ / CUSTOMER_B_04• Step 3 in which only CUSTOMER NO has known values.• Input Properties: allow duplicate keys• Extracts Customer name, address, region, currency, etc. from SAP table KNA1• Lookup the Customer's hierarchy on table CUSTOMER_EX1.• Lookup country name on SAP table T005T.
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Customer Type name on SAP table T077X.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Customer Classification name on SAP table TKUKT.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Industry description on SAP table T016T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup County name on SAP table T005FFROM "T005F" WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Region name on SAP table T005FUFROM "T005U" WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is Append to CUSTOMER_EX2
8. CUSTOMER_J_B_07_SJ / CUSTOMER_D_05• Loads dimension CUSTOMER from CUSTOMER_EX2
Delivery type is update/insert.• Post Procedure:
Update CUSTOMER_SCD(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
22 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Source Tables/Files• CDHDR Change document header• CDPOS Change document items• KNA1 General Data In Customer Master• KNB1 Customer Master (Company Code)• KNB5 Customer Master (Dunning Data)• KNKK Customer Master Credit Management: Control AR• KNVH Customer Hierarchies• KNVP Customer Master Partner Functions• KNVV Customer Master Sales Data• P0002 HR Master Record: Infotype 0002 (Personal Data)• PA0002 HR Master Record: Infotype 0002• T001 Company Codes• T005F County: Texts• T005T Country names• T005U Taxes: Region Key: Texts• T016T Industry names• T040T Dunning Block Reason Names• T052 Terms of Payment• T077X Account Group Names (Table T077d)• T151T Customers: Customer Groups: Texts• T171T Customers: Sales Districts: Texts• TKUKT Customers: Customer Classification: Texts• TVKO Organizational Unit: Sales Organizations
Target Tables/Files• CUSTOMER
Work Tables:• CUSTOMER_EX1• CUSTOMER_EX2• CUSTOMER_HIER_DEX• CUSTOMER_HIER_AEX• CUSTOMER_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
Developer Guide 23
Chapter 1: JobStream and Build Descriptions
8. For selected records, review and verify the target warehouse against the source ERP data.
Financial Currency Conversion
DescriptionThe Financial Currency Conversion dimension (FINANCIAL_CUR_CONV) enables conversion of monetary values from one currency to another for reporting purposes. For companies which have transactions in a variety of currencies, it is necessary to convert values from the document/local currencies to a common currency for additive and comparative purposes. The table includes a 'group' currency which identifies the common/standard currency used for overall reporting.
The ERP source normally provides the exchange rates between currencies. In those cases where an exchange rate is not provided, a 'base' currency is used as a central point to convert from the 'From' currency to 'base' and then from the 'base' to the 'To' currency. If this alternate method cannot be used either, the exchange rate is defaulted to '1'.
Each currency exchange rate is defined within a specific Fiscal Period which, in turn, is composed of a calendar date and a Fiscal Variant.
The Financial Currency Conversion table is not a true dimension; it does not have a DIM_ID column.
The key is composed of the following attributes:• FROM_CURRENCY_CD• TO_CURRENCY_CD• FISCAL_PERIOD_SID
This is a Type 1 (non History Preserving) dimension.
FINANCIAL_CUR_CONV is a CDC (Changed Data Capture) table dimension.
Data extraction from the ERP source, for each run, is controlled/limited by the From/To extraction Dates as specified by the related Jobflow Properties in the Analytic Applications Console.
Loading the Financial Currency dimension consists of six major steps:
1. Extract the currency rates for all currencies which the user has identified as requiring conversion.
2. Extract the currency codes for all currencies which the user has identified as requiring conversion.
3. Extract the local currencies and their corresponding base currency.
4. Join Currency_Codes and Local_Currencies to All_Time (using cartesian product) and load the dimension.
5. Re-calculate the currency conversion rates.
6. Re-calculate the forward currency conversion rates based on the results of step 5.
Impact of Conformed DimensionThis is a shared dimension that is common to• Accounts Payable Analysis• Accounts Receivable Analysis• General Ledger Analysis• Inventory Analysis• Procurement Analysis• Sales Analysis
24 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Configuration Parameters• EXCHANGE_RATE_TYPE
Default exchange rate type used for all financial currency conversions in the warehouse.• MART_BEGIN_DATE
This is the starting date of the data warehouse • MART_END_DATE
This is the ending date of the data warehouse • REPORT_CURRENCY_CD
Reporting currency codes. The currency codes for which you are going to want to do business currency analysis. At a minimum, you typically would want specify all your local currencies. You must include the group currency in the list of reporting currencies.
User InterventionNone.
Job Flow1. FINANCIAL_CURRENCY_J / INIT_P• Calls function FINANCIAL_CURRENCY_VARS_F() to set the jobflow parameters.
2. FINANCIAL_CURRENCY_J_B_01_SJ / FINANCIAL_CURRENCY_B_01• Input Properties: allow duplicate keys• Extracts Currency Rate info from SAP table TCURR
WHERE GDATU is within the CDC Extract Date rangeFROM "TCURR" TWHERE T."KURST" = '{$U_EXCHANGE_RATE_TYPE}' AND (CAST(T. "GDATU" AS INTEGER) - 99999999) * -1 >= CAST({$S_CDC_EXTRACT_FROM_DATE} AS INTEGER) AND (CAST(T. "GDATU" AS INTEGER) - 99999999) * -1 <= CAST({$S_CDC_EXTRACT_TO_DATE} AS INTEGER) AND T."TCURR" IN ({$U_REPORT_CURRENCY_CD})
• Output is CURRENCY_RATE.Delivery type is Update/Insert.
3. FINANCIAL_CURRENCY_J_B_02_SJ / FINANCIAL_CURRENCY_B_02• Input Properties: allow duplicate keys• Extracts Currency Codes info from SAP table TCURC • Lookup Currency Scaling Factor info on SAP table TCURX• Lookup Currency Codes on SAP table TCURC which are found in the list of currencies
(Include For Conversion) specified by the userFROM "TCURC" WHERE "WAERS" IN ({$U_REPORT_CURRENCY_CD})
• Lookup Currency name on SAP table TCURTFROM "TCURT" WHERE "SPRAS" = '{$U_LANGUAGE_CD}
• Output is CURRENCY_LOOKUP. Delivery type is Truncate. • Filter on delivery is CURRENCY_INCL_FOR_CONV_LKP.CODE IS NOT NULL• Output is CURRENCY_SCAL_FCTR.
Delivery type is Truncate.
Developer Guide 25
Chapter 1: JobStream and Build Descriptions
4. FINANCIAL_CURRENCY_J_B_03_SJ / FINANCIAL_CURRENCY_B_03• Input Properties: allow duplicate keys• Extracts Local Currencies and their corresponding Base Currency from SAP tables T001
and TCURVFROM "T001" T1, "TCURV" TCWHERE TC."KURST" = '{$U_EXCHANGE_RATE_TYPE}'
• Lookup Currency name on SAP table TCURTFROM "TCURT" WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is LOCAL_CURRENCIES.Delivery type is Truncate.
5. FINANCIAL_CURRENCY_J_B_04_SJ / FINANCIAL_CURRENCY_B_04• Input Properties: allow duplicate keys• Joins tables Currency_Codes and Local_Currencies to All_Time (using Cartesian product).• Lookup Country ISO code from target• Lookup Currency Codes on SAP table TCURC which are found in the list of currencies
(Include For Conversion) specified by the user• Lookup Currency name from target for Base Currency and Group Currency• Output is FINANCIAL_CUR_CONV
Delivery type is Update/Insert.
6. FINANCIAL_CURRENCY_J_B_05_SJ / FINANCIAL_CURRENCY_B_05• Input Properties: allow duplicate keys• FINANCIAL_CUR_CONV calculates the current exchange rates based on the effective
dates and the exchange rate typeFROM CURRENCY_RATE T1 …FROM FINANCIAL_CUR_CONV FCCWHERE FCC.PST_PRD_END_DT BETWEEN {$L_EXTRACT_FROM_DATE_STR} AND {$L_PUBLISH_UNTIL_DATE_STR} AND FCC.RATE_PUBLISHED_DT = {$L_DEFAULT_DATE_STR} AND FCC.FROM_CURRENCY_CD <> FCC.TO_CURRENCY_CD
• Output is FINANCIAL_CUR_CONV.Delivery type is Update.
• Filter on delivery is 'if exchange rates changed':RATE_PUBLISHED_DT <> I_RATE_PUBLISHED_DT ORTO_TO_BASE_EXCH_RT <> I_TO_TO_BASE_EXCH_RT ORBASE_TO_TO_EXCH_RT <> I_BASE_TO_TO_EXCH_RT ORFROM_TO_BS_EXCH_RT <> I_FROM_TO_BS_EXCH_RT ORBS_TO_FRM_EXCH_RT <> I_BS_TO_FRM_EXCH_RT OREXCHANGE_RT <> I_EXCHANGE_RT
26 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
7. FINANCIAL_CURRENCY_J_B_06_SJ / FINANCIAL_CURRENCY_B_06• Input Properties: allow duplicate keys• Pre_procedure: Determines the minimum Effective Date
$SQL_STRING:= CONCAT('SELECT MIN(EFFECTIVE_DT) FROM CURRENCY_RATE WHERE EFFECTIVE_DT BETWEEN ',$L_EXTRACT_FROM_DATE_STR);$SQL_STRING:= CONCAT($SQL_STRING, ' AND ');$SQL_STRING:= CONCAT($SQL_STRING,$L_PUBLISH_UNTIL_DATE_STR);$L_MIN_RATES_CHANGED_DATE:= LOOKUP('TARGET',$SQL_STRING);$L_MIN_RATES_CHANGED_DATE_STR:=TOCHAR($L_MIN_RATES_CHANGED_DATE);
• Conditional Run: IF_MIN_EFFECTIVE_DT_IS_NULL• FINANCIAL_CUR_CONV calculates the forward date exchange rates based on the
changes made in the previous build.FROM CURRENCY_RATE T1 …FROM FINANCIAL_CUR_CONV FCCWHERE FCC.PST_PRD_END_DT <= {$L_PUBLISH_UNTIL_DATE_STR} AND FCC.PST_PRD_END_DT >= {$L_MIN_RATES_CHANGED_DATE_STR} AND FCC.FROM_CURRENCY_CD <> FCC.TO_CURRENCY_CD
• Output is FINANCIAL_CUR_CONV.Delivery type is Update.
• Filter on delivery is 'if exchange rates changed':RATE_PUBLISHED_DT <> I_RATE_PUBLISHED_DT ORTO_TO_BASE_EXCH_RT <> I_TO_TO_BASE_EXCH_RT ORBASE_TO_TO_EXCH_RT <> I_BASE_TO_TO_EXCH_RT ORFROM_TO_BS_EXCH_RT <> I_FROM_TO_BS_EXCH_RT ORBS_TO_FRM_EXCH_RT <> I_BS_TO_FRM_EXCH_RT OREXCHANGE_RT <> I_EXCHANGE_RT
Source Tables/Files• TCURR Exchange Rates• TCURC Currency Codes• TCURT Currency Code Names• T001 Company Codes• TCURX Decimal Places in Currencies
Target Tables/Files• FINANCIAL_CUR_CONV
Work Tables• CURRENCY_RATE• CURRENCY_LOOKUP• CURRENCY_SCAL_FCTR• LOCAL_CURRENCIES• COUNTRY_ISO
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Developer Guide 27
Chapter 1: JobStream and Build Descriptions
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Material
Description:The Material dimension, an important component of Supply Chain Management, describes the products that a company manufactures and sells, allowing one to analyze Sales or Inventory across Material Types, Groups, etc. For example, the two most basic Inventory Management questions are - "what have I got?" and "where is it?". The Material Dimension tells us what we have.
The key (DIM_ID) is composed of the following attribute.• MATERIAL_ID
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column MATERIAL_DIM_ID.
Material is a CDC (Changed Data Capture) table dimension.
Data extraction from the ERP source, for each run, is controlled/limited by the From/To extraction Dates as specified by the related Jobflow Properties in the Analytic Applications Console. Only those records which are new or modified since the last extraction will be selected for processing.
Since this is an incremental dimension, the Mart Begin Date parameter should be set (via the console) to match the ERP's beginning date while this table is initially being loaded in order to ensure that all records are selected from the source.
Loading this dimension consists of:
1. Extracting general material data.
2. Extracting material groups.
3. Loading dimension table.
Impact of Conformed DimensionThis is a shared dimension that is common to• Inventory Analysis• Procurement Analysis• Sales Analysis
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
28 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
DependenciesNone.
Configuration Parameters• MATERIAL_CAT_DOMNAME
This parameter determines the material category codes and descriptions from the SAP fixed value domain table. This value, 'ATTYP', should not be changed.
• MTRL_LEVEL1_LENGTHNumber of characters allowed for denoting the level 1 characteristic within the material product hierarchy
• MTRL_LEVEL2_LENGTHNumber of characters allowed for denoting the level 2 characteristic within the material product hierarchy
• MTRL_LEVEL3_LENGTHNumber of characters allowed for denoting the level 3 characteristic within the material product hierarchy
• MTRL_LEVEL4_LENGTH• Number of characters allowed for denoting the level 4 characteristic within the material
product hierarchy• MTRL_LEVEL5_LENGTH
Number of characters allowed for denoting the level 5 characteristic within the material product hierarchy
User InterventionUser Interface• Pre-Run
Before initially loading this table, set the Mart Begin Date back to the ERP's beginning date in order to ensure that all source Material records will be retrieved. In the console, set the parameter value to the necessary early date and save. For the duration of this table's initial load job(s), ensure that no other jobs are run.
• Post-RunWhen the Material table initial load is complete, ensure that the Mart Begin Date parameter is properly reset to its defined configuration value.
• CDC DatesCDC_EXTRACT_FROM_DATECDC_EXTRACT_TO_DATETo limit the volume of data retrieved from SAP, particularly during historical data loads, the CDC_ExtractFrom/To_Date range may be set either specifically or by limiting the time span for which an extraction will be done.
Job Flow1. MATERIAL_J / INIT_P• Calls function MATERIAL_VARS_F() to set the jobflow parameters.
Developer Guide 29
Chapter 1: JobStream and Build Descriptions
2. MATERIAL_J_B_01_SJ / MATERIAL_B_01• Input Properties: allow duplicate keys• Extracts general Material info from SAP table MARA where ERSDA or LAEDA is within the
CDC Extract Date rangeFROM "MARA"WHERE (("MARA"."ERSDA" >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND "MARA"."ERSDA" <= date '{$S_CDC_EXTRACT_TO_FDATE}') OR ("MARA"."LAEDA" >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND "MARA"."LAEDA" <= date '{$S_CDC_EXTRACT_TO_FDATE}'))
• Lookup Material description on SAP table MAKTWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Division name on SAP table TSPATWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Industry Sector description on SAP table T137TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Category description on SAP table DD07TWHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND "DOMNAME" = 'ATTYP'
• Lookup Material Group description name on SAP table T023TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Type description on SAP table T134TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Price Band Category description on SAP table TWPTTWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• For each hierarchy level 1 - 5, Lookup Material Level name on SAP table T179TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Vendor name on SAP table LFA1WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is MATERIAL_DEX.Delivery type is Truncate.
3. MATERIAL_J_B_02_SJ / MATERIAL_B_02• Input Properties: allow duplicate keys• Extracts Material Groups info from SAP table T023• Lookup Material Group description on SAP table T023T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output to MATERIAL_DEX.Delivery type is Append.
4. MATERIAL_J_B_03_SJ / MATERIAL_D_03• Loads dimension MATERIAL from MATERIAL_DEX
5. MATERIAL_J / END_P• Post Procedure:
Update MATERIAL_SCD (table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving').
30 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Source Tables/Files• MARA General Material Data• MAKT Material Descriptions• TSPAT Organizational Unit: Sales Divisions: Texts• T137T Industry Descriptions• DD07T DD: Texts for Domain Fixed Values (Language-Dependent)• T023T Material Group Descriptions• T134T Material Type Descriptions• TWPTT Text: price band category• T179T Materials: Product hierarchies: Texts• LFA1 Vendor Master (General Section)• T023 Material Groups
Target Tables/Files• MATERIAL
Work Tables• MATERIAL_DEX• MATERIAL_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Material Movement Activity
DescriptionThis fact contains information required for management queries relating to material movements. Material movements are the most basic type of actions that need to be tracked while managing inventory. Examples of such movements are receipts, issues or transfers of materials across plants. Each time a material movement occurs, the information pertaining to it is stored in a document created in the source system.
The document contains information such as the quantity of materials moved, the date when the movement occurred, the material that moved, the plant it moved from or to, etc. The metric information from the document is stored here.
Developer Guide 31
Chapter 1: JobStream and Build Descriptions
Notes: The material movement fact is designed for high performance management queries and high performance load of summary fact tables. For this reason, it only contains foreign key columns and measures. Textual attributes that are part of the movement document are kept separate in the Movement Document entity. Related to the Material Movement entity are summary entities such as Stock Overview that also contain metrics that are derived from goods movement transactions.
This fact is composed of two tables.
1. MATERIAL_MVMNT_DOC contains the key components (DIM_ID), the related SID and descriptive/textual information. The DIM_ID is composed of the following attributes:
• DOCUMENT_NO
• DOCUMENT_YEAR_VAL
• DOCUMENT_ITEM_NO
2. MATERIAL_MVMNT_DTL contains the Document related SID, the dimensional SIDs and the fact measures.
Material Movement is a CDC (Changed Data Capture) fact table.
Data extraction from the ERP source, for each run, is controlled/limited by the from/to extraction dates as specified by the related Jobflow Properties in the Analytic Applications Console. The jobsteam is also controlled by MTRL_MVMNT_UPD_FLAG parameter which is used to determine whether you would like to process updates.
The job consists of two major steps:
1. Data retrieval from the SAP Material header and detail tables.
2. Loading of the 'doc' and 'detail' tables which comprise this fact.
Configuration Parameters• MTRL_MVMNT_UPD_FLAG
This parameter is used to determine whether you would like to process updates to the material movement fact. Processing updates will impact the performance as more overhead is generated while determining if an update or insert should be done and while performing the actual updates. To process updates, choose Y, otherwise choose N.
User Intervention• User Interface
None.• CDC Dates
CDC_EXTRACT_FROM_DATECDC_EXTRACT_TO_DATETo limit the volume of data retrieved from SAP, particularly during historical data loads, the CDC_ExtractFrom/To_Date range may be set either specifically or by limiting the time span for which an extraction will be done.
• Installing a newer (or same) version of this component over an existing one will replace the entire table and its contents will be lost. If you wish to keep existing data, save a copy of the data and reload it after the upgrade has been completed.
Job Flow1. MTRL_MVMNT_DTL_DOC_J / INIT_P• Calls function MATERIAL_MVMNT_VARS_F () to set the jobflow parameters.
32 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
2. MTRL_MVMNT_DTL_DOC_J_INS_01_SJ / MTRL_MVMNT_DTL_DOC_INS_B_01• If MTRL_MVMNT_UPD_FLAG parameter is set to 'N' (Not to process updates)• input properties: allow duplicate keys
FROM "MKPF" INNER JOIN "MSEG" ON ("MKPF"."MJAHR" = "MSEG"."MJAHR") AND ("MKPF"."MBLNR" = "MSEG"."MBLNR")WHERE ("MKPF"."CPUDT" >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND "MKPF"."CPUDT" <= date '{$S_CDC_EXTRACT_TO_FDATE}')
3. MTRL_MVMNT_DTL_DOC_J_UPDIN_01_SJ/MTRL_MVMNT_DTL_DOC_UPDINS_B_01• If MTRL_MVMNT_UPD_FLAG parameter is set to 'Y' (Process of updates is required).• input properties: allow duplicate keys• Extracts Material movement info from SAP tables MKPF and MSEG for rows whose
accounting document entry date or create date is within the CDC extract date range.FROM "MKPF" INNER JOIN "MSEG" ON ("MKPF"."MJAHR" = "MSEG"."MJAHR") AND ("MKPF"."MBLNR" = "MSEG"."MBLNR")WHERE (("MKPF"."CPUDT" >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND "MKPF"."CPUDT" <= date '{$S_CDC_EXTRACT_TO_FDATE}') OR ("MKPF"."AEDAT" >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND "MKPF"."AEDAT" <= date '{$S_CDC_EXTRACT_TO_FDATE}'))
• Lookup Batch date on SAP table MCHA.• Lookup material number on SAP table EKPO.• Lookup Valuation area code on SAP table T001W.• Lookup Local Currency code and Fiscal Variant on SAP table T001.• Output is MATERIAL_MVMNT_FEX.
Delivery Type is Truncate.
4. MTRL_MVMNT_DTL_DOC_J_B_02_SJ / MTRL_MVMNT_DTL_DOC_B_02• Pre Procedure
Determines the 'As At Date' from the Stock Opening Balance.Since Material Movement is one of the data sources for Stock Overview, there is a constraint on processing prior (historical) periods after the Stock Opening Balance and Stock Overview processes have begun. This 'As At' value is used to determine if and when the Stock Opening Balance was run in order to permit or deny processing of prior periods.
• Retrieves the Header/Doc and Detail info from work table MATERIAL_MVMNT_FEX and calculates the Stock Accuracy Percentages.
• Lookup on the existing 'doc' and 'detail' records to determine if the incoming rows are new, existing or changed. FROM "MATERIAL_MVMNT_DOC" DOC, "MATERIAL_MVMNT_DTL" DTL, "MATERIAL_MVMNT_FEX" FEX WHERE FEX."DOCUMENT_NO" = DOC."DOCUMENT_NO" ANDFEX."DOCUMENT_ITEM_NO" = DOC."DOCUMENT_ITEM_NO" ANDFEX."DOCUMENT_YEAR_VAL" = DOC."DOCUMENT_YEAR_VAL" ANDDOC."MTRL_MVMNT_DOC_SID" = DTL."MTRL_MVMNT_DOC_SID"
• Lookup the Local Currency's Scaling Factor on table CURRENCY_SCAL_FCTR.• Output is MATERIAL_MVMNT_DOC
Delivery Type is Update/Insert.• Output is MATERIAL_MVMNT_DTL
Delivery Type is Update/Insert.
Source Tables/Files• EKPO Purchasing Document Item• MCHA Batches• MKPF Header: Material Document.• MSEG Document Segment• T001 Company Codes• T001W Valuation area
Developer Guide 33
Chapter 1: JobStream and Build Descriptions
Target Tables/Files• MATERIAL_MVMNT_DTL• MATERIAL_MVMNT_DOC
Work Tables• MATERIAL_MVMNT_FEX
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Material Movement Document Class
DescriptionThis contains combinations of attributes that classify material documents. Such attributes describe the nature of the goods movement. At the highest level of classification, a goods movement is either an "issue" or a "receipt". At a lower level, the movement class describes the exact nature of the movement (e.g. goods issue to production) and the reason for movement. Such classifications are used in the calculation of stock level and stock usage.
For example, "goods issue for transfer to another plant" is not considered as usage whereas "goods issue to production" is. Typically, a source system has many such classifiers, such as Document Category, Document Type, Document Line Type, etc. This dimension combines every one of them into a single entity. This is done primarily for technical reasons, such as improving the performance of queries and minimizing the storage space required (a single link between the Class and the Fact is sufficient to answer queries that look at metrics across document classifiers).
However, in certain cases, it makes business sense to do so as well. For example, combinations of classifiers may be meaningful to a business. If so, new attributes may be added that represent such meaningful combinations. This also contains a number of multipliers. Multipliers are used to calculate metrics and have values of 1 or 0. The derived metric is calculated by multiplying the multiplier with the existing metric. Multipliers are defined by the ETL program based on certain source system classifiers.
34 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
The key (DIM_ID) is composed of the following attributes:• DOCUMENT_TYPE_CD• DOCUMENT_LN_TYP_CD• SPECIAL_STOCK_CD• INTTNG_DOC_TYP_CD• RECEIPT_TYP_CD• CNSMPTN_PSTNG_CD
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column MV_DOC_CLSS_DIM_ID.
MOVEMENT_DOC_CLSS is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading of this dimension consists of three major steps:
1. Extract the Document Types and Document Line Types.
2. Extract the Document Line Types.
3. Load the dimension.
Two passes are used to retrieve the Document Type and Line Type combinations:
1. Defined/existing combinations of the Doc Type & Doc Line Types.
2. Defined/existing Document Line Types only; the Doc Type is 'unknown'.
Impact of Conformed DimensionNone. Material Movement Document Class is unique to the Inventory Analysis Application.
Configuration Parameters• GOODS_ISSUE_DOC_TYPE
This parameter is used to determine which document types are considered "Goods Issue" material movements. The available list of values can be found in T003.BLART. This list allows multiple values. The values should be surrounded by single quotes and separated by a comma. This parameter is also used to determine the SIGN reversal multiplier. Documents that are "Goods Issue" types are recorded with negative values and quantities as they are a withdrawal from inventory.
• GOODS_RECEIPT_DOC_TYPEThis parameter is used to determine which document types are used for "Goods Receipt" material movements. The available list of values can be found in T003.BLART. This list allows multiple values. The values should be surrounded by single quotes and separated by a comma. This parameter is used to determine the document types that are loaded into this table, as well as the SIGN reversal multiplier. Documents that are "Goods Receipt" types are recorded with positive values and quantities as they are an addition to inventory.
• IA_INTTNG_DOC_TYP_DOMNAMEThis parameter determines the initiating document type code and description for movement transactions from the SAP fixed value domain table. This value should not be changed.
• IA_RECEIPT_TYP_DOMNAMEThis parameter determines the receipt type code and description for movement transactions from the SAP fixed value domain table. This value should not be changed.
• UNPLANNED_USG_MULT_CDThis parameter is used to determine which Inventory goods Issues were unplanned, i.e. to set the UNPLANNED_USG_MULT. The list of available values can be found from DD07T.DOMVALUE_L where DOMNAME = 'KZVBU' and SPRAS = "Language Code" (e.g. E).
• USAGE_MULT_CDThis parameter is used to determine which inventory movements affect consumption. The list of available values can be found from DD07T.DOMVALUE_L where DOMNAME = 'KZVBU' and SPRAS = "Language Code" (e.g. E).
Developer Guide 35
Chapter 1: JobStream and Build Descriptions
User Intervention• User Interface
Post-runFrom the Console 'Tools', run 'Movement Document Class Multipliers' to review and update the Multipliers for the various Doc Class combinations. This is the responsibility of the business user who is familiar with the SAP Inventory Module as implemented. See the User Guide for detailed explanation and instructions.
Job Flow1. MOVEMENT_DOC_CLSS_J / INIT_P• Calls function MOVEMENT_DOC_CLSS_VARS_F() to set the jobflow parameters
2. MOVEMENT_DOC_CLSS_J_B_01_SJ / MOVEMENT_DOC_CLSS_B_01• Extracts Doc Type, Line Type, Receipt Type, etc. and the multipliers from SAP tables T003,
T156 and T156T. Selection is limited by the configuration parameters.FROM "T003", "T156" INNER JOIN "T156T" ON "T156"."BWART" = "T156T"."BWART"WHERE T003.BLART IN ({$U_GOODS_RECEIPT_DOC_TYPE}, {$U_GOODS_ISSUE_DOC_TYPE}) AND T156T.SPRAS = '{$U_LANGUAGE_CD}'
• Input Properties: merge duplicate keys• Lookup Special Stock description on SAP table T148T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Movement Indicator description (INTTNG_DOC_TYP) on SAP table DD07TWHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND "DOMNAME" = '{$U_IA_INTTNG_DOC_TYP_DOMNAME}'
• Lookup Receipt Type description on SAP table DD07TWHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND "DOMNAME" = 'KZZUG'
• Lookup Doc Type on SAP table T003TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is MOVEMENT_DOC_C_DEX.Delivery type is truncate.
3. MOVEMENT_DOC_CLSS_J_B_02_SJ / MOVEMENT_DOC_CLSS_B_02• Input Properties: merge duplicate keys• Extracts Document Line Type, Receipt Type, etc. and the multipliers from SAP tables T156
and T156T. The Document Type is set to 'unknown'.FROM "T156", "T156T"WHERE "T156"."BWART" = "T156T"."BWART" AND "T156T"."SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Doc Type description on SAP table T156TWHERE TRIM("SPRAS") = '{$U_LANGUAGE_CD}' AND "SOBKZ" = ' '
• Output is Append to MOVEMENT_DOC_C_DEX
4. MOVEMENT_DOC_CLSS_J_B_03_SJ / MOVEMENT_DOC_CLSS_B_03• Loads dimension MOVEMENT_DOC_CLSS_UPD from MOVEMENT_DOC_C_DEX
Delivery type is update/insert.
5. MOVEMENT_DOC_CLSS_J / INIT_P• Post Procedure:
Update MVMNT_DOC_CLSS_SCD(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
36 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Source Tables/Files• DD07T DD: Texts for domain fixed values (language-dependent)• T003 Document types• T003T Document type texts• T148T Special Stock Descriptions• T156 Movement Type• T156T Movement Type Text
Target Tables/Files• MOVEMENT_DOC_CLSS
Work Tables• MOVEMENT_DOC_C_DEX• MVMNT_DOC_CLSS_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Material Reservation
DescriptionThis fact contains information related to material reservations at a specific plant or storage location. Each time a material reservation occurs, the information pertaining to it is stored in a document created in the source system. The document contains information such as the quantity of materials reserved, the date when the reservation occurred, the material reserved, the plant at which the reservation was made, etc. The metric information from the document is stored here.
This fact is composed of two tables:
1. MTRL_RSRVTN_DOC contains the key components (DIM_ID), the related SID and descriptive/textual information. The DIM_ID is composed of the following attributes:
• DOCUMENT_NO• RECORD_TYPE_CD• DOCUMENT_ITEM_NO
Developer Guide 37
Chapter 1: JobStream and Build Descriptions
2. MTRL_RSRVTN_DTL contains the Document related SID, the dimensional SIDs and the fact measures.
Material Reservation is a CDC (Changed Data Capture) fact table.
Initial Run will load all the reservation rows. Data extraction for the incremental loads will be controlled by the Extract From Date, which can be set to the desired starting point and could be set to 0. Subsequent Runs will extract data constrained by the Material Reservation Extract Days parameter. For example, if the parameter is set to 60 (days) the ETL will extract Reservations with a Required Date that is greater than the (Extract From Date less 60 days).The job consists of two major steps.
1. Data retrieval from the SAP Material header and detail tables.
2. Loading of the 'doc' and 'detail' tables, which comprise this fact.
Configuration Parameters• MTRL_RSRVTN_ETR_DYS
This parameter determines the number of days of history that should be loaded into material reservation after initial load. For example, if the value is set to 60, and today is December 1, 2002, the reservation job will extract all reservations where the request date is <= 2002/12/01 - 60 days i.e. 2002/10/02. This parameter should be set to a) reduce the volume of data extracted from the system for update purposes and b) Ensure that open reservations are updated and closed. If it typically takes one month to close a reservation, the value should be set for 30 days + buffer for reservations open longer than 30 days.
User Intervention• User Interface
None.• CDC Dates
CDC_EXTRACT_FROM_DATECDC_EXTRACT_TO_DATETo limit the volume of data retrieved from SAP, particularly during historical data loads, the CDC_ExtractFrom/To_Date range may be set either specifically or by limiting the time span for which an extraction will be done.
• Installing a newer (or same) version of this component over an existing one will replace the entire table and its contents will be lost. If you wish to keep existing data, save a copy of the data and reload it after the upgrade has been completed.
Job Flow1. MTRL_RSRVTN_DTL_DOC_J / INIT_P• Calls function MTRL_RSRVTN_DTL_DOC_VARS_F() to set the jobflow parameters
2. MTRL_RSRVTN_DTL_DOC_J_B_01_SJ / MTRL_RSRVTN_DTL_DOC_B_01• input properties: allow duplicate keys• Extracts Material reservations from SAP tables RESB, RKPF.
FROM "RKPF", "RESB" WHERE "RKPF"."RSNUM" = "RESB"."RSNUM" AND "RESB"."BDTER" >= date '{$S_CDC_EXTRACT_FROM_FDATE}'
• Lookup Fiscal Variant on SAP table T001 FROM "T001" INNER JOIN "T001K" ON "T001K"."BUKRS" = "T001"."BUKRS" INNER JOIN "T001W" ON "T001W"."BWKEY" = "T001K"."BWKEY"
• Output is MTRL_RSRVTN_FEX.Delivery Type is Truncate.
38 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
3. MTRL_RSRVTN_DTL_DOC_J_B_02_SJ / MTRL_RSRVTN_DTL_DOC_B_02• Input properties: allow duplicate keys• Extracts the Header/Doc and Detail info from work table MTRL_RSRVTN_FEX and
calculates the Stock Accuracy Percentages.• Lookup on the existing 'doc' and 'detail' records to determine if the incoming rows are new,
existing or changed. FROM "MTRL_RSRVTN_DOC" DOC, "MTRL_RSRVTN_DTL" DTL, "MTRL_RSRVTN_FEX" FEX WHERE DOC."MTRL_RSRV_DOC_SID" = DTL."MTRL_RSRV_DOC_SID" AND FEX."DOCUMENT_NO" = DOC."DOCUMENT_NO" AND FEX."DOCUMENT_ITEM_NO" = DOC."DOCUMENT_ITEM_NO" AND FEX."RECORD_TYPE_CD" = DOC."RECORD_TYPE_CD"
• Lookup the Local Currency's Scaling Factor on table CURRENCY_SCAL_FCTR.• Output is MTRL_RSRVTN_DTL
Delivery Type is Update/Insert.• Output is MTRL_RSRVTN_DOC
Delivery Type is Update/Insert.
Source Tables/Files• RESB Reservation/dependent requirements • RKPF Document Header: Reservation
Target Tables/Files• MTRL_RSRVTN_DTL• MTRL_RSRVTN_DOC
Work Tables:• MTRL_RSRVTN_FEX
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Developer Guide 39
Chapter 1: JobStream and Build Descriptions
Material Storage
DescriptionThis table contains material information that is specific to the plant in which it is stored. For example, it contains the plant-specific attributes of a material, such as the maximum and minimum size a batch is allowed to have in a plant, or the maximum stock level that is allowed. It also has material planning information (such as procurement planning or inventory planning) specific to a plant, such as the MRP group in charge of planning for the material, the purchasing group responsible for procuring the material, etc.
The Material Storage key (DIM_ID) is composed of the following attributes:• MATERIAL_ID• PLANT_ID
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column MTRL_STRG_DIM_ID.
Material Storage is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading of this table consists of two steps.
1. Extract the storage data from SAP.
2. Load the Material Storage table.
Impact of Conformed DimensionNone. Material Storage is unique to the Inventory Analysis Application.
DependenciesNone.
Configuration Parameters• MATERIAL_STORAGE_PRCRMT_TYP_CD
Potential name: MTRL_STRG_PRCRMT_TYP_DOMNAME = 'BESKZ'This parameter determines the plant specific special procurement types from the SAP fixed value domain table. This value should not be changed.
User InterventionNone.
Job Flow1. MATERIAL_STORAGE_J / INIT_P• Calls function MATERIAL_STORAGE_VARS_F() to set the jobflow parameters.
40 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
2. MATERIAL_STORAGE_J_B_01_SJ / MATERIAL_STORAGE_B_01• Extracts Material Storage ABC code, MRP info, Purchasing info, Procurement info,
Valuation Category and the quantity control values from SAP table MARC.• Input properties: allow duplicate keys• Lookup MRP Type description on SAP table T438T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Purchasing Group description on SAP table T024WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Procurement Type description on SAP table DD07TWHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND "DOMNAME" = '{$U_MTRL_STRG_PRCRMT_TYP_DOMNAME}
• Lookup Valuation Category description on SAP table T149TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup MRP Controller name on SAP table T024D• Lookup Special Procurement Type description on SAP table T460T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is MATERIAL_STORA_DEX.Delivery type is truncate.
3. MATERIAL_STORAGE_J_B_02_SJ / MATERIAL_STORAGE_D_02• Loads dimension MATERIAL_STORAGE from MATERIAL_STORA_DEX.
Delivery type is update/insert.
4. MATERIAL_STORAGE_J / END_P• Post Procedure:
Update MATERIAL_STRG_SCD(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
Source Tables/Files• MARC Material Master: C Segment• DD07T DD: Texts for domain fixed values (language-dependent)• T024 Purchasing Groups• T024D MRP• T149T Global valuation category descriptions• T438T MRP description• T460T Texts for special procurement keys
Target Tables/Files• MATERIAL_STORAGE• MATERIAL_STRG_SCD
Work Tables• MATERIAL_STORA_DEX
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
Developer Guide 41
Chapter 1: JobStream and Build Descriptions
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Physical Inventory
DescriptionThis fact compares the expected quantity of a material (or the book quantity) against the actual quantity based on the physical count of material in the storage location. This activity is done to determine the accuracy of the stock balance in the inventory books. An over- or under-estimation of the stock balance is measured as a percentage of the actual stock. One of two indicators of accuracy may be used - the absolute stock accuracy, which treats both positive and negative deviations from the actual as the same, and the relative stock accuracy, which makes a distinction between positive and negative deviations.
This fact is composed of two tables.
1. PHYSICAL_INV_DOC contains the key components (DIM_ID), the related SID and descriptive/textual information. The DIM_ID is composed of the following attributes:
• DOCUMENT_NO
• FISCAL_YEAR_VAL
• DOCUMENT_ITEM_NO
2. PHYSICAL_INV_DTL contains the Document related SID, the dimensional SIDs and the fact measures.
Physical Inventory is a CDC (Changed Data Capture) fact table.
Data extraction from the ERP source, for each run, is controlled/limited by the From/To extraction Dates as specified by the related Jobflow Properties in the Analytic Applications Console.
The job consists of two major steps.
1. Data retrieval from the SAP Physical Inventory header and detail tables.
2. Loading of the 'doc' and 'detail' tables which comprise this fact.
Impact of Conformed DimensionNone. Physical Inventory is a fact and is unique to the Inventory Analysis Application.
Configuration ParametersNone.
42 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
User Intervention• User Interface
None.• CDC Dates
CDC_EXTRACT_FROM_DATECDC_EXTRACT_TO_DATETo limit the volume of data retrieved from SAP, particularly during historical data loads, the CDC_ExtractFrom/To_Date range may be set either specifically or by limiting the time span for which an extraction will be done.
• Installing a newer (or same) version of this component over an existing one will replace the entire table and its contents will be lost. If you wish to keep existing data, save a copy of the data and reload it after the upgrade has been completed.
Job Flow1. PHYSICAL_INV_DTL_DOC_J / INIT_P• Calls function PHYSICAL_INV_DTL_DOC_VARS_F() to set the jobflow parameters.
2. PHYSICAL_INV_DTL_DOC_J_B_01_SJ / PHYSICAL_INV_DTL_DOC_B_01• input properties: allow duplicate keys• Extracts Material, Storage Location, Fiscal Year, Counts, Quantities, Amounts, etc. from
SAP tables IKPF and ISEG.The Last Count Date, ZLDAT, is used in the CDC Date range filter.FROM "IKPF" INNER JOIN "ISEG" ON "IKPF"."IBLNR" = "ISEG"."IBLNR" AND "IKPF"."GJAHR" = "ISEG"."GJAHR" AND ("IKPF"."DSTAT" = 'X' OR "IKPF"."DSTAT" = 'A') AND "ISEG"."XDIFF" = 'X' AND "ISEG"."XZAEL" = 'X' AND "ISEG"."XLOEK" <> 'X'WHERE ("IKPF"."ZLDAT" >= date '{$S_CDC_EXTRACT_FROM_FDATE}' AND "IKPF"."ZLDAT" <= date '{$S_CDC_EXTRACT_TO_FDATE}')
• Lookup the Plant's Fiscal Variant code on SAP tables T001, T001K and T001WFROM "T001" INNER JOIN "T001K" ON "T001K"."BUKRS" = "T001"."BUKRS" INNER JOIN "T001W" ON "T001W"."BWKEY" = "T001K"."BWKEY"
• Lookup the Plant's Valuation Area on SAP table T001W• Output is PHYSICAL_INV_FEX.
Delivery Type is Truncate.
3. PHYSICAL_INV_DTL_DOC_J_B_02_SJ / PHYSICAL_INV_DTL_DOC_B_02• Pre Procedure
Determines the 'As At Date' from the Stock Opening Balance.Since Physical Inventory is one of the data sources for Stock Overview, there is a constraint on processing prior (historical) periods after the Stock Opening Balance and Stock Overview processes have begun. This 'As At' value is used to determine if and when the Stock Opening Balance was run in order to permit or deny processing of prior periods.
• Extracts the Header/Doc and Detail info from work table PHYSICAL_INV_FEX and calculates the Stock Accuracy Percentages.
• Lookup on the existing 'doc' and 'detail' records to determine if the incoming rows are new, existing or changed. FROM "PHYSICAL_INV_DOC" DOC, "PHYSICAL_INV_DTL" DTL, "PHYSICAL_INV_FEX" FEX WHERE DOC."PHYS_INV_DOC_SID" = DTL."PHYS_INV_DOC_SID" AND FEX."DOCUMENT_NO" = DOC."DOCUMENT_NO" AND FEX."DOCUMENT_ITEM_NO" = DOC."DOCUMENT_ITEM_NO" AND FEX."FISCAL_YEAR_VAL" = DOC."FISCAL_YEAR_VAL"
• Lookup the Local Currency's Scaling Factor on table CURRENCY_SCAL_FCTR• Output is PHYSICAL_INV_DTL
Delivery Type is Update/Insert.• Output is PHYSICAL_INV_DOC
Delivery Type is Update/Insert.
Developer Guide 43
Chapter 1: JobStream and Build Descriptions
Source Tables/Files• IKPF Header: Physical Inventory Document• ISEG Physical Inventory Document Items• T001 Company Codes• T001K Valuation area• T001W Plants/Branches
Target Tables/Files• PHYSICAL_INV_DTL• PHYSICAL_INV_DOC
Work Tables• PHYSICAL_INV_FEX• CURRENCY_SCAL_FCTR
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Plant
DescriptionThis dimension is used to describe the plants of an organization. The most basic inventory management questions are - "what have I got?" and "where is it?". This helps us answer the "where is it?" question. In the context of Inventory Analysis, plants refer to warehouses. The plant or warehouse makes merchandise available for production, distribution and sale. A plant may be subdivided into storage locations, allowing stocks of materials to be broken down according to predefined criteria (e.g., location and materials planning aspects).
The key (DIM_ID) is composed of the following attributes:• PLANT_ID• STORAGE_LCTN_CD
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column PLANT_DIM_ID.
Plant is a non-CDC (Changed Data Capture) table dimension.
44 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading the Plant table consists of:
1. Extracting plants.
2. Extracting plants and storage locations.
3. Loading the dimension table.
Because the key contains 2 attributes, two passes are required to create the combinations for:
1. PLANT_ID and blank/unknown STORAGE_LCTN_CD
2. PLANT_ID with STORAGE_LCTN_CD value
Impact of Conformed DimensionThis is a shared dimension that is common to• Inventory Analysis• Procurement Analysis• Sales Analysis
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
DependenciesNone.
Configuration Parameters• PLANT_CAT_DOMNAME
This parameter determines the plant category codes and descriptions from the SAP fixed value domain table. Default is 'VLFKZ'. This value should not be changed.
• MRP_AT_STRG_LCTN_DOMNAMEThis parameter determines the "Storage Location MRP types" from the SAP fixed value domain table. Default is 'DISKZ'. Warning: Please do not change this value.
User InterventionNone.
Job Flow1. PLANT_J / INIT_P• Calls function PLANT_VARS_F() to set the jobflow parameters.
Developer Guide 45
Chapter 1: JobStream and Build Descriptions
2. MATERIAL_J_B_01_SJ / PLANT_B_01• Input Properties: allow duplicate keys• Extracts Plant info from SAP tables T001W• Lookup Plant Company info on SAP tables T001 and T001K
FROM "T001" INNER JOIN "T001K" ON "T001"."BUKRS" = "T001K"."BUKRS
• Lookup Plant Group Currency code on SAP tables T000, T001 and T001KFROM "T001" INNER JOIN "T001K" ON "T001"."BUKRS" = "T001K"."BUKRS" INNER JOIN "T000" ON "T001"."MANDT" = "T000"."MANDT
• Lookup Plant County name on SAP table T005FWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Country name on SAP table T005TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Category name on SAP table DD07TWHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND "DOMNAME" = 'VLFKZ'
• Lookup Plant Region name on SAP table T005UWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Supply Region name on SAP table TZONTWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Division name on SAP table TSPATWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Negative Stock Indicator on SAP table T001K• Lookup Plant Unloading Point name on SAP table KNVA
WHERE "DEFAB" = 'X'
• Output is PLANT_DEX.Delivery type is Truncate.
3. MATERIAL_J_B_02_SJ / PLANT_B_02• Input Properties: allow duplicate keys• Extracts Plant and Storage Location info from SAP tables T001W and T001L
FROM "T001W" INNER JOIN "T001L" ON "T001W"."WERKS" = "T001L"."WERKS"
• Lookup Plant Company info on SAP tables T001 and T001KFROM "T001" INNER JOIN "T001K" ON "T001"."BUKRS" = "T001K"."BUKRS
• Lookup Plant Group Currency code on SAP tables T000, T001 and T001KFROM "T001" INNER JOIN "T001K" ON "T001"."BUKRS" = "T001K"."BUKRS" INNER JOIN "T000" ON "T001"."MANDT" = "T000"."MANDT
• Lookup Plant County name on SAP table T005FWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Country name on SAP table T005TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Category name on SAP table DD07TWHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND "DOMNAME" = '{$U_ PLANT_CAT_DOMNAME}'
• Lookup Plant Region name on SAP table T005UWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Supply Region name on SAP table TZONTWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Division name on SAP table TSPATWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Negative Stock Indicator on SAP table T001K• Lookup Plant MRP Storage Location description on SAP table DD07T
WHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND "DOMNAME" = 'DISKZ'
• Lookup Plant Unloading Point name on SAP table KNVAWHERE "DEFAB" = 'X'
• Output is Append to PLANT_DEX.
46 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
4. MATERIAL_J_B_03_SJ / PLANT_D_03• Loads dimension PLANT from PLANT_DEX• Post Procedure:
Update PLANT_SCD (table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving').
Source Tables/Files• T001 Company Codes• T001K Valuation area• T001L Storage Locations• T001W Plants/Branches• T005F County: Texts• T005T Country Names• DD07T DD: Texts for Domain Fixed Values (Language-Dependent)• T005U Taxes: Region Key: Texts• TZONT Customers: Regional Zone Texts• TSPAT Organizational Unit: Sales Divisions: Texts• KNVA Customer Master Loading Points
Target Tables/Files• PLANT
Work Tables• PLANT_DEX• PLANT_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Developer Guide 47
Chapter 1: JobStream and Build Descriptions
Re-Ranking
DescriptionRe-Ranking is used by Stock Overview business concept to rank or re-rank the inventory items. Re-Ranking process also uses INVENTORY_RANK_PARM table, which is defined by the user and represents the ranks for "plant-specific" and "non-plant-specific" ranges. Ranks are defined from 0% to 100% for all plants or range of plants. Rank 1is the highest velocity item, Rank 5 is the lowest. The Rank '9999' or the highest rank number always will be the last record in the ranking table. This rank will be used to represent the 'dead' items (items with no usage). The table allows for the inclusion of any number of inventory rank numbers. The ranking parameters may differ by plant or may be the same for all plants. The table also allows user to specify the Overstock_months and Required_months.
Ranking or Re-Ranking is performed once a month at the start of the month. Perform ranking is part of the carry forward procedure and will be done during the forward process.
Ranking RulesThe calculation of ranks are base on a Pareto Analysis in order to prioritize and focus resources where they are most needed, using the following rules.
1. The COGS calculation (Usage_Qty * Unit_Value) is based on the data from the STOCK_OVERVIEW table. The extracting date range is determined by the ReRank From/To Date configuration parameters.
2. The COGS per item is accumulated (COGS_ACUM) and the results ordered by Plant_id and COGS_ACUM in descending order. All items are listed in order of magnitude, starting with the largest.
3. The COGS% is calculated based on the COGS ACUM divided by the COGS by Plant_id.
4. The COGS% and the Plant_id are used to determine the Rank_no and the Overstock and Required Months from the INVENTORY_RNK_PARM table.
Calculations1. Sum usage by plant id and material id over trailing InventoryRankMonths (12 or 24 previous
months) ("IUTTM"). Read this from Stock Overview.
2. Calculate COG$item by multiplying IUTTM by item cost (group currency)
3. Calculate COG$plant as the sum of COG$item for each plant.
4. Sort item detail by Plant, COG$item (descending).
5. Calculate COG$cum for each succeeding item (COG$cum = COG$item + COG$cum(previous)).
6. Calculate COG$cum% for each succeeding item (COG$cum% = COG$cum / COG$plant).
7. Assign rank based on rank cutoff using the values from INVENTORY_RNK_PARM (e.g Rank = 1 if COG$cum% <= Rank1, Rank = 2 if COG$cum% <= Rank2 and > Rank1, etc.). Item with QtyOH >0 and COG$item = 0 is assigned rank = 0.
Calculation of OVER_USAGE_QTY & REQ_USAGE_QTYFor each item in the list above:
1. Get periods of supply values for overstock (i.e., PSover1=1, PSover2=2, PSover3=3, PSover4=4, PSover5=6, PSover9=0) from the INVENTORY_RANK_PARM table.
2. Retrieve number of periods as specified by PSoverN from STOCK_USAGE_FORECAST. If null, retrieve previous year/same month historical usage for each period (i.e., if most current month of history is MAY, and PS = 3, retrieve forecasts for JUN-JUL-AUG, or history from previous year for JUN-JUL-AUG).
3. Summarize usage over period of supply frame ("UTover").
4. Get periods of supply cutoff values for required investment (i.e., PSreq1=.25, PSreq2=.50, PSreq3=1, PSreq4=2, PSreq5=2, PSreq9=0).
48 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
5. Retrieve number of periods as specified by PSreqN from STOCK_USAGE_FORECAST. If null, retrieve previous year/same month historical usage for each period. If PS value is < 1, retrieve one forecast value only.
6. Summarize usage over period of supply time frame ("UTreq" -- extend by PSreq value, if PSreq < 1).
Calculate OVERSTOCK_QTY & REQUIRED_QTYComputation of Overstock and Required Qty is performed once at the start of the month and optionally each time that Stock Overview is updated.
1. Calculate over stock units for each item (OSUitem = close stock level - UTover; if UTover < 0, set UTover = 0).
2. Calculate required units for each item (RQUitem = UTreq - close stock level;if UTreq < 0, set UTreq = 0).
When inserting into Stock Overview,• RANK_NO = Rank• OVER_USAGE_QTY= round to nearest whole number (UTover)• REQ_USAGE_QTY= round to nearest whole number (UTreq)
Update Stock OverviewEach time the closing stock level changes, if UpdateFrequencyForOverAndReq = "Continuous", re-calculate OVERSTOCK_QTY & REQUIRED_QTY using the method described above. This process will be done by the SO_UPD procedure. There is no need to recalculate or update RANK_NO, OVER_USAGE_QTY, REQ_USAGE_QTY during the update process. The 5 measures will be recalculated monthly by the CARRY_FORWARD process.
Insert Stock OverviewWhen inserting into stock overview as part of the Update Stock Overview Procedure, set• RANK_NO = null• OVER_USAGE_QTY= null• REQ_USAGE_QTY= null• OVERSTOCK_QTY= null• REQUIRED_QTY= null
Notes on the grain of Stock OverviewStock Overview is summarized at the level of Plant, Material, Calendar_Month in all cases. There is no difference between the grain of Overstock and Required Quantity and the rest of the measures, so no special processing is required.
ETL Control of the Ranking ProcessRanking is intensive process and may take considerable time to execute. Ranks are not volatile, so there is no need to always re-rank every month. Ranking is under ETL Control (as a refreshed dummy table), so that it can be manually Run or Held.
Configuration Parameters:• RERANK_FROM_DT
Extract from date for the ranking process.• RERANK_TO_DT
Extract to date for the ranking process.
User Intervention• Pre-run
From the Console 'Tools', run 'Inventory Ranking' to review and update the parameters used for ranking of inventory items. This is the responsibility of the business user who is familiar with the SAP Inventory Module as implemented. See the User Guide for detailed explanation and instructions.
Developer Guide 49
Chapter 1: JobStream and Build Descriptions
Job Flow1. RERANK_UPDATE_J / INIT_P• No job specific variables set for this job
2. RERANK_UPDATE_J_B_01_SJ / RERANK_UPDATE_01_P• Calls the store procedure for Ranking/Re-ranking process.
$SQL_STRING:= CONCAT('BEGIN RE_RANK(', ToChar($RERANK_FROM_DT),',', ToChar($RERANK_TO_DT), '); END;');
Source Tables/Files:None.
Target Tables/Files:• Stock Overview
Work Tables• INVENTORY_RANK_PARM
Stored ProcedureRE-RANK
TriggerNone.
Notes/FiltersNone.
Validation1. Check Console Log Files.
Stock Class
DescriptionThis table is used to classify the stock items in inventory. The most basic inventory management questions are "what have I got?" and "where is it?". Stock Class helps to clarify the "what have I got?" question by describing fitness for use. For example, there are 100 widgets in stock, but 10 are unavailable as they are going through "quality inspection", 20 are "blocked" for an unspecified reason, and 30 are "reserved". This implies that only 80 of the 100 widgets in stock are available for "unrestricted use", and 30 of these 80 have been "reserved" for use in a specific production process. This dimension contains combinations of attributes that are stock classifiers.
Typically, a source system has many such classifiers, such as Stock Type. This combines every one of these classifiers into a single entity. This is done primarily for technical reasons, such as improving the performance of queries and minimizing the storage space required (a single link between the stock class and the fact is sufficient to answer queries that look at metrics across document classifiers). However, in certain cases, it makes business sense to add combinations of classifiers may be meaningful to a business.
This dimension also contains a number of multipliers which are used for calculating derived metrics from existing ones, and have values of 1 or 0. The derived metric is calculated by multiplying the multiplier with the existing metric. Multipliers are defined by the ETL program based on certain source system classifiers.
50 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
SAP defines three variations of stock type:
1. MM-IM values are defined in DD07T within domain name MB_INSMK.
2. MM-WM values are defined in DD07T within domain name BESTQ.
3. Physical Inventory values are defined in T064A.
The key (DIM_ID) is composed of the following attributes:• STOCK_TYPE_CD• SPECIAL_STOCK_CD.
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column STOCK_CLSS_DIM_ID.
This is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
The load of Stock Class dimension consists of combinations of different stock types and the special stocks:
Step 1
1. Cartesian between DD07T and T148, filtered by the domain name and language parameters.
2. Stock type is sourced from DD07T and SPECIAL_STOCK_CD is unknown.
3. Cartesian between T064A, T064B and T148, for Physical Inventory.
4. Join of T064A, T064B. Stock type is sourced from T064A and SPECIAL_STOCK_CD is unknown.
Step 2• Load of target dimension; check of the multipliers changes using PEX table.
Impact of Conformed DimensionNone. Stock Class is unique to the Inventory Analysis Application.
Developer Guide 51
Chapter 1: JobStream and Build Descriptions
Configuration Parameters• BLOCKED_STOCK_TYPE
This parameter indicates which stock types are considered blocked. It is used to set the BLOCKED_MULT in the STOCK_CLASS table. The list of available values can be retrieved from two sources. The first is DD07T.DOMVALUE_L where DOMNAME = parm 'STOCK_TYPE_DOMNAME' and SPRAS = 'Language Code (e.g. E). The second is T064A.BSTAR. Data sourced from DD07T is relevant to regular inventory movements. Data sourced from T064A is only used for Physical Inventory documents.
• CUST_CONS_SPECIAL_STOCKThis parameter indicates which stock values are considered in customer consignment. It is used to set the CUSTOMER_CONS_MULT in the STOCK_CLASS table. The list of available values can be retrieved T148.SOBKZ.
• QLTY_INSPCTN_STOCK_TYPEThis parameter indicates which stock types are considered in quality inspection. It is used to set the QLTY_INSPCTN_MULT in the STOCK_CLASS table. The list of available values can be retrieved from two sources. The first is DD07T.DOMVALUE_L where DOMNAME = parm 'STOCK_TYPE_DOMNAME' and SPRAS = 'Language Code (e.g. E). The second is T064A.BSTAR. Data sourced from DD07T is relevant to regular inventory movements. Data sourced from T064A is only used for Physical Inventory documents
• STOCK_TYPE_DOMNAMEThis parameter determines the stock type codes and descriptions from the SAP fixed value domain table. This value should not be changed. Values in 'MB_INSMK', 'BESTQ'.
• UNRESTRICTED_STOCK_TYPEThis parameter indicates which stock types are considered unrestricted. It is used to set the UNRESTRICTED_MULT in the STOCK_CLASS table. The list of available values can be retrieved from two sources. The first is DD07T.DOMVALUE_L where DOMNAME = parm 'STOCK_TYPE_DOMNAME' and SPRAS = 'Language Code (e.g. E). The second is T064A.BSTAR. Data sourced from DD07T is relevant to regular inventory movements. Data sourced from T064A is only used for Physical Inventory documents
• VENDOR_CONS_SPECIAL_STOCKThis parameter indicates which stock values are considered in vendor consignment. It is used to set the VENDOR_CONS_MULT in the STOCK_CLASS table. The list of available values can be retrieved T148.SOBKZ.
User Intervention• Post-run
From the Console Tools, run Stock Class Multipliers to review and update the Multipliers for the various combinations. This is the responsibility of the business user who is familiar with the SAP Procurement/Inventory Management Module as implemented. See the User Guide for a detailed explanation and instructions.
DependenciesNone.
Job Flow1. STOCK_CLASS_J / INIT_P• Calls function STOCK_CLASS_VARS_F() to set the jobflow parameters.
52 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
2. STOCK_CLASS_J_B_01_SJ / STOCK_CLASS_B_01• Consists of 4 data sources.• Input property - merge.• Extracts the Special Stock Code and Stock Type from SAP tables T148 and DD07T
WHERE DD07T.DOMNAME = 'MB_INSMK' AND DDLANGUAGE = '{$U_LANGUAGE_CD}'
• Extracts Special Stock Code and Stock Type from SAP table DD07TWHERE DD07T.DOMNAME = 'MB_INSMK' AND DDLANGUAGE = '{$U_LANGUAGE_CD}'
• Extracts Special Stock Code and Type from SAP tables T148, T064A and T064BWHERE T064B.SPRAS = '{$U_LANGUAGE_CD}'
• Extracts Special Stock Code and Type from SAP tables T064A and T064BWHERE T064B.SPRAS = '{$U_LANGUAGE_CD}'
• Lookup Special Stock description on SAP table T148TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is STOCK_CLASS_DEX.Delivery type is truncate.
3. STOCK_CLASS_J_B_02_SJ / STOCK_CLASS_B_02• Loads dimension STOCK_CLASS from STOCK_CLASS_DEX. Checks the multipliers
changes using PEX table. • Output is STOCK_CLASS.
Delivery type is update/insert.
4. STOCK_CLASS_J / END_P• Post Procedure:
Update STOCK_CLASS_SCD SCD(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
Source Tables/Files• DD07T (DOMAIN NAME = 'MB_INSMK')• T064A Stock Types for Physical Inventory • T148 special stock)• T148T Special Stock Descriptions• T064 Stock Types and Texts for Physical Inventory
Target Tables/Files• STOCK_CLASS
Work Tables• STOCK_CLASS_DEX• STOCK_CLASS_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
Developer Guide 53
Chapter 1: JobStream and Build Descriptions
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Stock Overview
DescriptionSTOCK_OVERVIEW is a summary of the primary inventory management measures, calculated by period. It includes Open Stock Level, Close Stock Level, Average Stock Level, Usage Quantity, etc. for all stock items and for unrestricted (i.e. not blocked or being held for quality inspection) stock items.
The two primary sources used to construct the overview are Material Movement and Valuation. The material movements are a record of goods received, transferred internally, consumed internally and shipped out. Valuing the items, in a common currency, provides a method of evaluating and comparing inventory because the physical items are variously quantified by quantity/number, weight, volume, linear measure, etc. which are non-additive attributes.
Stock Overview also incorporates information from three additional sources: Physical Inventory, Stockout, and Stock Usage Forecast. These three components are optional; Stock Overview can run without them but if they are to be included in the calculations, they must be run before the overview process.
Loading Stock Overview for the first time requires a window of time during which there must be no material movement activity. SAP maintains a dynamic 'current' picture of inventory; it is constantly changing as new material movements occur. In order to initialize Stock Overview, it is necessary to freeze any activity, to take a snapshot of current inventory (Opening Balance) and to combine that information with a record of the material movements which have occurred between the beginning of the current period and the moment of the snapshot. From the snapshot and the related movements, the current period's opening balances are calculated. These values then serve as the starting point for calculating (backwards) historical periods of stock overview by subtracting the material movements and for maintaining a 'current' stock overview on an ongoing basis by adding subsequent movements.
When running backwards to determine the historical Stock Overview, Material Movement records are selected by Document Date, based on the period being processed; the process walks back through the periods until reaching the specified Stock Overview Start Date. During normal (current) processing, the Movements are selected on a 'records added since the last run' basis and then processed by period from oldest to current.
The Document Date, not the Posting Date, is used to determine the fiscal period in this 'inventory' environment. The latter is a Financial posting date and is not used here.
Each row in Stock Overview is uniquely identified by:• MATERIAL_STRG_SID• MATERIAL_SID• PLANT_SID• VALUATION_SID• UOM_SID• FISCAL_PERIOD_SID
The job consists of five major steps:
1. Retrieve the Stockout information from a 'csv' file.
2. Retrieve the Ranking values and percentages from a 'text' file.
3. Extract the Stock Opening Balances from SAP if the table has not already been loaded.
4. Load Stock Overview if the table is empty. Initializes the current/first period with the Stock Opening Balances.
54 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
5. Run the Stock Overview stored procedure.
Dependencies• MATERIAL_MOVEMENT_ACTIVITY• MATERIAL_RESERVATION• PHYSICAL_INVENTORY• STOCK_USAGE_FORECAST• VALUATION
Developer Guide 55
Chapter 1: JobStream and Build Descriptions
Configuration Parameters• COMPUTE_OVER_REQ
If set to 'Y', ranking will be computed. If set to 'N', no ranking will happen and the following parameters will not be calculated: RANK_NO, OVER_USAGE_QTY, REQ_USAGE_QTY, OVERSTOCK_QTY, REQUIRED_QTY.
• DFLT_BLOCKED_STOCK_TYPEThe SAP system code(s) used to identify the Stock of type Blocked. Since SAP has multiple source values, you must choose one to be displayed in the target tables.
• DFLT_IN_TRANSIT_STOCK_TYPEThe default code you want used in the Data Warehouse to identify Stock of type In Transit. Since SAP has multiple source values, you must choose one to be displayed in the target tables.
• DFLT_QLTY_INSPCTN_STOCK_TYPEThis code identifies the Stock of type Quality Inspection. Since SAP has multiple source values, you must choose one to be displayed in the target tables.
• DFLT_RESTRICTED_STOCK_TYPEThe default code you want used in the Data Warehouse to identify Stock of type Restricted. Since SAP has multiple source values, you must choose one to be displayed in the target tables.
• DFLT_RETURNS_STOCK_TYPEThe default Code you want used in the Data Warehouse to identify Stock of type Returns. Since SAP has multiple source values, you must choose one to be displayed in the target tables.
• DFLT_UNRESTRICTED_STOCK_TYPEThe code used to identify the Stock of type Unrestricted. Since SAP has multiple source values, you must choose one to be displayed in the target tables.
• IA_INITIAL_LOAD_END_DATEThis parameter serves to identify the demarcation point between historical and current data in order to determine whether the 'normal' or 'initial load' mode processing should be invoked. If this parameter is set to 0, then the initial load end date is set equal to the system date that is passed to the control procedure. This value should not be changed.
• INVENTORY_RANK_PERIODSNumber of periods used in the inventory rank model for historical data. In other words, the number of periods of history that will be used for the overstock and required quantities.
• PERIODS_TO_KEEP_ZERO_OVNumber of Fiscal Periods to keep Plant/ Material combinations with a Closing Balance of 0 in Stock Overview. You typically don't want to keep Plant/Material entries in Stock Overview with a 0 Balance for long periods of time as they cause the Fact to grow and can slow Query performance.
• STK_OVRVW_SPCL_STK_FLGUse this flag to include Material Movements of type Special Stock in Stock Overview (Vendor/Customer Consignment, Subcontracting, Sales Order stock, etc.)
• STK_OVRVW_STRG_LCN_FLGThe flag indicates: Y - storage location is part of the grain for stock overview, N - otherwise.
• STOCK_LEVEL_AVG_METHODPossible values are S and D. If you set this parameter to S, the Average Stock Level will be calculated as follows:(Open Stock level + Close Stock Level)/2.If you set this parameter to D, the Average Stock Level will be calculated as follows:Average taken daily weighted against how many days have passed and how many days are left to go in the Period.
• STOCK_OVERVIEW_START_DATEThis is the Date from which you want your Stock Overview Fact loaded. By specifying a Date in the past, the Stock Overview procedure will roll back to this date one Fiscal Period at a time. Note: In order to properly re-create Stock Balances, you must have all the corresponding Material Movement Transactions in your Material Movement Fact.
56 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
• UNRESTRICTED_STOCK_TYPEIndicates which stock types are considered in unrestricted.
• UPD_FRCY_OVER_REQSets the update rate for overstock. Possible values are MONTHLY and DAILY.
• VENDOR_CONS_SPECIAL_STOCKIndicates which special stock codes are considered to be vendor consignment.
• ZERO_KPI_INDPossible values are U (for unrestricted) and T (for total). Indicates if zero stocks will reflect the unrestricted or the total values.
User Intervention• User Interface
"Pre-runFrom the Console Tools menu, run Stock Class Multipliers to review and update the Multipliers for the various combinations. This is the responsibility of the business user who is familiar with the SAP Procurement/Inventory Management Module as implemented. See the User Guide for detailed explanation and instructions. In particular, the multiplier 'Incl in Stock Overview' must be set correctly.
• CDC DatesCDC_EXTRACT_FROM_DATECDC_EXTRACT_TO_DATETo limit the volume of data retrieved from SAP, particularly during historical data loads, the CDC_ExtractFrom/To_Date range may be set either specifically or by limiting the time span for which an extraction will be done.
Job Flow1. STOCK_OVERVIEW_J / INIT_P• Calls function STOCK_OVERVIEW_VARS_F() to set the jobflow parameters.
2. STOCK_OVERVIEW_J_B_01_SJ / STOCKOUT_B_01• Pre Procedure: Determines, if applicable, the date on which the Stock Opening Balance
was run.'ORACLE': $SQL_STRING:= CONCAT('SELECT NVL(SUBSTR(MAX(TO_CHAR(OPN_BAL_EXTRCT_DT)),1,8), TO_CHAR(TO_DATE(''',$S_CDATE,''',''YYYY-MM-DD HH24:MI:SS''), ''YYYYMMDD'')) FROM STOCK_OPEN_BAL_PEX');END;$AS_AT_DATE:= Lookup('TARGET', $SQL_STRING, FALSE);
• Input properties: allow duplicate keys• Extracts Plant, Material, Stockout Count and Date, etc. from file STOCKOUT.CSV• Lookup to determine Update/Insert for table Stockout • Output is STOCKOUT.
Delivery type is update/insert.• Post Procedure:
Updates stock overview's work table of calendar and fiscal dates.Sql('TARGET', 'BEGIN POP_SO_ALL_TIME_WT; END;');
3. STOCK_OVERVIEW_J_B_02_SJ / RANKING_TABLE_B• Input properties: allow duplicate keys.• Extracts the Rank number, plants, period values and usage percentages from file
RANKING_TABLE.txt• Output is INVENTORY_RNK_PARM.
Delivery type is truncate.
Developer Guide 57
Chapter 1: JobStream and Build Descriptions
4. STOCK_OVERVIEW_J_B_03_SJ / STOCK_OPENING_BAL_B• This runs only if the Stock Opening Balance table is empty.• Consists of 6 data sources• Input properties: merge duplicate keys• Extracts six stock quantities, Plant, Material, Special Stock Code, Batch No, etc. from SAP
tables MCHB and MARD (for Storage Location stock).FROM MCHB RIGHT JOIN MARD ON (MARD.MATNR = MCHB.MATNR)AND (MARD.WERKS = MCHB.WERKS)AND (MARD.LGORT = MCHB.LGORT)LEFT OUTER JOIN MCHA ON ("MCHB"."MATNR" = "MCHA"."MATNR")AND ("MCHB"."WERKS" = "MCHA"."WERKS")AND ("MCHB"."CHARG" = "MCHA"."CHARG")
• Extracts three stock quantities, Plant, Material, Special Stock Code, Batch No, etc. from SAP table MSPR (for Project stock).FROM MSPR LEFT OUTER JOIN MCHA ON "MSPR"."MATNR" = "MCHA"."MATNR"AND "MSPR"."WERKS" = "MCHA"."WERKS"AND "MSPR"."CHARG" = "MCHA"."CHARG"
• Extracts three stock quantities, Plant, Material, Special Stock Code, Batch No, etc. from SAP table MSKA (for Sales Order stock).FROM MSKA LEFT OUTER JOIN MCHA ON "MSKA"."MATNR" = "MCHA"."MATNR"AND "MSKA"."WERKS" = "MCHA"."WERKS"AND "MSKA"."CHARG" = "MCHA"."CHARG"
• Extracts four stock quantities, Plant, Material, Special Stock Code, Batch No, etc. from SAP table MKOL (for special stock - from vendor consignments).FROM MKOL LEFT OUTER JOIN MCHA ON "MKOL"."MATNR" = "MCHA"."MATNR"AND "MKOL"."WERKS" = "MCHA"."WERKS"AND "MKOL"."CHARG" = "MCHA"."CHARG"
• Extracts three stock quantities, Plant, Material, Special Stock Code, Batch No, etc. from SAP table MSKU (for special stock - customer consignments).FROM MSKU LEFT OUTER JOIN MCHA ON "MSKU"."MATNR" = "MCHA"."MATNR"AND "MSKU"."WERKS" = "MCHA"."WERKS"AND "MSKU"."CHARG" = "MCHA"."CHARG"
• Extracts three stock quantities, Plant, Material, Special Stock Code, Batch No, etc. from SAP table MSLB (for special stock - with vendor sub-contracts).FROM MSLB LEFT OUTER JOIN MCHA ON "MSLB"."MATNR" = "MCHA"."MATNR"AND "MSLB"."WERKS" = "MCHA"."WERKS"AND "MSLB"."CHARG" = "MCHA"."CHARG"
• Extracts one stock quantity, Plant, Material, Special Stock Code, Batch No, etc. from SAP table MARC (for in-transit stock). NOTE: Since in-transit stocks are not currently supported, this datastream is disabled!FROM MARCWHERE MARC.UMLMC > 0
• Lookup Plant's Valuation Area, Company, Local Currency and Fiscal Variant on SAP tables T001W, T001K and T001.FROM T001W INNER JOIN T001K ON T001W.BWKEY = T001K.BWKEY INNER JOIN T001 ON T001K.BUKRS = T001.BUKRS
• Output is STOCK_OPEN_BAL_PEX.Delivery type is truncate.
• Output is limited to non-zero stock quantities.
58 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
5. STOCK_OVERVIEW_J_B_04_SJ / STOCK_OVERVIEW_B• This runs only if the Stock Overview table is empty. It loads the Stock Opening Balances into
the Stock Overview table.• Consists of 2 data sources• Input properties: merge duplicate keys• Retrieves the Plant, Material, Stock Level Quantity, etc., for all stock, from tables
STOCK_OPEN_BAL_PEX and MATERIALFROM STOCK_OPEN_BAL_PEX PEX, MATERIAL MTRLWHERE + PEX.MATERIAL_ID = MTRL.MATERIAL_ID
• Retrieves the Plant, Material, Stock Level Quantity, etc., for only the unrestricted stock, from tables STOCK_OPEN_BAL_PEX and MATERIALFROM STOCK_OPEN_BAL_PEX PEX, MATERIAL MTRLWHERE + PEX.MATERIAL_ID = MTRL.MATERIAL_IDAND STOCK_TYPE_CD IN ('{$U_DFLT_UNRESTRICTED_STOCK_TYPE}')
• SID Lookups • Output is STOCK_OVERVIEW.
Delivery type is truncate.• Output is filtered by:
If TOINTEGER(MATERIAL_SID) <> 0 AND TOINTEGER(MATERIAL_STRG_SID) <> 0 ANDTOINTEGER(PLANT_SID) <> 0 AND TOINTEGER(UOM_SID) <> 0 AND TOINTEGER(VALUATION_SID) <> 0 AND TOINTEGER(FISCAL_PERIOD_SID) <> 0
6. STOCK_OVERVIEW_SP• This calls the General Control Procedure to run the Stock Overview process.
Sql ('TARGET', CONCAT('DECLARE BEGIN GENERAL_CONTROL_P (',TODOUBLE($S_CDC_EXTRACT_FROM_DATETIME),', ',TODOUBLE($S_CDC_EXTRACT_TO_DATETIME),', ',TODOUBLE($S_SRC_SYSTEM_DATETIME),', ','''STOCK_OVERVIEW''',', ', '''MONTHLY''',', ', $S_JOB_ID,'); RETURN; END;'));
• The behavior of the procedure will depend on the status of the Stock Overview table. Table SP_PERIOD_WORK is used to log the status and parameters necessary to determine and control the processes. The following three kinds of processes will be run, in the order presented:
• If the Stock Overview table has just been initialized, the current/first period Opening Balances are calculated as Closing Balance minus Material Movement. These Material Movements must constitute those movements which have occurred between the beginning of the current/first period and the moment of the Stock Opening Balance snapshot. This step will run once only.
• If Stock Overview is in the Initial Load & Backward mode, the 'current' period Opening Balances are transferred to the prior period Closing Balances and that period's Opening Balances are then calculated as Closing Balance minus Material Movement. This step repeats until the first period, as specified by the IA_PERIOD_START_DT, has been processed.
• After all the history has been processed, the procedure operates in 'normal' day-to-day mode.
Source Tables/Files• MARD Material Master: Storage Location/Ba• MCHB Batch Stocks• MKOL Special Stocks from Vendor• MSKA Sales Order Stock• MSKU Special Stocks with Customer• MSLB Special Stocks with Vendor• MSPR Project Stock• T001 Company Codes• T001K Valuation area• T001W Plants/Branches
Developer Guide 59
Chapter 1: JobStream and Build Descriptions
Target Tables/Files• STOCK_OVERVIEW
Work Tables• INVENTORY_RNK_PARM• MATERIAL• MATERIAL_MVMNT_DTL• RANKING_TABLE.txt• SP_PERIOD_WORK• STOCK_OPEN_BAL_PEX• STOCKOUT• STOCKOUT.CSV
Stored Procedure• GENERAL_CONTROL_P
The General Control procedure determines the type of load. If there is no entry in SP_PERIOD_WORK for STOCK_OVERVIEW, one is created and the INITIAL_LOAD_END_DATE is set to the value of input parm Src_System_DateTime unless otherwise specified. If the From/To Date range is greater than the Initial Load End Date, the procedure runs in Normal Mode; otherwise, Initial Mode is used. The date range cannot straddle the Initial Load End Date.The General Control procedure determines the Fiscal Variants and for each variant, determines the Fiscal Periods encompassed by the From/To Dates. For each Variant/Period combination, the Update and Carry Forward procedures are called. The General Control procedure passes a parameter to the Update process to indicate whether it is to operate in Initial or Normal Load mode.In Normal Load mode:
• The Material Movements are retrieved from table MATERIAL_MVMNT_DTL based on CREATED_DT values within the From/To Date range. This effectively retrieves them as 'those added since the last run'.
• Prior period movements are processed first and the impact is rippled forward to the current period. Future period postings are processed as belonging to the current period.
• In Initial Load mode:
• Records are retrieved from table MATERIAL_MVMNT_DTL based on DOCUMENT_DT values within the From/To Date range.
• The selected records are processed by fiscal period, from oldest to latest, for each Fiscal Variant. This called procedures are automatically cycled through each of the periods.
• SO_UPD and SO_UPD_BACKDATED
• For the specified fiscal period/date range, retrieves the Movements based on the type of load.
• Calculates new values for Opening or Closing Balances, new Min, Max and Avg, new Usage Quantities, etc. for both Un-restricted and for all items. Existing records are update; new records are inserted into the table.
• CARRY_FORWARD_SO
• Rolls Forward the Closing Balances of a Fiscal Variant/Period into the Opening & Closing Balances of the next. When rippling forward the impact of a prior period posting, the adjustment value is added to both the Opening and Closing Balances of the next period. New records are inserted as necessary.
• During the historical loads, this process works in reverse; moving from Opening Balance to the prior Closing.
TriggerNone.
60 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Notes/FiltersLoading Data
The following steps are recommended when loading data for a new application
1. Load the dimensions, observing the order required for related dependencies.Note the date on which this loading begins.
2. Update the related Multipliers via the Console - Tools. This step requires action by the Business Users.
3. Load the historical MATERIAL_MVMNT_DTL data up to the day preceding the beginning of the dimension loads as noted in step 01.
4. Run an update job for the application to include the dimensions and the Movements in order to make the data warehouse current.
5. The Stock Opening Balances must be retrieved from the source during a period of zero-activity in the Material Movements. This is normally scheduled for a quiet time, such as a Saturday night. In order to determine how long the lock-out window should be, run the Stock Overview job with STOCK_OVERVIEW_SP disabled/excluded from processing. The Stockout and Ranking Builds can/should also be disabled as their output is used only during normal mode, not during the loading or processing of historical data. Do not specify the From/To dates for this run as the defaults will satisfy the necessary requirements. The crucial window includes the loading of the related dimensions, the material movements and the stock opening balances. Subsequent processes within Stock Overview do not require restricted access to the source.
6. Set the date/time window for extracting the Stock Opening Balances. The business user will make the decision and will be responsible for policing their users.
7. Truncate Stock Overview and the Stock Opening Balance PEX table. Delete the Stock Overview entry from SP_PERIOD_WORK.
8. At this point, there are two options• Re-enable component STOCK_OVERVIEW_SP in the Stock Overview job so that it will be
included in the job• Leave STOCK_OVERVIEW_SP disabled during the Opening Balance load so that the
process will stop after the Balances and the first period of Stock Overview are loaded. This will provide an opportunity to do a backup of the two tables and the SP_PERIOD_WORK entry so that in the event of a future problem, it will not be necessary to require another closed window run.
9. Run the dimensions and Material Movements just prior to the snapshot window run in order to minimize the volume of data during the window.
10. Run the jobs: dimensions, Material Movements and Stock Overview. Do not specify the From/To dates for this run as the defaults will satisfy the necessary requirements. If the job is to include processing of the historical periods, ensure that the trailing window does not include backups or any lan or server down-time that might jeopardize the completion of the job.
11. Verify that the appropriate periods have been loaded and that the SP_PERIOD_WORK entry is accurate.
12. If STOCK_OVERVIEW_SP was disabled, re-enable it.
13. If there is a problem which prevents the historical periods from completing, you may run the job in stages, specifying a From/To date range corresponding to the Fiscal Periods to be processed. Note that the To-Date can not exceed the Initial Load End Date. If there are multiple Fiscal Variants, there may be some over-lap generated as the result of different period start/end dates.After the history has been loaded up to the Initial Load End Date, the process will operate in Normal mode in which the criteria for selecting Activity facts will be 'since the last run'.
14. If applicable, ensure that the Stockout and Ranking Builds in the Stock Overview job have been re-enabled.
15. Generate the related Powerplay cubes and run the reports.
Re-loading the Balances
Developer Guide 61
Chapter 1: JobStream and Build Descriptions
If you wish to re-load the balances from scratch, it must appear to the system as though the process had never been run. Truncate the STOCK_OPEN_BAL_PEX and STOCK_OVERVIEW tables and delete the entry from SP_PERIOD_WORK. You must also ensure that the Initial Load End Date parameter is also set to zero.
Re-loading Stock Overview
If you wish to re-load the overview from scratch, it must appear to the system as though the process had never been run. Truncate the STOCK_OVERVIEW table and delete its entry from SP_PERIOD_WORK. You must also ensure that the Initial Load End Date parameter is also set to zero.
Validation1. Check Console Log Files.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for existence of zero-sid rows.
4. For selected MATERIAL_STRG_SID, MATERIAL_SID, PLANT_SID, VALUATION_SID and UOM_SID combinations, verify the calculated values against the related movements by fiscal period.
Stock Usage Forecast
DescriptionThis table contains the predicted usage quantities (Stock Usage Forecasts) for a material in a given period based on a forecast version. Forecast Versions are used to predict stock usage. Each version may be based on any one of a number of forecasting models supported in the source system. A forecasting model is defined by a set of parameters that is used to calculate the predicted usage quantity. A version thus represents a set of values assigned to the parameters of the model.
Predicted usage quantities are stored in the Stock Usage Forecast entity. Stock Usage refers to the utilization of stock in sales or in production. Transfers between plants, or the removal of stock for quality inspection, reservations, etc. is not considered usage. Predicted usage quantities in the Stock Usage Forecast entity are used to calculate an overall Stock Usage Forecast number in the Stock Overview entity. The overall Stock Usage Forecast number may be based on an average of the predicted usage quantity of multiple versions.
Only the latest forecast is extracted each time the job is run. Although multiple forecasts may have been created since the last run, only the most current is extracted from SAP and loaded into the warehouse.
Each row is uniquely identified by• MATERIAL_SID• PLANT_SID• FORECAST_MTHD_SID• FORECAST_PRDC_CD• FORECAST_PRD_CNT• FORECAST_RUN_DT• FORECAST_START_DT• FRCST_PRD_STRT_DT
Stock Usage Frcst is a non-CDC (Changed Data Capture) fact table.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
The job consists of two major steps.
1. Data retrieval of the Forecast values based on Material, Plant and the Forecast parameters.
2. Loading of the Stock Usage Frcst fact table.
62 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
DependenciesStock Usage Forecast Method
Configuration ParametersNone.
User InterventionNone.
Job Flow1. STOCK_USAGE_FRCST_J / INIT_P• Calls function STOCK_USAGE_FRCST_VARS_F() to set the jobflow parameters.
2. STOCK_USAGE_FRCST_J_B_01_SJ / STOCK_USAGE_FRCST_B_01• input properties: allow duplicate keys• Extracts Material, Plant, Forecast Method, Quantities, etc. from SAP tables MAPR, PROP
and PROWFROM "MAPR" INNER JOIN "PROP" ON "MAPR"."PNUM1" = "PROP"."PNUM1" INNER JOIN "PROW" ON "PROP"."PNUM2" = "PROW"."PNUM2"WHERE "PROP"."HSNUM" = '00'
• Lookup the Material Unit of Measure on SAP tables MAPR and MARAFROM "MAPR" INNER JOIN "MARA" ON "MAPR"."MATNR" = "MARA"."MATNR"
• Lookup the Plant and it's Valuation Area plus the Company's Local Currency and Fiscal Variant on SAP tables T001W, T001K and T001.FROM T001W INNER JOIN T001K ON T001W.BWKEY = T001K.BWKEY INNER JOIN T001 ON T001K.BUKRS = T001.BUKRS
• Output is STOCK_USAGE_FR_FEX. Delivery type is truncate.
3. STOCK_USAGE_FRCST_J_B_02_SJ / STOCK_USAGE_FRCST_B_02• input properties: allow duplicate keys• Retrieve the Forecast Usage data from table STOCK_USAGE_FR_FEX• Lookup to determine Update/Insert
FROM "STOCK_USAGE_FR_FEX" "FEX", "STOCK_USAGE_FRCST" "STF", "MATERIAL" "MAT", "PLANT" "PLA", "STK_USG_FRCST_MTHD" "SFM"WHERE "STF"."FORECAST_PRDC_CD" = "FEX"."FORECAST_PRDC_CD" AND "STF"."FORECAST_PRD_CNT" = "FEX"."FORECAST_PRD_CNT" AND "STF"."FORECAST_RUN_DT" = "FEX"."FORECAST_RUN_DT" AND "STF"."FORECAST_START_DT" = "FEX"."FORECAST_START_DT" AND "STF"."FRCST_PRD_STRT_DT" = "FEX"."FRCST_PRD_STRT_DT" AND "MAT"."MATERIAL_DIM_ID" = "FEX"."MATERIAL_DIM_ID" AND "STF"."MATERIAL_SID" = "MAT"."MATERIAL_SID" AND "PLA"."PLANT_DIM_ID" = "FEX"."PLANT_DIM_ID" AND "STF"."PLANT_SID" = "PLA"."PLANT_SID" AND "SFM"."FRCST_MTHD_DIM_ID" = "FEX"."FRCST_MTHD_DIM_ID" AND "STF"."FORECAST_MTHD_SID" = "SFM"."FORECAST_MTHD_SID"
• Output is STOCK_USAGE_FRCST.Delivery type is update/insert.
4. STOCK_USAGE_FRCST_J / END_P• Post Procedure:
Runs SQL to reset the value of OFFCL_FRCST_MULT to zero for previously existing entries of each Material/Plant combination which was added/updated during the current run.
Developer Guide 63
Chapter 1: JobStream and Build Descriptions
Source Tables/Files• MAPR Material Index for Forecast• MARA Material Master: General Data• PROP Forecast parameters• PROW Forecast Values• T001 Company Codes• T001K Valuation area• T001W Plants/Branches
Target Tables/Files• STOCK_USAGE_FRCST
Work Tables• MATERIAL• PLANT• STK_USG_FRCST_MTHD• STOCK_USAGE_FR_FEX
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check DIM_ID field and the component fields of fact header (DOC table).
5. Ensure that row counts match for related Doc & Detail tables
6. Check row count against source table row count.
7. For selected records, review and verify the target warehouse against the source ERP data.
Stock Usage Forecast Method
DescriptionThis table contains details of versions of forecasts used to predict stock usage. Each version may be based on any one of a number of forecasting models supported in the source system. A forecasting model is defined by a set of parameters that is used to calculate the predicted usage quantity. A version thus represents a set of values assigned to the parameters of the model. Predicted usage quantities are stored in the Stock Usage Forecast entity
Stock Usage refers to the utilization of stock in sales or in production. Transfers between plants, or the removal of stock for quality inspection, reservations, etc. is not considered usage. Predicted usage quantities in the Stock Usage Forecast entity are used to calculate an overall Stock Usage Forecast number in the Stock Overview entity. The overall Stock Usage Forecast number may be based on an average of the predicted usage quantity of multiple versions. The Include in Overview Indicator indicates which versions are to be used in the average.
64 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
The key (DIM_ID) is composed of the following attribute:• FORECAST_METHOD_CD
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column FRCST_MTHD_DIM_ID.
This is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
The load of Stock Usage Forecast Method dimension consists of the following steps.
1. Extract the Forecast Methods (table DD07T).
2. Load the dimension.
Impact of Conformed DimensionNone. Stock Usage Forecast Method is unique to the Inventory Analysis Application.
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
Configuration Parameters• FORECAST_METHOD_DOMNAME
This parameter determines the forecast method codes and descriptions from the SAP fixed value domain table. This value should not be changed. Default value is 'PRMOD'.
User InterventionNone.
DependenciesNone.
Job Flow1. STK_USG_FRCST_MTHD_J / INIT_P• Calls function STK_USG_FRCST_MTHD_VARS_F() to set the jobflow parameters.
2. STK_USG_FRCST_MTHD_J_B_01_SJ / STK_USG_FRCST_MTHD_B_01• Extracts the Forecast Method code and name from SAP table DD07T
WHERE DOMNAME = 'PRMOD' AND DDLANGUAGE = '{$U_LANGUAGE_CD}'
• Output is STK_USG_FRCS_M_DEX.Delivery type is truncate.
3. STK_USG_FRCST_MTHD_J_B_02_SJ / STK_USG_FRCST_MTHD_D_02• Loads dimension STK_USG_FRCST_MTHD from STK_USG_FRCS_M_DEX
Delivery type is update/insert.
Source Tables/Files• DD07T (DOMAIN NAME = 'PRMOD').
Target Tables/Files• STK_USG_FRCST_MTHD
Work Tables• STK_USG_FRCS_M_DEX
Developer Guide 65
Chapter 1: JobStream and Build Descriptions
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Storage Bin
DescriptionThis table describes the physical location where the material is stored in a warehouse. In the context of Inventory Analysis, a warehouse is synonymous with a plant.
The key (DIM_ID) is composed of the following attributes:• WAREHOUSE_NO• STORAGE_TYPE_CD• STORAGE_BIN_ID
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column STORAGE_BIN_DIM_ID.
Storage Bin is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading of the customer dimension consists of two major steps.
1. Extract the Storage Bins, Storage Types and Warehouse Numbers
2. Load the dimension table.
Impact of Conformed DimensionNone. Storage_Bin is unique to the Inventory Analysis Application.
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
66 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
DependenciesNone.
Configuration Parameters• STRG_BIN_INV_MTHD_DOMNAME
This parameter determines storage bin inventory methods from the SAP fixed value domain table. This value should not be changed. Default is 'LVS_KZINV'.
User InterventionNone.
Job Flow1. STORAGE_BIN_J / INIT_P• Calls function STORAGE_BIN_VARS_F() to set the jobflow parameters.
2. STORAGE_BIN_J_B_01_SJ / STORAGE_BIN_B_01• Input Properties: allow duplicate keys• Consists of 3 data sources• LAGP (Storage Bin: warehouse#, storage-type and bin-id are all known)
Extracts Storage Bin info from SAP table LAGP• T301 (Storage Type: warehouse# & storage-type are known; bin-id is unknown)
Extracts Storage Type info from SAP table T301• T300 (Warehouse Number: only the warehouse# is known)
Extracts Warehouse Number info from SAP table T300• Lookup Warehouse name on SAP table T300T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Storage Type description on SAP table T301TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Storage Section description on SAP table T302TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Inventory Method description on SAP table DD07TWHERE DOMNAME = 'LVS_KZINV' AND DDLANGUAGE = '{$U_LANGUAGE_CD}'
• Lookup Bin Type description on SAP table T303TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Block Reason description on SAP table T330TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is STORAGE_BIN_DEX.Delivery type is truncate.
3. STORAGE_BIN_J_B_02_SJ / STORAGE_BIN_D_02• Loads dimension STORAGE_BIN from STORAGE_BIN_DEX.
Delivery type is update/insert.
4. STORAGE_BIN_J / END_P• Post Procedure:
Update STORAGE_BIN_SCD(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
Developer Guide 67
Chapter 1: JobStream and Build Descriptions
Source Tables/Files• DD07T DD: Texts for Domain Fixed Values (Language-Dependent)• LAGP Storage bins• T300 WM Warehouse Numbers• T300T Warehouse Number Descriptions• T301 WM Storage Types• T301T Storage Type Descriptions• T302T Storage Section Names• T303T WM Names of Storage Bin Types• T330T Text for Blocking Reason
Target Tables/Files• STORAGE_BIN
Work Tables:• STORAGE_BIN_DEX• STORAGE_BIN_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
Unit of Measure
DescriptionThe Unit of Measure (UOM) dimension contains a list of the units of measure in which the quantifying measures in the data warehouse are held.
Additionally, the Unit of Measure processing also loads the Unit of Measure Conversion (UOM_CONVERSION) dimension based on the entries in the Unit of Measure dimension.
The UNIT_OF_MEASURE key (DIM_ID) is composed of the following attribute:• UNIT_OF_MEASURE_CD
The UOM_CONVERSION key is composed of the following attributes:• FROM_UOM_SID• TO_UOM_SID
68 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column UOM_DIM_ID.
UNIT_OF_MEASURE is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
UOM_CONVERSION is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading the Unit of Measure dimension consists of two major steps:
1. Extract Unit_of_Measure information.
2. Load the dimension.
Loading the Unit of Measure Conversion dimension consists of two major steps:
1. Extract Unit_of_Measure Conversion information.
2. Load the dimension.
Impact of Conformed DimensionThis is a shared dimension that is common to• General Ledger Analysis• Inventory Analysis• Procurement Analysis• Sales Analysis
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
DependenciesNone.
Configuration ParametersNone.
User InterventionNone.
Job Flow1. UNIT_OF_MEASURE_J / INIT_P• Calls function UNIT_OF_MEASURE_VARS_F () to set the jobflow parameters.
2. UNIT_OF_MEASURE_J_B_01_SJ / UNIT_OF_MEASURE_B_01• Input Properties: allow duplicate keys• Extracts UOM info from T006• Lookup UOM description and External UOM description from SAP table T006A
WHERE SPRAS = '{$U_LANGUAGE_CD}'
• Lookup UOM Dim description from SAP table T006TWHERE SPRAS = '{$U_LANGUAGE_CD}'
• Lookup UOM ISO Description from SAP table T006JWHERE "LANGU" = '{$U_LANGUAGE_CD}'
• Output is UNIT_MEASUR_DEX. Delivery type is truncate.
Developer Guide 69
Chapter 1: JobStream and Build Descriptions
3. UNIT_OF_MEASURE_J_B_02_SJ / UNIT_OF_MEASURE _D_02• Input Properties: allow duplicate keys• Loads dimension UNIT_OF_MEASURE from UNIT_MEASUR_DEX.
Delivery type is update/insert.
4. UNIT_OF_MEASURE_J_B_03_SJ / UNIT_OF_MEASURE_CNVRSN_B• Input Properties: allow duplicate keys• Extracts the From & To units plus the conversion factors from SAP table T006 and T006D
FROM "T006" CFROM INNER JOIN "T006" CTO ON CFROM."DIMID" = CTO."DIMID" INNER JOIN "T006D" CBASE ON CFROM."DIMID" = CBASE."DIMID"AND CFROM."MSEHI" <> CTO."MSEHI"AND CBASE."MSSIE" <> ' '
• Lookup UOM Dim Id from Target table Unit_Of_MeasureFROM "UNIT_OF_MEASURE"ORDER BY "UOM_SID"
• Lookup UOM Conversion Dim description from SAP table T006TFROM "T006T"WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup UOM Conversion Base values from SAP tables T006 and T006DFROM "T006" T6, "T006D" T6DWHERE T6."MSEHI" = T6D."MSSIE"
• Loads dimension UOM_CONVERSION.Delivery type is truncate.
• Filter on delivery is DIMENSION_CD IS NOT NULL
Source Tables/Files• T006 Units of Measurement• T006A Assign Internal to Language-Dependent Unit• T006J ISO Codes for Unit of Measure Texts• T006D Dimensions• T006T Dimension Texts
Target Tables/Files• UNIT_OF_MEASURE• UOM_CONVERSION
Work Tables• UNIT_MEASURE_DEX
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check DS Job log, DS Build logs and DS Reject File.
3. Check for zero-sid rows.
4. Check DIM_ID field and the component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
70 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
8. For selected records, review and verify the target warehouse against the source ERP data.
Valuation
DescriptionThis table contains information on the financial value of inventory. The "value of inventory" (valuation) is an important measure - not just for accounting purposes, but because unlike the measure "stock quantity," it can be rolled up across materials.
The current value of each material is based on the valuation area and valuation type. The valuation area is a grouping of plants for valuation purposes. The valuation type is used to handle split valuation of materials. Materials with the same material number may be valued differently. For example, if one has new and refurbished motors in stock (both types of motors have the same material number), the new motors may be valued at $500 each while the refurbished ones are valued at $350 if they are assigned to different valuation types.
The key (DIM_ID) is composed of the following attributes:• MATERIAL_ID• VALUATION_AREA_CD• VALUATION_TYPE_CD
This is a Type 2, History Preserving, dimension based on the price. For performance reasons, a (non-unique) index is required on column VALUATION_DIM_ID.
Valuation is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading of the Valuation dimension consists of two major steps.
1. Extract the Material Valuation.
2. Load the dimension (inserts new rows with changed valuation).
Impact of Conformed DimensionNone. Valuation is unique to the Inventory Analysis Application.
DependenciesNone. However, Stock Overview is dependant upon Valuation so the latter must be current/up-to-date to ensure that the Overview values are accurate.
Configuration Parameters• VALUATION_PRICE_CNTRL_DOMNAME = 'VPRSV'
This parameter determines the allowed price control types for materials (e.g. standard vs. moving price).
User InterventionNone.
Job Flow1. VALUATION_J / INIT_P• Calls function VALUATION_VARS_F() to set the jobflow parameters.
Developer Guide 71
Chapter 1: JobStream and Build Descriptions
2. VALUATION_J_B_01_SJ / VALUATION_B_01• Input Properties: allow duplicate keys• Extracts Material Valuation info from SAP table MBEW• Lookup Valuation Price Control description on SAP table DD07T
FROM DD07T WHERE DOMNAME = '{$U_VALUATION_PRICE_CNTRL_DOMNAME}' AND DDLANGUAGE = '{$U_LANGUAGE_CD}
• Output is VALUATION_DEX.Delivery type is truncate.
3. VALUATION_J_B_02_SJ / VALUATION_D_02• Loads dimension VALUATION from VALUATION_DEX.
Delivery type is update/insert.
4. VALUATION_J / END_P• Post Procedure:
Update VALUATION_SCD(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
Source Tables/Files• DD07T DD: Texts for Domain Fixed Values (Language-Dependent)• MBEW Material Valuation• T001 Company Codes• T001K Valuation area
Target Tables/Files• VALUATION
Work Tables• VALUATION_DEX• VALUATION_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersTruncating the Valuation table will result in the loss of historical values as SAP does not store price change history.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
72 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
Vendor
DescriptionThis is a supplier of materials and/or services to an organization. In Accounts Payable, the vendor represents an entity that a payment may be made to including expense payments to employees. In procurement, the vendor identifies the supplier from whom a material is acquired. In inventory, it identifies the supplier which owns a 'vendor consignment' material.
The key (DIM_ID) is composed of the following attributes:• COMPANY_CD • PURCHASE_ORG_CD• VENDOR_ACCOUNT_NO
This is a Type 1 (non-History Preserving) dimension. If Tracking Changes (SCD) is enabled in the dimension delivery then, for performance reasons, a (non-unique) index is required on column VENDOR_DIM_ID.
This is a non-CDC (Changed Data Capture) table dimension.
Since there are no CDC dates available in this table, the contents must be extracted to the data warehouse server in order to identify and process any new/changed records.
Loading the vendor dimension consists of three major steps:
1. Extract the Vendor Hierarchy.
2. Extract the Vendor information and join to the Vendor Hierarchy.
3. Load the Vendor dimension.
Because of the customer key, which contains three attributes, the extraction of vendor information is divided into four stages, based on the known/unknown component values:
1. The key VENDOR_ACCOUNT_NO, COMPANY_CD, PURCHSING_ORG_CD are all known values (join information of LFA1,LFB1, LFM1).
2. VENDOR_ACCOUNT_NO has known values but COMPANY_CD, PURCHSING_ORG_CD are unknown (LFA1 only). These values are used for IA lookups (generally for consignment vendors).
3. The key VENDOR_ACCOUNT_NO, COMPANY_CD have known value but PURCHSING_ORG_CD is unknown (LFA1, LFB1). These values are used in Accounts Payable.
4. The key VENDOR_ACCOUNT_NO, PURCHSING_ORG_CD have known value but COMPANY_CD is unknown (LFA1, LFM1). These values are used in Procurement.
Impact of Conformed DimensionThis is a shared dimension that is common to• Accounts Payable Analysis• Inventory Analysis• Procurement Analysis
Care must be taken when installing dimensions, particularly when there is more than one application. Installing a newer (or same) version of this dimension over an existing one will replace the entire table and its contents will be lost. If you wish to retain existing data, save a copy of the data and reload it after the dimension has been upgraded.
If any other warehouse is already installed, check Installation Guide for any important information on integration with other Analytic Application data marts. That documentation will describe any manual intervention required.
DependenciesNone.
Developer Guide 73
Chapter 1: JobStream and Build Descriptions
Configuration Parameters• VENDOR_HIER_TYPE
This parameter is used to determine which vendor hierarchy will be loaded into the Vendor Table. Only one hierarchy is supported. The default value is A. The list of available values can be found in "LFMH"."HITYP".
User InterventionNone.
Job Flow1. VENDOR_J / INIT_P• Calls function VENDOR_VARS_F() to set the jobflow parameters.
2. VENDOR_J_B_01_SJ / VENDOR_HIER_D_01• Extracts Vendor and Parent hierarchy info from SAP tables LFMH and LFA1.
FROM "LFMH", "LFA1"WHERE "LFA1"."LIFNR" = "LFMH"."LIFNR"AND "LFMH"."HITYP" = '{$U_VENDOR_HIER_TYPE}'
• Output is VENDOR_HIER_DEX.Delivery type is truncate.
3. VENDOR_J_B_02_SJ / VENDOR_HIER_B_02• Input Properties: allow duplicate keys• Extracts the Parent, Customer, Level number and the five levels of the hierarchy from table
VENDOR_HIER_DEX.• Output is VENDOR_HIER_AEX.
Delivery type is truncate.
4. VENDOR_J_B_03_SJ / VENDOR_B_01• Input Properties: allow duplicate keys• Extracts joined into from VENDOR, VENDOR COMPANY and PURCHASING ORG. tables
LFA1,LFB1, LFM1.FROM "LFA1" INNER JOIN "LFB1" ON "LFA1"."LIFNR" = "LFB1"."LIFNR" INNER JOIN "LFM1" ON "LFA1"."LIFNR" = "LFM1"."LIFNR"
• Lookup plan group description on SAP table T035TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup vendor type on SAP table T077Y.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup the vendor's hierarchy level info on table VENDOR_HIER_AEX.• Lookup country name on SAP table T005T.
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup industry on SAP table T016T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup region name on SAP table T005U.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is VENDOR_DEX.Delivery type is truncate.
74 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 1: JobStream and Build Descriptions
5. VENDOR_J_B_04_SJ / VENDOR_B_02• Input Properties: allow duplicate keys• Extracts VENDOR info, VENDOR COMPANY and PURCHASING ORG are unknown. table
LFA1. FROM "LFA1" INNER JOIN "LFB1" ON "LFA1"."LIFNR" = "LFB1"."LIFNR"
• Lookup plan group description on SAP table T035TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup vendor type on SAP table T077Y.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup the vendor's hierarchy level info on table VENDOR_HIER_AEX.• Lookup country name on SAP table T005T.
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup industry on SAP table T016T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup region name on SAP table T005U.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is VENDOR_DEX.Delivery type is append.
6. VENDOR_J_B_05_SJ / VENDOR_B_03• Input Properties: allow duplicate keys• Extracts joined into from VENDOR, VENDOR COMPANY. PURCHASING ORG is unknown.
SAP tables LFA1,LFB1.• Lookup plan group description on SAP table T035T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup vendor type on SAP table T077Y.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup the vendor's hierarchy level info on table VENDOR_HIER_AEX.• Lookup country name on SAP table T005T.
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup industry on SAP table T016T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup region name on SAP table T005U.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is VENDOR_DEX.Delivery type is append.
7. VENDOR_J_B_06_SJ / VENDOR_B_04• Input Properties: allow duplicate keys• Extracts joined into from VENDOR, PURCHASING ORG. VENDOR COMPANY is
unknown. SAP tables LFA1, LFM1.FROM "LFA1" INNER JOIN "LFM1" ON "LFA1"."LIFNR" = "LFM1"."LIFNR"
• Lookup plan group description on SAP table T035TWHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup vendor type on SAP table T077Y.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup the vendor's hierarchy level info on table VENDOR_HIER_AEX.• Lookup country name on SAP table T005T.
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup industry on SAP table T016T.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup region name on SAP table T005U.WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Output is Append to VENDOR_DEX.Delivery type is append.
Developer Guide 75
Chapter 1: JobStream and Build Descriptions
8. VENDOR_J_B_07_SJ / VENDOR_D_05• Loads dimension VENDOR from VENDOR_DEX.
Delivery type is update/insert.• VENDOR_J / END_P• Post Procedure: Update VENDOR_SCD
(table used by stored procedures in cases where the dimension is defined as Type 2 'history preserving')
Source Tables/Files• LFB1 Vendor Master (Company Code)• LFA1 Vendor Master (General)• LFM1 Vendor Master Record Purchasing Organization Section)• T016T Industry Names• T005T Country Names• T005U Taxes: Region Key: Texts• T035T Planning Group Texts• T077Y Account Group Names• LFMH Vendor hierarchy
Target Tables/Files• VENDOR
Work Tables• VENDOR_DEX• VENDOR_HIER_DEX• VENDOR_HIER_AEX• VENDOR_SCD
Stored ProcedureNone.
TriggerNone.
Notes/FiltersNone.
Validation1. Check the Console log files for errors.
2. Check the DecisionStream job log file, build log files, and reject file.
3. Check for rows with zero SIDs.
4. Check the DIM_ID field and component fields.
5. Check counts, values and ranges for each key field component.
6. Check Type 2 attributes for changes (if applicable).
7. Check row count against source table row count.
8. For selected records, review and verify the target warehouse against the source ERP data.
76 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 2: Entity Relationship Diagrams
The Inventory Analysis for SAP Application data warehouse contains a number of fact and dimension tables. Each fact table is presented in an entity relationship diagram with the dimensions that draw data from it, followed by a list of all dimensions.
Note: These diagrams are the property of Cognos Incorporated. Copyright (C) Cognos Incorporated 1999-2003. All rights reserved. Design Patent Pending.
LegendIn each entity, the column names are preceded by symbols that describe the column’s properties.
For more information about each table in the Inventory Analysis data warehouse, see "Data Mart Metadata" (p. 85).
Symbol Column Property
# Primary key
* Mandatory
o Optional
789 Numeric
A Character
Date31
Developer Guide 77
Chapter 2: Entity Relationship Diagrams
Material Movement
78 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 2: Entity Relationship Diagrams
Physical Inventory
Developer Guide 79
Chapter 2: Entity Relationship Diagrams
Material Reservation
80 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 2: Entity Relationship Diagrams
Stock Overview
Developer Guide 81
Chapter 2: Entity Relationship Diagrams
Stock Usage Forecast
82 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 2: Entity Relationship Diagrams
All Dimensions (I)
Developer Guide 83
Chapter 2: Entity Relationship Diagrams
All Dimensions (II)
84 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
The data mart created for the Inventory Analysis for SAP Application is composed of the following tables.
Note: The Inventory Analysis for SAP data warehouse model is the property of Cognos Incorporated. Copyright (C) Cognos Incorporated 1999-2003. All rights reserved. Design Patent Pending.
All TimeTarget table name: ALL_TIME
Table type: Conformed dimension
Description: The All Time dimension is a combination of the Fiscal and Time calendars. Fiscal calendars represent the yearly period for accounting purposes within an organization. The Fiscal dimension is important in merged or multinational companies that are required to consider multiple fiscal calendars. This dimension is flexible enough to accommodate all fiscal calendars in an organization.
Each fiscal calendar is represented by a fiscal variant code that defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The posting periods within a fiscal year may belong to fiscal quarters. The default fiscal variant is defined as the calendar year, which starts on January 1 and ends on December 31, and includes 12 periods corresponding to the months, and four calendar quarters. The lowest level of detail in this calendar is a fiscal day. For example, 2001001001 represents January 1, 2001.
Time calendars represent calendar time, with years starting on January 1, ending on December 31, and containing 12 months. The lowest level of detail in this calendar is a day. For example, 20010101 represents January 1, 2001.
The Time dimension is probably the most important dimension in a data warehouse schema, because the majority of business questions that it supports look at historical changes in various business measures. The All Time dimension brings the two logical entities, Fiscal and Time, together into a single super-entity using a process called denormalization. Denormalization is for faster query processing, an important requirement in data warehousing. Such a combination is called a cartesian product in the language of set theory. Being a cartesian, the All Time dimension contains a row for each day of the calendar year for each fiscal calendar variation (fiscal variant) supported. Hence, this dimension may have the same calendar day repeated multiple times, once for each fiscal variant. Because of this repetition, you must be careful while joining the All Time dimension to any of the fact tables in a query. You must define a fiscal variant in the query to prevent double-counting of fact records. To avoid double-counting in the majority of queries that do not need to look at fiscal calendars, a default fiscal variant exists in this data model to define the regular calendar year, with 12 monthly periods and four seasonal quarters. You can create additional fiscal variants to support financial analysis and planning for other financial calendar(s).
Column mapping
Column name Datatype Description Derivation or source mapping
CALENDAR_DAY_VAL
NUMBER(2,0) This is the day of the month that the calendar date corresponds to (1, 2,..., 31).
CALENDAR_DT DATE This is the calendar date (e.g., The 1st of January 2000).
CALENDAR_MONTH_VAL
NUMBER(2,0) This represents the month of the year that the calendar date falls in (e.g., 1, 2,..., 12).
Developer Guide 85
Chapter 3: Data Mart Metadata
CALENDAR_QRTR_VAL
NUMBER(1,0) This is the calendar quarter that the calendar date falls in (e.g., 1-4).
This is the quarter within which the calendar date exists. There are 4 possible values for this with the following date ranges:Calendar Quarter 1 is from January 1 to March 31Calendar Quarter 2 is from April 1 to June 30Calendar Quarter 3 is from July 1 to September 30Calendar Quarter 4 is from October 1 to December 31.
CALENDAR_WEEK_VAL
NUMBER(2,0) The week number in the calendar that the date falls in. The range of values is from 1 to 53.
CALENDAR_WKDY_NM
VARCHAR(10) This is the day of the week the calendar date corresponds to (e.g.,’MONDAY’,’TUESDAY’, etc.).
CALENDAR_YEAR_VAL
NUMBER(4,0) This is the calendar year formatted as YYYY (e.g., 2000).
This is the year component of the calendar date. The default range of values are 1980 to 2020.
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. This is set to the Created Date when the row is inserted.
CLNDR_FSCL_PRD_NO
INTEGER This is the fiscal period that the calendar date corresponds to, depending on the fiscal variant used. The Fiscal Variant is used to define the fiscal calendars within an organization. An organization may be composed of multiple companies (e.g., if mergers took place), and may have to deal with multiple fiscal calendars. Each fiscal calendar is represented by a fiscal variant. The fiscal variant thus defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The default fiscal variant is defined as the calendar year, which starts on Jan 1st and ends on Dec 31st, and includes 12 periods corresponding to the months, and 4 calendar quarters.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
Column name Datatype Description Derivation or source mapping
86 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
DFLT_FSCL_VRNT_CD
VARCHAR(2) This is the Default Fiscal Variant. The Fiscal Variant is used to define the fiscal calendars within an organization. An organization may be composed of multiple companies (e.g., if mergers took place), and may have to deal with multiple fiscal calendars. Each fiscal calendar is represented by a fiscal variant. The fiscal variant thus defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The default fiscal variant is defined as the calendar year, which starts on Jan 1st and ends on Dec 31st, and includes 12 periods corresponding to the months, and 4 calendar quarters.
User defined parameter called DEFAULT_VARIANT which is set to’K4’.
FISCAL_DT INTEGER This is the date of the fiscal calendar. The fiscal date is similar to the calendar date, but deals with periods instead of months. For example, a calendar date may be formatted as YYYYMMDD, where YYYY represents the calendar year, MM the calendar month, and DD the calendar day. The fiscal date, however, is formatted as YYYYPPDDD, where YYYY is the fiscal year, PP the period number, and DDD the number of the day within the period (e.g., 199906001).
Table: N/A - DERIVEDColumn: FISCAL_YEAR_VAL, POSTING_PERIOD_NO
format(FISCAL_YEAR_VAL,’0000’) || format(.POSTING_PERIOD_NO,’00’) || format(Incremental number starting with 1 reset every fiscal period,’000’). 199906001 is the first day of fiscal period 6 in fiscal year 1999. 199906002 is the second day of fiscal period 6 in fiscal year 1999.
FISCAL_PERIOD_SID
INTEGER This is a data warehouse system generated unique identifier for the fiscal period.
If it is the first day of the fiscal period then this is a generated identifier otherwise set the value to -1.
FISCAL_QUARTER_VAL
NUMBER(1,0) This is the quarter of the fiscal calendar. Table: T009B, T009Column: POPER-POSTING PERIOD, ANZBP-#OF POSTING PERIODS
Depending on the Fiscal Variant, the Fiscal Quarter is derived in the following ways
Date Dependant Variants: CEIL((T009B.POPER) / (T009.ANZBP / 4))
Non Year Dependant Variants: ceil (T009B.POPER / (T009.ANZBP / 4))
Calendar Dependent Variants: Month component of theCEIL (((POSTING_PERIOD_END_DATE - 1) / 3) + 1)
FISCAL_VARIANT_CD
VARCHAR(2) This is the code representing the Fiscal Variant. The Fiscal Variant is used to define the fiscal calendars within an organization. An organization may be composed of multiple companies (e.g., if mergers took place), and may have to deal with multiple fiscal calendars. Each fiscal calendar is represented by a fiscal variant. The fiscal variant thus defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The default fiscal variant is defined as the calendar year, which starts on Jan 1st and ends on Dec 31st, and includes 12 periods corresponding to the months, and 4 calendar quarters.
Table: T009Column: PERIV-FISCAL YEAR VARIANT
Column name Datatype Description Derivation or source mapping
Developer Guide 87
Chapter 3: Data Mart Metadata
FISCAL_VARIANT_NM
VARCHAR(30) This is the name of the fiscal variant. The Fiscal Variant is used to define the fiscal calendars within an organization. An organization may be composed of multiple companies (e.g., if mergers took place), and may have to deal with multiple fiscal calendars. Each fiscal calendar is represented by a fiscal variant. The fiscal variant thus defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The default fiscal variant is defined as the calendar year, which starts on Jan 1st and ends on Dec 31st, and includes 12 periods corresponding to the months, and 4 calendar quarters.
Table: T009T, T009Column: LTEXT-DESCRIPTION OF FISCAL YEAR VARIANT
Select T009T.LTEXTfrom T009T, T009where T009.PERIV= T009Tand T009T.SPRAS = LanguageParameter
FISCAL_YEAR_VAL
NUMBER(4,0) This is the year of the fiscal calendar. This field is in YYYY format.
Table: T009BColumn: BDATJ,RELJR,BUMON,BUTAG
Depending on the Fiscal Variant, the Fiscal Year is derived in the following ways (format YYYY)
Date Dependent Variants:(T009B.BDATJ + T009B.RELJR)
Non Year Dependent Variants:Derived from string manipulations involving Year component of Calendar_ Year_Val + T009B.RELJR
Calendar Dependant Variants:Derived from a combination of string manipulations involving Calendar Date
BDATJ-Posting Date YYYYRELJR-Year shift relative to the current yearBUMON-Posting Date Calendar MonthBUTAG-Calendar Day for the Posting Date
POSTING_PERIOD_CNT
NUMBER(3,0) This is the total number of posting periods in the fiscal year (e.g., 12). This depends on the fiscal variant used.
Table: T009Column: ANZBP-NUMBER OF POSTING PERIODS
Depending on the Fiscal Variant, the Number of Posting Periods is derived in the following ways
:Date Dependent Variants:T009.ANZBP
Non Year Dependent Variants:T009.ANZBP
Calendar Dependent Variants: Hard coded to 12.
POSTING_PERIOD_NO
NUMBER(3,0) This is the number of the posting period of the fiscal calendar (e.g, 01, 02,... 12).
Table: T009BColumn: POPER-POSTING PERIOD
Depending on the Fiscal Variant, the Posting Period is derived in the following ways:
Date Dependent Variants: T009B.POPER
Non Year Dependent Variants:T 009B.POPER
Calendar Dependent Variants: Month component of the POSTING_DATE
Column name Datatype Description Derivation or source mapping
88 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
BatchTarget table name: BATCH
Table type: Conformed dimension
Description: This table is a grouping of material manufactured in a single production run that is managed together. In material management terminology, this group is known as a batch or lot. The reason why companies make use of batches is that it is easier to manage a group of materials with the same characteristics together than it is to handle them individually.
PST_PRD_END_DT
INTEGER This is the ending calendar date of the posting period. This date is in YYYYMMDD format (e.g., 20000131).
Table: T009BColumn: BDATJ,BUMON,BUTAG
Depending on the Fiscal Variant, the Posting Date is derived in the following ways:
Date Dependent Variants:(((T009B.BDATJ * 10000) + (T009B.BUMON * 100)) + T009B.BUTAG)
Non Year Dependent Variants:Derived from string manipulations involving Year component of ADM_TIME_DIM.Year + T009B.BUMON + T009B.BUTAG
Calendar Dependent Variants:ADM_LastDay_FN(((TIME_EX1.YEAR_VAL || substr(TIME_EX1.TIME_SID, 5, 2)) ||’01’))
***BDATJ-Posting Date YYYYBUMON-Posting Date Calendar MonthBUTAG-Calendar Date for the Posting Date
PST_PRD_STRT_DT
INTEGER This is the starting calendar date of the posting period. This date is in YYYYMMDD format (e.g., 20000101).
TIME_DIM_ID VARCHAR(150) This is the primary key for this entity. This key is composed of:FISCAL_VARIANT_CDFISCAL_DT
TIME_SID INTEGER This is a data warehouse system generated unique identifier for the time. This field is in YYYYMMDD format. A part of the surrogate identifier of the All Time dimension, the other part being Fiscal Variant Code.
Column name Datatype Description Derivation or source mapping
Developer Guide 89
Chapter 3: Data Mart Metadata
Column mapping
Column name Datatype Description Derivation or source mapping
AVAILABILITY_DT
INTEGER This is the date on which the batch becomes available.
Pass 1select MCH1.VERAB from MCHA, MCH1 where MCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned use default value for unknown
Pass 2MCH1.VERAB
BATCH_DIM_ID VARCHAR(150) This is the primary key for this entity. This key is composed of:BATCH_NOPLANT_IDMATERIAL_ID
BATCH_NO VARCHAR(10) This is the source system unique identifier for the batch.
Pass 1MCHA.CHARG
Pass 2MCH1.CHARG
BATCH_SID INTEGER This is a data warehouse system generated unique identifier for the batch.
System ETL generated unique id.
BATCH_STATUS_CD
CHAR(1) This is the code representing the status or usability of a batch. Statuses include Restricted Use, and Blocked.
Pass 1select MCH1.ZUSCH from MCHA, MCH1 left outer MCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned use default value for unknown
Pass 2MCH1.ZUSCH
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
LAST_RECEIPT_DT
INTEGER This is the date on which the last goods receipt for this batch was posted.
Pass 1select MCH1.LWEDT from MCHA, MCH1 where MCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned use default value for unknown
Pass 2MCH1.LWEDT
MATERIAL_ID VARCHAR(18) This is the source system unique identifier of the material being managed as a batch.
Pass 1MCHA.MATNR
Pass 2MCH1.MATNR
90 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
NEXT_INSPECTION_DT
INTEGER This is the date on which the next recurring inspection for the batch will take place.
Table: MCH1Column: QNDAT
Pass 1select MCH1.QNDAT from MCHA, MCH1 where MCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned use default value for unknown
Pass 2MCH1.QNDAT
PLANT_ID VARCHAR(4) This is the source system unique identifier of the Plant at which the batch of materials is located. This is used if this batch is specific to a Plant and is not managed across plants.
Pass 1MCHA.WERKS
Pass 2set to short char
RESTRICTED_USE_IND
CHAR(1) This is an indicator for the batch which is either set to restricted use (=Y) or not (=N).
Pass 1select MCH1.ZUSTD from MCHA, MCH1 where MCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned set indicator to N
if MCH1.ZUSTD = 'X'then set this indicator to Yelse set this indicator to N
Pass 2if MCH1.ZUSTD = 'X'then set this indicator to Yelse set this indicator to N
SHELF_LIFE_EXPR_DT
INTEGER This is the date of expiry of the materials in the batch. If the material is not of a type that expires, this date is set to null. If the materials in the batch have multiple dates of expiry, this is the earliest date amongst them.
Pass 1select MCH1.VFDAT from MCHA, MCH1 where MCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned use default value for unknown
Pass 2MCH1.VFDAT
VENDOR_ACCOUNT_NO
VARCHAR(10) This is a source system unique identifier of the vendor that is managing the batch. This is relevant for batches that are managed at the vendor's site.
Pass 1select MCH1.LIFNR from MCHA, MCH1 left outerMCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned use default value for unknown
Pass 2MCH1.LIFNR
VENDOR_BATCH_NO
VARCHAR(15) This is the unique identifier for the batch at the vendor's site. This is relevant for batches that are managed at the vendor's site.
Pass 1select MCH1.LICHA from MCHA, MCH1 left outer MCHA.MATNR = MCH1.MATNR and MCHA.CHARG = MCH1.CHARG
If no value is returned use default value for unknown
Pass 2MCH1.LICHA
Column name Datatype Description Derivation or source mapping
Developer Guide 91
Chapter 3: Data Mart Metadata
Business AreaTarget table name: BUSINESS_AREA
Table type: Conformed dimension
Description: This is an organizational unit within financial accounting that represents a separate area of operations or responsibilities within an organization. Financial accounting transactions can be allocated to a specific business area.
Business Areas permit external reporting of key performance indicators across multiple companies by product lines and/or subsidiaries. Alternatively, business area can mean an organizational entity for which "balance sheets" as well as "profit and loss statements" can be created for internal reporting. Unlike the company identifier, the business area is not a legally independent entity and is therefore not subject to the legal requirements for external reporting.
Column mapping
Column name Datatype Description Derivation or source mapping
BUSINESS_AREA_CD
VARCHAR(4) This is the code representing the business area. A Business Area permits external reporting of key performance indicators across multiple Companies by product lines and/or subsidiaries.
Table: TGSBColumn: GSBER
Natural keySAP Short Text: Business area
BUSINESS_AREA_NM
VARCHAR(30) This is the name representing the business area. A Business Area permits external reporting of key performance indicators across multiple Companies by product lines and/or subsidiaries.
Table: TGSBTColumn: GTEXT
SAP Short Text: BUSINESS AREA DESCRIPTION
Derived from a lookup into TGSBT.GTEXT based on TGSB.GSBER and TGSBT.SPRAS = Language parameter
BUSINESS_AREA_SID
INTEGER This is a data warehouse system generated unique identifier for the business area.
Created during the load (auto) created in Dimensional Build
BUSINESS_AR_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:BUSINESS_AREA_CD
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Created during the load process (auto) created in Dimensional Build
CNSLDTN_BA_CD
VARCHAR(4) Code that identifies a business area used centrally in the corporate group. The definition predefines the group parent. All reporting systems allocate business areas used locally to the consolidation business areas.
Table: TGSBColumn: GSBER_KONS
SAP Short Text: Consolidation business area
CNSLDTN_BA_NM
VARCHAR(30) Descriptive name for a consolidation business area associated with consolidation business area code.
Table: TGSBLColumn: TXT
SAP Short Text: BUSINESS AREA DESCRIPTION
Derived from a lookup into TGSBL.TXT based on TGSBL.GSBER_KONS and TGSBL.SPRAS = Language parameter
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Created during the load process (auto) created in Dimensional Build
92 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
CustomerTarget table name: CUSTOMER
Table type: Conformed dimension
Description: This describes customers, such as the ones being Sold-to, Billed-to, Shipped-to, Payers, Buyers, etc. Customers are relevant in the context of Sales, Financial Accounting, Customer Relationship Management, etc. A customer may be either a person or a company. Depending on the ERP implementation, a customer can have one or multiple addresses and any one of these addresses may be used in relation to a business transaction, such as a Sales Order.
Column mapping
Column name Datatype Description Derivation or source mapping
ACCNT_ASGMT_GRP_CD
VARCHAR(2) This is the identifier for the revenue account on the sales document for the customer payer. This value can be modified for the billing document.
Table: KNVV-CUSTOMER MASTER SALES DATAColumn: KTGRD-ACCOUNT ASSIGNMENT GROUP FOR THIS CUSTOMER
pass 1:use source column
pass 2 & 3:use unknown default parameter
ADDRESS_ID VARCHAR(10) This is a source system generated unique identifier of the address of the customer.
Table: KNA1 - GENERAL DATA IN CUSTOMER MASTERColumn: ADRNR - ADDRESS
pass 1, 2 & 3use source column
BILLING_BLOCK_CD
VARCHAR(2) This is an indicator that halts billing for a customer either in general for that customer or in a specific sales area. This is used to block billing if there are legal or credit-related problems. Depending on the ERP implementation, in order to block a customer at an entire sales organization level, it may have to be done in each sales area in which the sales organization is defined.
Table: KNVV, KNA1Column: FAKSD-BILLING BLOCK FOR CUSTOMER (SALES AND DISTRI
pass 1: If KNVV.FAKSD <> ' ' Then ---- (This means it is blocked) KNVV.FAKSD else KNA1.FAKSD Endif.
For PASS 2 and 3 KNA1.FAKSD
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. This is set to the CREATED_DT when the row is inserted
CITY_NM VARCHAR(35) This is the name of the city where the customer resides.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: ORT01-CITY
passes 1,2 & 3use source column
Developer Guide 93
Chapter 3: Data Mart Metadata
COLLECTION_MNGR_NM
VARCHAR(81) This is the identification of the employee who is assigned as the Accounts Receivable Collection Manager for the customer in default. This identifier conforms to the Employee dimension Personnel Number and should exist in this dimension.
Table: PA0002 - HR MASTER RECORD: INFOTYPE 0002 (PERSONALColumn: VORNA - FIRST NAME, NACHN - LAST NAME
pass 1 & 2:NULLIF(TRIM("KNA1"."KUNNR"), ' ') || '{$U_SEPARATOR_CHAR}' || NULLIF(TRIM("TVKO"."BUKRS"), ' ') || '{$U_SEPARATOR_CHAR}' || '{$U_DEFAULT_SHORT_CHAR}' || '{$U_SEPARATOR_CHAR}' || '{$U_DEFAULT_SHORT_CHAR}' || '{$U_SEPARATOR_CHAR}' || '{$U_DEFAULT_SHORT_CHAR}' AS COLLECTION_MGR_LKP
pass 3:use unknown default parameter
COMPANY_CD VARCHAR(4) This is the source system unique identifier for a Company.
Table: SEE MAPPINGColumn: BUKRS - COMPANY CODE OF THE SALES ORGANIZATION
pass 1:use TVKO.BUKRS
pass 2:use knb1.bukrs
pass 3:use unknown default parameter
COUNTRY_CD VARCHAR(3) This is a code representing the country where the customer resides.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: LAND1-COUNTRY KEY
pass 1, 2 & 3use source column
COUNTRY_NM VARCHAR(15) This is the name of the country where the customer resides.
Table: T005T-COUNTRY NAMESColumn: LANDX-COUNTRY NAME
use source columnbased on lookup to source table on KNA1.LAND1 and SPRAS= language parameter
COUNTY_CD VARCHAR(3) This is a code representing the county where the customer resides.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: COUNC-COUNTY CODE
pass 1, 2 & 3use source column
COUNTY_NM VARCHAR(20) This is the name of the county where the customer resides.
Table: T005F-COUNTY: TEXTSColumn: BEZEI-DESCRIPTION
pass 1, 2 & 3:use source column based on lookup to T005FWHERE language filter =T005F.SPRAS AND KNA1.LAND1 = T005F.LAND1 ANDKNA1.REGIO = T005F.REGIO ANDKNA1.COUNC = T005F.COUNC
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated
Column name Datatype Description Derivation or source mapping
94 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
CREDIT_LIMIT_AMT
NUMBER(15,2) This is the credit limit that the customer has been granted. This amount is stored in the currency of the company code in which the customer was created.
Table: KNKK-CUSTOMER MASTER CREDIT MANAGEMENT: CONTROL ARColumn: KLIMK-CUSTOMER'S CREDIT LIMIT
pass 1:If KNVV.kkber not nullthen select knkk.klimk from knkk where CUSTOMER_NO = KNKK.kunnr and KNKK.kkber = knvv.kkber If knkk.klimk = 0 then use knkk.knkli and knkk.kkber to look up knkk.klimk (a self join on knkk) else use knkk.klimk else select knkk.klimk from knkk where CUSTOMER_NO = KNKK.kunnr and KNKK.kkber = T001.kkber (get company code to do the lookup to T001 from TVKO.BUKRS) If knkk.klimk = 0 then use knkk.knkli and knkk.kkber to look up knkk.klimk (a self join on knkk) else use knkk.klimk
pass 2 Select KNKK.KLIMK from KNKK where KNA1.KUNNR = KNKK.KUNNR and T001.KKBER = KNKK.KKBER
To get T001.KKBER: Lookup to T001.KKBER where T001.BUKRS = KNB1.BUKRS
Pass 3:use unknown default parameter
CREDIT_MANAGER_NM
VARCHAR(81) This is the identification of the employee who is assigned as the Accounts Receivable Analyst for the customer. This identifier conforms to the Employee dimension Personnel Number and should exist in this dimension.
Table: PA0002 - HR MASTER RECORD: INFOTYPE 0002 (PERSONALColumn: VORNA - FIRST NAME,NACHN - SECOND NAME
pass 1 & 2: NULLIF(TRIM("KNA1"."KUNNR"), ' ') || '{$U_SEPARATOR_CHAR}' || NULLIF(TRIM("TVKO"."BUKRS"), ' ') || '{$U_SEPARATOR_CHAR}' || '{$U_DEFAULT_SHORT_CHAR}' || '{$U_SEPARATOR_CHAR}' || '{$U_DEFAULT_SHORT_CHAR}' || '{$U_SEPARATOR_CHAR}' || '{$U_DEFAULT_SHORT_CHAR}' AS CREDIT_MGR_LKP
pass 3use unknown default parameter
CURRENCY_CD VARCHAR(5) This is the customer's commonly accepted currency for the sales area. This currency is used to settle the customer's charges for sales. This is used to know the base currency, from which, conversions can occur for the customer's sales.
Table: SEE MAPPINGColumn: SEE MAPPING
pass 1:use knvv.waersif knvv.waers NULL use kna1.uwaer
pass 2 & 3use kna1.uwaer
Column name Datatype Description Derivation or source mapping
Developer Guide 95
Chapter 3: Data Mart Metadata
CUSTOMER_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:CUSTOMER_NOCOMPANY_CDSALES_ORG_CDDSTR_CHNL_CDDIVISION_CD
CUSTOMER_GROUP_CD
VARCHAR(2) This is a code representing a particular group of customers, for example, wholesale or retail, for the purposes of pricing or generating statistics. These groupings may be freely defined by each company according to the needs of the organization.
Table: KNVV-CUSTOMER MASTER SALES DATAColumn: KDGRP-CUSTOMER GROUP
pass 1:use source column
pass 2 & 3:use unknown default parameter
CUSTOMER_GROUP_NM
VARCHAR(20) This is a classification of customers by particular groups, for example, wholesale or retail, for the purposes of pricing or generating statistics. These groupings may be freely defined by each company according to the needs of the organization.
Table: T151T-CUSTOMERS: CUSTOMER GROUPS: TEXTSColumn: KTEXT-NAME
use source column based on a lookup to T151T using KNVV.KDGRP and SPRAS = language parameter
CUSTOMER_LEVEL1_NM to CUSTOMER_LEVEL5_NM
VARCHAR(35) This is the name of the level 1 to 5 parent of a customer. Customers are part of a hierarchy, where customers can belong to various levels in this hierarchy. This attribute identifies the level 1 to 5 customer in the hierarchy related to this customer. If the customer itself belongs to this level, the levels below it will be null or have the customer's name repeated in them.
Table: CUSTOMERHIERARCHY.DATColumn: LEVEL#_CUSTOMER_NM
where # = 1 to 5
pass 1use source columnwhen CUSTOMER_NO = CustomerHierarchy.CUSTOMER_NOSALES_ORG_CD = CustomerHierarchy.SALES_ORG_CDDSTRBTN_CHNNL_CD = CustomerHierarchy.DSTRBTN_CHNNL_CDDIVISION_CD = CustomerHierarchy.DIVISION_CD
pass 2 & 3use unknown default parameter
CUSTOMER_LONG_NM
VARCHAR(140) This is the full name of the customer, for example, the concatenation of first, middle, and last names of a person, or the legal name of a company.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: NAME1, NAME2, NAME3, NAME4
pass 1, 2 & 3Concatenate the source columnsKNA1.NAME1 + KNA1.NAME2 + KNA1.NAME3 + KNA1.NAME4
CUSTOMER_NM VARCHAR(35) This is the commonly used name of the customer, for example, the first and last names without the middle name of a person, or the trading name of a company.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: NAME1-NAME 1
pass 1, 2 & 3use source column
CUSTOMER_NO VARCHAR(10) This is the source system generated unique identifier of the customer.
Table: KNA1 - GENERAL DATA IN CUSTOMER MASTERColumn: KUNNR-CUSTOMER NUMBER
pass 1, 2 & 3use source column
CUSTOMER_SID INTEGER This is a data warehouse system generated unique identifier for the customer.
CUSTOMER_TYPE_CD
VARCHAR(4) This is a code that represents the type of customer.
Table: KNA1 - GENERAL DATA IN CUSTOMER MASTERColumn: KTOKD - CUSTOMER ACCOUNT GROUP
pass 1, 2 & 3use source column
Column name Datatype Description Derivation or source mapping
96 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
CUSTOMER_TYPE_NM
VARCHAR(30) This is the description for the type of customer.
Table: T077X - ACCOUNT GROUP NAMES (TABLE T077D)Column: TXT30
pass 1, 2 & 3:use source column when kna1.KTOKD = t077x.KTOKD ANDt077x.SPRAS = language parameter
CUST_CLSSFCTN_CD
VARCHAR(2) This is the code representing the classification for the type of customer. For example, it classifies the customer as a bulk purchaser. Classification values may be freely defined by the company and therefore can vary from company to company.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: KUKLA-CUSTOMER CLASSIFICATION
pass 1, 2 & 3use source column
CUST_CLSSFCTN_NM
VARCHAR(20) This is classification for the type of customer. For example, it classifies the customer as a bulk Purchaser. Classification values may be freely defined by the company and therefore can vary from company to company.
Table: TKUKT-CUSTOMERS: CUSTOMER CLASSIFICATION: TEXTSColumn: VTEXT-DESCRIPTION
Derived from a lookup into TKUKT.VTEXT based on KNA1.KUKLA and where SPRAS = language parameter
CUST_HIER_LVL_NO
NUMBER(4,0) This is the level number of the customer hierarchy. For example, if the customer is at level three of the hierarchy, the customer has a parent (in level 2) and a grandparent (in level 1). Level four is unused (the customer may be repeated in level four, or it may be left as null).
Table: CUSTOMERHIERARCHY.DATColumn: CUST_HIER_LEVEL_NO
pass 1use source columnwhen CUSTOMER_NO = CustomerHierarchy.CUSTOMER_NOSALES_ORG_CD = CustomerHierarchy.SALES_ORG_CDDSTRBTN_CHNNL_CD = CustomerHierarchy.DSTRBTN_CHNNL_CDDIVISION_CD = CustomerHierarchy.DIVISION_CD
pass 2 & 3use unknown default parameter
DIVISION_CD VARCHAR(2) This is a grouping of grouping material, products, or services to which a customer can be associated. A product or service is always assigned to just one division. from the point of view of sales and distribution, the use of divisions lets you organize your sales around groups of similar products or product lines. This allows the people in a division who process orders and service customers to specialize within a manageable area of expertise. If a sales organization sells food and non-food products through both retail and wholesale distribution channels, each distribution channel could then be further split into food and non-food divisions.
Table: KNVV-CUSTOMER MASTER SALES DATAColumn: SPART-DIVISION
pass 1:use source column
pass 2 & 3:use unknown default parameter
DNNG_BLCK_RSN_DSC
VARCHAR(50) Descriptive text for a DUNNING BLOCK REASON CODE value.
Table: T040T - DUNNING BLOCK REASON NAMESColumn: TEXT1 - REASON FOR DUNNING BLOCK TEXT
passes 1, 2:use source columnwhen CUSTOMER_NO = KNB5.KUNNR ANDCOMPANY_CD = KNB5.BUKRS ANDknb5.mansp = t040t.mansp andt040t.spras = language parameter
pass 3:use unknown default parameter
Column name Datatype Description Derivation or source mapping
Developer Guide 97
Chapter 3: Data Mart Metadata
DSTR_CHNL_CD VARCHAR(2) This is a code representing the mechanism by which products or services reach the customer. Typical examples are wholesale, retail, internet, or direct sales
Table: KNVV-CUSTOMER MASTER SALES DATAColumn: VTWEG-DISTRIBUTION CHANNEL
pass 1:use source column
pass 2 & 3:use unknown default parameter
DUNNING_BLOCK_IND
CHAR(1) This indicates whether Dunning is to occur for this particular customer. In other words, if the value is set to 'Y' (i.e. blocked for dunning), then this customer will not receive dunning letters. If the value is set to 'N', then dunning letters will be sent, as necessary.
Table: KNB5 - CUSTOMER MASTER (DUNNING DATA)Column: MANSP - DUNNING BLOCK
pass 1 & 2use manspwhen CUSTOMER_NO = KNB5.kunnr andCOMPANY_CD = KNB5.bukrs
if mansp is not blank then set to 'Y'else set to 'N'endif
pass 3use unknown default parameter
DUNNING_LEVEL_ID
CHAR(1) This is the level of "dunning" assigned to this Customer. It signifies the intensity of the solicitation for payment of overdue invoices.
Table: KNB5-CUSTOMER MASTER (DUNNING DATA)Column: MAHNS-DUNNING LEVEL
passes 1 & 2use mahnswhen CUSTOMER_NO = knb5.kunnr and COMPANY_CD to knb5.bukrs
pass 3use unknown default parameter
EXTRNL_CUST_REF_NO
VARCHAR(12) This is an identifier for the customer's company account number as assigned by the customer (or Vendor).
Table: KNVV-CUSTOMER MASTER SALES DATAColumn: EIKTO-SHIPPER'S (OUR) ACCOUNT NUMBER AT THE CUSTOM
Pass 1:Lookup KNVV.EIKTO and if its = ' ' then Lookup KNB1.EIKTO and if its = ' ' then use unknown default parameter else use KNB1.EIKTOelse use KNVV.EIKTO
Pass 2:Lookup KNB1.EIKTO and if its = ' 'then use unknown default parameterelse use KNB1.EIKTO
Pass 3:- use unknown default parameter
FAX_NO VARCHAR(31) This is the fax number of the customer. Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: TELFX-FAX NUMBER
pass 1, 2 & 3use source column
Column name Datatype Description Derivation or source mapping
98 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
INDUSTRY_CD VARCHAR(4) This is the industry of a distinct group of companies with the same basic business activity. This is used to select companies for evaluation. You can specify industries such as trade, banking, manufacturing, health care, media, etc.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: BRSCH-INDUSTRY KEY
pass 1, 2 & 3use source column
INDUSTRY_DSC VARCHAR(20) This is the description of the industry of a distinct group of companies with the same basic business activity. Used to select companies for evaluation. You can specify industries such as trade, banking, manufacturing, health care, media, etc.
Table: T016T-INDUSTRY NAMESColumn: BRTXT-DESCRIPTION OF THE INDUSTRY KEY
passes 1, 2 & 3:Derived from a lookup into T016T.BRTXT based on KNA1.BRSCH and SPRAS= language parameter
PAYMENT_TERMS_CD
VARCHAR(4) A code used to classify the Payment terms to allow grouping of customer by the terms of payment.
Table: KNVV-CUSTOMER MASTER SALES DATAColumn: ZTERM-TERMS OF PAYMENT KEY
pass 1:use source column
pass 2 & 3:use unknown default parameter
PAYMENT_TERMS_DSC
VARCHAR(28) A description used to classify the Payment terms to allow grouping of customer by the terms of payment.
Table: T052 - TERMS OF PAYMENTColumn: ZTAG1, ZTAG2, ZTAG3, ZPRZ1, ZPRZ2
Concatenation of all the fields that make up the payment term code.
Lookup to T052 whereKNVV.ZTERM = T052.ZTERM to retrieve:
concat((If T052.ZTAG1 <> ' ' then T052.ZTAG1), (If T052.ZPRZ1 <> ' ' then ' - ' + T052.ZPRZ1 + '%'), (If T052.ZTAG2 <> ' ' then ', ' + T052.ZTAG2), (If T052.ZPRZ2 <> ' ' then ' - ' + T052.ZPRZ2 + '%'), (If T052.ZTAG3 <> ' ' then ', ' +T052.ZTAG3))
Which will give (e.g. 1) 30 - 3%, 40 - 2%, 60(e.g. 2) 10 - 2%, 40(e.g. 3) 20
ZTAG1, ZTAG2, ZTAG3 - Days from Baseline Date for PaymentZPRZ1, ZPRZ2 - Cash Discount Percentage Rate
POSTAL_CD VARCHAR(10) This is the postal code associated with the residence of a customer.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: PSTLZ-POSTAL CODE
pass 1, 2 & 3use source column
RCNCL_GL_ACCNT_NO
VARCHAR(10) This is the GL account number that is used for this Customer's AR transactions that are rolled up into the general ledger. Many Customers may be assigned to the same GL reconciliation account. This account identifier conforms to the Account Identifier represented in the Chart of Accounts dimension.
Table: KNB1 - CUSTOMER MASTER (COMPANY CODE)Column: AKONT
passes 1 & 2use source column
pass 3 use unknown default parameter
Column name Datatype Description Derivation or source mapping
Developer Guide 99
Chapter 3: Data Mart Metadata
REGION_CD VARCHAR(3) This is the code representing the region where the customer resides. The relevant meaning depends on the country. In the USA the region would represent the state, in Canada the province, in Switzerland the canton, in UK the county, etc.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: REGIO-REGION (STATE, PROVINCE, COUNTY)
pass 1, 2 & 3use source column
REGION_NM VARCHAR(20) This is the name of the region where the customer resides. The relevant meaning depends on the country. In the USA it would represent the state, in Canada the province, in Switzerland the canton, in UK the county, etc.
Table: T005U-TAXES: REGION KEY: TEXTSColumn: BEZEI-DESCRIPTION
passes 1, 2 & 3:Derived from a lookup into T005U.BEZEI based on KNA1.REGIO, KNA1.LAND1 and SPRAS = language parameter
RISK_CATEGORY_CD
VARCHAR(3) This is a code representing the risk category (of defaulting on Accounts Receivable) of the customer.
Table: KNKK-CUSTOMER MASTER CREDIT MANAGEMENT: CONTROL ARColumn: CTLPC-CREDIT MANAGEMENT: RISK CATEGORY
pass 1:use CTLPCwhen KNKK.KUNNR = KNVV.KUNNR andKNKK.kkber = CONSOLIDATION_AREA
To get CONSOLIDATION_AREA: If KNVV.KKBER = ' ' then Lookup to T001.KKBER where T001.BUKRS = COMPANY_CD Else KNVV.KKBER Endif
*COMPANY_CD is derived from TVKO
pass 2 To get CONSOLIDATION_AREA: Lookup to T001.KKBER where T001.BUKRS = KNB1.BUKRS Endif
Pass 3:use unknown default parameter
SALES_DISTRICT_NM
VARCHAR(20) This is the geographical sales district that the customer has been assigned to for pricing conditions and statistical purposes.
Table: T171T-CUSTOMERS: SALES DISTRICTS: TEXTSColumn: BZTXT-NAME OF THE DISTRICT
pass 1Derived from a lookup into T171T.BZTXT based on KNVV.BZIRK and where SPRAS = language parameter
pass 2 & 3use unknown default parameter
SALES_ORG_CD VARCHAR(4) This is the identifier of the organization unit responsible for the sale of certain products or services. The responsibility of a sales organization may include legal liability for products and customer claims. A particular combination sales organization, distribution channel, and division is know as a sales area.
Table: KNVV-CUSTOMER MASTER SALES DATAColumn: VKORG-SALES ORGANIZATION
pass 1:use source column
pass 2 & 3:use unknown default parameter
Column name Datatype Description Derivation or source mapping
100 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Financial Currency ConversionTarget table name: FINANCIAL_CUR_CONV
Table type: Pseudo-dimension. In Cognos Applications, a pseudo-dimension refers to tables that are not true dimensions, because they are not used to answer business questions.
Description: This dimension supports converting monetary values from one currency to another for reporting purposes. For example, a multinational company's source system may have transactions in multiple currencies. While extracting data from the source system the monetary values are converted from their document currencies to a standard currency (referred to as the local currency). This entity allows such a conversion. The Fiscal Variant is an important component of this entity, as currency conversion rates vary from one fiscal calendar to the next. This entity is typically sourced from the source system's financial currency conversion tables.
The Financial Currency Conversion entity is not a fact or a true dimension. However, it is used for reports (business questions) that require a currency conversion. It is referred to as a pseudo-dimension in our documentation.
Column mapping
STREET_ADDRESS_TXT
VARCHAR(35) This is the street and house/building/apartment number where the customer resides. This attribute accommodates multi-line addresses.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: STRAS-HOUSE NUMBER AND STREET
pass 1, 2 & 3:use source column
TELEPHONE_NO VARCHAR(16) This is the complete telephone number of the customer including country code, area code, and number.
Table: KNA1-GENERAL DATA IN CUSTOMER MASTERColumn: TELF1-FIRST TELEPHONE NUMBER
pass 1, 2 & 3use source column
Column name Datatype Description Derivation or source mapping
Column name Datatype Description Derivation or source mapping
BASE_CURRENCY_CD
VARCHAR(5) This is the code representing the currency used as a base for triangulation purposes. Currency codes and associated conversion rates are used in conversions from one currency to another. The base currency code is often used in a technique often referred to as triangulation. In this method, conversion rates are provided to convert each currency to a base currency (usually, a base currency is decided upon and available as a global parameter set by the application concerned). The ratio of two such conversion rates then provides the rate to convert directly from one currency to another. For example: Base Currency = US Dollars, Currency A = Yen, Conversion Rate from A to Base = 0.009303; Currency B = Canadian Dollars, Conversion Rate from B to Base = 0.674933. Given this information, one may calculate the rate of conversion directly from A to B as 0.009303 / 0.674933 = 0.013751.
Table: TCURV -EXCHANGE RATE TYPES, T001-COMPANY CODESColumn: TCURV.BWAER, T001.WAERS
BASE_CURRENCY_NM
VARCHAR(15) This is the full name of the base currency. Table: TCURT-CURRENCY CODE NAMESColumn: KTEXT-SHORT TEXT
BASE_TO_TO_EXCH_RT
NUMBER(15,7) This is the rate of conversion from base currency to the currency converted to.
Table: TCURR-EXCHANGE RATESColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Developer Guide 101
Chapter 3: Data Mart Metadata
BS_TO_FRM_EXCH_RT
NUMBER(15,7) This is the inverse of the rate of conversion from the currency converted from to the base currency.
Table: TCURR-EXCHANGE RATESColumn: SEE SOURCE SYSTEM MAPPING LOGIC
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL Derived. Changed_Dt is set to Created_Dt on insert of row.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL Derived
EXCHANGE_RT NUMBER(15,7) This is the rate of conversion from the currency converted from to the currency converted to.
FISCAL_PERIOD_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "fiscal role" sourced from the Logical Data Model.
Table: FISCAL_EX1Column: FISCAL_PERIOD_SID
FISCAL_VARIANT_CD
VARCHAR(2) This is used to define the fiscal calendars within an organization. An organization may be composed of multiple companies (e.g., if mergers took place), and may have to deal with multiple fiscal calendars. This entity is flexible enough to accommodate all the fiscal calendars in the organization. Each fiscal calendar is represented by a fiscal variant code. The fiscal variant code thus defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The posting periods within a fiscal year may belong to fiscal quarters. The default fiscal variant is defined as the calendar year, which starts on Jan 1st and ends on Dec 31st, and includes 12 periods corresponding to the months, and 4 calendar quarters.
Table: FISCAL_EX1Column: FISCAL_VARIANT_CD
FISCAL_YEAR_VAL
NUMBER(4,0) This is the year of the fiscal calendar. This field is in YYYY format.
Table: FISCAL_EX1Column: FISCAL_YEAR_VAL
FROM_CURRENCY_CD
VARCHAR(5) This is the currency code to be converted from.
Table: T001-COMPANY CODESColumn: WAERS-CURRENCY KEY
FROM_CURRENCY_NM
VARCHAR(15) This is the full name of the currency converted from.
Table: TCURT-CURRENCY CODE NAMESColumn: KTEXT-SHORT TEXT
FROM_TO_BS_EXCH_RT
NUMBER(15,7) This is the rate of conversion from the currency converted from to the base currency.
Table: TCURR-EXCHANGE RATESColumn: SEE SOURCE SYSTEM MAPPING LOGIC
GROUP_CURRENCY_CD
VARCHAR(5) This is the code representing the standard currency in which all monetary amounts in the data warehouse are stored. For example, if the monetary amounts in the data warehouse are stored in US Dollars, the code representing that may be USD. The standard or group currency is useful in reports that compare monetary amounts across companies that prefer to work in a variety of currencies.
Table: T000-CLIENTS, TCURV-EXCHANGE RATE TYPESColumn: T000.MWAER, TCURV.BWAER
Column name Datatype Description Derivation or source mapping
102 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
MaterialTarget table name: MATERIAL
Table type: Conformed dimension
Description: The Material dimension is an important component of Supply Chain Management. The dimension describes the products that a company manufactures and sells in extreme detail, allowing one to analyze Sales or Inventory across Material Types, Groups, etc. For example, the two most basic Inventory Management questions are - "what have I got?" and "where is it?". The Material Dimension tells us what we have.
GROUP_CURRENCY_NM
VARCHAR(15) This is the name of the standard currency in which all monetary amounts in the data warehouse are stored. For example, if the monetary amounts in the data warehouse are stored in US Dollars, the code representing that may be USD. The standard or group currency is useful in reports that compare monetary amounts across companies that prefer to work in a variety of currencies.
Table: TCURT-CURRENCY CODE NAMESColumn: KTEXT-SHORT TEXT
POSTING_PERIOD_NO
NUMBER(3,0) This is the number of the posting period of the fiscal calendar (e.g, 01, 02,... 12).
Table: FISCAL_EX1Column: POSTING_PERIOD_NO
PST_PRD_END_DT
NUMBER(8,0) This is the ending calendar date of the posting period. This date is in YYYYMMDD format (e.g., 20000131).
Table: FISCAL_EX1Column: PST_PRD_END_DT
PST_PRD_STRT_DT
NUMBER(8,0) This is the starting calendar date of the posting period. This date is in YYYYMMDD format (e.g., 20000101).
Table: FISCAL_EX1Column: PST_PRD_STRT_DT
This is retrieved from the FISCAL_EX1 work table.
-- valid combinations of local currency, fiscal variant, posting date and "convert to currency"select distinct co.waers, fd.fiscal_period_sid, fd.fiscal_year, fd.fiscal_variant_ cd, fd.posting_period, fd.pst_prd_end_dt, fd.pst_prd_strt_dtfrom adm.t001 co,FISCAL_EX1 fd,file: ADM_CONVERT_TO_CURRENCYwhere co.mandt = Client_CDand fd.FISCAL_VARIANT_CD = co.perivand ADM_CONVERT_TO_CURRENCY.CONVERT_TO_CURRENCY =’Y’;
RATE_PUBLISHED_DT
NUMBER(8,0) This is the date on which the rate of currency conversion was published.
Table: TCURR-EXCHANGE RATESColumn: GDATU-DATE AS OF WHICH THE EXCHANGE RATE IS EFFECT
TCUR_CNTRY_ISO_CD
VARCHAR(3) This is the ISO country code of the currency converted to.
TO_CURRENCY_CD
VARCHAR(5) This is the currency code to be converted to.
TO_CURRENCY_NM
VARCHAR(15) This is the full name of the currency converted to.
Table: TCURT-CURRENCY CODE NAMESColumn: KTEXT-SHORT TEXT
TO_TO_BASE_EXCH_RT
NUMBER(15,7) This is the inverse of the rate of conversion from base currency to the currency converted to.
Table: TCURR-EXCHANGE RATESColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Column name Datatype Description Derivation or source mapping
Developer Guide 103
Chapter 3: Data Mart Metadata
Column mapping
Column name Datatype Description Derivation or source mapping
BASE_UOM_CD VARCHAR(3) This is a code representing the base unit of measure in which material stocks are managed. This is sometimes referred to as the Stock Keeping Unit.
Table: MARA-GENERAL MATERIAL DATAColumn: MEINS-BASE UNIT OF MEASURE
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. CHANGED_DT = CREATED_DT on insert of row.
DELETION_DT INTEGER This is the date on which the material is to be deleted. This is the latest possible date of all "TO-dates" referring to the material.
Table: MARAColumn: LAEDA - DATE OF LAST CHANGE
If the DELETION IND (mara.lvorm) = 'X'then the value in LAEDA - DATE OF LAST CHANGE should be used
DELETION_IND CHAR(1) This is an indicator that flags all data on a material master for deletion.
Table: MARA-GENERAL MATERIAL DATAColumn: LVORM-FLAG MATERIAL FOR DELETION AT CLIENT LEVEL
if lvorm = 'X'then set to 'Y'else set to 'N'
DIM_UOM_CD VARCHAR(3) This is the unit of measure in which the dimensions of length, width and height of a material or its packaging are measured.
Table: MARAColumn: MEABM-UNIT OF DIMENSION FOR LENGTH/WIDTH/HEIGHT
DIVISION_CD VARCHAR(2) This is the code representing the division to which the material belongs. A division is a way of grouping materials, products, or services, based on the sales area or the business area that it belongs to. A product is always assigned to just one division, from the point of view of sales and distribution. The use of divisions lets you organize your sales around groups of similar products or product lines. It also allows the people who process orders and services within the division to specialize in an area of expertise related to the division. For example, if a sales organization sells food and non-food products, each could represent a division. If the sales were conducted through both retail and wholesale distribution channels, each distribution channel could then be split into food and non-food divisions.
Table: MARAColumn: SPART-DIVISION
104 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
DIVISION_NM VARCHAR(20) This is the name of the division to which the material belongs. A division is a way of grouping materials, products, or services, based on the sales area or the business area that it belongs to. A product is always assigned to just one division, from the point of view of sales and distribution. The use of divisions lets you organize your sales around groups of similar products or product lines. It also allows the people who process orders and services within the division to specialize in an area of expertise related to the division. For example, if a sales organization sells food and non-food products, each could represent a division. If the sales were conducted through both retail and wholesale distribution channels, each distribution channel could then be split into food and non-food divisions.
Table: TSPAT-ORGANIZATIONAL UNIT: SALES DIVISIONS: TEXTSColumn: VTEXT-NAME
Derived from a lookup into TSPAT.VTEXT BASED ON MARA.SPART and where SPRAS = LanguageParameter
HEIGHT_VAL NUMBER(13,3) This is the height of the material or its packaging, measured in the unit of dimension.
Table: MARA-GENERAL MATERIAL DATAColumn: HOEHE-HEIGHT
INDUSTRY_SECT_CD
CHAR(1) This is the code representing the branch of industry to which the material is assigned. Examples are fuel, food, hardware, etc.
Table: MARA-GENERAL MATERIAL DATAColumn: MBRSH-INDUSTRY SECTOR
INDUSTRY_SECT_DSC
VARCHAR(25) This is the textual description of the branch of industry to which the material is assigned. Examples are fuel, food, hardware, etc.
Table: T137T-INDUSTRY DESCRIPTIONSColumn: MBBEZ-INDUSTRY SECTOR DESCRIPTION
SELECT MBBEZFROM MARA, T137T WHERE MARA.MBRSH = T137T.MBRSH AND T137T.SPRAS = LanguageParameter
INDUSTRY_STD_DSC
VARCHAR(18) This is the standard industry description for the material.
Table: MARA-GENERAL MATERIAL DATAColumn: NORMT-INDUSTRY STANDARD DESCRIPTION (SUCH AS ANSI
LENGTH_VAL NUMBER(13,3) This is the length of the material or its packaging, measured in the unit of dimension.
Table: MARA-GENERAL MATERIAL DATAColumn: LAENG - LENGTH
LEVEL1_MATERIAL_NM to LEVEL5_MATERIAL_NM
VARCHAR(40) This is the name of the level 1 to 5 parent of a material. Materials are part of a hierarchy, where a material can belong to various levels in this hierarchy. This attribute identifies the highest level material in the hierarchy related to this material. If the material itself belongs to this level, the levels below it will be null or have the material's name repeated in them.
Table: T179T-MATERIALS: PRODUCT HIERARCHIES: TEXTSColumn: VTEXT-DESCRIPTION
Lookup to T179T.VTEXTwhere PRODH = substring(MARA.PRDHA) and SPRAS = LanguageParameter
The substring length should be a parameter (Material 1 Level Length to Material 5 Level Length), however the default is from Char 1 to 5.
MATERIAL_CAT_CD
VARCHAR(2) This is a code representing the category of the material, for example, whether it is a configurable material, variant, a sales set, display material, or single material, etc.
Table: MARA-GENERAL MATERIAL DATAColumn: ATTYP - MATERIAL CATEGORY
Column name Datatype Description Derivation or source mapping
Developer Guide 105
Chapter 3: Data Mart Metadata
MATERIAL_CAT_DSC
VARCHAR(60) This is a textual description of the material category code, for example, whether it is a configurable material, variant, a sales set, display material, or single material, etc.
Table: DD07T - DD: TEXTS FOR DOMAIN FIXED VALUES (LANGUAColumn: DDTEXT - SHORT TEXT FOR FIXED VALUES
select DD07T-DDTEXT where DD07T-DOMNAM = 'ATTYP' And DD07T-SPRAS = LanguageParameter And DD07T-DOMVALUE_L = MARA-ATTYP
BLANK OR NULL IS A VALID VALUE for MATERIAL_CAT_CD and returns 'Single Material (Industry)' in the text field.
MATERIAL_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:MATERIAL_ID
MATERIAL_DSC VARCHAR(40) This is the textual description of the material.
Table: MAKTColumn: MAKTX
Pass 1select maktx from mara, maktwhere mara.matnr = makt.matnr andspras = LanguageParameter
Pass 2Use same value as material_id
MATERIAL_GRP_CD
VARCHAR(9) This is the code representing the grouping of materials or services with similar attributes. Material groups may be used to restrict the scope of analysis to a number of similar materials at a time, rather than focusing on a specific material.
Table: MARA-GENERAL MATERIAL DATAColumn: MATKL-MATERIAL GROUP
pass 1) use mara.matkl
pass 2) use t023.matkl
MATERIAL_GRP_DSC
VARCHAR(20) This is the textual description of the grouping of materials or services with similar attributes. Material groups may be used to restrict the scope of analysis to a number of similar materials at a time, rather than focusing on a specific material.
Table: T023T-MATERIAL GROUP DESCRIPTIONSColumn: WGBEZ-DESCRIPTION OF MATERIAL GROUP
SELECT WGBEZ FROM MARA, T023TWHERE MARA.MATKL = T023T.MATKL AND SPRAS = LanguageParameter- a row will not get returned if a description in the filter language has not been defined.
MATERIAL_ID VARCHAR(18) This is the source system unique identifier of the material.
Table: MARA-GENERAL MATERIAL DATAColumn: MATNR-MATERIAL NUMBER
Pass 1)- load from MARA.MATNR
Pass 2) - A contrived row will be created using all the material group values in T023.- The contrived MATERIAL_ID values should be for all rows in T023 with the value "NO MAT " + T023.MATKL.
MATERIAL_SID INTEGER This is a data warehouse system generated unique identifier for the material.
System generated unique identifier.
MATERIAL_TYPE_CD
VARCHAR(4) This is a code representing the material types such as raw materials, finished products, etc.
Table: MARA-GENERAL MATERIAL DATAColumn: MTART-MATERIAL TYPE
Column name Datatype Description Derivation or source mapping
106 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
MATERIAL_TYPE_DSC
VARCHAR(25) This is the textual description of the material types such as raw materials, finished products, etc.
Table: T134T-MATERIAL TYPE DESCRIPTIONSColumn: MTBEZ-DESCRIPTION OF MATERIAL TYPE
SELECT MTBEZFROM MARA, T134T WHERE MARA.MTART = T134T.MTART AND MARA.MADT = T134T.MADT AND T134T.SPRAS = LanguageParameter
MTRL_HIER_LVL_NO
VARCHAR(18) This is the level number of the material hierarchy.
Table: MARA-GENERAL MATERIAL DATAColumn: PRDHA-PRODUCT HIERARCHY
Derived from a lookup into T179.STUFE based on MARA.PRDHA and where SPRAS = LanguageParameter
NET_WEIGHT_VAL
NUMBER(13,3) This is the net weight of the material expressed in the unit of weight.
Table: MARAColumn: NTGEW-NET WEIGHT
ORDER_UOM_CD
VARCHAR(3) This is the unit of measure in which the material was ordered.
Table: MARA-GENERAL MATERIAL DATAColumn: BSTME-ORDER UNIT
PRICE_BND_CAT_CD
VARCHAR(2) This is the code representing the range of prices to which the material belongs. For example, price band categories may be High, Medium, and Low.
Table: MARA-GENERAL MATERIAL DATAColumn: PLGTP-PRICE BAND CATEGORY
PRICE_BND_CAT_DSC
VARCHAR(20) This is the code representing the range of prices to which the material belongs. For example, price band categories may be High, Medium, and Low.
Table: TWPTT-TEXT: PRICE BAND CATEGORYColumn: VTEXT-DESCRIPTION
SELECT VTEXTFROM MARA, TWPTT WHERE MARA.PLGTP = TWPTT.PLGTP AND MARA.MADT = TWPTT.MADT AND TWPTT.SPRAS = LanguageParameter
VALIDITY_DT INTEGER This is the date from when the material information is valid.
Table: MARAColumn: DATAB-VALID-FROM DATE
VENDOR_ACCOUNT_NO
VARCHAR(10) This is the source system number of a vendor, used in the context of Material Management, it is the Prime Vendor of the Material.
Table: MARA - GENERAL MATERIAL DATAColumn: MFRNR - MANUFACTURER NUMBER
VENDOR_NM VARCHAR(35) This is the name of the Prime vendor of the Material as identified by the Vendor Account Number.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: NAME1-NAME 1
SELECT NAME1 FROM MARA, LFA1MARA.MFRNR = LFA1.LIFNR
VOLUME_UOM_CD
VARCHAR(3) This is the code representing the unit of measure in which material volume is measured.
Table: MARA-GENERAL MATERIAL DATAColumn: VOLEH-VOLUME UNIT
VOLUME_VAL NUMBER(13,3) This is the volume of the material per unit of volume.
Table: MARAColumn: VOLUM-VOLUME
WEIGHT_UOM_CD
VARCHAR(3) This is the code representing the unit of measure in which material weight is measured.
Table: MARA-GENERAL MATERIAL DATAColumn: GEWEI-WEIGHT UNIT
WIDTH_VAL NUMBER(13,3) This is the width of the material or its packaging, measured in the unit of dimension.
Table: MARAColumn: BREIT-WIDTH
Column name Datatype Description Derivation or source mapping
Developer Guide 107
Chapter 3: Data Mart Metadata
Material Movement DetailTarget table name: MATERIAL_MVMNT_DTL
Table type: Fact
Description: This fact is the information required for management queries relating to material movements. Material movements are the most basic type of actions that need to be tracked while managing inventory. Examples of such movements are receipts, issues or transfers of materials across plants. Each time a material movement occurs, the information pertaining to it is stored in a document created in the source system.
The document contains information such as the quantity of materials moved, the date when the movement occurred, the material that moved, the plant it moved from or to, etc. The metric information from the document is stored here.
Notes: The material movement fact is designed for high performance management queries and high performance load of summary fact tables. For this reason, it only contains foreign key columns and measures. Textual attributes that are part of the movement document are kept separate in the Movement Document entity. Related to the Material Movement entity are summary entities such as Stock Overview that also contain metrics that are derived from goods movement transactions.
Column mapping
Column name Datatype Description Derivation or source mapping
BATCH_SID INTEGER This is a foreign key to the BATCH entity that is identified by the relationship name "material movement of a batch" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup to Batch based onBATCH_NO = MSEG.CHARG CHAR(10) PLANT_ID = MSEG.WERKS CHAR(4) MATERIAL_ID = MSEG.MATNR CHAR(18)
BUSINESS_AREA_SID
INTEGER This is a foreign key to the BUSINESS AREA entity that is identified by the relationship name "material movement for Business Area" sourced from the Logical Data Model.
Table: MSEGColumn: GSBER-BUSINESS AREA
Lookup to Business Area based on GSBER field equal to Business Area Code
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. CHANGED_DT = CREATED_DT on insert of row.
108 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
CUSTOMER_SID INTEGER This is a foreign key to the CUSTOMER entity that is identified by the relationship name "material movement for customer order" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup Customer DIM based on MSEG.KUNNR = CUSTOMER.CUSTOMER_NO MSEG.BUKRS = CUSTOMER.COMPANY_CD and unknown value = CUSTOMER.SALES_ORG_CD and unknown value = CUSTOMER.DSTR_CHNL_CD and unknown value = CUSTOMER.DIVISION_CD
DOCUMENT_ISSUED_DT
INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "material movement document create on date in time" sourced from the Logical Data Model.
Table: MKPFColumn: BLDAT
Convert the source date to eApps date format of YYYYMMDD.
If ((ToChar(DOCUMENT_DT_TMP) <= $AS_AT_DATE And O_MAT_MOV_CREATED_DT_char > $AS_AT_DATE), ToChar(AddToDate(ToDate($AS_AT_DATE,'YYYYMMDD'),1), 'YYYYMMDD'), If((ToChar(DOCUMENT_DT_TMP) > $AS_AT_DATE And O_MAT_MOV_CREATED_DT_char <= $AS_AT_DATE),O_MAT_MOV_CREATED_DT_char, ToChar(DOCUMENT_DT_TMP)))
FISCAL_PERIOD_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "material movement has fiscal period" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup to ALL_TIME based onuse MKPF.BUDAT for fiscal datejoin MSEG to T001 on MSEG.BUKRS = T001.BUKRS to get the fiscal variant T001.PERIV
FSCL_PRD_DC_IS_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "material movement issued in" sourced from the Logical Data Model.
Lookup to ALL_TIME based onuse MKPF.BLDAT for fiscal datejoin MSEG to T001 on MSEG.BUKRS = T001.BUKRS to get the fiscal variant T001.PERIV
LOCAL_CURRENCY_CD
VARCHAR(5) This is the code representing the currency in which the company that created the document prefers to work. Currencies are applicable to monetary amounts. For example, if the currency which the concerned company prefers to work in is Canadian dollars, the code representing it may be CAD. This is used on reports that are specific to the company that created the document. Such reports display the monetary amounts stored in the data warehouse (which are in group currency) in the currency of the company concerned.
Table: T001W, T001K, T001Column: WAERS, BWKEY, BUKRS
Select T001.WAERSfrom T001, T001W, T001Kwhere T001W.BWKEY = T001K.BWKEYand T001.BUKRS = T001K.BUKRS
T001W - Plants/Branches,T001K- Valuation area,T001-Company Codes
T001.WAERSCurrency key-Char(5)T001W.BWKEY-Valuation area-Char(4)T001K.BWKEY-Valuation area-Char(4)T001.BUKRS-Company code-Char(4)T001K.BUKRS-Company code-Char(4)
Column name Datatype Description Derivation or source mapping
Developer Guide 109
Chapter 3: Data Mart Metadata
MATERIAL_SID INTEGER This is a foreign key to the MATERIAL entity that is identified by the relationship name "movement details of material" sourced from the Logical Data Model.
Table: MSEGColumn: MATNR
if MSEG.MATNR = ' 'then SELECT EKPO.MATKL WHERE MSEG.EBLEN = EKPO.EBLEN AND MSEG.EBELP = EKPO.EBELP -- EKPO can be filtered on EKPO.MATNR = ' '
MATERIAL ID = 'NO MAT' + MSEG.MATNRelse MATERIAL ID = MSEG.MATNR
MATERIAL_STRG_SID
INTEGER This is a foreign key to the MATERIAL STORAGE entity that is identified by the relationship name "movement for material storage" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup to Material Storage based onMATERIAL_ID = MSEG.MATNR CHAR(18) PLANT_ID = MSEG.WERKS CHAR(4)
MOVEMENT_AMT
NUMBER(13,2) This is the total value assigned to the goods in the Inventory Movement Document Line Item, in Group Currency. This value can be calculated in a number of ways, by considering the total price of the goods, the total cost of it, the total discount applied to it, etc. The method of calculation of this field depends on the source system. This is useful in comparing stocks across various types of products. Each product may be stored in a separate unit of measure (e.g., bottles vs. boxes), thus making comparisons of quantities meaningless. The only meaningful comparisons that may be made is in terms of currency amounts associated with the goods.
Table: MSEGColumn: DMBTR
If MSEG.SHKZG = 'H'then MSEG.DMBTR * -1 (credit)else MSEG.DMBTR * 1 (debit).The formula above assigns a sign to the quantity based on the debit/credit indicator. This way, all receipts are positive and issues are negative.
MOVEMENT_QTY
NUMBER(13,3) This is the actual number of units of the product moved, measured in base units. The unit of measure (e.g., bottles, pieces) in which the units are expressed is defined separately, by relating the Billing Document Line Item to the Unit of Measure dimension.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
If XAUTO = 'X' and LGORT = ' ' and SOBKZ = ' 'THEN set MOVEMENT_QTY = 0ELSE If MSEG.MENGE = 0 THEN If MSEG.SHKZG = 'H' then MSEG.ERFMG * -1 (credit) else MSEG.ERFMG * 1 (debit) ELSE If MSEG.SHKZG = 'H' then MSEG.MENGE * -1 (credit) else MSEG.MENGE * 1 (debit).The formula above assigns a sign to the quantity based on the debit/credit indicator. This way, all receipts are positive and issues are negative.
Column name Datatype Description Derivation or source mapping
110 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
MTRL_MVMNT_DOC_SID
INTEGER This is a foreign key to the MATERIAL MOVEMENT DOCUMENT entity that is identified by the relationship name "material movement has document details" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup to Movement Document based on Document No = MSEG.MBLNR char(10)Document Year No = MSEG.MJAHR char(4)Document Item No = MSEG.ZEILE cha(4)
MVMNT_DOC_CLSS_SID
INTEGER This is a foreign key to the MOVEMENT DOCUMENT CLASS entity that is identified by the relationship name "movement detail of material movement doc class" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup to Movement Document Class based onDocument Type CD = MKPF.BLART char(2)Document Line Type CD = MSEG.BWART char(3)Special Stock CD = MSEG.SOBKZ char(1)Initiating Document Type CD = MSEG.KZBEW char(1)Receipt Type Cd = MSEG.KZZUG char(1)Consumption Posting CD = MSEG.KZVBR-Char(1)
PLANT_SID INTEGER This is a foreign key to the PLANT entity that is identified by the relationship name "material movement in/out of plant" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup to Plant based on PLANT_ID = MSEG.WERKS CHAR(4) STORAGE_LCTN_CD = MSEG.LGORT CHAR(4)
REVERSE_PLANT_SID
INTEGER This is a foreign key to the PLANT entity that is identified by the relationship name "material movement has reverse plant" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup in the Plant dimension based onPLANT_ID = MSEG.UMWRKSTORAGE_LCTN_CD = MSEG.UMLGO.SAP help text for MSEG.UMWRK Receiving plant/issuing plant Definition Indicates the receiving or issuing plant. The receiving plant is the plant or internal organizational unit that is to receive the goods. The issuing plant is the plant that issues the goods. Note The value of the transfer posting is determined not by the plant entered here but by the plant specified in the Plant field.
Column name Datatype Description Derivation or source mapping
Developer Guide 111
Chapter 3: Data Mart Metadata
SHELF_LIFE_EXPR_DT
INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "material has shelf life expiration date" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Use the min. non-null value of MSEG.VFDAT and MCHA.VFDAT.
Get MCHA.VFDAT by joining MSEG to MCHA(do this as an left outer join on MSEG) where MSEG.MATNR = MCHA.MATNR AND MSEG.WERKS = MCHA.WERKS AND MSEG.CHARG = MCHA.CHARG
Use unknown value if there is no expiration date
STOCK_CLASS_SID
INTEGER This is a foreign key to the STOCK CLASS entity that is identified by the relationship name "material movement of stock class" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup to Stock Classif MSEG.INSMK = ' 'then STOCK_TYPE_CD = MSEG.BESTQelse STOCK_TYPE_CD = MSEG.INSMK
SPECIAL_STOCK_CD = MSEG.SOBKZ CHAR(1)
STORAGE_BIN_SID
INTEGER This is a foreign key to the STORAGE BIN entity that is identified by the relationship name "material movement in/out of storage bin" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup Storage Bin based on WAREHOUSE_NO = MSEG.LGNUM CHAR(3) STORAGE_TYPE_CD = LGTYP CHAR(3) STORAGE_BIN_ID = LGPLA CHAR(10)
TIME_SID INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "material movement posting date" sourced from the Logical Data Model.
Table: MKPFColumn: BUDAT
Lookup to ALL_TIME (calendar date) based onMKPF.BUDAT
Column name Datatype Description Derivation or source mapping
112 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "material movement in base unit of measure" sourced from the Logical Data Model.
Table: MSEGColumn: MEINS
IF MSEG.MEINS = ' 'then LOOKUP UOM_SID WHERE UNIT_OF_MEASURE_CD = MSEG.ERFMEelse LOOKUP UOM_SID WHERE UNIT_OF_MEASURE_CD = MSEG.MEINS.SAP help text Base unit of measure Unit of measure in which stocks of the material are managed. The system converts all the quantities you enter in other units of measure (alternative units of measure) to the base unit of measure. Procedure You define the base unit of measure and also alternative units of measure and their conversion factors in the material master record. Dependencies Since all data is updated in the base unit of measure, your entry is particularly important for the conversion of alternative units of measure. A quantity in the alternative unit of measure can only be shown precisely if its value can be shown with the decimal places available. To ensure this, please note the following: o The base unit of measure is the unit satisfying the highest necessary requirement for precision. o The conversion of alternative units of measure to the base unit should result in simple decimal fractions (not, for example, 1/3 = 0.333...). Inventory Management In Inventory Management, the base unit of measure is the same as the stockkeeping unit. Services Services have units of measure of their own, including the following: o Service unit Unit of measure at the higher item level. The precise quantities of the individual services are each at the detailed service line level. o Blanket Unit of measure at service line level for services to be provided once only, and for which no precise quantities can or are to be specified.
Column name Datatype Description Derivation or source mapping
Developer Guide 113
Chapter 3: Data Mart Metadata
Material Movement DocumentTarget table name: MATERIAL_MVMNT_DOC
Table type: Dimension
Description: This table is the textual information that is part of a Material Movement Document, such as header text, item text, user name, etc. A Material Movement Document is created every time a material movement (such as a receipt, issue or transfer) occurs. The Material Movement Document contains information critical to business analysis such as the document number, related order number, the quantity of items moved, the amounts associated with the quantity, etc. This type of critical information is stored in the Material Movement table. The remaining (largely textual) information that is not relevant to the majority of business analysis, but may be required in specific reports, such as those that re-create source system document detail, is stored in the Material Movement Document dimension.
Column mapping
VALUATION_SID INTEGER This is a foreign key to the VALUATION entity that is identified by the relationship name "material has price valuation" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup Valuation based onMATERIAL_ID = MSEG.MATNR CHAR(18)VALUATION_AREA_CD = T001W.BWKEY join T001W to MSEG where T001W.WERKS = MSEG.WERKSVALUATION_TYPE_CD = MSEG.BWTAR CHAR(10)
VENDOR_SID INTEGER This is a foreign key to the VENDOR entity that is identified by the relationship name "material movement for vendor" sourced from the Logical Data Model.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
Lookup Vendor based onVENDOR_ACCOUNT_NO = MSEG.LIFNR CHAR(10)COMPANY_CD = MSEG.BUKRS VARCHAR(4)PURCHASE_ORG_CD = unknown value (there is no purchasing group context for the vendor lookup)
Column name Datatype Description Derivation or source mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
The date when the target record was last updated in the source system. Populated by the ETL program.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
The date when the target record was first extracted from the source system. Populated by the ETL program.
DOCUMENT_ITEM_NO
VARCHAR(4) This is the source system generated number that identifies a line in a document, It is part of the natural key.
Table: MSEGColumn: ZEILE
NK 3
114 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
DOCUMENT_NO VARCHAR(10) This is the source system generated identifier of a document which is part of the natural key.
Table: MSEGColumn: MBLNR
NK 1
DOCUMENT_YEAR_VAL
VARCHAR(4) This is the calendar year in which the material document was posted. In some source systems, the material document year, in conjunction with the document number, uniquely identifies a document. In SAP it is part of the natural key.
Table: MSEGColumn: MJAHR
NK 2
ITEM_TXT VARCHAR(50) This is the textual information associated with the line item of the document.
Table: MSEGColumn: SGTXT
MTRL_MVMNT_DOC_SID
INTEGER This is a data warehouse system generated unique identifier for the movement document.
System generated unique id.
MTRL_MV_DOC_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:DOCUMENT_NODOCUMENT_YEAR_VALDOCUMENT_ITEM_NO
ORDER_DOC_ITM_NO
VARCHAR(6) This is the source system generated unique identifier of the Sales Order or Purchase Order Document Line Item that this Material Movement Document Line Item is related to.
If MSEG.KDPOS NE ' ' -- (sales order item number) use MSEG.KDPOS to populate warehouse column
If MSEG.EBELP NE ' ' -- (purchase order item number) use MSEG.EBELP to populate warehouse column
If MSEG.KDPOS EQ ' ' AND MSEG.EBELP EQ ' ' use unknown character value to populate warehouse column
ORDER_DOC_NO
VARCHAR(10) This is the source system generated unique identifier of the Sales Order or Purchase Order Document that this Material Movement Document is related to.
Table: SEE SOURCE SYSTEM MAPPING LOGICColumn: SEE SOURCE SYSTEM MAPPING LOGIC
If MSEG.KDAUF NE ' ' -- (sales order number) use MSEG.KDAUF to populate warehouse column
If MSEG.EBELN NE ' ' -- (purchase order number) use MSEG.EBELN to populate warehouse column
If MSEG.EBELN EQ ' ' AND MSEG.KDAUF EQ ' ' use unknown character value to populate warehouse column
ORDER_DOC_TYP_CD
VARCHAR(2) This code represents the type of source document (sales, purchasing, etc.) that initiated a movement. For example, PO = purchase order, and SO = sales order.
If MSEG.KDPOS NE ' ' -- (sales order item number) use "SO" to populate warehouse column
If MSEG.EBELP NE ' ' -- (purchase order item number) use "PO" to populate warehouse column
If MSEG.KDPOS EQ ' ' AND MSEG.EBELP EQ ' ' use unknown character value to populate warehouse column
USER_NM VARCHAR(12) This is the identification of the source system user who created the document.
Table: MKPFColumn: USNAM
Column name Datatype Description Derivation or source mapping
Developer Guide 115
Chapter 3: Data Mart Metadata
Material Movement Document ClassTarget table name: MOVEMENT_DOC_CLSS
Table type: Dimension
Description: This contains combinations of attributes that are classifiers of material documents. Such attributes classify material movement transactions as to the nature of the goods movement. At the highest level of classification, a goods movement is either an "issue" or a "receipt". At a lower level, the movement class describes the exact nature of the movement (e.g. goods issue to production) and the reason for movement. Such classifications are used in the calculation of stock level and stock usage.
For example, "goods issue for transfer to another plant" is not considered as usage whereas "goods issue to production" is. Typically, a source system has many such classifiers, such as Document Category, Document Type, Document Line Type, Document Status, etc. This dimension combines every one of them into a single entity. This is done primarily for technical reasons, such as improving the performance of queries and minimizing the storage space required (a single link between the Class and the Fact is sufficient to answer queries that look at metrics across document classifiers).
However, in certain cases, it makes business sense to do so as well. For example, combinations of classifiers may be meaningful to a business. If so, some Class Status attributes may be added that represent such meaningful combinations. This also contains a number of multipliers. Multipliers are used for calculating derived metrics from existing ones, and have values of 1 or 0. The derived metric is calculated by multiplying the multiplier with the existing metric. Multipliers are defined by the ETL program based on certain source system classifiers.
Technical Notes: There are two options for creating the combinations of attributes. If the attributes have only a few members, a complete set of combinations (called a complete cartesian product) may be created at the time of initial load of the data warehouse, even though some of the combinations may not make business sense. This option saves time of load. However, if creating a complete cartesian product produces a very large set of combinations most of which is meaningless, it may be better to use only the combinations that already exist in documents. This is less efficient with regard to load time, but saves storage space.
Column mapping
Column name Datatype Description Derivation or source mapping
BLOCKED_MULT SMALLINT This is the multiplier that indicates whether the material movement is of "blocked" stock or not. "Blocked" stock is a type of stock that indicates that the material is restricted from usage for an unspecified reason. Multipliers are used for calculating derived metrics from existing ones, and have values of 1 or 0. The derived metric is calculated by multiplying the multiplier with the existing metric. Multipliers are defined by the ETL program based on certain source system classifiers.
Table: T156Column: KZWES-GR BLOCKED STOCK
same logic for both passes 1 and 2:
IF T156.KZWES = 'X' then set to 1ELSE set to 0ENDIF
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL Generated. Changed_Dt set to Created_Dt on insert.
116 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
CNSMPTN_PSTNG_CD
CHAR(1) This is an code that specifies whether consumption is to be posted to a consumption account, an asset account, a sales order, or a project account. In the case of goods receipt for purchase orders the account assignment is obtained from the account assignment category on the purchase order.
Table: T156TColumn: KZVBR-CONSUMPTION POSTING
Pass 1: set to T156T.KZVBR
Pass 2: Set to default value
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL Generated
CUSTOMER_CONS_MULT
SMALLINT This multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if the movement is an "issue to" or "receipt from" a customer site but belongs to (is owned by) the source plant. Customer consignment is material located at a customer location.
Same logic for both passes 1 and 2. Set to default value. User may update this field through Console.
DISPOSAL_MULT SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if the movement is a disposal.
Same logic for both passes 1 and 2. Set to default value. User may update this field through Console.
DOCUMENT_LN_TYP_CD
VARCHAR(3) This code represents material movement document line types. In this context, document line types represent types of material movement. Examples include "purchase order to warehouse", "goods issue", " reversal of goods receipt", etc.
Table: T156TColumn: BWART-MOVEMENT TYPE (INVENTORY MANAGEMENT)
same value for both pass 1 and 2.
DOCUMENT_TYPE_CD
VARCHAR(2) This is the code representing the type of document. Examples are "customer invoice", "customer payment", "vendor invoice", "vendor payment", "inventory document", "goods issue/receipt", etc.
Table: T003Column: BLART-DOCUMENT TYPE
Pass 1: set to T003.BLART
Pass 2: Set to default value
DOCUMENT_TYPE_DSC
VARCHAR(20) This is the textual description of the type of document. Examples are "goods issue", "goods receipt", etc.
Table: T003TColumn: LTEXT
Pass 1:Lookup to T003T. Lookup using Document_typ_cd and filter by SPRAS equal to language parameter.
Pass 2:Set to default value.
DOC_LN_TYP_DSC
VARCHAR(20) This is a textual description of the material movement document line type. In this context, document line types represent types of material movement. Examples include "purchase order to warehouse", "goods issue", " reversal of goods receipt", etc.
Table: T156TColumn: BTEXT-MOVEMENT TYPE TEXT (INVENTORY MANAGEMENT)
Pass 1:Set to T156T.BTEXT.
Pass 2:Perform a lookup to T156T asSelect Last Row(BTEXT) from T156Twhere SPRAS = Default Language Parameterand BWART = Document Line Type Codeand SOBKZ = ' '
Column name Datatype Description Derivation or source mapping
Developer Guide 117
Chapter 3: Data Mart Metadata
GOODS_ISSUE_MULT
SMALLINT This multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if this is a goods issue from inventory accounting.
For Pass 1:If Document_Type_Cd in GoodsIssueParameter then set to 1Else set to 0Endif
For Pass 2:Set to default value.
* User may update this field through Console.
GOODS_RECEIPT_MULT
SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if this is a receipt into inventory accounting.
Pass 1:If Document_Type_Cd in GoodsReceiptParameter then set to 1Else set to 0Endif
Pass 2:Set to default value.
* User may update this field through Console.
INDPNDNT_RQR_MULT
SMALLINT This is an Indicator specifying whether a requirements reduction is necessary or not for a given material document item in the case of a goods movement.
Table: T156Column: XPBED-REQUIREMENTS REDUCTION BY GOODS MOVEMENTS
Same logic for both passes 1 and 2.
IF XPBED = 'X' then set to 1ELSE set to 0ENDIF
INSPECTION_MULT
SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if the movement type is a movement into inspection.
Table: T156Column: QSSBW-INSPECTION BY QUALITY ASSURANCE
Same logic for both passes 1 and 2:If QSSBW = 'X' then set to 1Else set to 0Endif
INTTNG_DOC_TYP_CD
CHAR(1) This is an code specifying the type of document for which the movement relates, i.e.purchase order, delivery note etc., that constitutes the basis for the movement. This is necessary, for example, to enable a distinction to be made between a goods receipt for a purchase order and a goods receipt for a production order. These two movements result in different data and accounts updates in the system.
Table: T156TColumn: KZBEW-MOVEMENT INDICATOR
Pass 1: set to T156T.KZBEW
Pass 2: Set to default value
INTTNG_DOC_TYP_DSC
VARCHAR(60) Textual description that identifies the type of document for which the movement relates.
Pass 1select DD07T.DDTEXT whereDD07T.DOMNAM = 'KZBEW'And DD07T.DDLANGUAGE = LanguageParameterAnd DD07T.DOMVALUE_L =T156T.KZBEW
Pass 2set to default short char
MVMNT_DOC_CLSS_SID
INTEGER This is a data warehouse system generated unique identifier for the movement class.
System generated unique id.
Column name Datatype Description Derivation or source mapping
118 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
MV_DOC_CLSS_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:DOCUMENT_TYPE_CDDOCUMENT_LN_TYP_CDSPECIAL_STOCK_CDINTTNG_DOC_TYP_CDRECEIPT_TYP_CDCNSMPTN_PSTNG_CD
RECEIPT_TYP_CD
CHAR(1) This is the code representing the type of purchase order if this requires different accounting treatment (for example, stock transport order or a sub-contract order).
Table: T156TColumn: KZZUG-RECEIPT INDICATOR
Pass 1: set to T156T.KZZUG
Pass 2: Set to default value
RECEIPT_TYP_DSC
VARCHAR(60) Description of the type of purchase order. Pass 1select DD07T.DDTEXT whereDD07T.DOMNAM = 'KZZUG'And DD07T.DDLANGUAGE = LanguageParameterAnd DD07T.DOMVALUE_L =T156T.KZZUG
Pass 2set to default short char
REVERSAL_MULT
SMALLINT This multiplier is used to identify transactions that are "reversals" of an original transaction.
Table: T156Column: XSTBW-REVERSAL MOVEMENT TYPE
Same logic for both passes 1 and 2:If XSTBW = 'X' then set to 1Else set to 0Endif
SHRINKAGE_MULT
SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if the if the movement is an adjustment to inventory as a result of a physical stock. The default is 0.
Same logic for both passes 1 and 2. Set to default value. User may update this field through Console.
SIGN_REVERSAL_MULT
SMALLINT This multiplier is used to assign a sign to a monetary amount. If the ERP only uses positive numbers the this multiplier is used where credits are assigned negative signs and debits are assigned positive signs.
Table: T156Column: SHKZG-DEBIT/CREDIT INDICATOR
Same logic for both passes 1 and 2:If SHKZG = 'H' then set to -1Else (SHKZG = 'S') set to 1Endif Value of H = CreditValue of S = Debit
SPECIAL_STOCK_CD
CHAR(1) This is an indicator of whether the stock, i.e. consignment stock, of a material needs to be managed separately.
Table: T156TColumn: SOBKZ-SPECIAL STOCK INDICATOR
Pass 1: set to T156T.SOBKZ
Pass 2: Set to default value
SPECIAL_STOCK_DSC
VARCHAR(20) Textual description that identifies if certain stock (for example, consignment stock, project stock, etc.) needs to be managed separately.
Pass 1select T148T.SOTXT whereT156T.SOBKZ = T148T.SOBKZAND T148T.SPRAS = LanguageParameter
Pass 2set to default short char
Column name Datatype Description Derivation or source mapping
Developer Guide 119
Chapter 3: Data Mart Metadata
Material Reservation DetailTarget table name: MTRL_RSRVTN_DTL
Table type: Fact
STK_OVRVW_INC_MULT
SMALLINT This is a data warehouse required attribute that controls whether the movement type is to be included in the computation of Stock Overview.
Same logic for passes 1 and 2.
If (DOCUMENT_TYPE_CD in {Goods Receipt Document Type Parameter} AND CNSMPTN_PSTNG_CD = 'V') or T156.KZWES = 'S' then STOCK_OVERVIEW_INCL_MULT = 0Else STOCK_OVERVIEW_INCL_MULT = 1Endif
TRANSFER_IN_MULT
SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if this is a transfer in to a particular plant. The default for this is 0.
Same logic for both passes 1 and 2. Set to default value. User may update this field through Console.
TRANSFER_OUT_MULT
SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if this is a transfer out to a particular plant. The default for this is 0.
Same logic for both passes 1 and 2. Set to default value. User may update this field through Console.
UNPLANNED_USE_MULT
SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if the movement is one that is not planned. That is, it is not part of the Manufacturing Resource Planning (MRP).
Table: T156Column: KZVBU-CONSUMPTION POSTING
Same logic for both passes 1 and 2:If BKZBU in UnplannedUseParameter and Goods_Issue_Mult = 1 then set to 1Else set to 0Endif
*User may update this field through Console.
USAGE_MULT SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 for all usage of raw materials issued to production, finished goods to sales, spare parts for maintenance etc. It is set to 0 for Receipts and issues to vendor or scrap. That is, it is part of the Manufacturing Resource Planning (MRP).
Table: T156Column: KZVBU-CONSUMPTION POSTING
Same logic for both passes 1 and 2:If KZVBU in UsageMultiplier and Goods_Issue_Mult = 1 then set to 1Else set to 0Endif
*User may update this field through Console.
USER_DEFINED1_MULT to USER_DEFINED5_MULT
SMALLINT This is a user defined attribute available for the addition of any new multiplier specific to a particular client.
Same logic for both passes 1 and 2. This is user defined. This should be set to a default value = 0;
VENDOR_CONS_MULT
SMALLINT This multiplier is applied to the computation of KPIs. This multiplier is set to 1 if the movement is into or out of a Vendor consignment. A vendor consignment is material that is located at a plant but is still owned by the vendor.
Same logic for both passes 1 and 2. Set to default value. User may update this field through Console.
Column name Datatype Description Derivation or source mapping
120 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Description: This fact is the metric information related to reservations of materials at a specific Plant or Storage Location. Each time a material reservation occurs, the information pertaining to it is stored in a document created in the source system. The document contains information such as the quantity of materials reserved, the date when the reservation occurred, the material reserved, the plant at which the reservation was made, etc. The metric information from the document is stored here.
Additional notes: The material reservations fact is designed for high performance management queries and high performance load of summary fact tables. For this reason, it only contains foreign key columns and measures. Textual attributes that are part of the material reservations document are kept separate in the Material Reservation Document entity. There is a one to one relationship between the Material Reservation Document and the Material Reservation Fact.
SAP note: The sign for quantities in material reservations is opposite to all other material documents. For example, a reservation of 10 will result in a goods issue, credit, of 10 out of a plant.
Column mapping
Column name Datatype Description Derivation or source mapping
BATCH_SID INTEGER This is a foreign key to the BATCH entity that is identified by the relationship name "batch" sourced from the Logical Data Model.
Lookup to Batch Dimension where:Batch Number = CHARG andPlant Id = WERKS andMaterial Id = MATNR
CHARG-Batch number-Char(10)WERKS-Plant-Char(4)MATNR-Material number-Char(18)
BUSINESS_AREA_SID
INTEGER This is a foreign key to the BUSINESS AREA entity that is identified by the relationship name "for business area" sourced from the Logical Data Model.
Lookup to Business Area where:Business Area Code = GSBER
GSBER-Business Area-Char(4)
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. CHANGED_DT = CREATED_DT on insert of row.
CONFIRMED_QTY
NUMBER(15,3) This is the quantity of material that is confirmed to be delivered.
Table: RESBColumn: VMENG
If RESB.SHKZG = 'H' Confirmed Quantity = VMENG *1Else Confirmed Quantity = VMENG* -1
****THIS IS OPPOSITE TO ALL OTHER MATERIAL FACTS!
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
DELIVERY_DDLN_DT
INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "delivery deadline date is" sourced from the Logical Data Model.
Table: RESBColumn: SBTER
FISCAL_PERIOD_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "fiscal period" sourced from the Logical Data Model.
Use the required date for the fiscal period lookup. If it is null use the delivery deadline date.
Developer Guide 121
Chapter 3: Data Mart Metadata
LOCAL_CURRENCY_CD
VARCHAR(5) This is the code representing the currency in which the company that created the document prefers to work. Currencies are applicable to monetary amounts. For example, if the currency which the concerned company prefers to work in is Canadian dollars, the code representing it may be CAD. This is used on reports that are specific to the company that created the document. Such reports display the monetary amounts stored in the data warehouse (which are in group currency) in the currency of the company concerned.
Table: T001W, T001K, T001Column: WAERS, BWKEY, BUKRS
Select T001.WAERSSelect T001.WAERSSelect T001.WAERSfrom RESB, T001, T001W, T001Kfrom RESB, T001, T001W, T001Kwhere RESB.WERKS - T001W.WERKSfrom RESB, T001, T001W, T001Kand T001W.BWKEY = T001K.BWKEYwhere RESB.WERKS - T001W.WERKSand T001.BUKRS = T001K.BUKRSwhere RESB.WERKS - T001W.WERKS
and T001W.BWKEY = T001K.BWKEYT001W - Plants/Branches,and T001W.BWKEY = T001K.BWKEYT001K- Valuation area,and T001.BUKRS = T001K.BUKRST001-Company Codesand T001.BUKRS = T001K.BUKRS
T001.WAERSCurrency key-Char(5)T001W.BWKEY-Valuation area-Char(4)T001W - Plants/Branches,T001K.BWKEY-Valuation area-Char(4)T001W - Plants/Branches,T001.BUKRS-Company code-Char(4)T001K- Valuation area,T001K.BUKRS-Company code-Char(4)T001K- Valuation area,T001-Company CodesT001-Company Codes
T001.WAERSCurrency key-Char(5)T001.WAERSCurrency key-Char(5)T001W.BWKEY-Valuation area-Char(4)T001W.BWKEY-Valuation area-Char(4)T001K.BWKEY-Valuation area-Char(4)T001K.BWKEY-Valuation area-Char(4)T001.BUKRS-Company code-Char(4)T001.BUKRS-Company code-Char(4)T001K.BUKRS-Company code-Char(4)T001K.BUKRS-Company code-Char(4)
MATERIAL_SID INTEGER This is a foreign key to the MATERIAL entity that is identified by the relationship name "material" sourced from the Logical Data Model.
Table: RESB-RESERVATION/DEPENDENT REQUIREMENTSColumn: SEE SOURCE MAPPING LOGIC
Lookup to Material Dimension where:Material Id = MATNR
MATNR-Material number-Char(18)
MATERIAL_STRG_SID
INTEGER This is a foreign key to the MATERIAL STORAGE entity that is identified by the relationship name "material storage" sourced from the Logical Data Model.
Lookup to Material Storage Dimension where:Plant Id = WERKS andMaterial Id = MATNR
WERKS-Plant-Char(4)MATNR-Material number-Char(18)
MTRL_RSRV_DOC_SID
INTEGER This is a foreign key to the MATERIAL RESERVATION DOCUMENT entity that is identified by the relationship name "material reservation document" sourced from the Logical Data Model.
Lookup to Material Reservation Document where:Material Reservation Number = RSNUM andMaterial Reservation Item Number = RSPOS
RSNUM-Number of reservation/dependent requirements-NUMC(10)RSPOS-Item number of reservation/dependent requirements-NUMC(4)
Column name Datatype Description Derivation or source mapping
122 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
MVMNT_DOC_CLSS_SID
INTEGER This is a foreign key to the MOVEMENT DOCUMENT CLASS entity that is identified by the relationship name "movement class" sourced from the Logical Data Model.
Table: RESB-RESERVATION/DEPENDENT REQUIREMENTSColumn: SEE SOURCE MAPPING LOGIC
Lookup to Movement Document Class based onDocument Type CD =default valueDocument Line Type CD = RESB.BWARTSpecial Stock CD = RESB.SOBKZInitiating Document Type CD =default valueReceipt Type Cd = default valueConsumption Posting CD = default value
BWART Movement type (inventory management) char(3)SOBKZ Special Stock Indicator Char(1).
PLANT_SID INTEGER This is a foreign key to the PLANT entity that is identified by the relationship name "plant" sourced from the Logical Data Model.
Lookup to Plant where:Plant Id = WERKSStorage Location = LGORT
WERKS-Plant-Char(4)LGORT-Storage location-Char(4)
Note: If LGORT is NULL then substitute with default value.
REQUESTED_QTY
NUMBER(13,3) This is the quantity of material requested to be reserved.
Table: RESBColumn: BDMNG
If RESB.SHKZG = 'H' Requested Quantity = BDMNG *1Else Requested Quantity =BDMNG* -1
****THIS IS OPPOSITE TO ALL OTHER MATERIAL FACTS!
REQUIRED_DT INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "posted date" sourced from the Logical Data Model.
Table: RESBColumn: BDTER
REVERSE_PLANT_SID
INTEGER This is a foreign key to the PLANT entity that is identified by the relationship name "reverse plant" sourced from the Logical Data Model.
Table: RESB-RESERVATION/DEPENDENT REQUIREMENTSColumn: SEE SOURCE MAPPING LOGIC
Lookup to Plant where:Plant Id = UMWRKStorage Location = UMLGO
WERKS-Receiving plant/issuing plant-Char(4)UMLGO-Receiving/issuing storage location-Char(4)
Note: If UMLGO is NULL then substitute with default value.
STORAGE_BIN_SID
INTEGER This is a foreign key to the STORAGE BIN entity that is identified by the relationship name "storage bin" sourced from the Logical Data Model.
Lookup to Storage Bin whereWarehouse Number = LGNUMStorage Type Code =LGTYPStorage Bin Id = LGPLA
LGPLA-Storage Bin-Char(10)LGNUM-Warehouse Number / Warehouse Complex-Char(3)LGTYP-Storage type-Char(3)
Column name Datatype Description Derivation or source mapping
Developer Guide 123
Chapter 3: Data Mart Metadata
Material Reservation DocumentTarget table name: MTRL_RSRVTN_DOC
Table type: Dimension
Description: This table is the non metric information related to material reservations at a specific Plant or Storage Location. Each time a material reservation occurs, the information pertaining to it is stored in a document created in the source system. The document contains information such as the quantity of materials reserved, the date when the reservation occurred, the material reserved, the plant at which the reservation was made, etc. The metric information from the document is stored here.
Notes: The material reservation fact is designed for high performance management queries and high performance load of summary fact tables. For this reason, it only contains foreign key columns and measures. Textual attributes that are part of the material reservations document are kept separate in the Material Reservation Document entity. There is a one to one relationship between the Material Reservation Document and the Material Reservation Fact.
UNIT_COST_AMT
NUMBER(15,7) This is the unit cost of the item being reserved/withdrawn/requested in local currency.
Table: RESBColumn: GPREIS
If RESB.ENWRT > 0then UNIT_COST_AMT = RESB.ENWRT / RESB.ENMNGelse if RESB.GPREIS > 0 AND RESB.PEINH > 0 UNIT_COST_AMT = RESB.GPREIS / RESB.PEINH else set to 0
UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "base uom" sourced from the Logical Data Model.
Lookup to Unit of Measure dimension where:Unit Of Measure Code = MEINSMEINS-Base unit of measure-Unit(3)
WITHDRAWN_QTY
NUMBER(13,3) This is the cumulative quantity of the material that has already been withdrawn.
Table: RESBColumn: ENMNG
If RESB.SHKZG = 'H' Withdrawn Quantity = ENMNG *1Else Withdrawn Quantity = ENMNG* -1
****THIS IS OPPOSITE TO ALL OTHER MATERIAL FACTS!
Column name Datatype Description Derivation or source mapping
124 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Column mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Table: N/A-DERIVEDColumn: N/A-DERIVED
ETL generated. CHANGED_DT = CREATED_DT on insert of row.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Table: N/A-DERIVEDColumn: N/A-DERIVED
ETL Derived.
DELETION_IND CHAR(1) This is an indicator that marks all data on a material reservation line item as deleted. This is an SAP specific field.
Table: RESB-RESERVATION/DEPENDENT REQUIREMENTSColumn: XLOEK-ITEM IS DELETED
If RESB.XLOEK = 'X' then set to 'Y'Else set to 'N'Endif
DOCUMENT_ITEM_NO
VARCHAR(4) This is the source system generated number that, in combination with the Document Number, is the unique identifier of the Document Line Item.
Table: RESB-RESERVATION/DEPENDENT REQUIREMENTSColumn: RSPOS-MATERIAL RESERVATION ITEM NUMBER
DOCUMENT_NO VARCHAR(10) This is the source system generated unique identifier of the Document.
Table: RKPF-DOCUMENT HEADER: RESERVATIONColumn: RSNUM-NUMBER OF RESERVATION/DEPENDENT REQUIREMENTS
FINAL_ISSUE_IND
CHAR(1) This indicates that the final issue of material for this reservation was completed.
Table: RESB-RESERVATION/DEPENDENT REQUIREMENTSColumn: KZEAR-FINAL ISSUE FOR THIS RESERVATION
If RESB.KZEAR = 'X' then set to 'Y'Else set to 'N'Endif
MTRL_RSRV_DOC_SID
INTEGER This is a foreign key to the MATERIAL RESERVATION DETAIL entity that is identified by the relationship name "material reservation" sourced from the Logical Data Model.
Table: N/A-DERIVEDColumn: N/A-DERIVED
System generated unique id.
MTRL_RSRV_D_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:DOCUMENT_NODOCUMENT_ITEM_NORECORD_TYPE_CD
RECORD_TYPE_CD
CHAR(1) This is a natural key component for SAP. Table: RESB-RESERVATION/DEPENDENT REQUIREMENTSColumn: RSART-RECORD TYPE
USER_NM VARCHAR(12) This is the identification of the source system user who created the document.
Table: RKPFColumn: USNAM-USER NAME
Developer Guide 125
Chapter 3: Data Mart Metadata
Material StorageTarget table name: MATERIAL_STORAGE
Table type: Dimension
Description: This table contains information that is applicable to both Materials and Plants. For example, it contains the plant-specific attributes of a material, such as the maximum and minimum size a batch is allowed to have in a plant, or the maximum stock level that is allowed. It also has material planning information (such as procurement planning or inventory planning) specific to a plant, such as the MRP group in charge of planning for the material, the purchasing group responsible for procuring the material, etc.
Column mapping
Column name Datatype Description Derivation or source mapping
ABC_CD CHAR(1) This is the code representing the classification of a material as of type A (important - high consumption), B (less important - medium consumption), or C (relatively unimportant, low consumption). Vendors responsible for 'A' type products are those that account for the company's biggest expenditure. This type of classification is known as Activity Based Cost analysis.
Table: MARCColumn: MAABC
SAP short text: ABC indicator. MARC.MAABC.SAP system valuesA = Very important material according to the ABC analysisB = Fairly important material according to the ABC analysisC = Less important material according to the ABC analysis
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. CHANGED_DT = CREATED_DT on insert of row.
FIXED_LOT_SIZE_QTY
NUMBER(13,3) This is the quantity that will be ordered or produced in the event of a shortage. If the shortage is less than the fixed lot size, the fixed lot size is ordered. If the shortage is greater than the fixed lot size, a multiple of fixed lot are ordered.
Table: MARCColumn: BSTFE
SAP short text: Fixed lot size
MARC.BSTFE
MAINT_STTS_CD VARCHAR(15) This is the code representing which departments may maintain a material master record of a particular material type. The overall maintenance status is made up of the individual maintenance statuses. The individual maintenance statuses may have the following values: Work Scheduling, Accounting, MRP, Purchasing, Costing, Storage, Forecasting, QC, Sales, etc.
Table: MARCColumn: PSTAT
SAP short text: Maintenance status
MATERIAL_ID VARCHAR(18) This is the source system unique identifier of the material.
Table: MARCColumn: MATNR
NK1SAP short text: Material number
MATERIAL_STRG_SID
INTEGER This is a data warehouse system generated unique identifier for the material storage.
System generated unique identifier.
126 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
MAXIMUM_LOT_SZ_QTY
NUMBER(13,3) This is the quantity that the number of items in a lot or batch must not exceed during procurement.
Table: MARCColumn: BSTMA
SAP short text: Maximum lot size. MARC.BSTMA
MAXIMUM_STOCK_QTY
NUMBER(13,3) This is the quantity of stock that may not be exceeded in a plant. This is also known as the Maximum Stock Level.
Table: MARCColumn: MABST
SAP short text: Maximum stock level. MARC.MABST
MINIMUM_LOT_SZ_QTY
NUMBER(13,3) This is the quantity that the number of items in a lot or batch must not fall below of during procurement.
Table: MARCColumn: BSTMI
SAP short text: Minimum lot size. MARC.BSTMI
MRP_CNTLR_CD VARCHAR(3) This is the code representing the Manufacturing Resource Planning (MRP) Controller or group of Controllers responsible for planning material requirements.
Table: MARCColumn: DISPO
SAP short text: MRP controller
MARC.DISPO
MRP_CNTLR_NM VARCHAR(18) This is the textual description of the Manufacturing Resource Planning (MRP) Controller or group of Controllers responsible for planning material requirements.
Table: T024DColumn: DSNAM
SAP short text: Name of MRP controller.join MARC to T024Dwhere MARC.WERKS = T024D.WERKS and MRP_CNTLR_CD = T024D.DISPO
MRP_PRFL_CD VARCHAR(4) This is the code representing the Manufacturing Resource Planning (MRP) parameters that are independent of the material master record. In an MRP profile, you define: which fields are filled with values when MRP data is entered in the material master record, which values these fields have, and which of these values can be overwritten and which cannot. The information stored in a profile is standard information that is needed again and again in similar constellations when material master records are maintained. Thus an MRP Profile is a useful aid and makes it easier to manage MRP data.
Table: MARCColumn: DISPR
SAP short text: Material: MRP profile
MRP_TYP_CD VARCHAR(2) This is the code representing the Manufacturing Resource Planning (MRP) method to be applied to the material. Examples are 'manual reorder point planning', 'automatic reorder point planning', 'forecast-based planning', 'master production scheduling', etc.
Table: MARCColumn: DISMM
SAP short text: MRP type
MARC.DISMM
MRP_TYP_DSC VARCHAR(30) This is the textual description of the Manufacturing Resource Planning (MRP) method to be applied to the material. Examples are 'manual reorder point planning', 'automatic reorder point planning', 'forecast-based planning', 'master production scheduling', etc.
Table: T438TColumn: DIBEZ
SAP short text: Material requirements planning description.Lookup T438T.DIBEZwhere T438T.DISMM = MRP_MTHD_CD and T438T.SPRAS = LanguageParameter.If no value is returned because an entry has not been created for the LanguageParameter put in the default parameter for unknown value.
Column name Datatype Description Derivation or source mapping
Developer Guide 127
Chapter 3: Data Mart Metadata
MTRL_STRG_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:MATERIAL_IDPLANT_ID
PLANT_ID VARCHAR(4) This is the source system unique identifier of the plant. A plant is an organizational unit within logistics that subdivides the Enterprise from the viewpoint of production, inventory management, manufacturing resource planning (MRP) and plant maintenance.
Table: MARCColumn: WERKS
NK2SAP short text: Plant
PRCHSNG_GRP_CD
VARCHAR(3) This is the code representing the buyer or group of buyers responsible for certain purchasing-related activities. Internal purchasing groups are responsible for the procurement of a material or a group of materials. External purchasing groups are a medium through which contacts with vendors are maintained.
Table: MARCColumn: EKGRP
SAP short text: Purchasing group. MARC.EKGRP
PRCHSNG_GRP_DSC
VARCHAR(18) This is the textual description for the buyer or group of buyers responsible for certain purchasing-related activities. Internal purchasing groups are responsible for the procurement of a material or a group of materials. External purchasing groups are a medium through which contacts with vendors are maintained.
Table: T024Column: EKNAM
SAP short text: Description of purchasing group
PRCRMT_TYP_CD
CHAR(1) This is the code representing the type of procurement of the material. Examples are: "produced in-house" or "procured externally" or "both produced in-house and procured externally".
Table: MARCColumn: BESKZ
SAP short text: Procurement Type.SAP system values:E = In-house productionF = External procurement" " = No procurementX = Both procurement types
PRCRMT_TYP_DSC
VARCHAR(60) This is the textual description of the type of procurement of the material. Examples are: "produced in-house" or "procured externally" or "both produced in-house and procured externally".
Table: DD07TColumn: DDTEXT
SAP short text: Short text for fixed values.Lookup DD07T.DDTEXT where DD07T.DDLANGUAGE = LanguageParameter and DD07T.DOMNAME = 'BESKZ' and DD07T.DOMVALUE_L = PRCRMT_TYP_CD.If no value is returned because an entry has not been created for the LanguageParameter put in the default parameter for unknown value.
REORDER_POINT_QTY
NUMBER(13,3) This is the least quantity of stock allowed for the material in the plant before it is flagged for re-order. If the quantity of the material falls below this level, it will be identified as one for which procurement must be planned.
Table: MARCColumn: MINBE
SAP short text: Reorder point. MARC.MINBE
RPLNSHMT_LD_TM_NO
NUMBER(3,0) This is the time required to re-stock the material in the plant either through in-house production or procurement.
Table: MARCColumn: WZEIT
SAP short text: Total replenishment lead time (in workdays) MARC.WZEIT
Column name Datatype Description Derivation or source mapping
128 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Physical Inventory DetailTarget table name: PHYSICAL_INV_DTL
Table type: Fact
SAFETY_STOCK_QTY
NUMBER(13,3) This is the stock quantity kept in reserve to satisfy unexpectedly high demand in the coverage period. The risk of shortfalls is reduced by having a safety stock quantity (aka safety stock level) in a plant.
Table: MARCColumn: EISBE
SAP short text: Safety stock. MARC.EISBE
SPCL_PRCRMT_TYP_CD
VARCHAR(2) This is the code representing the special procurement type. The special procurement type allows the procurement type to be further defined. The procurement type is predetermined by the material type. For example, the special procurement type "consignment order" is possible for "externally procured materials". (This definition is unclear and needs to be improved)
Table: MARCColumn: SOBSL
SAP short text: Special procurement type.The value in SAP is constrained by the plant.
SPCL_PRCRMT_TY_DSC
VARCHAR(40) The textual description that allows more information on the procurement type to be defined. The procurement type is predetermined by the material type. For example, the special procurement type "consignment order" is possible for externally procured materials, and "produced in another plant" for in-house production.
Table: T460TColumn: LTEXT
SAP short text: Long text.Lookup T460T.LTEXT where T460T.WERKS = PLANT_ID and T460T.SOBSL = SPCL_PRCRMT_TYP_CD and T460T.SPRAS = LanguageParameter.If no value is returned because an entry has not been created for the LanguageParameter put in the default parameter for unknown value.
VALUATION_CAT_CD
CHAR(1) This is a code representing whether stocks of the material are valuated together or separately. In the case of split valuation, it also determines which movement types are allowed, that is, the criteria by which the stocks can be valuated.
Table: MARCColumn: BWTTY
SAP short text: Valuation category.SAP system values:A = " "B = Inhse/ext.proc.C = StatusH = OriginR = RetailX = Automat.(batch)
VALUATION_CAT_DSC
VARCHAR(15) The textual description of the (Valuation Category Code) which is used to determine whether stocks of the material are valuated together or separately. In the case of split valuation, it also determines which movement types are allowed, that is, the criteria by which the stocks can be valuated.
Table: T149TColumn: BTBEZ
SAP short text: Description of valuation category.Lookup T149T.BTBEZwhere T149T.BWTTY = VALUATION_CAT_CD and T149T.SPRAS = LanguageParameter.If no value is returned because an entry has not been created for the LanguageParameter put in the default parameter for unknown value.
Column name Datatype Description Derivation or source mapping
Developer Guide 129
Chapter 3: Data Mart Metadata
Description: This fact compares the expected quantity of a material (or the book quantity) against the actual amount based on the physical count of material in the storage location. This activity is done to determine the accuracy of the stock balance in the inventory books. An over- or under-estimation of the stock balance is measured as a percentage of the actual stock. One of two indicators of accuracy may be used - the absolute stock accuracy, which treats both positive and negative deviations from the actual as the same, and the relative stock accuracy, which makes a distinction between positive and negative deviations.
Notes: The physical inventory document is the central element of physical inventory management. It is used to 1) plan and carry out physical inventory 2) enter count-related information, 3) post any differences. After all lines in the physical inventory document are counted and posted, the document can be archived.
Column mapping
Column name Datatype Description Derivation or source mapping
ABS_STK_ACCRCY_PCT
NUMBER This is the absolute value of the accuracy of the physical inventory levels expressed as a percentage, with no regard to whether the estimate is over or under the actual amount. The formula used is: Absolute Stock Accuracy Percentage = (1 - ABS(Book Stock Level Count - Physical Inventory Count)/ Book Stock Level Count) * 100 (e.g., if Book Stock Level Count = 100 and Physical Inventory Count = 110 then ABS Stock Accuracy = 90%; if Book Stock Level Count = 100 and Physical Inventory Count = 90 then ABS Stock Accuracy = 90%)
{(1 - ABS[BOOK_STOCK_QTY - PHYSICAL_STOCK_QTY]) / BOOK_STOCK_QTY} * 100
SPECIAL SITUATIONS:1) If ABS_STK_ACCRCY_PCT< ZERO THEN SET TO ZERO 2) If PHYSICAL_STOCK_QTY > 0 AND BOOK_STOCK_QTY = 0 THEN SET TO ZERO 3) If PHYSICAL_STOCK_QTY = 0 AND BOOK_STOCK_QTY = 0 THEN SET TO 100 4) If PHYSICAL_STOCK_QTY = 0 AND BOOK_STOCK_QTY > 0 THEN SET TO ZERO
e.g.If Book = 100 and Physical = 110 ABS_STK_ACCRCY_PCT= 90% If Book = 100 and Physical = 90 ABS_STK_ACCRCY_PCT= 90%
BATCH_SID INTEGER This is a foreign key to the BATCH entity that is identified by the relationship name "group together by BATCH" sourced from the Logical Data Model.
The sid should be set to 0 as the lookup to batch will not be implemented pending a decision from product management regarding the removal of Batch..This mapping should not be used but appears in the spec just for historical purposesLookup BATCH based on ISEG.CHARG = BATCH_NOISEG.WERKS = PLANT_IDISEG.MATNR = MATERIAL_ID
BOOK_STOCK_AMT
NUMBER(13,2) This is the total value assigned to the book stock quantity of goods in the Physical Inventory Document Line Item, in Local Currency. This value can be calculated in a number of ways, by considering the total price of the goods, the total cost of it, the total discount applied to it, etc. The method of calculation of this field depends on the source system. This is useful in comparing stocks across various types of products. Each product may be stored in a separate unit of measure (e.g., bottles vs. boxes), thus making comparisons of quantities meaningless. The only meaningful comparisons that may be made is in terms of currency amounts associated with the goods.
Table: ISEGColumn: WRTBM
130 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
BOOK_STOCK_QTY
NUMBER(13,3) This is the book inventory balance of this item at the time of the count. The count is not adopted as the new book inventory balance until the inventory differences are posted.
Table: ISEGColumn: BUCHM
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
COUNT_DT INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "physical inventory counted on date in time" sourced from the Logical Data Model.
Lookup to ALL_TIME on CALENDAR_DT based onIF "ISEG"."ZLDAT" (DETAIL COUNT DT) IS NULL THEN USE "IKPF"."ZLDAT" (HEADER COUNT DT)ELSE USE "ISEG"."ZLDAT" (DETAIL COUNT DT)
If ((ToChar(COUNT_DT_TMP) <= ToChar($AS_AT_DATE) And ToChar(CREATED_DT_char) > ToChar($AS_AT_DATE)), ToChar(AddToDate(ToDate($AS_AT_DATE,'YYYYMMDD'),1), 'YYYYMMDD'), If((ToChar(COUNT_DT_TMP) > ToChar($AS_AT_DATE) And ToChar(CREATED_DT_char) <= ToChar($AS_AT_DATE)),ToChar(CREATED_DT_char), ToChar(COUNT_DT_TMP)))
COUNT_FSCL_PRD_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "physical inventory taken during a period in fiscal" sourced from the Logical Data Model.
Lookup the fiscal period sid in All Time using the count date ZLDAT and fiscal variantIF "ISEG"."ZLDAT" (DETAIL COUNT DT) IS NULL THEN USE "IKPF"."ZLDAT" (HEADER COUNT DT)ELSE USE "ISEG"."ZLDAT" (DETAIL COUNT DT)
To get the fiscal variant T001.PERIV where IKPF.WERKS = T001W.WERKS ANDT001W.BWKEY = T001K.BWKEY ANDT001K.BUKRS = T001.BUKRS
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. CHANGED_DT = CREATED_DT on insert of row.
FINAL_COUNT_IND
CHAR(1) This is an indicator that specifies that the item will not be recounted in another physical inventory document.
If ISEG.XNZAE = "X"then set indicator to "N"else set indicator to "Y"
Column name Datatype Description Derivation or source mapping
Developer Guide 131
Chapter 3: Data Mart Metadata
FISCAL_PERIOD_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "physical inventory posted to period in fiscal" sourced from the Logical Data Model.
Derived from Posting Date and Fiscal Variant
IKPF.BUDAT = posting date
To get the fiscal variant T001.PERIV where IKPF.WERKS = T001W.WERKS ANDT001W.BWKEY = T001K.BWKEY ANDT001K.BUKRS = T001.BUKRS
LOCAL_CURRENCY_CD
VARCHAR(5) This is the code representing the currency in which the balances are kept in the source company.
Table: T001W, T001K, T001Column: WAERS, BWKEY, BUKRS
Select T001.WAERSfrom T001, T001W, T001Kwhere T001W.BWKEY = T001K.BWKEYand T001.BUKRS = T001K.BUKRS
T001W - Plants/Branches,T001K- Valuation area,T001-Company Codes
T001.WAERSCurrency key-Char(5)T001W.BWKEY-Valuation area-Char(4)T001K.BWKEY-Valuation area-Char(4)T001.BUKRS-Company code-Char(4)T001K.BUKRS-Company code-Char(4)
MATERIAL_SID INTEGER This is a foreign key to the MATERIAL entity that is identified by the relationship name "material" sourced from the Logical Data Model.
Lookup Material based on ISEG.MATNR = MATERIAL_ID
MATERIAL_STRG_SID
INTEGER This is a foreign key to the MATERIAL STORAGE entity that is identified by the relationship name "material storage" sourced from the Logical Data Model.
Lookup Material Storage based onISEG.MATNR = MATERIAL_ID ISEG.WERKS = PLANT_ID
PHYSICAL_STOCK_AMT
NUMBER(13,2) This is the total value assigned to the physical stock quantity of goods in the Physical Inventory Document Line Item, in Local Currency. This value can be calculated in a number of ways, by considering the total price of the goods, the total cost of it, the total discount applied to it, etc. The method of calculation of this field depends on the source system. This is useful in comparing stocks across various types of products. Each product may be stored in a separate unit of measure (e.g., bottles vs. boxes), thus making comparisons of quantities meaningless. The only meaningful comparisons that may be made is in terms of currency amounts associated with the goods.
Table: ISEGColumn: WRTZL
PHYSICAL_STOCK_QTY
NUMBER(13,3) This is the actual quantity of stock found in inventory at the time of the count.
Table: ISEGColumn: MENGE
PHYS_INV_DOC_SID
INTEGER This is a foreign key to the PHYSICAL INVENTORY DOCUMENT entity that is identified by the relationship name "further described by physical inventory doc" sourced from the Logical Data Model.
Lookup Physical Inventory Document based on:ISEG.IBLNR = DOCUMENT_NOISEG.ZEILI = DOCUMENT_ITEM_NOISEG.GJAHR = FISCAL_YEAR_VAL
PLANT_SID INTEGER This is a foreign key to the PLANT entity that is identified by the relationship name "plant" sourced from the Logical Data Model.
Lookup to Plant based on ISEG.WERKS = PLANT_ID ISEG.LGORT = STORAGE_LCTN_CD
Column name Datatype Description Derivation or source mapping
132 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Physical Inventory DocumentTarget table name: PHYSICAL_INV_DOC
Table type: Dimension
RLTV_STK_ACRCY_PCT
NUMBER This is the accuracy of the physical inventory levels expressed as a percentage, with a distinction between an over- or under-estimation of the actual amount. The formula used is: Relative Stock Accuracy Percentage = (1 - (Book Stock Level Count - Physical Inventory Count) / Book Stock Level Count) * 100 (e.g., if Book Stock Level Count = 100 and Physical Inventory Count = 110 then ABS Stock Accuracy = 110% if Book Stock Level Count = 100 and Physical Inventory Count = 90 then ABS Stock Accuracy = 90%)
{(1 - [BOOK_STOCK_QTY - PHYSICAL_STOCK_QTY]) / BOOK_STOCK_QTY} * 100
SPECIAL SITUATIONS:1) If RLTV_STK_ACRCY_PCT< ZERO THEN SET TO ZERO2) If PHYSICAL_STOCK_QTY > 0 AND BOOK_STOCK_QTY = 0 THEN SET TO ZERO 3) If PHYSICAL_STOCK_QTY = 0 AND BOOK_STOCK_QTY = 0 THEN SET TO 100 4) If PHYSICAL_STOCK_QTY = 0 AND BOOK_STOCK_QTY > 0 THEN SET TO ZERO
e.g.if Book = 100 and Physical = 110 RLTV_STK_ACRCY_PCT= 110%if Book = 100 and Physical = 90 RLTV_STK_ACRCY_PCT= 90%
STOCK_CLASS_SID
INTEGER This is a foreign key to the STOCK CLASS entity that is identified by the relationship name "stock class" sourced from the Logical Data Model.
Lookup Stock Class based onSTOCK_TYPE_CD = ISEG.BSTARSSPECIAL_STOCK_CD = ISEG.SOBKZ
TIME_SID INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "physical inventory document issued on date" sourced from the Logical Data Model.
Convert the source date to eApps date format of YYYYMMDD.
UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "stockkeeping UOM" sourced from the Logical Data Model.
Lookup UOM_SID in Unit of Measure Dimension where UOM_CD = ISEG.MEINS
VALUATION_SID INTEGER This is a foreign key to the VALUATION entity that is identified by the relationship name "physical inventory is valued by valuation" sourced from the Logical Data Model.
If the following lookup returns a value use the SID Lookup Valuation based on MATERIAL_ID = ISEG.MATNR CHAR(18) VALUATION_AREA_CD = T001W.BWKEY join T001W to ISEG where T001W.WERKS = ISEG.WERKS VALUATION_TYPE_CD = ISEG.CHARG CHAR(10) otherwise do the following lookup Lookup Valuation based on MATERIAL_ID = ISEG.MATNR CHAR(18) VALUATION_AREA_CD = T001W.BWKEY join T001W to ISEG where T001W.WERKS = ISEG.WERKS VALUATION_TYPE_CD = default short char
Column name Datatype Description Derivation or source mapping
Developer Guide 133
Chapter 3: Data Mart Metadata
Description: This table compares the expected quantity of a material (or the book quantity) against the actual amount based on the physical count of material in the storage location. This activity is done to determine the accuracy of the stock balance in the inventory books. An over- or under-estimation of the stock balance is measured as a percentage of the actual stock. One of two indicators of accuracy may be used - the absolute stock accuracy, which treats both positive and negative deviations from the actual as the same, and the relative stock accuracy, which makes a distinction between positive and negative deviations.
Notes: The physical inventory document is the central element of physical inventory management. It is used to 1) plan and carry out physical inventory 2) enter count-related information, 3) post any differences. After all lines in the physical inventory document are counted and posted, the document can be archived.
Column mapping
PlantTarget table name: PLANT
Table type: Conformed Dimension
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. CHANGED_DT = CREATED_DT on insert of row.
DOCUMENT_ITEM_NO
VARCHAR(6) A source system generated number that identifies a line item on a physical inventory document. This is part of the natural key.
Table: ISEGColumn: ZEILI
Natural Key 3
DOCUMENT_NO VARCHAR(10) A source system generated identifier for a physical inventory document.
Table: ISEGColumn: IBLNR
Natural Key 1
FISCAL_YEAR_VAL
VARCHAR(4) This is the fiscal year in which the physical inventory activity was conducted (for a definition of Fiscal Year, refer to the Fiscal entity).
Table: ISEGColumn: GJAHR
Natural Key 2
PHYS_INV_DC_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:DOCUMENT_NOFISCAL_YEAR_VALDOCUMENT_ITEM_NO
PHYS_INV_DOC_SID
INTEGER This is a data warehouse system generated unique identifier for a physical inventory document line item.
System generated unique id.
USER_NM VARCHAR(12) This is the identification of the source system user who created the document.
Table: IKPFColumn: USNAM
134 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Description: This describes the plants of an organization. The most basic inventory management questions are - "what have I got?" and "where is it?". This helps us answer the "where is it?" question. In the context of Inventory Analysis, plants refer to warehouses. The plant or warehouse makes merchandise available for production, distribution and sale. A plant may be subdivided into storage locations, allowing stocks of materials to be broken down according to predefined criteria (e.g., location and materials planning aspects).
Column mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL Generated. Changed_Dt is set to Created_dt on insert of row.
CITY_CD VARCHAR(4) This is the code representing the city where the plant is located.
Table: T001W-PLANT/BRANCHESColumn: CITYC - CITY CODE
CITY_NM VARCHAR(35) This is the name of the city where the plant is located.
Table: T001W-PLANT/BRANCHESColumn: ORT01-CITY
COMPANY_CD VARCHAR(4) This is the code representing the company responsible for the valuation of this Plant.
Table: T001K- VALUATION AREA, T001W-PLANT/BRANCHESColumn: T001K.BUKRS, T001K.BWKEY, T001W.KWKEY
select T001K.BUKRSfrom T001K, T001Wwhere T001K.BWKEY.T001W.BWKEY
T001K.BUKRS-Company code-Char(4)T001K.BWKEY-Valuation area-Char(4)T001W.BWKEY-Valuation area-Char(4)
COMPANY_NM VARCHAR(35) This is the textual description representing the company responsible for the valuation of this Plant.
Table: T001-COMPANYColumn: BUTXT-NAME OF THE COMPANY CODE OR COMPANY
Lookup to T001 (Company) using BUKRS (Company Code) = Company Cd- column made same size as other company_nm columns for consistency
COUNTRY_CD VARCHAR(3) This is the code representing the country where the plant is located.
Table: T001W-PLANT/BRANCHESColumn: LAND1-COUNTRY KEY
COUNTRY_NM VARCHAR(15) This is the textual description of the country where the plant is located.
Table: T005T-COUNTRY NAMESColumn: LANDX-COUNTRY NAME
filter by SPRAS (language key)Lookup to T005T using LAND1 (Country key) = Country Cd
COUNTY_CD VARCHAR(3) This is the code representing the county where the plant is located. It is used to group cities into counties for tax purposes. It is used only in the USA for handling county taxes.
Table: T001W-PLANT/BRANCHESColumn: COUNC-COUNTY CODE
Developer Guide 135
Chapter 3: Data Mart Metadata
COUNTY_NM VARCHAR(20) This is the textual description of the county where the plant is located. It is used to group cities into counties for tax purposes. It is used only in the USA for handling county taxes.
Table: T005F-COUNTY: TEXTSColumn: BEZEI-TEXT
filter by SPRAS (language key)
SELECT NULLIF("T005F"."COUNC", ' ') COUNTY_CD, NULLIF("T005F"."BEZEI", ' ') COUNTY_NM, FROM "T005F", T001WWHERE "T005F"."SPRAS" = 'E'AND "T005F"."LAND1" = "T001W"."LAND1"AND "T005F"."REGIO" = "T001W"."REGIO"AND "T005F"."COUNC" = "T001W"."COUNC"
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL Generated.
DIVISION_CD VARCHAR(2) This is the code representing the division with which the plant is associated. A division is a way of grouping materials, products, or services, based on the sales area or the business area that it belongs to. A product is always assigned to just one division, from the point of view of sales and distribution. The use of divisions lets you organize your sales around groups of similar products or product lines. It also allows the people who process orders and services within the division to specialize in an area of expertise related to the division. For example, if a sales organization sells food and non-food products, each could represent a division. If the sales were conducted through both retail and wholesale distribution channels, each distribution channel could then be split into food and non-food divisions.
Table: T001L-STORAGE LOCATIONS, T001W-PLANT/BRANCHESColumn: SPART-DIVISION FOR INTERCOMPANY BILLING
When mapping to a storage location = '-' then this field maps to T001W.SPART
When mapping to a storage location <> '-' then this field maps to T001L.SPART
DIVISION_NM VARCHAR(20) This is the textual description of the division with which the plant is associated. A division is a way of grouping materials, products, or services, based on the sales area or the business area that it belongs to. A product is always assigned to just one division, from the point of view of sales and distribution. The use of divisions lets you organize your sales around groups of similar products or product lines. It also allows the people who process orders and services within the division to specialize in an area of expertise related to the division. For example, if a sales organization sells food and non-food products, each could represent a division. If the sales were conducted through both retail and wholesale distribution channels, each distribution channel could then be split into food and non-food divisions.
Table: TSPAT-ORGANIZATIONAL UNIT: SALES DIVISIONS: TEXTSColumn: VTEXT-NAME
filter by SPRAS (language key)Lookup to TSPAT using SPART (Division) = Division Cd
FISCAL_VARIANT_CD
VARCHAR(2) This is the code representing the fiscal calendar that is used by the plant for accounting purposes.
Table: T001-COMPANY CODESColumn: PERIV-FISCAL YEAR VARIANT
Lookup to T001 (Company) where BUKRS = Company Cd
Column name Datatype Description Derivation or source mapping
136 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
FREEZE_BOOK_IND
CHAR(1) This is an indicator that specifies whether in the storage location, it is possible to freeze the book inventory balances of all items in a physical inventory document that has not yet been counted. The frozen book inventory balance is recorded in the physical inventory document and is used for calculations of inventory differences.
Table: T001L-STORAGE LOCATIONSColumn: XBUFX-FREEZING BOOK INVENTORY BAL. ALLOWED IN STRG
Pass 1: loading Plants/no storage location- use default value for unknown value
Pass 2: loading Plants/with storage locationsJoin of T001W to T001L using WERKS (plant)if xbufx = 'X'then FREEZE_BOOK_IND='Y'else FREEZE_BOOK_IND= 'N'
GROUP_CURRENCY_CD
VARCHAR(5) This is the code representing the standard currency in which all monetary amounts in the data warehouse are stored. For example, if the monetary amounts in the data warehouse are stored in US Dollars, the code representing that may be USD. The standard or group currency is useful in reports that compare monetary amounts across companies that prefer to work in a variety of currencies.
ETL derived
LOCAL_CURRENCY_CD
VARCHAR(5) This is the code representing the currency in which the company that created the document prefers to work. Currencies are applicable to monetary amounts. For example, if the currency which the concerned company prefers to work in is Canadian dollars, the code representing it may be CAD. This is used on reports that are specific to the company that created the document. Such reports display the monetary amounts stored in the data warehouse (which are in group currency) in the currency of the company concerned.
Table: T001W, T001K, T001Column: WAERS, BWKEY, BUKRS
Select T001.WAERSfrom T001, T001W, T001Kwhere T001W.BWKEY = T001K.BWKEYand T001.BUKRS = T001K.BUKRS
T001W - Plants/Branches,T001K - Valuation area,T001 - Company Codes
T001.WAERS Currency key-Char(5)T001W.BWKEY - Valuation area-Char(4)T001.BUKRS - Company code-Char(4)
MRP_STRG_LCTN_CD
CHAR(1) This is an indicator that specifies whether to exclude or not a storage location from material requirements planning at the Plant level. If this indicator is not set, stock, requirements, and receipts are included in the Manufacturing Resource Planning (MRP) at plant level.
Table: T001L-STORAGE LOCATIONSColumn: DISKZ-STORAGE LOCATION MRP INDICATOR
Pass 1: loading Plants/no storage location- use default value for unknown value
Pass 2: loading Plants/with storage locations- join of T001W to T001L using WERKS (plant)
MRP_STRG_LCTN_DSC
VARCHAR(60) Descriptive text for a MRP STORAGE LOCATION CODE value.
Table: DD07T - DD: TEXTS FOR DOMAIN FIXED VALUES (LANGUAGColumn: DDTEXT - SHORT TEXT FOR FIXED VALUES
Pass 1: loading Plants/no storage location- use default value for unknown value
Pass 2: loading Plants/with storage locationsselect ddtextwhere domname = 'DISKZ' andMRP_STRG_LCTN_CD = DD07T.DOMVALUE_L ANDddlanguage = language parameter
Column name Datatype Description Derivation or source mapping
Developer Guide 137
Chapter 3: Data Mart Metadata
Stock ClassTarget table name: STOCK_CLASS
Table type: Conformed dimension
Description: This table is used to classify the fitness of use of inventory. The most basic inventory management questions are "what have I got?" and "where is it?". Stock Class helps to clarify the "what have I got?" question by describing fitness for use. For example, there are 100 widgets in stock, but 10 are unavailable as they are going through "quality inspection", 20 are "blocked" for an unspecified reason, and 30 are "reserved". This implies that only 80 of the 100 widgets in stock are available for "unrestricted use", and 30 of these 80 have been "reserved" for use in a specific production process. This contains combinations of attributes that are classifiers of stock.
Typically, a source system has many such classifiers, such as Stock Type. Other classifiers, such as Age basket may be derived. This combines every one of these classifiers into a single entity. This is done primarily for technical reasons, such as improving the performance of queries and minimizing the storage space required (a single link between the Class and the Fact is sufficient to answer queries that look at metrics across document classifiers). However, in certain cases, it makes business sense to do so as well. For example, combinations of classifiers may be meaningful to a business. If so, some Class Status attributes may be added that represent such meaningful combinations. This also contains a number of multipliers. Multipliers are used for calculating derived metrics from existing ones, and have values of 1 or 0. The derived metric is calculated by multiplying the multiplier with the existing metric. Multipliers are defined by the ETL program based on certain source system classifiers.
Technical Notes: There are two options for creating the combinations of attributes. If the attributes have only a few members, a complete set of combinations (called a complete cartesian product) may be created at the time of initial load of the warehouse, even though some of the combinations may not make business sense. This option saves time of load. However, if creating a complete cartesian product produces a very large set of combinations most of which is meaningless, it may be better to use only the combinations that already exist in documents. This is less efficient with regard to load time, but saves storage space.
Column mapping
Column name Datatype Description Derivation or source mapping
BLOCKED_MULT SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if the movement if the stock is blocked from being used.
If Stock_Type_Cd in BlockedStockTypeParameter then set to 1 (blocked)else set to default value (not blocked)endif
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. Changed_Dt set to Created_Dt on insert of row.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
138 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
CUSTOMER_CONS_MULT
SMALLINT This multiplier is applied to the computation of KPIs. This multiplier is set to 1 if the movement is into or out of a Vendor consignment. A customer consignment is a material movement where the material is located at the customer location.
If Special_Stock_Cd in CustomerConsignmentSpecialStockParameter then set to 1 (on customer consignment)else set to default value (not on customer consignment)endif
OVRL_STTS_LVL1_DSC to OVRL_STTS_LVL5_DSC
VARCHAR(50) This is the level 1 to 5 of a hierarchy that describes the status associated with a stock class. A stock class is a combination of classifiers of stocks. Sometimes, a combination may make business sense, and a status maybe associated with it. The status may even be part of a hierarchy. This is the 1st to 5th level parent of such a status hierarchy.
These are user entered status fields. Set to default value in ETL.
QLTY_INSPCTN_MULT
SMALLINT This multiplier is applied to the computation of KPIs. This multiplier is set to 1 if the quality inspection has been done.
If Stock_Type_Cd in QualityInspectionStockTypeParameter then set to 1 (QI required)else set to default value (QI not required)endif
SPECIAL_STOCK_CD
CHAR(1) This is the code representing the type of stock in terms of its management. For example, "consignment stock" of a material needs to be managed separately.
Table: T148Column: SOBKZ-SPECIAL STOCK INDICATOR
Pass 1, 2: T148.SOBKZPass 3, 4: {DEFAULT_SHORT_CHAR}
SPECIAL_STOCK_DSC
VARCHAR(20) This is the textual description of the type of stock in terms of its management. For example, "consignment stock" of a material needs to be managed separately.
Table: T148TColumn: SOTXT-DESCRIPTION OF SPECIAL STOCK
Lookup to T148T using Special Stock Code and Filtering by Language Parameter (SPRAS)
STOCK_CLASS_SID
INTEGER This is a data warehouse system generated unique identifier for the stock class.
System generated unique id.
STOCK_CLSS_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:STOCK_TYPE_CDSPECIAL_STOCK_CD
STOCK_TYPE_CD
VARCHAR(10) This is the code representing the type of stock in terms of its fitness of use. Examples include "unrestricted-use" stock, stock "in quality inspection", and "blocked" stock.
Pass 1, 3: DD07T.DOMVALUE_LPass 2, 4: T064B.BSTAR
DOMVALUE_L - VALUES FOR DOMAINSBSTAR - STOCK TYPE
STOCK_TYPE_DSC
VARCHAR(60) This is the textual description of the type of stock in terms of its fitness of use. Examples include "unrestricted-use" stock, stock "in quality inspection", and "blocked" stock.
Table: DD07TColumn: DDTEXT-SHORT TEXT FOR FIXED VALUES
Pass 1, 3: DD07T.DDTEXT where DDLANGUAGE = {Language Parameter}
Pass 2, 4: Lookup to T064B.BTEXT where T064A.BSTAR = T064B.BSTAR and T064B.SPRAS = {Language Parameter}
BTEXT: Text for Stock TypeDDTEXT: Short text for fixed valuesDDLANGUAGE/SPRAS: Language parameter.BSTAR: Stock Type
Column name Datatype Description Derivation or source mapping
Developer Guide 139
Chapter 3: Data Mart Metadata
Stock Opening BalanceTarget table name: STOCK_OPEN_BAL_PEX
Table type: Work table
Description: This table provides a snapshot of the stock levels for every material across plants and storage locations at a given point in time. This is a persistent work table, used in building certain types of summary facts (called snapshot facts) from transactional facts. This is not to be used for answering business questions. However, it is a critical component of the Inventory Analysis application. The information in it is used as a starting point to create stock levels.
For example:
1. The opening balance of widgets in a plant as on 2000-01-01 00:00:00 was 100.
2. The following material movement transactions were posted in that plant in the month of 1999-12.
3. 10 widgets were issued on 1999-12-10.
4. 100 widgets were received on 1999-12-15.
5. 50 widgets were issued on 1999-121-20.
6. 50 widgets were issued on 1999-12-29.
7. The Open Stock Level as of1999-12-01 is:100 + 10 - 100 + 50 + 50 = 110.
This table is used the first time rows are added to the Stock Overview and Stock Level tables. If the stock overview must be reloaded this table must be saved so the stock overview can be correctly calculated. Hence the information in it must persist. The table must be loaded once, and must not be truncated or refreshed at any stage after the initial load. This table is usually sourced from a corresponding "Opening Balances" table in the source system. The point in time of the snapshot is the time of the extract from that table (since the extract may take a while, the time of the start of the extract is applied to every record).
UNRESTRICTED_MULT
SMALLINT This is a multiplier that is applied to the computation of KPIs. This multiplier is set to 1 if the stock is available for general use.
If Stock_Type_Cd in UnrestrictedStockTypeParameter then set to 1 (unrestricted)else set to default value (restricted)endif
USER_DEFINED1_MULT to USER_DEFINED5_MULT
SMALLINT This is an user-defined multiplier. The usage of It is optional. The default value of it is zero.
This is user defined. This should be set to a default value = 0;
VENDOR_CONS_MULT
SMALLINT This multiplier is applied to the computation of KPIs. This multiplier is set to 1 if the movement is into or out of a Vendor consignment. A vendor consignment is a material movement where the material is located at the vendor location.
If Special_Stock_Cd in VendorConsignmentSpecialStockParameter then set to 1 (on vendor consignment)else set to default value (not on vendor consignment)endif
Column name Datatype Description Derivation or source mapping
140 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Column mapping
Column name Datatype Description Derivation or source mapping
AVG_EXPR_DY_CNT
INTEGER The average number of days for the material in the lot or batch to expire.
Table: MCHAColumn: VFDAT
All Passes:Convert to Number of days ((Lookup to MCHA.VFDAT whereSOURCE_TABLE.MATNR = MCHA.MATNR andSOURCE_TABLE.WERKS = MCHA.WERKS andSOURCE_TABLE.CHARG = MCHA.CHARG) - SYSTEM DATE)
Pass 1: SOURCE_TABLE = MCHBPass 2: SOURCE_TABLE =Pass 3: SOURCE_TABLE =Pass 4: SOURCE_TABLE =Pass 5: SOURCE_TABLE =Pass 6: SOURCE_TABLE =
If CHARG is empty (or does not exist), DEFAULT NUMBER
AVG_RECPT_DY_CNT
INTEGER The average number of days from the time the purchase order was issued for the material, to the time it was received into the plant.
BATCH_NO VARCHAR(10) This is the source system unique identifier for the batch in the source system. A batch is a grouping of material manufactured in a single production run that is managed together. This applies to stocks of materials managed in batches.
Pass 1: MCHB.CHARGPass 2: MSPR.CHARGPass 3: MSKA.CHARGPass 4: MKOL.CHARGPass 5: MSKU.CHARGPass 6: MSLB.CHARGPass 7: Default number
COMPANY_CD VARCHAR(4) This is the code representing the company that the plant belongs to.
Table: T001KColumn: BUKRS
All PassesLookup to T001K.BUKRS whereT001K.BWKEY = VALUATION_AREA_CD
VALUATION_AREA_CD logic is in VALUATION_AREA_CD attribute
COST_METHOD_CD
VARCHAR(2) This is the code representing the method of pricing to use in valuating stock of a material. Examples include "Standard Price", "Moving Average Price", or "Periodic Unit Price".
Not required
DELETION_IND CHAR(1) This is a flag that indicates that this record should be considered as deleted.
Pass 1: If MARD.LVORM = 'X' then 'Y'Else 'N'
Pass 4:If MKOL.LVORM = 'X' then 'Y'Else 'N'
Pass 7:If MARC.LVORM = 'X' then 'Y'Else 'N'
Pass 2, 3, 5, 6:Default short char, or 'N'?
Developer Guide 141
Chapter 3: Data Mart Metadata
FISCAL_VARIANT_CD
VARCHAR(2) This code represents the Fiscal Variant for a plant. The Fiscal Variant is used to define the fiscal calendars within an organization. An organization may be composed of multiple companies (e.g., if mergers took place), and may have to deal with multiple fiscal calendars. Each fiscal calendar is represented by a fiscal variant. The fiscal variant thus defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The default fiscal variant is defined as the calendar year, which starts on Jan 1st and ends on Dec 31st, and includes 12 periods corresponding to the months, and 4 calendar quarters.
All passes
Lookup to T001.PERIVWhere T001W.BWKEY = T001K.BWKEY T001K.BUKRS = T001.BUKRS
T001W - Plants/BatchesT001K - Valuation AreaT001 - Company Codes
FISCAL_YEAR_VAL
VARCHAR(4) The year of a given financial calendar that the Opening Balance Extract Date (As At Date) falls in.
Pass 1: MARD.LFGJAPass 2: MSPR.LFGJAPass 3: MSKA.LFGJAPass 4: MKOL.LFGJAPass 5: MSKU.LFGJAPass 6: MSLB.LFGJAPass 7: MARC.LFGJA
INVENTORY_BLK_IND
CHAR(1) This indicates whether the Material at the Plant is blocked for an unspecified reason.
Table: SEE SOURCE LOGICColumn: PHYSICAL INVENTORY BLOCKING INDICATOR
Pass 1: If MARD.SPERR <> ' ' then 'Y' Else 'N'
Pass 2:If MSPR.PRSPR <> ' ' then 'Y' Else 'N'
Pass 3:If MSKA.KASPR <> ' ' then 'Y' Else 'N'
Pass 4:If MKOL.SPERS <> ' ' then 'Y' Else 'N'
Pass 5:If MSKU.KUSPR <> ' ' then 'Y' Else 'N'
Pass 6:If MSLB.LBSPR <> ' ' then 'Y' Else 'N'
Pass 7:Default short char
LOCAL_CURRENCY_CD
VARCHAR(5) This is the code representing the currency in which the company that created the document prefers to work. Currencies are applicable to monetary amounts. For example, if the currency which the concerned company prefers to work in is Canadian dollars, the code representing it may be CAD. This is used on reports that are specific to the company that created the document. Such reports display the monetary amounts stored in the data warehouse (which are in group currency) in the currency of the company concerned.
Table: T001Column: WAERS
All PassesLookup to T001K.WAERS whereT001K.BWKEY = VALUATION_AREA_CD
MATERIAL_ID VARCHAR(18) This is the source system unique identifier of the material being stocked.
Pass 1: MARD.MATNRPass 2: MSPR.MATNRPass 3: MSKA.MATNRPass 4: MKOL.MATNRPass 5: MSKU.MATNRPass 6: MSLB.MATNRPass 7: MARC.MATNR
Column name Datatype Description Derivation or source mapping
142 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
OPN_BAL_EXTRCT_DT
INTEGER This is the date on which the Stock Opening Balance records were extracted from the Source system.
PLANT_ID VARCHAR(4) This is the source system unique identifier of the plant where the material is stocked.
Pass 1: MARD.WERKSPass 2: MSPR.WERKSPass 3: MSKA.WERKSPass 4: MKOL.WERKSPass 5: MSKU.WERKSPass 6: MSLB.WERKSPass 7: MARC.WERKS
POSTING_PERIOD_NO
NUMBER(2,0) The posting period of the Fiscal Year of a given financial calendar that the Opening Balance Extract Date (As At Date) falls in.
Pass 1: MARD.LFMONPass 2: MSPR.LFMONPass 3: MSKA.LFMONPass 4: MKOL.LFMONPass 5: MSKU.LFMONPass 6: MSLB.LFMONPass 7: MARC.LFMON
SPECIAL_STOCK_CD
CHAR(1) This is a code representing types of stock that need special handling,e.g., consignment stock.
Pass 1: Default short charPass 2: MSPR.SOBKZPass 3: MSKA.SOBKZPass 4: MKOL.SOBKZPass 5: MSKU.SOBKZPass 6: MSLB.SOBKZPass 7: Default short char
Column name Datatype Description Derivation or source mapping
Developer Guide 143
Chapter 3: Data Mart Metadata
STOCK_QTY NUMBER(13,3) The total quantity of stock of the material in a plant (or storage location). This is used as the opening balance quantity of the material in that plant and storage location.
Pivot table on quantity rows:
Note: for each stock quantity below, we have to "hard-code" a STOCK_TYPE_CD key in order to turn one table row into multiple rows. The STOCK_TYPE_CD will be supplied by the user through a parameter value. There will be six parameters:a) Unrestricted_Use_Parameterb) Blocked_Parameterc) Quality_Inspection_Parameterd) Restricted_Use_Parametere) Stock_In_Transit_Parameterf) Returns_Parameter
STOCK_TYPE_CD = Unrestricted Use Parameter Pass 1: If MCHB.CLABS is Null then If MARD.LABST > 0, MARD.LABST, null Else if MCHB.CLABS > 0, MCHB.CLABS, null Pass 2: IF sum(MSPR.PRLAB) > 0, sum(MSPR.PRLAB), nullSame format as Pass 2, using: Pass 3: sum(MSKA.KALAB) Pass 4: sum(MKOL.SLABS) Pass 5: sum(MSKU.KULAB) Pass 6: sum(MSLB.LBLAB) Pass 7: Not applicable
STOCK_TYPE_CD = Blocked_Parameter Pass 1: IF MCHB.SPEME is null then If MARD.SPEME > 0, MARD.SPEME, null ELSE If MCHB.SPEME > 0, MCHB.SPEME, null Pass 2: If sum(MSPR.PRSPE) > 0, sum (MSPR.PRSPE), nullSame format as Pass 2, using: Pass 3: sum(MSKA.KASPE) Pass 4: sum(MKOL.SSPEM) Pass 5, 6, 7: Not applicable
STOCK_TYPE_CD = Quality_Inspection_Parameter Pass 1: If MCHB.INSME is null then if MARD.INSME > 0, MARD.INSME, null Else if MCHB.INSME > 0, MCHB.INSME, null Pass 2: If sum(MSPR.PRINS) > 0, sum (MSPR.PRSPE), nullSame logic as Pass 2, using: Pass 3: sum(MSKA.KAINS) Pass 4: sum(MKOL.SINSM) Pass 5: sum(MSKU.KUINS) Pass 6: sum(MSLB.LBINS) Pass 7: Not applicable
Column name Datatype Description Derivation or source mapping
144 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
STOCK_QTY (Cont’d)
STOCK_TYPE_CD = Stock In Transit Quantity'? Pass 1: If MCHB.UMLME is null then If MARD.UMLME > 0, MARD.UMLME, null Else if MCHB.UMLME > 0, MCHB.UMLME, null Pass 2, 3, 4, 5, 6: Not applicable
Pass 7: If MARC.UMLMC > 0, MARC.UMLMC, null
STOCK_TYPE_CD = 'Restricted QTY' Pass 1: If MCHB.EINME is null then if MARD.EINME > 0, MARD.EINME, null Else if MCHB.EINME > 0, MCHB.EINME, null Pass 2, 3, 7: Not applicable Pass 4: If sum(MKOL.SEINM) > 0, sum(MKOL.SEINM), NullSame logic as pass 4 using: Pass 5: sum(MSKU.KUEIN) Pass 6: sum(MSLB.LBEIN)
STOCK_TYPE_CD = 'Returns Parameter' Pass 1: If MCHB.RETME is null then If MARD.RETME > 0, MARD.RETME, null Else if MCHB.RETME > 0, MCHB.RETME, null Pass 2, 3, 4, 5, 6, 7: Not applicable
STOCK_QTY NUMBER(13,3) The total quantity of stock of the material in a plant (or storage location). This is used as the opening balance quantity of the material in that plant and storage location.
applicable
Pass 7: If MARC.UMLMC > 0, MARC.UMLMC, null
STOCK_TYPE_CD = 'Restricted QTY' Pass 1: If MCHB.EINME is null then if MARD.EINME > 0, MARD.EINME, null Else if MCHB.EINME > 0, MCHB.EINME, null Pass 2, 3, 7: Not applicable Pass 4: If sum(MKOL.SEINM) > 0, sum(MKOL.SEINM), NullSame logic as pass 4 using: Pass 5: sum(MSKU.KUEIN) Pass 6: sum(MSLB.LBEIN)
STOCK_TYPE_CD = 'Returns Parameter' Pass 1: If MCHB.RETME is null then If MARD.RETME > 0, MARD.RETME, null Else if MCHB.RETME > 0, MCHB.RETME, null Pass 2, 3, 4, 5, 6, 7: Not applicable
STOCK_TYPE_CD
VARCHAR(2) This is a code representing the type of stock with regard to its availability for issue. For example: "unrestricted-use" stock is available for issue, whereas stock "in quality inspection" or stock that is "blocked" for some unspecified reason is not.
Derived from Pivot in all cases. See STOCK_QTY
STORAGE_LCTN_CD
VARCHAR(4) This is the code representing the physical storage location in the plant where the stocks are held.
Pass 1: MARD.LGORTPass 2: MSPR.LGORTPass 3: MSKA.LGORTPass 4: MKOL.LGORT
Pass 5, 6, 7: Default short char
Column name Datatype Description Derivation or source mapping
Developer Guide 145
Chapter 3: Data Mart Metadata
VALUATED_STOCK_QTY
NUMBER(13,3) This is the total quantity of stock of the material in the plant that is valued. Stock in plants that are not "owned" are not counted.
If STOCK_TYPE_CD in 'RETURNS' parameter OR SPECIAL_STOCK_CD in 'Vendor Consignment' then 0Else STOCK_QTY
Column name Datatype Description Derivation or source mapping
146 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
VALUATION_AREA_CD
VARCHAR(4) This is the code representing the organizational grouping to which the plant belongs for material valuation purposes. A valuation area may be a single plant, or all plants belonging to a company.
Table: T001WColumn: BWKEY
Pass 1:Lookup to T001W.BWKEY whereMARD.WERKS = T001W.WERKS
Pass 2:Lookup to T001W.BWKEY whereMSPR.WERKS = T001W.WERKS
Pass 3:Lookup to T001W.BWKEY whereMSKA.WERKS = T001W.WERKS
Pass 4:Lookup to T001W.BWKEY whereMKOL.WERKS = T001W.WERKS
Pass 5:Lookup to T001W.BWKEY whereMSKU.WERKS = T001W.WERKS
Pass 6:Lookup to T001W.BWKEY whereMSLB.WERKS = T001W.WERKS
Pass 7:Lookup to T001W.BWKEY whereMARC.WERKS = T001W.WERKS
Column name Datatype Description Derivation or source mapping
Developer Guide 147
Chapter 3: Data Mart Metadata
Stock OverviewTarget table name: STOCK_OVERVIEW
Table type: Fact
Description: This shows a summary of the most important information required in Inventory Management, such as Stock Level, Stock Usage, Stock Usage Forecast, Stock outages and Physical Inventory Counts. The summary is at a monthly grain.
VALUATION_TYPE_CD
VARCHAR(10) This is the code representing the stocks of a material subject to split valuation. The valuation category determines which valuation types are permissible for a material. If a material is valuated according to its origin (valuation category H in SAP), you can define the possible countries of origin as valuation types.
Table: MCHAColumn: BWTAR - VALUATION TYPE
Pass 1: Lookup to MCHA.BWTAR whereMCHB.MATNR = MCHA.MATNR andMCHB.WERKS = MCHA.WERS andMCHB.CHARG = MCHA.CHARG
Pass 2:Lookup to MCHA.BWTAR whereMSPR.MATNR = MCHA.MATNR andMSPR.WERKS = MCHA.WERS andMSPR.CHARG = MCHA.CHARG
Pass 3:Lookup to MCHA.BWTAR whereMSKA.MATNR = MCHA.MATNR andMSKA.WERKS = MCHA.WERS andMSKA.CHARG = MCHA.CHARG
Pass 4:Lookup to MCHA.BWTAR whereMKOL.MATNR = MCHA.MATNR andMKOL.WERKS = MCHA.WERS andMKOL.CHARG = MCHA.CHARG
Pass 5:Lookup to MCHA.BWTAR whereMSKU.MATNR = MCHA.MATNR andMSKU.WERKS = MCHA.WERS andMSKU.CHARG = MCHA.CHARG
Pass 6:Lookup to MCHA.BWTAR whereMSLB.MATNR = MCHA.MATNR andMSLB.WERKS = MCHA.WERS andMSLB.CHARG = MCHA.CHARG
Pass 7: Default short char
MATNR - Material NumberWERKS - PlantCHARG - Batch Number
Column name Datatype Description Derivation or source mapping
148 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Column mapping
Column name Datatype Description
Derivation or source mapping
ABS_STK_ACCRCY_PCT
NUMBER This is the accuracy of the physical inventory levels expressed as a percentage, with no regard to whether the estimate is over or under the actual amount. The formula used is: Absolute Stock Accuracy Percentage = (1 - ABS(Book Stock Level Count - Physical Inventory Count)/ Book Stock Level Count) * 100 (e.g., if Book Stock Level Count = 100 and Physical Inventory Count = 110 then ABS Stock Accuracy = 90%; if Book Stock Level Count = 100 and Physical Inventory Count = 90 then ABS Stock Accuracy = 90%).For first row 0. Update for new or changed rows in PHYSICAL_INVENTORY. roll forward: ABS_STOCK_ACCURACY. Assume that the Stock Accuracy for any periods is the accuracy as at the last physical inventory date.
Developer Guide 149
Chapter 3: Data Mart Metadata
AVG_STCK_LVL_QTY
NUMBER(18,3) This is the average of the stock levels for the time period concerned (day, week, or month). This is used in business questions such as the following:
"Show me a report showing the stock level of Material A over time by month".
This sounds like a simple question, but it is not. Stock levels change constantly throughout the month. It is easy to determine the stock level at the start of a month or at the end of it, but what does one really mean by "the stock level for a month"? One answer might be that one would like to see the average stock level for the month. So what is the average stock level? That is another difficult question. The true average stock level is calculated from a mathematical integral of material movements across the period concerned. However, such calculations are complicated, and most users seem to shy from it. A variety of other simpler methods are used, though any method other than the mathematical integral is an approximation of the average. To add to the complication, the number of hours over which the average is calculated affects the value of it (e.g., all hours of the day vs. working hours). Thus, the value of the average is dependent on the method of calculation chosen, and may vary from business to business. The important point is to be consistent in the usage of a method.
The following examples demonstrate the disparity in results from various averaging methods:
Day 1 Started with 0 stock of an item. Received 100 units of the item at the beginning of the working day. Issued 80 units of the item more or less evenly throughout the working day. 20 left in stock at the end of the working day. Open Stock Level for the day is 0. Close Stock Level for the day is 20. True (integrated) average stock level for the working day is 60. Average based on (Open Stock Level + Close Stock Level) / 2 is 10. Average based on Daily Close Stock Level is 20.Day 2 Received 100 at the beginning of the working day. Issued 110 units of the item more or less evenly throughout the working day. 10 left at the end of the working day. Open Stock Level for the day is 20. Close Stock Level for the day is 10. True (integrated) average stock level for the working day is 65. Average based on (Open Stock Level + Close Stock Level) / 2 is 15. Average based on Daily Close Stock Level is 10.
The average stock level for the two days may be:
62.5 based on the True (integrated) average stock level for the working day 5 based on the Average based on (Open Stock Level + Close Stock Level) / 2 over two days15 based on the Average of the Daily Close Stock Level of each day
Clearly, there is a large amount of disparity between the answers obtained from different methods, and no answer that stands out as being the "right" one. As long as the definition of average stock level is clearly stated, yields answers that are meaningful to the business, and is useful for comparison, it is suitable for most inventory management purposes.
The IA e-application supports two definitions of average stock level:1) Average based on (Open Stock Level + Close Stock Level) / 2 for the period. For example, the average of the month is (Open Stock Level for the month + Close Stock Level for the month) / 2 2) Average of daily Close Stock Level. For example, the average of the month is the average of the Close Stock Level for every day of the month.
The user selects an averaging method using a global configuration
Column name Datatype Description
Derivation or source mapping
150 Cognos Analytic Applications Inventory Analysis for SAP(R)parameter.
Chapter 3: Data Mart Metadata
AVG_UR_STK_LVL_QTY
NUMBER(18,3) This is the average of the stock levels for the time period concerned (day, week, or month) for "unrestricted-use" stock types only. This is used in business questions such as the following:
"Show me a report showing the stock level of Material A over time by month".
This sounds like a simple question, but it is not. Stock levels change constantly throughout the month. It is easy to determine the stock level at the start of a month or at the end of it, but what does one really mean by "the stock level for a month"? One answer might be that one would like to see the average stock level for the month. So what is the average stock level? That is another difficult question. The true average stock level is calculated from a mathematical integral of material movements across the period concerned. However, such calculations are complicated, and most users seem to shy from it. A variety of other simpler methods are used, though any method other than the mathematical integral is an approximation of the average. To add to the complication, the number of hours over which the average is calculated affects the value of it (e.g., all hours of the day vs. working hours). Thus, the value of the average is dependent on the method of calculation chosen, and may vary from business to business. The important point is to be consistent in the usage of a method.
The following examples demonstrate the disparity in results from various averaging methods:
Day 1 Started with 0 stock of an item. Received 100 units of the item at the beginning of the working day. Issued 80 units of the item more or less evenly throughout the working day. 20 left in stock at the end of the working day. Open Stock Level for the day is 0. Close Stock Level for the day is 20. True (integrated) average stock level for the working day is 60. Average based on (Open Stock Level + Close Stock Level) / 2 is 10. Average based on Daily Close Stock Level is 20.Day 2 Received 100 at the beginning of the working day. Issued 110 units of the item more or less evenly throughout the working day. 10 left at the end of the working day. Open Stock Level for the day is 20. Close Stock Level for the day is 10. True (integrated) average stock level for the working day is 65. Average based on (Open Stock Level + Close Stock Level) / 2 is 15. Average based on Daily Close Stock Level is 10.
The average stock level for the two days may be:
62.5 based on the True (integrated) average stock level for the working day 5 based on the Average based on (Open Stock Level + Close Stock Level) / 2 over two days15 based on the Average of the Daily Close Stock Level of each day
Clearly, there is a large amount of disparity between the answers obtained from different methods, and no answer that stands out as being the "right" one. As long as the definition of average stock level is clearly stated, yields answers that are meaningful to the business, and is useful for comparison, it is suitable for most inventory management purposes.
The IA e-application supports two definitions of average stock level:1) Average based on (Open Stock Level + Close Stock Level) / 2 for the period. For example, the average of the month is (Open Stock Level for the month + Close Stock Level for the month) / 2 2) Average of daily Close Stock Level. For example, the average of the month is the average of the Close Stock Level for every day of the month.
The user selects an averaging method using a global configuration
Column name Datatype Description
Derivation or source mapping
Developer Guide 151parameter.
Chapter 3: Data Mart Metadata
CLOSE_STCK_LVL_QTY
NUMBER(18,3) This is the stock level at the end of a time period (day, week, or month).
CLS_UR_STK_LVL_QTY
NUMBER(18,3) This is the stock level at the end of a time period (day, week, or month) for "unrestricted-use" stock types only.
CUMULATIVE_USG_QTY
NUMBER(18,3) This is the sum of the past usage of stocks for period of time (day, week, or month).
FISCAL_PERIOD_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "fiscal period" sourced from the Logical Data Model.
FORECAST_USAGE_QTY
NUMBER(18,3) This is the predicted usage of the stocks in the time period concerned (day, week, or month) based on a version of a forecasting model (If several valid versions of the model exist, such as Optimistic and Pessimistic, an average of the versions may be used).
LAST_USED_DT INTEGER This is a foreign key to the TIME entity that is identified by the relationship name "last used date" sourced from the Logical Data Model.
MATERIAL_SID INTEGER This is a foreign key to the MATERIAL entity that is identified by the relationship name "material" sourced from the Logical Data Model.
MATERIAL_STRG_SID
INTEGER This is a foreign key to the MATERIAL STORAGE entity that is identified by the relationship name "material storage" sourced from the Logical Data Model.
MAX_STK_LVL_QTY
NUMBER(18,3) This is the highest value of the stock level in a time period (day, week, or month).
MAX_UR_STK_LVL_QTY
NUMBER(18,3) This is the highest value of the stock level in a time period (day, week, or month) for "unrestricted-use" stock types only.
MIN_STK_LVL_QTY
NUMBER(18,3) This is the lowest value of the stock level in the time period concerned (day, week, or month).
MIN_UR_STK_LVL_QTY
NUMBER(18,3) This is the lowest value of the stock level in the time period concerned (day, week, or month) for "unrestricted-use" stock types only.
MOVING_AVG_USG_QTY
NUMBER(18,3) This is the moving average of the stock usage quantities for the time period concerned (day, week, or month). The moving average value is dependent on the number of periods over which it is to be calculated, which should be an user-defined global parameter. For example, if the moving average is to be calculated over 3 periods, the formula used would be: Moving Average Stock Usage Quantity = [Average Stock Usage Quantity for (current period) + Average Stock Usage Quantity for the (current period -1) + Average Stock Usage Quantity for the (current period -2)] / 3.
MV_AVG_STK_LV_QTY
NUMBER(18,3) This is the moving average of the stock levels for the time period concerned (day, week, or month). The moving average value is dependent on the number of periods over which it is to be calculated, which should be an user-defined global parameter. For example, if the moving average is to be calculated over 3 periods, the formula used would be: Moving Average Stock Level = [Average Stock Level for (current period) + Average Stock Level for the (current period -1) + Average Stock Level for the (current period -2)] / 3.
MV_AVG_UR_ST_L_QTY
NUMBER(18,3) This is the moving average of the stock levels for the time period concerned (day, week, or month) for "unrestricted-use" stock types only. The moving average value is dependent on the number of periods over which it is to be calculated, which should be an user-defined global parameter. For example, if the moving average is to be calculated over 3 periods, the formula used would be: Moving Average Stock Level = [Average Stock Level for (current period) + Average Stock Level for the (current period -1) + Average Stock Level for the (current period -2)] / 3.
OPEN_STOCK_LVL_QTY
NUMBER(18,3) This is the stock level at the beginning of a time period (day, week, or month).
Column name Datatype Description
Derivation or source mapping
152 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
OPN_UR_STK_LVL_QTY
NUMBER(18,3) This is the stock level at the beginning of a time period (day, week, or month) for "unrestricted-use" stock types only.
OVERSTOCK_QTY
NUMBER(18,3) This is the quantity of stock that is greater than the quantity needed to meet short term demand.
OVRSPPLY_USG_QTY
NUMBER(18,3) This is calculated by taking the replenishment period established for the material by the category rank, and comparing the usage for that period to the replenishment quantity expected for the period. The Over Usage Quantity is the quantity of usage that exceeds the replenishment quantity.
PHYSCL_INV_DOC_CNT
NUMBER This is the number of physical inventory counts that have been performed on the material at the plant in the period. It is calculated by counting the number of detail physical inventory line items (in Physical Inventory) for material at a plant.
PLANT_SID INTEGER This is a foreign key to the PLANT entity that is identified by the relationship name "plant" sourced from the Logical Data Model.
RANK_NO INTEGER This field depicts the rank number (unique number) that will be used to populate the STOCK_OVERVIEW table. Each rank is represented by a group of plant_ids that share the same metrics for their calculation.
RELV_STK_ACCRC_PCT
NUMBER This is the accuracy of the physical inventory levels expressed as a percentage, with a distinction between an over- or under-estimation of the actual amount. The formula used is: Relative Stock Accuracy Percentage = (1 - (Book Stock Level Count - Physical Inventory Count) / Book Stock Level Count) * 100 (e.g., if Book Stock Level Count = 100 and Physical Inventory Count = 110 then ABS Stock Accuracy = 110% if Book Stock Level Count = 100 and Physical Inventory Count = 90 then ABS Stock Accuracy = 90%)
REQUIRED_QTY NUMBER(18,3) This is the number of units of material that must be purchased or produced in order to meet short term demand. This measure is available in the Inventory Analysis Catalog, which may be queried and reported on using Cognos Impromptu.
REQUIRED_USG_QTY
NUMBER(18,3) This is the quantity of expected future usage, reflecting either actual requirements, or where these do not exist, the previous year`s same month`s historical usage is used. This measure is available in the Inventory Analysis Catalog, which may be queried and reported on using Cognos Impromptu.
STD_DEV_USG_QTY
NUMBER(18,3) This is the standard deviation of the stock usage quantities for a time period (day, week, or month).
STOCKOUT_CNT NUMBER This is the number of times that a stockout was registered in a time period (day, week, or month). A stockout is registered when somebody requests a stock item and the request cannot be satisfied due to a shortage of stock.
UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "unit of measure" sourced from the Logical Data Model.
USAGE_QTY NUMBER(18,3) This is the actual usage of the stocks in a time period (day, week, or month).
VALUATION_SID INTEGER This is a foreign key to the VALUATION entity that is identified by the relationship name "valuation" sourced from the Logical Data Model.
ZERO_STK_DYS_CNT
NUMBER This is the number of days over which a stock level was zero in a time period (day, week, or month).
ZERO_STOCK_CNT
NUMBER This is the number of times that the stock level dipped to zero time period concerned (day, week, or month).
ZERO_STOCK_CNT_DT
INTEGER This is the date on which the Zero Stock Count field was last updated.
Column name Datatype Description
Derivation or source mapping
Developer Guide 153
Chapter 3: Data Mart Metadata
Stock Usage ForecastTarget table name: STOCK_USAGE_FRCST
Table type: Fact
Description: This table contains the predicted usage quantities (Stock Usage Forecasts) for a material in a given period based on a forecast version. Forecast Versions are used to predict stock usage. Each version may be based on any one of a number of forecasting models supported in the source system. A forecasting model is defined by a set of parameters that is used to calculate the predicted usage quantity. A version thus represents a set of values assigned to the parameters of the model.
Predicted usage quantities are stored in the Stock Usage Forecast entity. Stock Usage refers to the utilization of stock in sales or in production. Transfers between plants, or the removal of stock for quality inspection, reservations, etc. is not considered usage. Predicted usage quantities in the Stock Usage Forecast entity are used to calculate an overall Stock Usage Forecast number in the Stock Overview entity. The overall Stock Usage Forecast number may be based on an average of the predicted usage quantity of multiple versions. The Include in Overview Indicator indicates which versions are to be used in the average. The period over which the forecast is calculated may be a day, a week or a month. The period is defined by the period first day date and the period number.
Column mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
System generated
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
System generated
CRRCTD_FRCST_QTY
NUMBER(13,3) A manually entered value which corrects the system calculated forecast value from a forecast run.
Table: PROWColumn: KOPRW - CORRECTED FORECAST VALUE
FORECAST_MTHD_SID
INTEGER This is a foreign key to the STOCK USAGE FORECAST METHOD entity that is identified by the relationship name "forecast method" sourced from the Logical Data Model.
Table: PROPColumn: PRMOD - FORECAST MODEL
Lookup to STOCK_USG_FRCST_MTHD dimension to retrieve FORECAST_MTHD_SIDwhere PROP.PRMOD = FORECAST_MTHD_CD
FORECAST_PRDC_CD
CHAR(1) This is the periodic code of the forecast (i.e. D = Daily, W = Weekly, M = Monthly).
Table: MAPRColumn: PERKZ - PERIOD INDICATOR
FORECAST_PRD_CNT
NUMBER(3) This is the count of periods included in the forecast.
Table: PROPColumn: ANZPR - NUMBER OF FORECAST PERIODS
154 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
FORECAST_QTY NUMBER(13,3) This is the anticipated usage quantity for a period, pertaining to an instance of a forecast.
Table: PROWColumn: PRWRT - FORECAST VALUE
FORECAST_RUN_DT
INTEGER(8) This is a foreign key to the TIME entity that is identified by the relationship name "stock usage forecast was run at time" sourced from the Logical Data Model.
Table: MAPRColumn: DATUM - DATE AND TIME, CURRENT (APPLICATION SERVER
FORECAST_START_DT
INTEGER(8) This is a foreign key to the TIME entity that is identified by the relationship name "stock usage forecast period starts on time" sourced from the Logical Data Model.
Table: PROPColumn: PRDAT - DATE OF LAST FORECAST
FRCST_FSCL_PRD_SID
INTEGER This is a foreign key to the FISCAL entity that is identified by the relationship name "stock usage forecast made for fiscal" sourced from the Logical Data Model.
Table: PROWColumn: ERTAG
Lookup fiscal period in All Time using PROW.ERTAG and the fiscal variant.
To get the fiscal variant T001.PERIV where MAPR.WERKS = T001W.WERKS ANDT001W.BWKEY = T001K.BWKEY ANDT001K.BUKRS = T001.BUKRS
FRCST_PRD_STRT_DT
INTEGER(8) This is a foreign key to the TIME entity that is identified by the relationship name "stock usage forecast period starts at date in time" sourced from the Logical Data Model.
Table: PROWColumn: ERTAG - FRST DY OF THE PRD TO WHCH THE VALS REFER
MATERIAL_SID INTEGER This is a foreign key to the MATERIAL entity that is identified by the relationship name "material dim" sourced from the Logical Data Model.
Table: MAPRColumn: MATNR, WERKS
Lookup to Material Storage dimension to retrieve Material_Strg_Sid whereMAPR.MATNR = MATERIAL_STORAGE.MATERIAL_ID andMAPR.WERKS = MATERIAL_STORAGE.PLANT_ID
MATERIAL_STRG_SID
INTEGER This is a foreign key to the MATERIAL STORAGE entity that is identified by the relationship name "material storage dim" sourced from the Logical Data Model.
Table: MAPRColumn: MATNR, WERKS
Lookup to Material Storage dimension to retrieve Material_Strg_Sid whereMAPR.MATNR = MATERIAL_STORAGE.MATERIAL_ID andMAPR.WERKS = MATERIAL_STORAGE.PLANT_ID
OFFCL_FRCST_MULT
SMALLINT This multiplier is set to 1 if the forecast instance is considered the "official" forecast to be considered by the application for the purposes of calculating forecast accuracy, overstock and understock. This multiplier is set to 0 if the forecast instance is to be ignored.
Table: PROPColumn: HSNUM - HISTORY NUMBER
IF PROP.HSNUM = '00' then '1' else '0'
****This must be checked each time a forecast is executed as this value changes each time a forecast is run.
Column name Datatype Description Derivation or source mapping
Developer Guide 155
Chapter 3: Data Mart Metadata
Stock Usage Forecast MethodTarget table name: STK_USG_FRCST_MTHD
Table type: Dimension
Description: This table contains details of versions of forecasts used to predict stock usage. Each version may be based on any one of a number of forecasting models supported in the source system. A forecasting model is defined by a set of parameters that is used to calculate the predicted usage quantity. A version thus represents a set of values assigned to the parameters of the model. Predicted usage quantities are stored in the Stock Usage Forecast entity
Stock Usage refers to the utilization of stock in sales or in production. Transfers between plants, or the removal of stock for quality inspection, reservations, etc. is not considered usage. Predicted usage quantities in the Stock Usage Forecast entity are used to calculate an overall Stock Usage Forecast number in the Stock Overview entity. The overall Stock Usage Forecast number may be based on an average of the predicted usage quantity of multiple versions. The Include in Overview Indicator indicates which versions are to be used in the average.
Column mapping
PLANT_SID INTEGER This is a foreign key to the PLANT entity that is identified by the relationship name "plant dim" sourced from the Logical Data Model.
Table: MAPRColumn: WERKS - PLANT
Lookup to PLANT dimension to retrieve PLANT_SID wherePLANT.PLANT_ID = MAPR.WERKS PLANT.STORAGE_LCTN_CD = {Default Short char}
UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "base uom dim" sourced from the Logical Data Model.
Table: MARAColumn: MEINS - BASE UNIT OF MEASURE
Lookup to the UOM dimension to retrieve UOM_SID whereMARA.MEINS = UNIT_OF_MEASURE.UOM_SID
To retrieve MARA.MEINS,Lookup to MARA.MEINS whereMAPR.MATNR = MARA.MATNR
Column name Datatype Description Derivation or source mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
156 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
StockoutTarget table name: STOCKOUT
Table type: Conformed dimension
Description: This table keeps a record of the number of times that a stockout was registered for a material at a plant or storage location in the time period concerned (day, week, or month) A stockout is registered when somebody requests a stock item and the request cannot be satisfied due to a shortage of stock.
Column mapping
FORECAST_METHOD_CD
VARCHAR(10) This is the code representing the forecasting method that was used to calculate predicted usage quantities of the material. Examples of methods used include "moving average", "linear approximation", "regression analysis", etc.
Table: DD07TColumn: DOMVALUE_L-VALUES FOR DOMAINS: SINGLE VALUE/UPPER
Select DOMVALUE_L from DD07Twhere DOMNAME = 'PRMOD'and DDLANGUAGE = Language Parameter
FORECAST_METHOD_NM
VARCHAR(60) This is the textual name that interprets the forecasting method code.
Table: DD07TColumn: DDTEXT
Select DDTEXT from DD07Twhere DOMNAME = 'PRMOD'and DDLANGUAGE = Language Parameter
FORECAST_MTHD_SID
INTEGER This is a data warehouse system generated unique identifier for the forecast version.
The ETL generated unique identifier for the dimension.
FRCST_MTHD_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:FORECAST_METHOD_CD
Column name Datatype Description Derivation or source mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Created by the ETL.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Created by the ETL.
FISCAL_VARIANT_CD
VARCHAR(2) This is the code representing the Fiscal Variant. The Fiscal Variant is used to define the fiscal calendars within an organization. An organization may be composed of multiple companies (e.g., if mergers took place), and may have to deal with multiple fiscal calendars. Each fiscal calendar is represented by a fiscal variant. The fiscal variant thus defines the number of posting periods in a given fiscal year, as well as their start and end dates in terms of the calendar year. The default fiscal variant is defined as the calendar year, which starts on Jan 1st and ends on Dec 31st, and includes 12 periods corresponding to the months, and 4 calendar quarters.
Developer Guide 157
Chapter 3: Data Mart Metadata
Storage BinTarget table name: STORAGE_BIN
Table type: Conformed dimension
Description: This table describes the physical location where the material is stored in a warehouse. In the context of Inventory Analysis, a warehouse is synonymous with a plant.
Column mapping
MATERIAL_ID VARCHAR(18) This is the source system unique identifier of the material.
OVERVIEW_INCLD_DT
INTEGER This is the date on which this record was included in the calculation of Stockout Count in the Stock Overview entity.
PLANT_ID VARCHAR(4) This is the source system unique Identifier of the plant where the stockout occurred.
STOCKOUT_CNT INTEGER This is the number of times that a stockout was registered in the time period concerned (day, week, or month). A stockout is registered when somebody requests a stock item and the request cannot be satisfied due to a shortage of stock.
STOCKOUT_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:PLANT_IDSTORAGE_LCTN_CDMATERIAL_IDVALUATION_AREA_CDVALUATION_TYPE_CDSTOCKOUT_DT
STOCKOUT_DT INTEGER This is the date when the stockout occurred.
STOCKOUT_SID INTEGER ETL generated unique identifier for a row in the Stockout fact.
STORAGE_LCTN_CD
VARCHAR(20) This is the identifier of the storage location where the stockout occurred. A plant may have a number of storage locations.
Column name Datatype Description Derivation or source mapping
Column name Datatype Description Derivation or source mapping
BIN_LOAD_CAP_NO
NUMBER(11,3) This is the load capacity for the storage bin. SAP short text: Load capacity of storage bin
Pass 1LAGP.LGEWI
Pass 2default short char
Pass 3default short char
BIN_LOAD_UOM_CD
VARCHAR(3) This is a code representing the unit of weight used if the capacities specified represent mass.
SAP short text: Weight Unit
Pass 1LAGP.GEWEI
Pass 2default short char
Pass 3default short char
158 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
BIN_QUANTS_MAX_QTY
NUMBER(7,0) This is the maximum number of quants that may be stored in the storage bin. This field is used during stock placement strategy whereby, depending on the bin sectioning, different numbers of storage units can fit into the bin.
SAP short text: Maximum number of quants in storage binPass 1LAGP.MAXQU
Pass 2set to 0
Pass 3set to 0
BIN_QUANTS_QTY
NUMBER(7,0) This is the number of quants in a storage bin. This number is automatically filled by the system during stock placements and stock removals.
SAP short text: Number of quants in storage binPass 1LAGP.ANZQU
Pass 2set to 0
Pass 3set to 0
BIN_SECTION_ID CHAR(1) This is the identifier for the Bin Sectioning. In stock placement strategies, this decides which storage unit types and how many storage units of each type can be placed into storage. The sectioning is determined dynamically in the storage bin by the first storage unit placed in the bin. The sectioning is deleted as soon as the last unit has been removed from the bin.
Pass 1LAGP.PLAUF
Pass 2default short char
Pass 3default short char
BIN_SORT_FIELD_TXT
VARCHAR(9) This is the sort order of the bins. It is used by the system for sorting empty bins. By automatically setting an entry in the field when the storage bins are created, the system ensures that materials are placed into stock in the warehouse in a different manner. For example, the warehouse is not filled aisle by aisle, but evenly from front to back.
Pass 1LAGP.SORLP
Pass 2default short char
Pass 3default short char
BIN_TOTAL_CAP_QTY
NUMBER(11,3) This is the total capacity of the storage bin. This value must correspond to the capacity usage values that can be defined in the material master or for the storage unit type.
SAP short text: Total capacity of storage binPass 1LAGP.LKAPV
Pass 2set to 0
Pass 3set to 0
BIN_TYPE_CD VARCHAR(2) This is a code representing the classification of storage bins according to physical characteristics, e.g.; high bin, liquid storage bin, etc.
SAP short text: Storage bin type
Pass 1LAGP.LPTYP
Pass 2default short char
Pass 3default short char
Column name Datatype Description Derivation or source mapping
Developer Guide 159
Chapter 3: Data Mart Metadata
BIN_TYPE_DSC VARCHAR(20) This is a textual description representing the classification of storage bins according to physical characteristics, e.g.; high bin, liquid storage bin, etc.
SAP short text: Description of storage bin typePass 1 Lookup T303T.PTYPT where T303T.LGNUM = LAGP.LGNUM and T303T.LPTYP = LAGP.LPTYP and T303T.SPRAS = LanguageParameter
Pass 2default short char
Pass 3default short char
BIN_UNIT_MAX_QTY
NUMBER(5,0) This is the maximum number of storage units in storage bin.
SAP short text: Maximum number of storage units in storage binPass 1LAGP.MAXLE
Pass 2set to 0
Pass 3set to 0
BIN_UNIT_QTY NUMBER(9,3) This is the current number of storage units in the storage bin. This value is updated during stock placements and removals.
SAP short text: Number of storage units in storage binPass 1LAGP.ANZLE
Pass 2set to 0
Pass 3set to 0
BLOCK_IND CHAR(1) This is an indicator of whether the storage bin is blocked for any reason.
Pass 1If any of the following fields have a value of 'X'LAGP.SKZUA (Blocking indicator: for stock removals (user)) LAGP.SKZUE (Blocking indicator: for putaways (user)) LAGP.SKZSA (Blocking indicator: current stock removal (system)) LAGP.SKZSE (Blocking indicator: current stock placement (system)) LAGP.SKZSI (Blocking indicator: current inventory (system))then set the indicator to 'Y'else set the indicator to 'N'
Pass 2set to default short char
Pass 3set to default short char
BLOCK_REASON_CD
CHAR(1) This is the code representing why the stock is being blocked from using this storage bin.
SAP short text: Blocking reason
Pass 1LAGP.SPGRU
Pass 2default short char
Pass 3default short char
Column name Datatype Description Derivation or source mapping
160 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
BLOCK_REASON_DSC
VARCHAR(20) This is the textual description representing why the stock is being blocked from using this storage bin.
SAP short text: Text for blocking reasonPass 1Lookup T330T.SPGTX where T330T.LGNUM = LAGP.LGNUM and T330T.SPGRU = LAGP.SPGRU and T330T.SPRAS = LanguageParameter
Pass 2default short char
Pass 3default short char
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Created by the ETL.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
Created by the ETL.
DYNAMIC_BIN_IND
CHAR(1) This is an indicator of whether the bin is dynamically allocated or not.
Pass 1IF LAGP.KZDYN = X then SET DYNAMIC_BIN_IND = 'Y' ELSE SET DYNAMIC_BIN_IND = 'N'
Pass 2set to default short char
Pass 3set to default short char
INVENTORY_PREP_IND
CHAR(1) This is an indicator of whether a storage bin has been recorded in system inventory as being counted. An "x" in this field indicates that the storage bin is recorded in a system inventory for the purpose of being counted. This prevents a storage bin from being recorded in two different inventory records at the same time. This indicator is automatically set during the physical inventory process.
SAP short text: Inventory in preparationPass 1IF LAGP.IVIVO = X then SET INVENTORY_PREP_IND = 'Y' ELSE SET INVENTORY_PREP_IND = 'N'
Pass 2set to default short char
Pass 3set to default short char
INV_MTHD_CD VARCHAR(2) Represents the type of physical inventory count to be used, or has already been taken. Possible values include a "PE" which represents "continuous inventory upon placement into stock or "ST" represents "annual inventory", etc.
SAP short text: Inventory method
Pass 1LAGP.KZINV
Pass 2default short char
Pass 3default short char
Column name Datatype Description Derivation or source mapping
Developer Guide 161
Chapter 3: Data Mart Metadata
INV_MTHD_DSC VARCHAR(60) Description of the type of physical inventory count to be used, or has already been taken. Possible values include "continuous inventory upon placement into stock" (PE) or "annual inventory" (ST), etc.
Pass 1DD07T.DDTEXT where DOMNAME = 'LVS_KZINV' and DOMVALUE_L = LAGP.KZINV and DDLANGUAGE = LanguageParameter
Pass 2default short char
Pass 3default short char
STORAGE_BIN_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:WAREHOUSE_NOSTORAGE_TYPE_CDSTORAGE_BIN_ID
STORAGE_BIN_ID
VARCHAR(10) This is a source system identifier of a storage bin.
Pass 1LAGP.LGPLA
Pass 2default short char
Pass 3default short char
STORAGE_BIN_SID
INTEGER This is a data warehouse system generated unique identifier for the storage bin.
System generated unique id.
STORAGE_SECTION_ID
VARCHAR(3) This is a source system identifier representing the storage sections that divide up a warehouse.
Pass 1LAGP.LGBER
Pass 2default short char
Pass 3default short char
STORAGE_SECTION_NM
VARCHAR(25) This is the textual description representing the storage sections that divide up a warehouse.
SAP short text: Name of storage areaPass 1Lookup T302T.LBERT where T302T.LGNUM = LAGP.LGNUM and T302T.LGTYP = LAGP.LGTYP and T302T.LGBER = LAGP.LGBER and SPRAS = LanguageParameter
Pass 2default short char
Pass 3default short char
STORAGE_TYPE_CD
VARCHAR(3) This is a code representing the subdivision of storage bins into groups, for example, large bin, small bins.
Pass 1LAGP.LGTYP
Pass 2T301.LGTYP
Pass 3default short char
Column name Datatype Description Derivation or source mapping
162 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Unit of MeasureTarget table name: UNIT_OF_MEASURE
Table type: Conformed dimension
Description: The Unit of Measure dimension contains a list of the units of measure in which the quantifying measures in the data warehouse are held.
STORAGE_TYPE_DSC
VARCHAR(25) This is textual description representing the subdivision of storage bins into groups, for example, large bin, small bins.
SAP short text: Name of storage typePass 1T301T.LTYPT where T301T.LGNUM = LAGP.LGNUM and T301T.LGTYP = LAGP.LGTYP and T301T.SPRAS = LanguageParmeter
Pass 2T301T.LTYPT where T301T.LGNUM = T301.LGNUM and T301T.LGTYP = T301.LGTYP and T301T.SPRAS = LanguageParmeter
Pass 3default short char
WAREHOUSE_NM
VARCHAR(25) This is the textual description that represents a complex, physical warehouse structure within the Warehouse Management System.
SAP short text: Warehouse number descriptionPass 1 Lookup T300T.LNUMT where T300T.LGNUM = LAGP.LGNUM and T300T.SPRAS = LanguageParameter
Pass 2Lookup T300T.LNUMT where T300T.LGNUM = T301.LGNUM and T300T.SPRAS = LanguageParameter
Pass 3Lookup T300T.LNUMT where T300T.LGNUM = T300.LGNUM and T300T.SPRAS = LanguageParameter
WAREHOUSE_NO
VARCHAR(3) This is the source system identifier that represents a complex, physical warehouse structure within the Warehouse Management System. All activities within a warehouse, for example, goods movement and physical inventory, are assigned to a specific warehouse number. The physical warehouse, where these activities take place, is identified by a warehouse number.
Pass 1LAGP.LGNUM
Pass 2T301.LGNUM
Pass 3T300.LGNUM
Column name Datatype Description Derivation or source mapping
Developer Guide 163
Chapter 3: Data Mart Metadata
Column mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. Changed_Dt is set to Created_Dt on creation of the row.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
EXTERNAL_UOM_DSC
VARCHAR(3) The language dependant textual value displayed by the source system in place of a standard code used by the source system for a unit of measure.
Table: T006A - ASSIGN INTERNAL TO LANGUAGE-DEPENDENT UNITColumn: MSEH3 - EXTERNAL UNIT OF MEASUREMENT COMMERCIAL FO
Select T006A.MSEH3from T006A, T006where T006A.SPRAS = E (language)and T006A.MSEHI = T006.MSEHI
ISO_UOM_CD VARCHAR(3) This is the International Standards Organization's (ISO) code for this unit of measure.
Table: T006Column: ISOCODE
ISO_UOM_DSC VARCHAR(25) This is the International Standards Organization's (ISO) name for this unit of measure.
Table: T006J, T006Column: ISOTXT
Select T006J. ISOTXTfrom T006J, T006Where T006J.ISOCODE = T006.ISOCODEand T006J.LANGU = LanguageParameter
UNIT_OF_MEASURE_CD
VARCHAR(3) This is an unique code that identifies the unit of measure in the source system.
Table: T006Column: MSEHI
UOM_DIM_CD VARCHAR(6) This is the coded value of type of measurement (i.e.; volume, weight, or length) that is being represented by a unit of measure.
Table: T006Column: DIMID
UOM_DIM_DSC VARCHAR(20) This is the textual description of the type of measurement (i.e.; volume, weight or length) for a unit of measure.
Table: T006T, T006Column: TXDIM
Select T006T.TXDIMfrom T006T, T006where T006T.DIMID = T006.DIMIDand SPRAS = LanguageParameter
UOM_DIM_ID VARCHAR(150) This is the primary key for this entity. This key is composed of:UNIT_OF_MEASURE_CD
UOM_DSC VARCHAR(10) This is the textual description of the unit of measure.
Table: T006A, T006Column: MSEHT
Select T006A.MSEHTfrom T006A, T006where T006.SPRAS = E (language)and T006A.MSEHI = T006.MSEHI
UOM_SID INTEGER This is a data warehouse system generated unique identifier for the unit of measure.
System generated unique id.
164 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
Unit of Measure ConversionTarget table name: UOM_CONVERSION
Table type: Conformed dimension
Description: This table allows the conversion of one Unit of Measure into another.
Column mapping
Column name Datatype Description Derivation or source mapping
BASE_UOM_CD VARCHAR(3) This is the code representing the base unit of measure used to "triangulate" conversions that are not supported directly. For example, a conversion is required from centimeters to feet, but the conversion is not directly supported in the source system. However, a conversion from meters to feet is supported, and so is one from centimeters to meters. Choosing meters as the base unit of measure, the two conversion factors are multiplied to provide a conversion factor that allows a direct conversion from centimeters to feet.
Table: T006-UNITS OF MEASUREMENT, T006D-DIMENSIONSColumn: MSEHI
select T006.MSEHIfrom T006, T006D where T006.DIMID = T006D.DIMID and T006.MSEHI = T006D.MSSIE
T006-Unit Of MeasureT006D-DimensionsT006.MSEHI -Unit of Measure -Char(3)T006D.MSSIE -SI unit - Char(3)T006D.DIMID -Dimension key - Char(6)
BASE_UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "base UOM" sourced from the Logical Data Model.
Table: UNIT_OF_MEASUREColumn: UOM_SID
Perform a lookup on the Unit_Of_Measure table using the BASE_UOM_CD to get the UOM_SID to populate this field.
BUOM_SI_CNSTNT_VAL
NUMBER(9,6) This is the constant value used when converting temperatures to the international systems (SI) unit Kelvin. The SI unit is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: ADDKO-ADDITIVE CONSTANT FOR CONVERSION TO SI UNIT
T006.ADDKO where T006.DIMID = T006D.DIMID andT006.MSEHI = T006D.MSSIE
T006-UNITS OF MEASUREMENTT006D-DimensionsT006.DIMID -Dimension key - Char(6)T006D.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)T006D.MSSIE - SI unit - Char(3)
BUOM_SI_DNMNTR_VAL
NUMBER(10,0) This is the conversion factor for the denominator to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: NENNR-DENOMINATOR FOR CONVERSION INTO SI UNIT
T006.NENNR where T006.DIMID = T006D.DIMID andT006.MSEHI = T006D.MSSIE
T006-UNITS OF MEASUREMENTT006D-DimensionsT006.DIMID -Dimension key - Char(6)T006D.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)T006D.MSSIE - SI unit - Char(3)
Developer Guide 165
Chapter 3: Data Mart Metadata
BUOM_SI_EXPNTN_VAL
NUMBER(5,0) This is the conversion factor for the base 10 exponent, to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: EXP10-BASE TEN EXPONENT FOR CONVERSION TO SI UNIT
T006.EXP10 where T006.DIMID = T006D.DIMID andT006.MSEHI = T006D.MSSIE
T006-UNITS OF MEASUREMENTT006D-DimensionsT006.DIMID -Dimension key - Char(6)T006D.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)T006D.MSSIE - SI unit - Char(3)
BUOM_SI_NMRTR_VAL
NUMBER(10,0) This is the conversion factor for the numerator to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: ZAEHL-NUMERATOR FOR CONVERSION TO SI UNIT
T006.ZAEHL where T006.DIMID = T006D.DIMID andT006.MSEHI = T006D.MSSIE
T006-UNITS OF MEASUREMENTT006D-DimensionsT006.DIMID -Dimension key - Char(6)T006D.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)T006D.MSSIE - SI unit - Char(3)
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL derived. Changed_Dt is set to Created_Dt on insert of row.
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL derived.
DIMENSION_CD VARCHAR(6) This is a code representing the dimension being measured using the UOM table. For example V = volume, W = mass, L = length, etc.
Table: T006-UNITS OF MEASUREMENTColumn: DIMID-DIMENSION KEY
DIMENSION_TXT VARCHAR(20) This is a textual description representing the dimension being measured using the UOM table. For example volume, mass, length, temperature etc.
Table: T006T-DIMENSION TEXTColumn: TXTDIM-DIMENSION TEXT
Filter by SPRAS (language code). Join to this table using the DIMENSION_KEY_CD (DIMID).
FROM_UOM_CD VARCHAR(3) This is the code representing the unit of measure being converted from.
Table: T006-UNITS OF MEASUREMENTColumn: MSEHI-UNIT OF MEASUREMENT
FROM_UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "from UOM" sourced from the Logical Data Model.
Table: UNIT_OF_MEASUREColumn: UOM_SID
Perform a lookup on the Unit_Of_Measure table using the FROM_UOM_CD to get the UOM_SID to populate this field.
Column name Datatype Description Derivation or source mapping
166 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
FUOM_SI_CNSTNT_VAL
NUMBER(9,6) This is the conversion factor for the temperature constant, to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: ADDKO-ADDITIVE CONSTANT FOR CONVERSION TO SI UNIT
T006.ADDKO from t1 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)
FUOM_SI_DNMNTR_VAL
NUMBER(10,0) This is the conversion factor for the denominator to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: NENNR-DENOMINATOR FOR CONVERSION INTO SI UNIT
T006.NENNR from t1 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)
FUOM_SI_EXPNTN_VAL
NUMBER(5,0) This is the conversion factor for the base 10 exponent, to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: EXP10-BASE TEN EXPONENT FOR CONVERSION TO SI UNIT
T006.EXP10 from t1 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)
FUOM_SI_NMRTR_VAL
NUMBER(10,0) This is the conversion factor for the numerator to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: ZAEHL-NUMERATOR FOR CONVERSION TO SI UNIT
T006.ZAEHL from t1 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.MSEHI - Unit of Measurement - Char(3)T006.DIMID - Dimension Key - Char(6)
TO_UOM_CD VARCHAR(3) This is the code representing the unit of measure being converted to.
Table: T006-UNITS OF MEASUREMENTColumn: MSEHI - UNIT OF MEASUREMENT
TO_UOM_SID INTEGER This is a foreign key to the UNIT OF MEASURE entity that is identified by the relationship name "to UOM" sourced from the Logical Data Model.
Table: UNIT_OF_MEASUREColumn: UOM_SID
Perform a lookup on the Unit_Of_Measure table using the TO_UOM_CD to get the UOM_SID to populate this field.
TUOM_SI_CNSTNT_VAL
NUMBER(9,6) This is the conversion factor for the temperature constant, to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: ADDKO-ADDITIVE CONSTANT FOR CONVERSION TO SI UNIT
T006.ADDKO from t2 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)
Column name Datatype Description Derivation or source mapping
Developer Guide 167
Chapter 3: Data Mart Metadata
ValuationTarget table name: VALUATION
Table type: Dimension
Description: This table contains information on the financial value of inventory. The "value of inventory" (valuation) is an important measure - not just for accounting purposes, but because unlike the measure "stock quantity," it can be rolled up across materials. If an inventory has 5 liters of paint, 1000 washers and 10000 split pins, it does not make much sense to say that there are 11005 items of inventory. If paint is valued at $20 a liter, washers at $0.01 each and split pins at $10 for a box of 1000, it does make sense to say that the overall value of inventory is $210.
Unlike most other areas where transaction values are summed up to get overall values (e.g. Account Balance is the cumulative sum of transactions), the current value of stock is not defined from the sum of goods movement transactions. In the previous example, a drastic reduction in the price of paint prompted the inventory manager to buy another 5 liters for $5 a liter. If the transactions were summed up to get the current value, one would get a stock value of $235 ($210 + $25). This is not a true representation of the stock value as the drop in the price of paint has lowered the value of the existing inventory to $160 (based on an unit value of $5 a liter).
TUOM_SI_DNMNTR_VAL
NUMBER(10,0) This is the conversion factor for the denominator to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: NENNR-DENOMINATOR FOR CONVERSION INTO SI UNIT
T006.NENNR from t2 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)
TUOM_SI_EXPNTN_VAL
NUMBER(5,0) This is the conversion factor for the base 10 exponent, to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: EXP10-BASE TEN EXPONENT FOR CONVERSION TO SI UNIT
T006.EXP10 from t2 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)
TUOM_SI_NMRTR_VAL
NUMBER(10,0) This is the conversion factor for the numerator to SI unit. SI unit represents SYSTEME INTERNATIONAL unit and is the basis for conversion from one unit of measurement to another. Basic equation: Measurement unit = (Numerator /Denominator) x SI unit. Complete equation: Measurement unit = (Numerator /Denominator * 10**Exponent + Constant (temperature only)) * SI unit.
Table: T006-UNITS OF MEASUREMENTColumn: ZAEHL-NUMERATOR FOR CONVERSION TO SI UNIT
T006.ZAEHL from t2 where T006.MSEHI t1!= T006.MSEHI t2 and T006.DIMID t1 = T006.DIMID t2
T006-UNITS OF MEASUREMENTT006.DIMID -Dimension key - Char(6)T006.MSEHI -Unit of measurement - Char(3)
UOM_CONV_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:FROM_UOM_CDTO_UOM_CD
Column name Datatype Description Derivation or source mapping
168 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
The current value of each material is based on the valuation area and valuation type. The valuation area is a grouping of plants for valuation purposes. The valuation type is used to handle split valuation of materials. Materials with the same material number may be valued differently. For example, if one has new and refurbished motors in stock (both types of motors have the same material number), the new motors may be valued at $500 each while the refurbished ones are valued at $350 if they are assigned to different valuation types.
Column mapping
Column name Datatype Description Derivation or source mapping
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated
MATERIAL_ID VARCHAR(18) This is the source system unique identifier of the material being valuated.
Table: MBEWColumn: MATNR-MATERIAL NUMBER
NK1SAP short text: Material number
PRICE_CONTROL_CD
CHAR(1) This is a code representing which price control to use in valuating stock of a material. Some values include "Standard Price", "Moving Average Price", or "Periodic Unit Price".
Table: MBEWColumn: VPRSV-PRICE CONTROL INDICATOR
SAP short text:
PRICE_CONTROL_DSC
VARCHAR(60) This is a textual description representing which price control to use in valuating stock of a material. Some values include "Standard Price", "Moving Average Price", or "Periodic Unit Price".
Table: DD07TColumn: DDTEXT-SHORT TEXT FOR FIXED VALUES
Lookup DD07T.DDTEXT where DD07T.DDLANGUAGE = LanguageParameter and DD07T.DOMNAME = 'VPRSV' and DD07T.DOMVALUE_L = MBEW.VPRSV
VALUATION_AREA_CD
VARCHAR(4) This is the code representing the organizational grouping to which the plant belongs for material valuation purposes. A valuation area may be a single plant, or all plants belonging to a company.
Table: MBEWColumn: BWKEY-VALUATION AREA
NK2SAP short text: Valuation area
VALUATION_DIM_ID
VARCHAR(150) This is the primary key for this entity. This key is composed of:MATERIAL_IDVALUATION_AREA_CDVALUATION_TYPE_CD
VALUATION_SID INTEGER This is a data warehouse system generated unique identifier for the valuation.
System generated unique identifier.
Developer Guide 169
Chapter 3: Data Mart Metadata
VendorTarget table name: VENDOR
Table type: Conformed dimension
Description: This is a supplier of materials and/or services to an organization. In Accounts Payable, the vendor represents an entity that a payment may be made to including expense payments to employees.
Column mapping
VALUATION_TYPE_CD
VARCHAR(10) This is the code representing the stocks of a material subject to split valuation. The valuation category determines which valuation types are permissible for a material. If a material is valuated according to its origin (valuation category H in SAP), you can define the possible countries of origin as valuation types.
Table: MBEWColumn: BWTAR-VALUATION TYPE
NK3SAP short text: Valuation type
VLTN_UPRC_AMT
NUMBER(18,7) This is the unit price of the material in Local Currency.
Table: SEE SOURCE LOGIC MAPPINGColumn: SEE SOURCE LOGIC MAPPING
If MBEW.VPRSV = 'S', then MBEW.STPRS / MBEW.PEINH (standard pricing)else MBEW.VERPR / MBEW.PEINH.Note: (If MBEW.PEINH = 0, divide by 1).MBEW.VPRSV CHAR(1)MBEW.STPRS (standard pricing) NUMBER(11,2)MBEW.VERPR NUMBER(11,2)MBEW.PEINH NUMBER(5,0)
Column name Datatype Description Derivation or source mapping
Column name Datatype Description Derivation or source mapping
ABC_CD CHAR(1) This is the code representing the classification of a material as an A (important - high consumption), B (less important - medium consumption), or C (relatively unimportant, low consumption) part. "A" vendors are those responsible for your companies greatest expenditure. This classification process is known as the Activity Based Cost analysis.
Table: LFM1-VENDOR MASTER RECORD PURCHASING ORGANIZATIONColumn: LFABC-ABC INDICATOR
CHANGED_DT DATE This represents the date and time of update of the warehouse record. This field is populated for records that have been updated since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated. Changed_dt is set to Created_dt on insert of row.
CITY_NM VARCHAR(35) This is the textual description of the city where the vendor is located.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: ORT01-CITY
COMPANY_CD VARCHAR(4) This is the code representing the company, an organizational unit used for the purposes of external accounting.
Table: LFB1-VENDOR MASTER (COMPANY CODE)Column: BUKRS
COUNTRY_CD VARCHAR(3) This is the code representing the country where the vendor is located.
Table: LFA1-VENDOR MASTERColumn: LAND1-COUNTRY KEY
170 Cognos Analytic Applications Inventory Analysis for SAP(R)
Chapter 3: Data Mart Metadata
COUNTRY_NM VARCHAR(15) This is the textual description of the country where the vendor is located.
Table: T005T-COUNTRY NAMESColumn: LANDX-COUNTRY NAME
Lookup to T005T using Country Code equal to LAND1 and filtering by SPRAS (language parameter).
CREATED_DT DATE This represents the date and time of creation of the warehouse record. This field is populated for newly inserted records since the last extract. The time of extract (the system date and time at which the extract from the source system was started) is stored in this field. This field is populated by the ETL program.
ETL generated.
DISTRICT_NM VARCHAR(35) This is the name of the district where the vendor is located. It is appended to the city for providing further address detail.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: ORT02-DISTRICT
HOLD_PAYMENT_IND
CHAR(1) An indicator that specifies that vouchers/invoices are to be held for payment for this vendor.
Table: LFB1-VENDOR MASTER (COMPANY CODE)Column: ZAHLS-BLOCK KEY FOR PAYMENT
If ZAHLS is set to ’A’ then set to ’Y’else set to ’N’
Future enhancement (If more information is required on the type of hold):lookup to T008 where ZAHLS = ’A’
If Char1 is set then Indicator: Change in Payment Proposal Permitted?if XOZP is set then Indicator: Blocked for manual paymentsIf XNCHG is set then Payment block, not changeable
INDUSTRY_CD VARCHAR(4) This is the code representing the industry that the vendor belongs to. Examples include trade, banking, manufacturing, health care, media, etc.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: BRSCH-INDUSTRY KEY
INDUSTRY_DSC VARCHAR(20) This is the textual description of the industry that the vendor belongs to. Examples include trade, banking, manufacturing, health care, media, etc.
Table: T016T-INDUSTRY NAMESColumn: BRTXT-DESCRIPTION OF THE INDUSTRY KEY
Lookup to T016T using Industry Code equal to BRSCH and filtering by SPRAS (language parameter).
PLAN_GROUP_CD
VARCHAR(10) This is the code representing the classification of Vendors (and customers) according to accounting rules, domestic, foreign, high risk.
Table: LFB1-VENDOR MASTER (COMPANY CODE)Column: FDGRV-PLANNING GROUP
PLAN_GROUP_NM
VARCHAR(30) This is the textual description of the classification of Vendors (and customers) according to accounting rules, domestic, foreign, high risk.
Table: T035T-PLANNING GROUP TEXTSColumn: TEXTL-DESCRIPTION
Lookup on T035T using the Plan Group Code equal to the GRUPP field and filtering by SPRAS (language code)
POSTAL_CD VARCHAR(10) This is the postal code associated with the address of the vendor.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: PSTLZ-POSTAL CODE
PURCHASE_ORG_CD
VARCHAR(4) This is the code representing the purchasing organization with which this vendor is associated.
Table: LFM1-VENDOR MASTER RECORD PURCHASING ORGANIZATIONColumn: EKORG-PURCHASING ORGANIZATION
Column name Datatype Description Derivation or source mapping
Developer Guide 171
Chapter 3: Data Mart Metadata
REGION_CD VARCHAR(3) This is the code representing the region where the vendor is located. The relevant meaning depends on the country. In the USA the region would represent the state, in Canada the province, in Switzerland the canton, in UK the county, etc.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: REGIO-REGION (STATE, PROVINCE, COUNTY)
REGION_NM VARCHAR(20) This is the textual description of the region where the vendor is located. The relevant meaning depends on the country. In the USA the region would represent the state, in Canada the province, in Switzerland the canton, in UK the county, etc.
Table: T005U-TAXES: REGION KEY: TEXTSColumn: BEZEI-DESCRIPTION
SELECT DISTINCT NULLIF("BLAND",’’) REGION_CD, NULLIF("BEZEI",’’) REGION_NM
FROM "T005U", "LFA1"WHERE "T005U"."SPRAS" =’EN’ AND"T005U"."LAND1" = "LFA1"."LAND1"AND "LFA1"."REGIO" = "T005U"."BLAND"
VENDOR_ACCOUNT_NO
VARCHAR(10) This is the source system account number of the vendor (creditor).
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: LIFNR-ACCOUNT NUMBER OF VENDOR OR CREDITOR
VENDOR_DIM_ID VARCHAR(150) This is the primary key for this entity. This key is composed of:VENDOR_ACCOUNT_NOCOMPANY_CDPURCHASE_ORG_CD
VENDOR_LEVEL1_NM to VENDOR_LEVEL4_NM
VARCHAR(35) This is the name of the level 1 to 5 parent of a Vendor. Vendors are part of a hierarchy, where Vendors can belong to various levels in this hierarchy. This attribute identifies the highest level Vendor in the hierarchy related to this Vendor. If the Vendor itself belongs to this level, the levels below it will be null or have the Vendor’s name repeated in them.
Table: VENDORHIERARCHYColumn: LEVEL1_VENDOR_NM to LEVEL4_VENDOR_NM
VENDOR_NM VARCHAR(35) This is the name of the vendor. Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: NAME1-NAME 1
VENDOR_SHORT_NM
VARCHAR(10) This is the short or "significant" name of the vendor and is used for searches.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: SORTL-SORT FIELD
VENDOR_SID INTEGER This is a data warehouse system generated unique identifier for the vendor.
System generated unique identifier.
VENDOR_TYPE_CD
VARCHAR(4) A code that classifies the vendor as an Employee, Plant, Supplier, etc.
Table: LFA1-VENDOR MASTER (GENERAL SECTION)Column: KTOKK-VENDOR ACCOUNT GROUP
VENDOR_TYPE_DSC
VARCHAR(30) A textual description of the vendor type code.
Table: T077Y-ACCOUNT GROUP NAMESColumn: TXT30-ACCOUNT GROUP NAME
Lookup on T077Y using the Vendor Type Cd (KTOKK from LFA1) and SPRAS equal to language parameter.
VNDR_HIER_LEVEL_NO
SMALLINT This is the level number of the Vendor in the hierarchy. For example, if the Vendor is at level three of the hierarchy, the Vendor has a parent (in level 2) and a grandparent (in level 1). Level four is unused (the Vendor may be repeated in level four, or it may be left as null).
Table: VENDORHIERARCHYColumn: HIERARCHY_LEVEL_NO
Column name Datatype Description Derivation or source mapping
172 Cognos Analytic Applications Inventory Analysis for SAP(R)
Index
Bbuild logic
dimensions, 7facts, 7
Build Relationships, 8builds
descriptions, 7-8
Ccopyright, 2
Ddocument
version, 2
Eentity relationship diagrams
All Dimensions, 83-84Material Movement, 78Material Reservation, 80Physical Inventory, 79Stock Overview, 81Stock Usage Forecast, 82
JJobStream details
All Time, 9Batch, 13Business Area, 16Customer, 18Financial Currency Conversion, 24Material, 28Material Movement Activity, 31Material Movement Document Class, 34Material Reservation, 37Material Storage, 40Physical Inventory, 42Plant, 44Re-Ranking, 48Stock Class, 50Stock Overview, 54Stock Usage Forecast, 62Stock Usage Forecast Method, 64Storage Bin, 66Unit of Measure, 68Valuation, 71Vendor, 73
JobStreamsdescriptions, 7-8
Mmetadata tables
All Time, 85
metadata tables (cont'd)Batch, 89Business Area, 92Customer, 93Financial Currency Conversion, 101Material, 103Material Movement Detail, 108Material Movement Document, 114Material Movement Document Class, 116Material Reservation Detail, 120Material Reservation Document, 124Material Storage, 126Physical Inventory Detail, 129Physical Inventory Document, 133Plant, 134Stock Class, 138Stock Opening Balance, 140Stock Overview, 148Stock Usage Forecast, 154Stock Usage Forecast Method, 156Stockout, 157Storage Bin, 158Unit of Measure, 163Unit of Measure Conversion, 165Valuation, 168Vendor, 170
Pproduct
version, 2
Vversion
product, 2
Developer Guide 173
Index
174 Cognos Analytic Applications Inventory Analysis for SAP(R)