Professional Documents
Culture Documents
INTELLIGENCE
C 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
INVENTORY ANALYSIS FOR SAP
( R)
DEVELOPER GUIDE
Developer Guide
T H E N EX T L EVE L
TM
O F PER FO R M A N C E
Product Information
This 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).
Copyright
Copyright (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 7
Dimensions 7
Facts 7
Build Relationships 8
JobStream Descriptions 9
All Time 9
Batch 13
Business Area 16
Customer 18
Financial Currency Conversion 24
Material 28
Material Movement Activity 31
Material Movement Document Class 34
Material Reservation 37
Material Storage 40
Physical Inventory 42
Plant 44
Re-Ranking 48
Stock Class 50
Stock Overview 54
Stock Usage Forecast 62
Stock Usage Forecast Method 64
Storage Bin 66
Unit of Measure 68
Valuation 71
Vendor 73
Chapter 2: Entity Relationship Diagrams 77
Material Movement 78
Physical Inventory 79
Material Reservation 80
Stock Overview 81
Stock Usage Forecast 82
All Dimensions (I) 83
All Dimensions (II) 84
Chapter 3: Data Mart Metadata 85
All Time 85
Batch 89
Business Area 92
Customer 93
Financial Currency Conversion 101
Material 103
Material Movement Detail 108
Material Movement Document 114
Material Movement Document Class 116
Material Reservation Detail 120
Material Reservation Document 124
Material Storage 126
Developer Guide 3
Physical Inventory Detail 129
Physical Inventory Document 133
Plant 134
Stock Class 138
Stock Opening Balance 140
Stock Overview 148
Stock Usage Forecast 154
Stock Usage Forecast Method 156
Stockout 157
Storage Bin 158
Unit of Measure 163
Unit of Measure Conversion 165
Valuation 168
Vendor 170
Index 173
Other Information
Our 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.
Topic Location
How to install and configure Cognos Installation Guide
Analytic Applications.
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).
Developer Guide 5
Welcome
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.
Dimensions
A 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.
Facts
There 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 Relationships
The 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.
FINANCIAL_CURRENCY FINANCIAL_CURRENCY_B_01
FINANCIAL_CURRENCY_B_02
FINANCIAL_CURRENCY_B_03
FINANCIAL_CURRENCY_B_04
FINANCIAL_CURRENCY_B_05
FINANCIAL_CURRENCY_B_06
MATERIAL MATERIAL_B_01 MATERIAL_D_03
MATERIAL_B_02
MATERIAL_MOVEMENT_ACTIVITY MTRL_MVMNT_DTL_DOC_B_02
MTRL_MVMNT_DTL_DOC_INS_B_01
MTRL_MVMNT_DTL_DOC_UPDINS_B_01
MATERIAL_MOVEMENT_DOCUMENT_CLASS MOVEMENT_DOC_CLSS_B_01
MOVEMENT_DOC_CLSS_B_02
MOVEMENT_DOC_CLSS_B_03
MATERIAL_RESERVATION MTRL_RSRVTN_DTL_DOC_B_01
MTRL_RSRVTN_DTL_DOC_B_02
PHYSICAL_INVENTORY PHYSICAL_INV_DTL_DOC_B_01
PHYSICAL_INV_DTL_DOC_B_02
RE-RANKING
STOCK_CLASS STOCK_CLASS_B_01
STOCK_CLASS_B_02
STOCK_OVERVIEW RANKING_TABLE_B
STOCKOUT_B_01
STOCK_OPENING_BAL_B
STOCK_OVERVIEW_B
STOCK_USAGE_FORECAST STOCK_USAGE_FRCST_B_01
STOCK_USAGE_FRCST_B_02
JobStream Descriptions
This section describes each JobStream in detail.
All Time
Description
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 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.
Developer Guide 9
Chapter 1: JobStream and Build Descriptions
Dependencies
None.
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_DATE
This 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_Date
To 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).
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_DEPENDANT
T009,T009B_NON_YEAR_DEPENDANT
T009_CALENDAR_DEPENDANT
• Input Properties: allow duplicate keys
• Extracts Date Dependant fiscal info from SAP tables T009 and T009B
FROM "T009B" T9B,
"T009" T9
WHERE T9B."PERIV" = T9."PERIV"
AND T9."XJABH" = 'X'
• Extracts Calendar Dependant fiscal info from SAP tables T009 and T009B
FROM "T009B" T9B,
"T009" T9
WHERE 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 T009
FROM "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 info
FROM
(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 T3
WHERE 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_DT
GROUP 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_CD
ORDER 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
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/Filters
None.
Validation
1. 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 rows
SELECT 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 variants
SELECT DISTINCT DFLT_FSCL_VRNT_CD
FROM ALL_TIME;
SELECT DISTINCT FISCAL_VARIANT_CD
FROM ALL_TIME;
6. Check the contents of each fiscal variant
SELECT 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
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. 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
Dependencies
None.
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-Run
When 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 Flow
1. 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
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
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.
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).
Configuration Parameters
None.
Dependencies
None.
User Intervention
None.
Job Flow
1. BUSINESS_AREA_J / INIT_P
• Calls function BUSINESS_AREA_VARS_F() to set the job flow parameters.
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
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.
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).
Dependencies
None.
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_CD
This 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 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 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-Run
When 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 Flow
1. 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 KNVV
FROM "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 CDHDR
FROM "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.
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
TVKO
FROM "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 P0002
FROM "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 P0002
FROM "PA0002" INNER JOIN "KNVP" ON "PA0002"."PERNR" = "KNVP"."PERNR" AND
"KNVP"."PARVW" IN ({$U_CREDIT_MANAGER_CD})
• Lookup County name on SAP table T005F
FROM "T005F"
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Region name on SAP table T005FU
FROM "T005U"
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Sales District name on SAP table T171T
FROM "T171T"
WHERE "SPRAS" = '{$U_LANGUAGE_CD}
• Lookup Dunning Block Reason on SAP tables KNB5 and T040T
FROM "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 T005F
FROM "T005F"
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Region name on SAP table T005FU
FROM "T005U"
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Dunning Block Reason on SAP tables KNB5 and T040T
FROM "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 T005F
FROM "T005F"
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Region name on SAP table T005FU
FROM "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')
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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.
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 Intervention
None.
Job Flow
1. 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 range
FROM "TCURR" T
WHERE 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 user
FROM "TCURC"
WHERE "WAERS" IN ({$U_REPORT_CURRENCY_CD})
• Lookup Currency name on SAP table TCURT
FROM "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 TCURV
FROM "T001" T1,
"TCURV" TC
WHERE TC."KURST" = '{$U_EXCHANGE_RATE_TYPE}'
• Lookup Currency name on SAP table TCURT
FROM "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 type
FROM CURRENCY_RATE T1 …
FROM FINANCIAL_CUR_CONV FCC
WHERE 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 OR
TO_TO_BASE_EXCH_RT <> I_TO_TO_BASE_EXCH_RT OR
BASE_TO_TO_EXCH_RT <> I_BASE_TO_TO_EXCH_RT OR
FROM_TO_BS_EXCH_RT <> I_FROM_TO_BS_EXCH_RT OR
BS_TO_FRM_EXCH_RT <> I_BS_TO_FRM_EXCH_RT OR
EXCHANGE_RT <> I_EXCHANGE_RT
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 FCC
WHERE 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 OR
TO_TO_BASE_EXCH_RT <> I_TO_TO_BASE_EXCH_RT OR
BASE_TO_TO_EXCH_RT <> I_BASE_TO_TO_EXCH_RT OR
FROM_TO_BS_EXCH_RT <> I_FROM_TO_BS_EXCH_RT OR
BS_TO_FRM_EXCH_RT <> I_BS_TO_FRM_EXCH_RT OR
EXCHANGE_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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Developer Guide 27
Chapter 1: JobStream and Build Descriptions
Validation
1. 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.
Dependencies
None.
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_LENGTH
Number of characters allowed for denoting the level 1 characteristic within the material
product hierarchy
• MTRL_LEVEL2_LENGTH
Number of characters allowed for denoting the level 2 characteristic within the material
product hierarchy
• MTRL_LEVEL3_LENGTH
Number 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 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 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-Run
When the Material 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 Flow
1. 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 range
FROM "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 MAKT
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Division name on SAP table TSPAT
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Industry Sector description on SAP table T137T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Category description on SAP table DD07T
WHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}' AND
"DOMNAME" = 'ATTYP'
• Lookup Material Group description name on SAP table T023T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Type description on SAP table T134T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Price Band Category description on SAP table TWPTT
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• For each hierarchy level 1 - 5, Lookup Material Level name on SAP table T179T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Material Vendor name on SAP table LFA1
WHERE "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').
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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 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_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.
• 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 Flow
1. MTRL_MVMNT_DTL_DOC_J / INIT_P
• Calls function MATERIAL_MVMNT_VARS_F () to set the jobflow parameters.
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
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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.
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_TYPE
This 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_DOMNAME
This 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_DOMNAME
This 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_CD
This 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_CD
This 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-run
From 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 Flow
1. 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 DD07T
WHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}'
AND "DOMNAME" = '{$U_IA_INTTNG_DOC_TYP_DOMNAME}'
• Lookup Receipt Type description on SAP table DD07T
WHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}'
AND "DOMNAME" = 'KZZUG'
• Lookup Doc Type on SAP table T003T
WHERE "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 T156T
WHERE 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')
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
Description
This 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_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.
• 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 Flow
1. 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.
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
Description
This 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.
Dependencies
None.
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 Intervention
None.
Job Flow
1. MATERIAL_STORAGE_J / INIT_P
• Calls function MATERIAL_STORAGE_VARS_F() to set the jobflow parameters.
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 T024
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Procurement Type description on SAP table DD07T
WHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}'
AND "DOMNAME" = '{$U_MTRL_STRG_PRCRMT_TYP_DOMNAME}
• Lookup Valuation Category description on SAP table T149T
WHERE "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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
Physical Inventory
Description
This 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.
Configuration Parameters
None.
User Intervention
• User Interface
None.
• 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.
• 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 Flow
1. 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 T001W
FROM "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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
Description
This 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.
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
Dependencies
None.
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_DOMNAME
This 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 Intervention
None.
Job Flow
1. 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 T001K
FROM "T001" INNER JOIN "T001K" ON "T001"."BUKRS" = "T001K"."BUKRS"
INNER JOIN "T000" ON "T001"."MANDT" = "T000"."MANDT
• Lookup Plant County name on SAP table T005F
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Country name on SAP table T005T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Category name on SAP table DD07T
WHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}'
AND "DOMNAME" = 'VLFKZ'
• Lookup Plant Region name on SAP table T005U
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Supply Region name on SAP table TZONT
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Division name on SAP table TSPAT
WHERE "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 T001K
FROM "T001" INNER JOIN "T001K" ON "T001"."BUKRS" = "T001K"."BUKRS
• Lookup Plant Group Currency code on SAP tables T000, T001 and T001K
FROM "T001" INNER JOIN "T001K" ON "T001"."BUKRS" = "T001K"."BUKRS"
INNER JOIN "T000" ON "T001"."MANDT" = "T000"."MANDT
• Lookup Plant County name on SAP table T005F
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Country name on SAP table T005T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Category name on SAP table DD07T
WHERE "DDLANGUAGE" = '{$U_LANGUAGE_CD}'
AND "DOMNAME" = '{$U_ PLANT_CAT_DOMNAME}'
• Lookup Plant Region name on SAP table T005U
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Supply Region name on SAP table TZONT
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Plant Division name on SAP table TSPAT
WHERE "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 KNVA
WHERE "DEFAB" = 'X'
• Output is Append to PLANT_DEX.
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
Description
Re-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 Rules
The 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.
Calculations
1. 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.
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 Flow
1. 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 Procedure
RE-RANK
Trigger
None.
Notes/Filters
None.
Validation
1. Check Console Log Files.
Stock Class
Description
This 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.
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_STOCK
This 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_TYPE
This 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_DOMNAME
This 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_TYPE
This 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_STOCK
This 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.
Dependencies
None.
Job Flow
1. STOCK_CLASS_J / INIT_P
• Calls function STOCK_CLASS_VARS_F() to set the jobflow parameters.
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 DD07T
WHERE DD07T.DOMNAME = 'MB_INSMK' AND DDLANGUAGE = '{$U_LANGUAGE_CD}'
• Extracts Special Stock Code and Type from SAP tables T148, T064A and T064B
WHERE T064B.SPRAS = '{$U_LANGUAGE_CD}'
• Extracts Special Stock Code and Type from SAP tables T064A and T064B
WHERE T064B.SPRAS = '{$U_LANGUAGE_CD}'
• Lookup Special Stock description on SAP table T148T
WHERE "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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
Description
STOCK_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.
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_TYPE
The 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_TYPE
The 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_TYPE
This 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_TYPE
The 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_TYPE
The 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_TYPE
The 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_DATE
This 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_PERIODS
Number 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_OV
Number 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_FLG
Use 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_FLG
The flag indicates: Y - storage location is part of the grain for stock overview, N - otherwise.
• STOCK_LEVEL_AVG_METHOD
Possible 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_DATE
This 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.
• UNRESTRICTED_STOCK_TYPE
Indicates which stock types are considered in unrestricted.
• UPD_FRCY_OVER_REQ
Sets the update rate for overstock. Possible values are MONTHLY and DAILY.
• VENDOR_CONS_SPECIAL_STOCK
Indicates which special stock codes are considered to be vendor consignment.
• ZERO_KPI_IND
Possible 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-run
From 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 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 Flow
1. 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 MARC
WHERE 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.
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 MATERIAL
FROM STOCK_OPEN_BAL_PEX PEX, MATERIAL MTRL
WHERE + 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 MATERIAL
FROM STOCK_OPEN_BAL_PEX PEX, MATERIAL MTRL
WHERE + PEX.MATERIAL_ID = MTRL.MATERIAL_ID
AND 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 AND
TOINTEGER(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.
Trigger
None.
Notes/Filters
Loading 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.
Validation
1. 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.
Dependencies
Stock Usage Forecast Method
Configuration Parameters
None.
User Intervention
None.
Job Flow
1. 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 PROW
FROM "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 MARA
FROM "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"."FORECAS
T_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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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.
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 Intervention
None.
Dependencies
None.
Job Flow
1. 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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
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.
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.
Dependencies
None.
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 Intervention
None.
Job Flow
1. 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 T301T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Storage Section description on SAP table T302T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Inventory Method description on SAP table DD07T
WHERE DOMNAME = 'LVS_KZINV'
AND DDLANGUAGE = '{$U_LANGUAGE_CD}'
• Lookup Bin Type description on SAP table T303T
WHERE "SPRAS" = '{$U_LANGUAGE_CD}'
• Lookup Block Reason description on SAP table T330T
WHERE "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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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
Description
The 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
Dependencies
None.
Configuration Parameters
None.
User Intervention
None.
Job Flow
1. 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 T006T
WHERE SPRAS = '{$U_LANGUAGE_CD}'
• Lookup UOM ISO Description from SAP table T006J
WHERE "LANGU" = '{$U_LANGUAGE_CD}'
• Output is UNIT_MEASUR_DEX.
Delivery type is truncate.
Developer Guide 69
Chapter 1: JobStream and Build Descriptions
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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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.
8. For selected records, review and verify the target warehouse against the source ERP data.
Valuation
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.
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).
Dependencies
None. 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 Intervention
None.
Job Flow
1. 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 Procedure
None.
Trigger
None.
Notes/Filters
Truncating the Valuation table will result in the loss of historical values as SAP does not store
price change history.
Validation
1. 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.
Vendor
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. 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.
Dependencies
None.
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 Intervention
None.
Job Flow
1. 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 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 truncate.
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 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.
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 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 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 Procedure
None.
Trigger
None.
Notes/Filters
None.
Validation
1. 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.
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.
Legend
In each entity, the column names are preceded by symbols that describe the column’s
properties.
* Mandatory
o Optional
789 Numeric
A Character
Date
31
For more information about each table in the Inventory Analysis data warehouse, see "Data
Mart Metadata" (p. 85).
Developer Guide 77
Chapter 2: Entity Relationship Diagrams
Material Movement
Physical Inventory
Developer Guide 79
Chapter 2: Entity Relationship Diagrams
Material Reservation
Stock Overview
Developer Guide 81
Chapter 2: Entity Relationship Diagrams
Developer Guide 83
Chapter 2: Entity Relationship Diagrams
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 Time
Target 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
Developer Guide 85
Chapter 3: Data Mart Metadata
CALENDAR_YEA NUMBER(4,0) This is the calendar year formatted as YYYY This is the year component of the calendar
R_VAL (e.g., 2000). date. The default range of values are 1980
to 2020.
CHANGED_DT DATE This represents the date and time of update ETL generated. This is set to the Created
of the warehouse record. This field is Date when the row is inserted.
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.
FISCAL_DT INTEGER This is the date of the fiscal calendar. The Table: N/A - DERIVED
fiscal date is similar to the calendar date, but Column: FISCAL_YEAR_VAL,
deals with periods instead of months. For POSTING_PERIOD_NO
example, a calendar date may be formatted format(FISCAL_YEAR_VAL,’0000’) ||
as YYYYMMDD, where YYYY represents format(.POSTING_PERIOD_NO,’00’) ||
the calendar year, MM the calendar month, format(Incremental number starting with 1
and DD the calendar day. The fiscal date, reset every fiscal period,’000’). 199906001
however, is formatted as YYYYPPDDD, is the first day of fiscal period 6 in fiscal year
where YYYY is the fiscal year, PP the period 1999. 199906002 is the second day of fiscal
number, and DDD the number of the day period 6 in fiscal year 1999.
within the period (e.g., 199906001).
FISCAL_PERIOD INTEGER This is a data warehouse system generated If it is the first day of the fiscal period then
_SID unique identifier for the fiscal period. this is a generated identifier otherwise set
the value to -1.
FISCAL_QUARTE NUMBER(1,0) This is the quarter of the fiscal calendar. Table: T009B, T009
R_VAL Column: POPER-POSTING PERIOD,
ANZBP-#OF POSTING PERIODS
Depending on the Fiscal Variant, the Fiscal
Quarter is derived in the following ways
Developer Guide 87
Chapter 3: Data Mart Metadata
FISCAL_YEAR_V NUMBER(4,0) This is the year of the fiscal calendar. This Table: T009B
AL field is in YYYY format. Column: BDATJ,RELJR,BUMON,BUTAG
Depending on the Fiscal Variant, the Fiscal
Year is derived in the following ways (format
YYYY)
POSTING_PERIO NUMBER(3,0) This is the number of the posting period of Table: T009B
D_NO the fiscal calendar (e.g, 01, 02,... 12). Column: POPER-POSTING PERIOD
Depending on the Fiscal Variant, the
Posting Period is derived in the following
ways:
***
BDATJ-Posting Date YYYY
BUMON-Posting Date Calendar Month
BUTAG-Calendar Date for the Posting Date
TIME_DIM_ID VARCHAR(150) This is the primary key for this entity. This key is composed of:
FISCAL_VARIANT_CD
FISCAL_DT
Batch
Target 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.
Developer Guide 89
Chapter 3: Data Mart Metadata
Column mapping
Pass 2
MCH1.VERAB
BATCH_DIM_ID VARCHAR(150) This is the primary key for this entity. This key is composed of:
BATCH_NO
PLANT_ID
MATERIAL_ID
Pass 2
MCH1.CHARG
BATCH_SID INTEGER This is a data warehouse system generated System ETL generated unique id.
unique identifier for the batch.
Pass 2
MCH1.ZUSCH
CHANGED_DT DATE This represents the date and time of update ETL generated.
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 ETL generated.
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.
LAST_RECEIPT_ INTEGER This is the date on which the last goods Pass 1
DT receipt for this batch was posted. select MCH1.LWEDT from MCHA, MCH1
where MCHA.MATNR = MCH1.MATNR and
MCHA.CHARG = MCH1.CHARG
Pass 2
MCH1.LWEDT
Pass 2
MCH1.MATNR
Pass 2
MCH1.QNDAT
if MCH1.ZUSTD = 'X'
then
set this indicator to Y
else
set this indicator to N
Pass 2
if MCH1.ZUSTD = 'X'
then
set this indicator to Y
else
set this indicator to N
Pass 2
MCH1.VFDAT
Pass 2
MCH1.LIFNR
VENDOR_BATCH VARCHAR(15) This is the unique identifier for the batch at Pass 1
_NO the vendor's site. This is relevant for batches select MCH1.LICHA from MCHA, MCH1 left
that are managed at the vendor's site. outer MCHA.MATNR = MCH1.MATNR and
MCHA.CHARG = MCH1.CHARG
Pass 2
MCH1.LICHA
Developer Guide 91
Chapter 3: Data Mart Metadata
Business Area
Target 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
BUSINESS_ARE VARCHAR(30) This is the name representing the business Table: TGSBT
A_NM area. A Business Area permits external Column: GTEXT
reporting of key performance indicators
SAP Short Text: BUSINESS AREA
across multiple Companies by product lines DESCRIPTION
and/or subsidiaries.
Derived from a lookup into TGSBT.GTEXT
based on TGSB.GSBER and
TGSBT.SPRAS = Language parameter
BUSINESS_ARE INTEGER This is a data warehouse system generated Created during the load (auto) created in
A_SID unique identifier for the business area. Dimensional Build
BUSINESS_AR_ VARCHAR(150) This is the primary key for this entity. This key is composed of:
DIM_ID BUSINESS_AREA_CD
CHANGED_DT DATE This represents the date and time of update Created during the load process (auto)
of the warehouse record. This field is created in Dimensional Build
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.
CNSLDTN_BA_C VARCHAR(4) Code that identifies a business area used Table: TGSB
D centrally in the corporate group. The Column: GSBER_KONS
definition predefines the group parent. All
SAP Short Text: Consolidation business
reporting systems allocate business areas
area
used locally to the consolidation business
areas.
CREATED_DT DATE This represents the date and time of Created during the load process (auto)
creation of the warehouse record. This field created in Dimensional Build
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.
Customer
Target 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
pass 2 & 3:
use unknown default parameter
ADDRESS_ID VARCHAR(10) This is a source system generated unique Table: KNA1 - GENERAL DATA IN
identifier of the address of the customer. CUSTOMER MASTER
Column: ADRNR - ADDRESS
pass 1, 2 & 3
use source column
BILLING_BLOCK VARCHAR(2) This is an indicator that halts billing for a Table: KNVV, KNA1
_CD customer either in general for that customer Column: FAKSD-BILLING BLOCK FOR
or in a specific sales area. This is used to CUSTOMER (SALES AND DISTRI
block billing if there are legal or pass 1:
credit-related problems. Depending on the If KNVV.FAKSD <> ' ' Then ---- (This means
ERP implementation, in order to block a it is blocked)
customer at an entire sales organization KNVV.FAKSD
level, it may have to be done in each sales else
area in which the sales organization is KNA1.FAKSD
defined. Endif.
CHANGED_DT DATE This represents the date and time of update ETL generated. This is set to the
of the warehouse record. This field is CREATED_DT when the row is inserted
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.
CITY_NM VARCHAR(35) This is the name of the city where the Table: KNA1-GENERAL DATA IN
customer resides. CUSTOMER MASTER
Column: ORT01-CITY
passes 1,2 & 3
use source column
Developer Guide 93
Chapter 3: Data Mart Metadata
pass 3:
use unknown default parameter
COMPANY_CD VARCHAR(4) This is the source system unique identifier Table: SEE MAPPING
for a Company. Column: 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 Table: KNA1-GENERAL DATA IN
where the customer resides. CUSTOMER MASTER
Column: LAND1-COUNTRY KEY
pass 1, 2 & 3
use source column
COUNTRY_NM VARCHAR(15) This is the name of the country where the Table: T005T-COUNTRY NAMES
customer resides. Column: LANDX-COUNTRY NAME
use source column
based on lookup to source table on
KNA1.LAND1 and SPRAS= language
parameter
COUNTY_CD VARCHAR(3) This is a code representing the county Table: KNA1-GENERAL DATA IN
where the customer resides. CUSTOMER MASTER
Column: COUNC-COUNTY CODE
pass 1, 2 & 3
use source column
COUNTY_NM VARCHAR(20) This is the name of the county where the Table: T005F-COUNTY: TEXTS
customer resides. Column: BEZEI-DESCRIPTION
pass 1, 2 & 3:
use source column
based on lookup to T005F
WHERE language filter =T005F.SPRAS
AND
KNA1.LAND1 = T005F.LAND1 AND
KNA1.REGIO = T005F.REGIO AND
KNA1.COUNC = T005F.COUNC
CREATED_DT DATE This represents the date and time of ETL generated
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.
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_MANAG VARCHAR(81) This is the identification of the employee Table: PA0002 - HR MASTER RECORD:
ER_NM who is assigned as the Accounts INFOTYPE 0002 (PERSONAL
Receivable Analyst for the customer. This Column: VORNA - FIRST NAME,NACHN -
identifier conforms to the Employee SECOND NAME
dimension Personnel Number and should
pass 1 & 2:
exist in this dimension.
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 3
use unknown default parameter
CURRENCY_CD VARCHAR(5) This is the customer's commonly accepted Table: SEE MAPPING
currency for the sales area. This currency is Column: SEE MAPPING
used to settle the customer's charges for
pass 1:
sales. This is used to know the base
use knvv.waers
currency, from which, conversions can occur
if knvv.waers NULL use kna1.uwaer
for the customer's sales.
pass 2 & 3
use kna1.uwaer
Developer Guide 95
Chapter 3: Data Mart Metadata
CUSTOMER_GR VARCHAR(2) This is a code representing a particular Table: KNVV-CUSTOMER MASTER SALES
OUP_CD group of customers, for example, wholesale DATA
or retail, for the purposes of pricing or Column: KDGRP-CUSTOMER GROUP
generating statistics. These groupings may pass 1:
be freely defined by each company use source column
according to the needs of the organization.
pass 2 & 3:
use unknown default parameter
pass 2 & 3
use unknown default parameter
CUSTOMER_LO VARCHAR(140) This is the full name of the customer, for Table: KNA1-GENERAL DATA IN
NG_NM example, the concatenation of first, middle, CUSTOMER MASTER
and last names of a person, or the legal Column: NAME1, NAME2, NAME3, NAME4
name of a company. pass 1, 2 & 3
Concatenate the source columns
KNA1.NAME1 +
KNA1.NAME2 +
KNA1.NAME3 +
KNA1.NAME4
CUSTOMER_NM VARCHAR(35) This is the commonly used name of the Table: KNA1-GENERAL DATA IN
customer, for example, the first and last CUSTOMER MASTER
names without the middle name of a person, Column: NAME1-NAME 1
or the trading name of a company.
pass 1, 2 & 3
use source column
CUSTOMER_NO VARCHAR(10) This is the source system generated unique Table: KNA1 - GENERAL DATA IN
identifier of the customer. CUSTOMER MASTER
Column: KUNNR-CUSTOMER NUMBER
pass 1, 2 & 3
use source column
CUST_CLSSFCT VARCHAR(2) This is the code representing the Table: KNA1-GENERAL DATA IN
N_CD classification for the type of customer. For CUSTOMER MASTER
example, it classifies the customer as a bulk Column: KUKLA-CUSTOMER
purchaser. Classification values may be CLASSIFICATION
freely defined by the company and therefore
pass 1, 2 & 3
can vary from company to company.
use source column
CUST_CLSSFCT VARCHAR(20) This is classification for the type of Table: TKUKT-CUSTOMERS: CUSTOMER
N_NM customer. For example, it classifies the CLASSIFICATION: TEXTS
customer as a bulk Purchaser. Classification Column: VTEXT-DESCRIPTION
values may be freely defined by the Derived from a lookup into TKUKT.VTEXT
company and therefore can vary from based on KNA1.KUKLA and where SPRAS
company to company. = language parameter
CUST_HIER_LVL NUMBER(4,0) This is the level number of the customer Table: CUSTOMERHIERARCHY.DAT
_NO hierarchy. For example, if the customer is at Column: CUST_HIER_LEVEL_NO
level three of the hierarchy, the customer
pass 1
has a parent (in level 2) and a grandparent
use source column
(in level 1). Level four is unused (the
when CUSTOMER_NO =
customer may be repeated in level four, or it
CustomerHierarchy.CUSTOMER_NO
may be left as null).
SALES_ORG_CD =
CustomerHierarchy.SALES_ORG_CD
DSTRBTN_CHNNL_CD =
CustomerHierarchy.DSTRBTN_CHNNL_CD
DIVISION_CD =
CustomerHierarchy.DIVISION_CD
pass 2 & 3
use unknown default parameter
DIVISION_CD VARCHAR(2) This is a grouping of grouping material, Table: KNVV-CUSTOMER MASTER SALES
products, or services to which a customer DATA
can be associated. A product or service is Column: SPART-DIVISION
always assigned to just one division. from
pass 1:
the point of view of sales and distribution,
use source column
the use of divisions lets you organize your
sales around groups of similar products or
pass 2 & 3:
product lines. This allows the people in a
use unknown default parameter
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.
DNNG_BLCK_RS VARCHAR(50) Descriptive text for a DUNNING BLOCK Table: T040T - DUNNING BLOCK REASON
N_DSC REASON CODE value. NAMES
Column: TEXT1 - REASON FOR DUNNING
BLOCK TEXT
passes 1, 2:
use source column
when CUSTOMER_NO = KNB5.KUNNR
AND
COMPANY_CD = KNB5.BUKRS AND
knb5.mansp = t040t.mansp and
t040t.spras = language parameter
pass 3:
use unknown default parameter
Developer Guide 97
Chapter 3: Data Mart Metadata
pass 2 & 3:
use unknown default parameter
DUNNING_BLOC CHAR(1) This indicates whether Dunning is to occur Table: KNB5 - CUSTOMER MASTER
K_IND for this particular customer. In other words, if (DUNNING DATA)
the value is set to 'Y' (i.e. blocked for Column: MANSP - DUNNING BLOCK
dunning), then this customer will not receive
pass 1 & 2
dunning letters. If the value is set to 'N', then
use mansp
dunning letters will be sent, as necessary.
when CUSTOMER_NO = KNB5.kunnr and
COMPANY_CD = KNB5.bukrs
pass 3
use unknown default parameter
DUNNING_LEVE CHAR(1) This is the level of "dunning" assigned to this Table: KNB5-CUSTOMER MASTER
L_ID Customer. It signifies the intensity of the (DUNNING DATA)
solicitation for payment of overdue invoices. Column: MAHNS-DUNNING LEVEL
passes 1 & 2
use mahns
when CUSTOMER_NO = knb5.kunnr and
COMPANY_CD to knb5.bukrs
pass 3
use unknown default parameter
EXTRNL_CUST_ VARCHAR(12) This is an identifier for the customer's Table: KNVV-CUSTOMER MASTER SALES
REF_NO company account number as assigned by DATA
the customer (or Vendor). Column: 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.EIKTO
else
use KNVV.EIKTO
Pass 2:
Lookup KNB1.EIKTO and if its = ' '
then
use unknown default parameter
else
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 MASTER
Column: TELFX-FAX NUMBER
pass 1, 2 & 3
use source column
INDUSTRY_DSC VARCHAR(20) This is the description of the industry of a Table: T016T-INDUSTRY NAMES
distinct group of companies with the same Column: BRTXT-DESCRIPTION OF THE
basic business activity. Used to select INDUSTRY KEY
companies for evaluation. You can specify passes 1, 2 & 3:
industries such as trade, banking, Derived from a lookup into T016T.BRTXT
manufacturing, health care, media, etc. based on KNA1.BRSCH and SPRAS=
language parameter
PAYMENT_TERM VARCHAR(4) A code used to classify the Payment terms Table: KNVV-CUSTOMER MASTER SALES
S_CD to allow grouping of customer by the terms DATA
of payment. Column: ZTERM-TERMS OF PAYMENT
KEY
pass 1:
use source column
pass 2 & 3:
use unknown default parameter
PAYMENT_TERM VARCHAR(28) A description used to classify the Payment Table: T052 - TERMS OF PAYMENT
S_DSC terms to allow grouping of customer by the Column: ZTAG1, ZTAG2, ZTAG3, ZPRZ1,
terms of payment. ZPRZ2
Concatenation of all the fields that make up
the payment term code.
POSTAL_CD VARCHAR(10) This is the postal code associated with the Table: KNA1-GENERAL DATA IN
residence of a customer. CUSTOMER MASTER
Column: PSTLZ-POSTAL CODE
pass 1, 2 & 3
use source column
RCNCL_GL_ACC VARCHAR(10) This is the GL account number that is used Table: KNB1 - CUSTOMER MASTER
NT_NO for this Customer's AR transactions that are (COMPANY CODE)
rolled up into the general ledger. Many Column: AKONT
Customers may be assigned to the same
passes 1 & 2
GL reconciliation account. This account
use source column
identifier conforms to the Account Identifier
represented in the Chart of Accounts
pass 3
dimension.
use unknown default parameter
Developer Guide 99
Chapter 3: Data Mart Metadata
REGION_NM VARCHAR(20) This is the name of the region where the Table: T005U-TAXES: REGION KEY:
customer resides. The relevant meaning TEXTS
depends on the country. In the USA it would Column: BEZEI-DESCRIPTION
represent the state, in Canada the province,
passes 1, 2 & 3:
in Switzerland the canton, in UK the county,
Derived from a lookup into T005U.BEZEI
etc.
based on KNA1.REGIO, KNA1.LAND1 and
SPRAS = language parameter
RISK_CATEGOR VARCHAR(3) This is a code representing the risk category Table: KNKK-CUSTOMER MASTER
Y_CD (of defaulting on Accounts Receivable) of CREDIT MANAGEMENT: CONTROL AR
the customer. Column: CTLPC-CREDIT MANAGEMENT:
RISK CATEGORY
pass 1:
use CTLPC
when KNKK.KUNNR = KNVV.KUNNR and
KNKK.kkber = CONSOLIDATION_AREA
To get CONSOLIDATION_AREA:
If KNVV.KKBER = ' ' then
Lookup to T001.KKBER where
T001.BUKRS = COMPANY_CD
Else
KNVV.KKBER
Endif
pass 2
To get CONSOLIDATION_AREA:
Lookup to T001.KKBER where
T001.BUKRS = KNB1.BUKRS
Endif
Pass 3:
use unknown default parameter
SALES_DISTRIC VARCHAR(20) This is the geographical sales district that Table: T171T-CUSTOMERS: SALES
T_NM the customer has been assigned to for DISTRICTS: TEXTS
pricing conditions and statistical purposes. Column: BZTXT-NAME OF THE DISTRICT
pass 1
Derived from a lookup into T171T.BZTXT
based on KNVV.BZIRK and where SPRAS
= language parameter
pass 2 & 3
use unknown default parameter
SALES_ORG_CD VARCHAR(4) This is the identifier of the organization unit Table: KNVV-CUSTOMER MASTER SALES
responsible for the sale of certain products DATA
or services. The responsibility of a sales Column: VKORG-SALES ORGANIZATION
organization may include legal liability for pass 1:
products and customer claims. A particular use source column
combination sales organization, distribution
channel, and division is know as a sales pass 2 & 3:
area. use unknown default parameter
TELEPHONE_NO VARCHAR(16) This is the complete telephone number of Table: KNA1-GENERAL DATA IN
the customer including country code, area CUSTOMER MASTER
code, and number. Column: TELF1-FIRST TELEPHONE
NUMBER
pass 1, 2 & 3
use source column
BASE_CURRENC VARCHAR(15) This is the full name of the base currency. Table: TCURT-CURRENCY CODE NAMES
Y_NM Column: KTEXT-SHORT TEXT
BASE_TO_TO_E NUMBER(15,7) This is the rate of conversion from base Table: TCURR-EXCHANGE RATES
XCH_RT currency to the currency converted to. Column: SEE SOURCE SYSTEM
MAPPING LOGIC
CHANGED_DT DATE This represents the date and time of update ETL Derived. Changed_Dt is set to
of the warehouse record. This field is Created_Dt on insert of row.
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 ETL Derived
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.
FISCAL_PERIOD INTEGER This is a foreign key to the FISCAL entity Table: FISCAL_EX1
_SID that is identified by the relationship name Column: FISCAL_PERIOD_SID
"fiscal role" sourced from the Logical Data
Model.
FISCAL_VARIAN VARCHAR(2) This is used to define the fiscal calendars Table: FISCAL_EX1
T_CD within an organization. An organization may Column: FISCAL_VARIANT_CD
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.
FISCAL_YEAR_V NUMBER(4,0) This is the year of the fiscal calendar. This Table: FISCAL_EX1
AL field is in YYYY format. Column: FISCAL_YEAR_VAL
FROM_CURREN VARCHAR(5) This is the currency code to be converted Table: T001-COMPANY CODES
CY_CD from. Column: WAERS-CURRENCY KEY
FROM_CURREN VARCHAR(15) This is the full name of the currency Table: TCURT-CURRENCY CODE NAMES
CY_NM converted from. Column: KTEXT-SHORT TEXT
FROM_TO_BS_E NUMBER(15,7) This is the rate of conversion from the Table: TCURR-EXCHANGE RATES
XCH_RT currency converted from to the base Column: SEE SOURCE SYSTEM
currency. MAPPING LOGIC
GROUP_CURRE VARCHAR(5) This is the code representing the standard Table: T000-CLIENTS, TCURV-EXCHANGE
NCY_CD currency in which all monetary amounts in RATE TYPES
the data warehouse are stored. For Column: T000.MWAER, TCURV.BWAER
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.
POSTING_PERIO NUMBER(3,0) This is the number of the posting period of Table: FISCAL_EX1
D_NO the fiscal calendar (e.g, 01, 02,... 12). Column: POSTING_PERIOD_NO
PST_PRD_END_ NUMBER(8,0) This is the ending calendar date of the Table: FISCAL_EX1
DT posting period. This date is in YYYYMMDD Column: PST_PRD_END_DT
format (e.g., 20000131).
PST_PRD_STRT NUMBER(8,0) This is the starting calendar date of the Table: FISCAL_EX1
_DT posting period. This date is in YYYYMMDD Column: PST_PRD_STRT_DT
format (e.g., 20000101).
This is retrieved from the FISCAL_EX1 work
table.
RATE_PUBLISHE NUMBER(8,0) This is the date on which the rate of Table: TCURR-EXCHANGE RATES
D_DT currency conversion was published. Column: GDATU-DATE AS OF WHICH THE
EXCHANGE RATE IS EFFECT
TO_CURRENCY_ VARCHAR(15) This is the full name of the currency Table: TCURT-CURRENCY CODE NAMES
NM converted to. Column: KTEXT-SHORT TEXT
TO_TO_BASE_E NUMBER(15,7) This is the inverse of the rate of conversion Table: TCURR-EXCHANGE RATES
XCH_RT from base currency to the currency Column: SEE SOURCE SYSTEM
converted to. MAPPING LOGIC
Material
Target 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.
Column mapping
CHANGED_DT DATE This represents the date and time of update ETL generated.
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 ETL generated. CHANGED_DT =
creation of the warehouse record. This field CREATED_DT on insert of row.
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.
DELETION_DT INTEGER This is the date on which the material is to Table: MARA
be deleted. This is the latest possible date of Column: LAEDA - DATE OF LAST CHANGE
all "TO-dates" referring to the material.
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 Table: MARA-GENERAL MATERIAL DATA
material master for deletion. Column: 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 Table: MARA
dimensions of length, width and height of a Column: MEABM-UNIT OF DIMENSION
material or its packaging are measured. FOR LENGTH/WIDTH/HEIGHT
DIVISION_CD VARCHAR(2) This is the code representing the division to Table: MARA
which the material belongs. A division is a Column: SPART-DIVISION
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.
HEIGHT_VAL NUMBER(13,3) This is the height of the material or its Table: MARA-GENERAL MATERIAL DATA
packaging, measured in the unit of Column: HOEHE-HEIGHT
dimension.
INDUSTRY_SEC CHAR(1) This is the code representing the branch of Table: MARA-GENERAL MATERIAL DATA
T_CD industry to which the material is assigned. Column: MBRSH-INDUSTRY SECTOR
Examples are fuel, food, hardware, etc.
INDUSTRY_SEC VARCHAR(25) This is the textual description of the branch Table: T137T-INDUSTRY DESCRIPTIONS
T_DSC of industry to which the material is assigned. Column: MBBEZ-INDUSTRY SECTOR
Examples are fuel, food, hardware, etc. DESCRIPTION
SELECT MBBEZ
FROM MARA, T137T
WHERE MARA.MBRSH = T137T.MBRSH
AND
T137T.SPRAS = LanguageParameter
INDUSTRY_STD_ VARCHAR(18) This is the standard industry description for Table: MARA-GENERAL MATERIAL DATA
DSC the material. Column: NORMT-INDUSTRY STANDARD
DESCRIPTION (SUCH AS ANSI
LENGTH_VAL NUMBER(13,3) This is the length of the material or its Table: MARA-GENERAL MATERIAL DATA
packaging, measured in the unit of Column: LAENG - LENGTH
dimension.
LEVEL1_MATERI VARCHAR(40) This is the name of the level 1 to 5 parent of Table: T179T-MATERIALS: PRODUCT
AL_NM to a material. Materials are part of a hierarchy, HIERARCHIES: TEXTS
LEVEL5_MATERI where a material can belong to various Column: VTEXT-DESCRIPTION
AL_NM levels in this hierarchy. This attribute Lookup to T179T.VTEXT
identifies the highest level material in the where PRODH = substring(MARA.PRDHA)
hierarchy related to this material. If the and SPRAS = LanguageParameter
material itself belongs to this level, the levels
below it will be null or have the material's The substring length should be a parameter
name repeated in them. (Material 1 Level Length to Material 5 Level
Length), however the default is from Char 1
to 5.
MATERIAL_CAT_ VARCHAR(2) This is a code representing the category of Table: MARA-GENERAL MATERIAL DATA
CD the material, for example, whether it is a Column: ATTYP - MATERIAL CATEGORY
configurable material, variant, a sales set,
display material, or single material, etc.
MATERIAL_DIM_I VARCHAR(150) This is the primary key for this entity. This key is composed of:
D MATERIAL_ID
Pass 2
Use same value as material_id
MATERIAL_GRP_ VARCHAR(9) This is the code representing the grouping Table: MARA-GENERAL MATERIAL DATA
CD of materials or services with similar Column: MATKL-MATERIAL GROUP
attributes. Material groups may be used to pass 1)
restrict the scope of analysis to a number of use mara.matkl
similar materials at a time, rather than
focusing on a specific material. pass 2)
use t023.matkl
MATERIAL_GRP_ VARCHAR(20) This is the textual description of the Table: T023T-MATERIAL GROUP
DSC grouping of materials or services with DESCRIPTIONS
similar attributes. Material groups may be Column: WGBEZ-DESCRIPTION OF
used to restrict the scope of analysis to a MATERIAL GROUP
number of similar materials at a time, rather
SELECT WGBEZ
than focusing on a specific material.
FROM MARA, T023T
WHERE 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 Table: MARA-GENERAL MATERIAL DATA
of the material. Column: 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 System generated unique identifier.
unique identifier for the material.
MATERIAL_TYPE VARCHAR(4) This is a code representing the material Table: MARA-GENERAL MATERIAL DATA
_CD types such as raw materials, finished Column: MTART-MATERIAL TYPE
products, etc.
MTRL_HIER_LVL VARCHAR(18) This is the level number of the material Table: MARA-GENERAL MATERIAL DATA
_NO hierarchy. Column: PRDHA-PRODUCT HIERARCHY
Derived from a lookup into T179.STUFE
based on MARA.PRDHA and where
SPRAS = LanguageParameter
NET_WEIGHT_V NUMBER(13,3) This is the net weight of the material Table: MARA
AL expressed in the unit of weight. Column: NTGEW-NET WEIGHT
ORDER_UOM_C VARCHAR(3) This is the unit of measure in which the Table: MARA-GENERAL MATERIAL DATA
D material was ordered. Column: BSTME-ORDER UNIT
PRICE_BND_CAT VARCHAR(2) This is the code representing the range of Table: MARA-GENERAL MATERIAL DATA
_CD prices to which the material belongs. For Column: PLGTP-PRICE BAND CATEGORY
example, price band categories may be
High, Medium, and Low.
PRICE_BND_CAT VARCHAR(20) This is the code representing the range of Table: TWPTT-TEXT: PRICE BAND
_DSC prices to which the material belongs. For CATEGORY
example, price band categories may be Column: VTEXT-DESCRIPTION
High, Medium, and Low. SELECT VTEXT
FROM 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 Table: MARA
information is valid. Column: DATAB-VALID-FROM DATE
VENDOR_ACCO VARCHAR(10) This is the source system number of a Table: MARA - GENERAL MATERIAL DATA
UNT_NO vendor, used in the context of Material Column: MFRNR - MANUFACTURER
Management, it is the Prime Vendor of the NUMBER
Material.
VENDOR_NM VARCHAR(35) This is the name of the Prime vendor of the Table: LFA1-VENDOR MASTER
Material as identified by the Vendor Account (GENERAL SECTION)
Number. Column: NAME1-NAME 1
SELECT NAME1
FROM MARA, LFA1
MARA.MFRNR = LFA1.LIFNR
VOLUME_UOM_ VARCHAR(3) This is the code representing the unit of Table: MARA-GENERAL MATERIAL DATA
CD measure in which material volume is Column: VOLEH-VOLUME UNIT
measured.
VOLUME_VAL NUMBER(13,3) This is the volume of the material per unit of Table: MARA
volume. Column: VOLUM-VOLUME
WEIGHT_UOM_C VARCHAR(3) This is the code representing the unit of Table: MARA-GENERAL MATERIAL DATA
D measure in which material weight is Column: GEWEI-WEIGHT UNIT
measured.
WIDTH_VAL NUMBER(13,3) This is the width of the material or its Table: MARA
packaging, measured in the unit of Column: BREIT-WIDTH
dimension.
CHANGED_DT DATE This represents the date and time of update ETL generated.
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 ETL generated. CHANGED_DT =
creation of the warehouse record. This field CREATED_DT on insert of row.
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.
FISCAL_PERIOD INTEGER This is a foreign key to the FISCAL entity Table: SEE SOURCE SYSTEM MAPPING
_SID that is identified by the relationship name LOGIC
"material movement has fiscal period" Column: SEE SOURCE SYSTEM
sourced from the Logical Data Model. MAPPING LOGIC
Lookup to ALL_TIME based on
use MKPF.BUDAT for fiscal date
join MSEG to T001 on MSEG.BUKRS =
T001.BUKRS to get the fiscal variant
T001.PERIV
FSCL_PRD_DC_I INTEGER This is a foreign key to the FISCAL entity Lookup to ALL_TIME based on
S_SID that is identified by the relationship name use MKPF.BLDAT for fiscal date
"material movement issued in" sourced from join MSEG to T001 on MSEG.BUKRS =
the Logical Data Model. T001.BUKRS to get the fiscal variant
T001.PERIV
LOCAL_CURREN VARCHAR(5) This is the code representing the currency in Table: T001W, T001K, T001
CY_CD which the company that created the Column: WAERS, BWKEY, BUKRS
document prefers to work. Currencies are Select T001.WAERS
applicable to monetary amounts. For from T001, T001W, T001K
example, if the currency which the where T001W.BWKEY = T001K.BWKEY
concerned company prefers to work in is and T001.BUKRS = T001K.BUKRS
Canadian dollars, the code representing it
may be CAD. This is used on reports that T001W - Plants/Branches,
are specific to the company that created the T001K- Valuation area,
document. Such reports display the T001-Company Codes
monetary amounts stored in the data
warehouse (which are in group currency) in T001.WAERSCurrency key-Char(5)
the currency of the company concerned.
T001W.BWKEY-Valuation area-Char(4)
T001K.BWKEY-Valuation area-Char(4)
T001.BUKRS-Company code-Char(4)
T001K.BUKRS-Company code-Char(4)
MOVEMENT_AM NUMBER(13,2) This is the total value assigned to the goods Table: MSEG
T in the Inventory Movement Document Line Column: DMBTR
Item, in Group Currency. This value can be If MSEG.SHKZG = 'H'
calculated in a number of ways, by then
considering the total price of the goods, the MSEG.DMBTR * -1 (credit)
total cost of it, the total discount applied to it,
else
etc. The method of calculation of this field
MSEG.DMBTR * 1 (debit)
depends on the source system. This is
.
useful in comparing stocks across various
The formula above assigns a sign to the
types of products. Each product may be
quantity based on the debit/credit indicator.
stored in a separate unit of measure (e.g.,
This way, all receipts are positive and issues
bottles vs. boxes), thus making comparisons
are negative.
of quantities meaningless. The only
meaningful comparisons that may be made
is in terms of currency amounts associated
with the goods.
MOVEMENT_QT NUMBER(13,3) This is the actual number of units of the Table: SEE SOURCE SYSTEM MAPPING
Y product moved, measured in base units. LOGIC
The unit of measure (e.g., bottles, pieces) in Column: SEE SOURCE SYSTEM
which the units are expressed is defined MAPPING LOGIC
separately, by relating the Billing Document If XAUTO = 'X' and LGORT = ' ' and SOBKZ
Line Item to the Unit of Measure dimension. =''
THEN
set MOVEMENT_QTY = 0
ELSE
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.
MVMNT_DOC_C INTEGER This is a foreign key to the MOVEMENT Table: SEE SOURCE SYSTEM MAPPING
LSS_SID DOCUMENT CLASS entity that is identified LOGIC
by the relationship name "movement detail Column: SEE SOURCE SYSTEM
of material movement doc class" sourced MAPPING LOGIC
from the Logical Data Model.
Lookup to Movement Document Class
based on
Document 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 Table: SEE SOURCE SYSTEM MAPPING
is identified by the relationship name LOGIC
"material movement in/out of plant" sourced Column: SEE SOURCE SYSTEM
from the Logical Data Model. MAPPING LOGIC
Lookup to Plant based on
PLANT_ID = MSEG.WERKS CHAR(4)
STORAGE_LCTN_CD = MSEG.LGORT
CHAR(4)
REVERSE_PLAN INTEGER This is a foreign key to the PLANT entity that Table: SEE SOURCE SYSTEM MAPPING
T_SID is identified by the relationship name LOGIC
"material movement has reverse plant" Column: SEE SOURCE SYSTEM
sourced from the Logical Data Model. MAPPING LOGIC
Lookup in the Plant dimension based on
PLANT_ID = MSEG.UMWRK
STORAGE_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.
STOCK_CLASS_ INTEGER This is a foreign key to the STOCK CLASS Table: SEE SOURCE SYSTEM MAPPING
SID entity that is identified by the relationship LOGIC
name "material movement of stock class" Column: SEE SOURCE SYSTEM
sourced from the Logical Data Model. MAPPING LOGIC
Lookup to Stock Class
if MSEG.INSMK = ' '
then
STOCK_TYPE_CD = MSEG.BESTQ
else
STOCK_TYPE_CD = MSEG.INSMK
SPECIAL_STOCK_CD = MSEG.SOBKZ
CHAR(1)
STORAGE_BIN_ INTEGER This is a foreign key to the STORAGE BIN Table: SEE SOURCE SYSTEM MAPPING
SID entity that is identified by the relationship LOGIC
name "material movement in/out of storage Column: SEE SOURCE SYSTEM
bin" sourced from the Logical Data Model. 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 Table: MKPF
is identified by the relationship name Column: BUDAT
"material movement posting date" sourced
Lookup to ALL_TIME (calendar date) based
from the Logical Data Model.
on
MKPF.BUDAT
VENDOR_SID INTEGER This is a foreign key to the VENDOR entity Table: SEE SOURCE SYSTEM MAPPING
that is identified by the relationship name LOGIC
"material movement for vendor" sourced Column: SEE SOURCE SYSTEM
from the Logical Data Model. MAPPING LOGIC
Lookup Vendor based on
VENDOR_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)
DOCUMENT_YE VARCHAR(4) This is the calendar year in which the Table: MSEG
AR_VAL material document was posted. In some Column: MJAHR
source systems, the material document
NK 2
year, in conjunction with the document
number, uniquely identifies a document. In
SAP it is part of the natural key.
MTRL_MVMNT_D INTEGER This is a data warehouse system generated System generated unique id.
OC_SID unique identifier for the movement
document.
MTRL_MV_DOC_ VARCHAR(150) This is the primary key for this entity. This key is composed of:
DIM_ID DOCUMENT_NO
DOCUMENT_YEAR_VAL
DOCUMENT_ITEM_NO
ORDER_DOC_IT VARCHAR(6) This is the source system generated unique If MSEG.KDPOS NE ' ' -- (sales order item
M_NO identifier of the Sales Order or Purchase number)
Order Document Line Item that this Material use MSEG.KDPOS to populate warehouse
Movement Document Line Item is related to. column
ORDER_DOC_N VARCHAR(10) This is the source system generated unique Table: SEE SOURCE SYSTEM MAPPING
O identifier of the Sales Order or Purchase LOGIC
Order Document that this Material Column: SEE SOURCE SYSTEM
Movement Document is related to. MAPPING LOGIC
If MSEG.KDAUF NE ' ' -- (sales order
number)
use MSEG.KDAUF to populate warehouse
column
ORDER_DOC_TY VARCHAR(2) This code represents the type of source If MSEG.KDPOS NE ' ' -- (sales order item
P_CD document (sales, purchasing, etc.) that number)
initiated a movement. For example, PO = use "SO" to populate warehouse column
purchase order, and SO = sales order.
If MSEG.EBELP NE ' ' -- (purchase order
item number)
use "PO" to populate warehouse column
CHANGED_DT DATE This represents the date and time of update ETL Generated. Changed_Dt set to
of the warehouse record. This field is Created_Dt on insert.
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 ETL Generated
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.
CUSTOMER_CO SMALLINT This multiplier that is applied to the Same logic for both passes 1 and 2. Set to
NS_MULT computation of KPIs. This multiplier is set to default value. User may update this field
1 if the movement is an "issue to" or "receipt through Console.
from" a customer site but belongs to (is
owned by) the source plant. Customer
consignment is material located at a
customer location.
DISPOSAL_MULT SMALLINT This is a multiplier that is applied to the Same logic for both passes 1 and 2. Set to
computation of KPIs. This multiplier is set to default value. User may update this field
1 if the movement is a disposal. through Console.
DOCUMENT_TY VARCHAR(20) This is the textual description of the type of Table: T003T
PE_DSC document. Examples are "goods issue", Column: LTEXT
"goods receipt", etc. Pass 1:
Lookup to T003T. Lookup using
Document_typ_cd and filter by SPRAS
equal to language parameter.
Pass 2:
Set to default value.
For Pass 2:
Set to default value.
Pass 2:
Set to default value.
Pass 2
set to default short char
MVMNT_DOC_C INTEGER This is a data warehouse system generated System generated unique id.
LSS_SID unique identifier for the movement class.
RECEIPT_TYP_C CHAR(1) This is the code representing the type of Table: T156T
D purchase order if this requires different Column: KZZUG-RECEIPT INDICATOR
accounting treatment (for example, stock Pass 1: set to T156T.KZZUG
transport order or a sub-contract order).
Pass 2: Set to default value
Pass 2
set to default short char
SHRINKAGE_MU SMALLINT This is a multiplier that is applied to the Same logic for both passes 1 and 2. Set to
LT computation of KPIs. This multiplier is set to default value. User may update this field
1 if the if the movement is an adjustment to through Console.
inventory as a result of a physical stock. The
default is 0.
Value of H = Credit
Value of S = Debit
SPECIAL_STOCK CHAR(1) This is an indicator of whether the stock, i.e. Table: T156T
_CD consignment stock, of a material needs to Column: SOBKZ-SPECIAL STOCK
be managed separately. INDICATOR
Pass 1: set to T156T.SOBKZ
Pass 2
set to default short char
TRANSFER_IN_ SMALLINT This is a multiplier that is applied to the Same logic for both passes 1 and 2. Set to
MULT computation of KPIs. This multiplier is set to default value. User may update this field
1 if this is a transfer in to a particular plant. through Console.
The default for this is 0.
TRANSFER_OUT SMALLINT This is a multiplier that is applied to the Same logic for both passes 1 and 2. Set to
_MULT computation of KPIs. This multiplier is set to default value. User may update this field
1 if this is a transfer out to a particular plant. through Console.
The default for this is 0.
USER_DEFINED SMALLINT This is a user defined attribute available for Same logic for both passes 1 and 2. This is
1_MULT to the addition of any new multiplier specific to user defined. This should be set to a default
USER_DEFINED a particular client. value = 0;
5_MULT
VENDOR_CONS SMALLINT This multiplier is applied to the computation Same logic for both passes 1 and 2. Set to
_MULT of KPIs. This multiplier is set to 1 if the default value. User may update this field
movement is into or out of a Vendor through Console.
consignment. A vendor consignment is
material that is located at a plant but is still
owned by the vendor.
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
CHARG-Batch number-Char(10)
WERKS-Plant-Char(4)
MATNR-Material number-Char(18)
BUSINESS_ARE INTEGER This is a foreign key to the BUSINESS Lookup to Business Area where:
A_SID AREA entity that is identified by the Business Area Code = GSBER
relationship name "for business area"
sourced from the Logical Data Model. GSBER-Business Area-Char(4)
CHANGED_DT DATE This represents the date and time of update ETL generated. CHANGED_DT =
of the warehouse record. This field is CREATED_DT on insert of row.
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.
CONFIRMED_QT NUMBER(15,3) This is the quantity of material that is Table: RESB
Y confirmed to be delivered. Column: VMENG
If RESB.SHKZG = 'H'
Confirmed Quantity = VMENG *1
Else
Confirmed Quantity = VMENG* -1
CREATED_DT DATE This represents the date and time of ETL generated.
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.
DELIVERY_DDLN INTEGER This is a foreign key to the TIME entity that Table: RESB
_DT is identified by the relationship name Column: SBTER
"delivery deadline date is" sourced from the
Logical Data Model.
FISCAL_PERIOD INTEGER This is a foreign key to the FISCAL entity Use the required date for the fiscal period
_SID that is identified by the relationship name lookup. If it is null use the delivery deadline
"fiscal period" sourced from the Logical Data date.
Model.
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 Codes
T001-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 Table: RESB-RESERVATION/DEPENDENT
that is identified by the relationship name REQUIREMENTS
"material" sourced from the Logical Data Column: SEE SOURCE MAPPING LOGIC
Model. Lookup to Material Dimension where:
Material Id = MATNR
MATNR-Material number-Char(18)
MATERIAL_STRG INTEGER This is a foreign key to the MATERIAL Lookup to Material Storage Dimension
_SID STORAGE entity that is identified by the where:
relationship name "material storage" Plant Id = WERKS and
sourced from the Logical Data Model. Material Id = MATNR
WERKS-Plant-Char(4)
MATNR-Material number-Char(18)
MTRL_RSRV_DO INTEGER This is a foreign key to the MATERIAL Lookup to Material Reservation Document
C_SID RESERVATION DOCUMENT entity that is where:
identified by the relationship name "material Material Reservation Number = RSNUM
reservation document" sourced from the and
Logical Data Model. Material Reservation Item Number =
RSPOS
RSNUM-Number of reservation/dependent
requirements-NUMC(10)
RSPOS-Item number of
reservation/dependent
requirements-NUMC(4)
PLANT_SID INTEGER This is a foreign key to the PLANT entity that Lookup to Plant where:
is identified by the relationship name "plant" Plant Id = WERKS
sourced from the Logical Data Model. Storage Location = LGORT
WERKS-Plant-Char(4)
LGORT-Storage location-Char(4)
REVERSE_PLAN INTEGER This is a foreign key to the PLANT entity that Table: RESB-RESERVATION/DEPENDENT
T_SID is identified by the relationship name REQUIREMENTS
"reverse plant" sourced from the Logical Column: SEE SOURCE MAPPING LOGIC
Data Model.
Lookup to Plant where:
Plant Id = UMWRK
Storage Location = UMLGO
WERKS-Receiving plant/issuing
plant-Char(4)
UMLGO-Receiving/issuing storage
location-Char(4)
STORAGE_BIN_ INTEGER This is a foreign key to the STORAGE BIN Lookup to Storage Bin where
SID entity that is identified by the relationship Warehouse Number = LGNUM
name "storage bin" sourced from the Logical Storage Type Code =LGTYP
Data Model. Storage Bin Id = LGPLA
LGPLA-Storage Bin-Char(10)
LGNUM-Warehouse Number / Warehouse
Complex-Char(3)
LGTYP-Storage type-Char(3)
UOM_SID INTEGER This is a foreign key to the UNIT OF Lookup to Unit of Measure dimension
MEASURE entity that is identified by the where:
relationship name "base uom" sourced from Unit Of Measure Code = MEINS
the Logical Data Model. MEINS-Base unit of measure-Unit(3)
Column mapping
CREATED_DT DATE This represents the date and time of Table: N/A-DERIVED
creation of the warehouse record. This field Column: N/A-DERIVED
is populated for newly inserted records
ETL Derived.
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.
DELETION_IND CHAR(1) This is an indicator that marks all data on a Table: RESB-RESERVATION/DEPENDENT
material reservation line item as deleted. REQUIREMENTS
This is an SAP specific field. Column: XLOEK-ITEM IS DELETED
If RESB.XLOEK = 'X' then
set to 'Y'
Else
set to 'N'
Endif
DOCUMENT_NO VARCHAR(10) This is the source system generated unique Table: RKPF-DOCUMENT HEADER:
identifier of the Document. RESERVATION
Column: RSNUM-NUMBER OF
RESERVATION/DEPENDENT
REQUIREMENTS
FINAL_ISSUE_IN CHAR(1) This indicates that the final issue of material Table: RESB-RESERVATION/DEPENDENT
D for this reservation was completed. REQUIREMENTS
Column: KZEAR-FINAL ISSUE FOR THIS
RESERVATION
If RESB.KZEAR = 'X' then
set to 'Y'
Else
set to 'N'
Endif
RECORD_TYPE_ CHAR(1) This is a natural key component for SAP. Table: RESB-RESERVATION/DEPENDENT
CD REQUIREMENTS
Column: RSART-RECORD TYPE
Material Storage
Target 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
CHANGED_DT DATE This represents the date and time of update ETL generated.
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 ETL generated. CHANGED_DT =
creation of the warehouse record. This field CREATED_DT on insert of row.
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.
FIXED_LOT_SIZE NUMBER(13,3) This is the quantity that will be ordered or Table: MARC
_QTY produced in the event of a shortage. If the Column: BSTFE
shortage is less than the fixed lot size, the
SAP short text: Fixed lot size
fixed lot size is ordered. If the shortage is
greater than the fixed lot size, a multiple of
MARC.BSTFE
fixed lot are ordered.
MATERIAL_ID VARCHAR(18) This is the source system unique identifier Table: MARC
of the material. Column: MATNR
NK1
SAP short text: Material number
MATERIAL_STRG INTEGER This is a data warehouse system generated System generated unique identifier.
_SID unique identifier for the material storage.
MINIMUM_LOT_S NUMBER(13,3) This is the quantity that the number of items Table: MARC
Z_QTY in a lot or batch must not fall below of during Column: BSTMI
procurement. SAP short text: Minimum lot size
.
MARC.BSTMI
PLANT_ID VARCHAR(4) This is the source system unique identifier Table: MARC
of the plant. A plant is an organizational unit Column: WERKS
within logistics that subdivides the NK2
Enterprise from the viewpoint of production, SAP short text: Plant
inventory management, manufacturing
resource planning (MRP) and plant
maintenance.
PRCHSNG_GRP VARCHAR(3) This is the code representing the buyer or Table: MARC
_CD group of buyers responsible for certain Column: EKGRP
purchasing-related activities. Internal
SAP short text: Purchasing group
purchasing groups are responsible for the
.
procurement of a material or a group of
MARC.EKGRP
materials. External purchasing groups are a
medium through which contacts with
vendors are maintained.
PRCHSNG_GRP VARCHAR(18) This is the textual description for the buyer Table: T024
_DSC or group of buyers responsible for certain Column: EKNAM
purchasing-related activities. Internal
SAP short text: Description of purchasing
purchasing groups are responsible for the
group
procurement of a material or a group of
materials. External purchasing groups are a
medium through which contacts with
vendors are maintained.
PRCRMT_TYP_C CHAR(1) This is the code representing the type of Table: MARC
D procurement of the material. Examples are: Column: BESKZ
"produced in-house" or "procured
SAP short text: Procurement Type
externally" or "both produced in-house and
.
procured externally".
SAP system values:
E = In-house production
F = External procurement
" " = No procurement
X = Both procurement types
PRCRMT_TYP_D VARCHAR(60) This is the textual description of the type of Table: DD07T
SC procurement of the material. Examples are: Column: DDTEXT
"produced in-house" or "procured
SAP short text: Short text for fixed values
externally" or "both produced in-house and
.
procured externally".
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_POIN NUMBER(13,3) This is the least quantity of stock allowed for Table: MARC
T_QTY the material in the plant before it is flagged Column: MINBE
for re-order. If the quantity of the material SAP short text: Reorder point
falls below this level, it will be identified as .
one for which procurement must be MARC.MINBE
planned.
RPLNSHMT_LD_ NUMBER(3,0) This is the time required to re-stock the Table: MARC
TM_NO material in the plant either through in-house Column: WZEIT
production or procurement.
SAP short text: Total replenishment lead
time (in workdays)
MARC.WZEIT
SPCL_PRCRMT_ VARCHAR(40) The textual description that allows more Table: T460T
TY_DSC information on the procurement type to be Column: LTEXT
defined. The procurement type is
SAP short text: Long text
predetermined by the material type. For
.
example, the special procurement type
Lookup T460T.LTEXT
"consignment order" is possible for
where T460T.WERKS = PLANT_ID and
externally procured materials, and
T460T.SOBSL = SPCL_PRCRMT_TYP_CD
"produced in another plant" for in-house
and
production.
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 CHAR(1) This is a code representing whether stocks Table: MARC
_CD of the material are valuated together or Column: BWTTY
separately. In the case of split valuation, it
SAP short text: Valuation category
also determines which movement types are
.
allowed, that is, the criteria by which the
SAP system values:
stocks can be valuated.
A=" "
B = Inhse/ext.proc.
C = Status
H = Origin
R = Retail
X = Automat.(batch)
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
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 The sid should be set to 0 as the lookup to
that is identified by the relationship name batch will not be implemented pending a
"group together by BATCH" sourced from decision from product management
the Logical Data Model. regarding the removal of Batch.
.
This mapping should not be used but
appears in the spec just for historical
purposes
Lookup BATCH based on
ISEG.CHARG = BATCH_NO
ISEG.WERKS = PLANT_ID
ISEG.MATNR = MATERIAL_ID
BOOK_STOCK_A NUMBER(13,2) This is the total value assigned to the book Table: ISEG
MT stock quantity of goods in the Physical Column: WRTBM
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.
CHANGED_DT DATE This represents the date and time of update ETL generated.
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.
COUNT_DT INTEGER This is a foreign key to the TIME entity that Lookup to ALL_TIME on CALENDAR_DT
is identified by the relationship name based on
"physical inventory counted on date in time" IF "ISEG"."ZLDAT" (DETAIL COUNT DT)
sourced from the Logical Data Model. 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_P INTEGER This is a foreign key to the FISCAL entity Lookup the fiscal period sid in All Time
RD_SID that is identified by the relationship name using the count date ZLDAT and fiscal
"physical inventory taken during a period in variant
fiscal" sourced from the Logical Data Model. IF "ISEG"."ZLDAT" (DETAIL COUNT DT) IS
NULL
THEN USE "IKPF"."ZLDAT" (HEADER
COUNT DT)
ELSE USE "ISEG"."ZLDAT" (DETAIL
COUNT DT)
CREATED_DT DATE This represents the date and time of ETL generated. CHANGED_DT =
creation of the warehouse record. This field CREATED_DT on insert of row.
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.
FINAL_COUNT_I CHAR(1) This is an indicator that specifies that the If ISEG.XNZAE = "X"
ND item will not be recounted in another then
physical inventory document. set indicator to "N"
else
set indicator to "Y"
LOCAL_CURREN VARCHAR(5) This is the code representing the currency in Table: T001W, T001K, T001
CY_CD which the balances are kept in the source Column: WAERS, BWKEY, BUKRS
company. Select T001.WAERS
from T001, T001W, T001K
where T001W.BWKEY = T001K.BWKEY
and 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 Lookup Material based on
that is identified by the relationship name ISEG.MATNR = MATERIAL_ID
"material" sourced from the Logical Data
Model.
MATERIAL_STRG INTEGER This is a foreign key to the MATERIAL Lookup Material Storage based on
_SID STORAGE entity that is identified by the ISEG.MATNR = MATERIAL_ID
relationship name "material storage" ISEG.WERKS = PLANT_ID
sourced from the Logical Data Model.
PHYSICAL_STOC NUMBER(13,2) This is the total value assigned to the Table: ISEG
K_AMT physical stock quantity of goods in the Column: WRTZL
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.
PHYSICAL_STOC NUMBER(13,3) This is the actual quantity of stock found in Table: ISEG
K_QTY inventory at the time of the count. Column: MENGE
PHYS_INV_DOC INTEGER This is a foreign key to the PHYSICAL Lookup Physical Inventory Document based
_SID INVENTORY DOCUMENT entity that is on:
identified by the relationship name "further ISEG.IBLNR = DOCUMENT_NO
described by physical inventory doc" ISEG.ZEILI = DOCUMENT_ITEM_NO
sourced from the Logical Data Model. ISEG.GJAHR = FISCAL_YEAR_VAL
PLANT_SID INTEGER This is a foreign key to the PLANT entity that Lookup to Plant based on
is identified by the relationship name "plant" ISEG.WERKS = PLANT_ID
sourced from the Logical Data Model. ISEG.LGORT = STORAGE_LCTN_CD
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_ INTEGER This is a foreign key to the STOCK CLASS Lookup Stock Class based on
SID entity that is identified by the relationship STOCK_TYPE_CD = ISEG.BSTARS
name "stock class" sourced from the Logical SPECIAL_STOCK_CD = ISEG.SOBKZ
Data Model.
TIME_SID INTEGER This is a foreign key to the TIME entity that Convert the source date to eApps date
is identified by the relationship name format of YYYYMMDD.
"physical inventory document issued on
date" sourced from the Logical Data Model.
UOM_SID INTEGER This is a foreign key to the UNIT OF Lookup UOM_SID in Unit of Measure
MEASURE entity that is identified by the Dimension where UOM_CD = ISEG.MEINS
relationship name "stockkeeping UOM"
sourced from the Logical Data Model.
VALUATION_SID INTEGER This is a foreign key to the VALUATION If the following lookup returns a value use
entity that is identified by the relationship the SID
name "physical inventory is valued by Lookup Valuation based on
valuation" sourced from the Logical Data MATERIAL_ID = ISEG.MATNR CHAR(18)
Model. 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
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
CREATED_DT DATE This represents the date and time of ETL generated. CHANGED_DT =
creation of the warehouse record. This field CREATED_DT on insert of row.
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.
FISCAL_YEAR_V VARCHAR(4) This is the fiscal year in which the physical Table: ISEG
AL inventory activity was conducted (for a Column: GJAHR
definition of Fiscal Year, refer to the Fiscal Natural Key 2
entity).
PHYS_INV_DC_D VARCHAR(150) This is the primary key for this entity. This key is composed of:
IM_ID DOCUMENT_NO
FISCAL_YEAR_VAL
DOCUMENT_ITEM_NO
PHYS_INV_DOC INTEGER This is a data warehouse system generated System generated unique id.
_SID unique identifier for a physical inventory
document line item.
Plant
Target table name: PLANT
Table type: Conformed Dimension
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
CITY_CD VARCHAR(4) This is the code representing the city where Table: T001W-PLANT/BRANCHES
the plant is located. Column: CITYC - CITY CODE
CITY_NM VARCHAR(35) This is the name of the city where the plant Table: T001W-PLANT/BRANCHES
is located. Column: ORT01-CITY
COMPANY_CD VARCHAR(4) This is the code representing the company Table: T001K- VALUATION AREA,
responsible for the valuation of this Plant. T001W-PLANT/BRANCHES
Column: T001K.BUKRS, T001K.BWKEY,
T001W.KWKEY
select T001K.BUKRS
from T001K, T001W
where T001K.BWKEY.T001W.BWKEY
T001K.BUKRS-Company code-Char(4)
T001K.BWKEY-Valuation area-Char(4)
T001W.BWKEY-Valuation area-Char(4)
COUNTRY_CD VARCHAR(3) This is the code representing the country Table: T001W-PLANT/BRANCHES
where the plant is located. Column: LAND1-COUNTRY KEY
COUNTRY_NM VARCHAR(15) This is the textual description of the country Table: T005T-COUNTRY NAMES
where the plant is located. Column: 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 Table: T001W-PLANT/BRANCHES
where the plant is located. It is used to Column: COUNC-COUNTY CODE
group cities into counties for tax purposes. It
is used only in the USA for handling county
taxes.
DIVISION_CD VARCHAR(2) This is the code representing the division Table: T001L-STORAGE LOCATIONS,
with which the plant is associated. A division T001W-PLANT/BRANCHES
is a way of grouping materials, products, or Column: SPART-DIVISION FOR
services, based on the sales area or the INTERCOMPANY BILLING
business area that it belongs to. A product is
When mapping to a storage location = '-'
always assigned to just one division, from
then this field maps to T001W.SPART
the point of view of sales and distribution.
The use of divisions lets you organize your
When mapping to a storage location <> '-'
sales around groups of similar products or
then this field maps to T001L.SPART
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.
DIVISION_NM VARCHAR(20) This is the textual description of the division Table: TSPAT-ORGANIZATIONAL UNIT:
with which the plant is associated. A division SALES DIVISIONS: TEXTS
is a way of grouping materials, products, or Column: VTEXT-NAME
services, based on the sales area or the
filter by SPRAS (language key)
business area that it belongs to. A product is
Lookup to TSPAT using SPART (Division) =
always assigned to just one division, from
Division Cd
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.
FISCAL_VARIAN VARCHAR(2) This is the code representing the fiscal Table: T001-COMPANY CODES
T_CD calendar that is used by the plant for Column: PERIV-FISCAL YEAR VARIANT
accounting purposes. Lookup to T001 (Company) where BUKRS
= Company Cd
LOCAL_CURREN VARCHAR(5) This is the code representing the currency in Table: T001W, T001K, T001
CY_CD which the company that created the Column: WAERS, BWKEY, BUKRS
document prefers to work. Currencies are
Select T001.WAERS
applicable to monetary amounts. For
from T001, T001W, T001K
example, if the currency which the
where T001W.BWKEY = T001K.BWKEY
concerned company prefers to work in is
and T001.BUKRS = T001K.BUKRS
Canadian dollars, the code representing it
may be CAD. This is used on reports that
T001W - Plants/Branches,
are specific to the company that created the
T001K - Valuation area,
document. Such reports display the
T001 - Company Codes
monetary amounts stored in the data
warehouse (which are in group currency) in
T001.WAERS Currency key-Char(5)
the currency of the company concerned.
T001W.BWKEY - Valuation area-Char(4)
T001.BUKRS - Company code-Char(4)
MRP_STRG_LCT CHAR(1) This is an indicator that specifies whether to Table: T001L-STORAGE LOCATIONS
N_CD exclude or not a storage location from Column: DISKZ-STORAGE LOCATION
material requirements planning at the Plant MRP INDICATOR
level. If this indicator is not set, stock,
Pass 1: loading Plants/no storage location
requirements, and receipts are included in
- use default value for unknown value
the Manufacturing Resource Planning
(MRP) at plant level.
Pass 2: loading Plants/with storage
locations
- join of T001W to T001L using WERKS
(plant)
MRP_STRG_LCT VARCHAR(60) Descriptive text for a MRP STORAGE Table: DD07T - DD: TEXTS FOR DOMAIN
N_DSC LOCATION CODE value. FIXED VALUES (LANGUAG
Column: DDTEXT - SHORT TEXT FOR
FIXED VALUES
Pass 1: loading Plants/no storage location
- use default value for unknown value
Stock Class
Target 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
CREATED_DT DATE This represents the date and time of ETL generated.
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.
OVRL_STTS_LVL VARCHAR(50) This is the level 1 to 5 of a hierarchy that These are user entered status fields. Set to
1_DSC to describes the status associated with a stock default value in ETL.
OVRL_STTS_LVL class. A stock class is a combination of
5_DSC 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.
QLTY_INSPCTN_ SMALLINT This multiplier is applied to the computation If Stock_Type_Cd in
MULT of KPIs. This multiplier is set to 1 if the QualityInspectionStockTypeParameter then
quality inspection has been done. set to 1 (QI required)
else
set to default value (QI not required)
endif
SPECIAL_STOCK CHAR(1) This is the code representing the type of Table: T148
_CD stock in terms of its management. For Column: SOBKZ-SPECIAL STOCK
example, "consignment stock" of a material INDICATOR
needs to be managed separately.
Pass 1, 2: T148.SOBKZ
Pass 3, 4: {DEFAULT_SHORT_CHAR}
SPECIAL_STOCK VARCHAR(20) This is the textual description of the type of Table: T148T
_DSC stock in terms of its management. For Column: SOTXT-DESCRIPTION OF
example, "consignment stock" of a material SPECIAL STOCK
needs to be managed separately.
Lookup to T148T using Special Stock Code
and Filtering by Language Parameter
(SPRAS)
STOCK_CLASS_ INTEGER This is a data warehouse system generated System generated unique id.
SID unique identifier for the stock class.
STOCK_CLSS_DI VARCHAR(150) This is the primary key for this entity. This key is composed of:
M_ID STOCK_TYPE_CD
SPECIAL_STOCK_CD
STOCK_TYPE_C VARCHAR(10) This is the code representing the type of Pass 1, 3: DD07T.DOMVALUE_L
D stock in terms of its fitness of use. Examples Pass 2, 4: T064B.BSTAR
include "unrestricted-use" stock, stock "in
quality inspection", and "blocked" stock. DOMVALUE_L - VALUES FOR DOMAINS
BSTAR - STOCK TYPE
STOCK_TYPE_D VARCHAR(60) This is the textual description of the type of Table: DD07T
SC stock in terms of its fitness of use. Examples Column: DDTEXT-SHORT TEXT FOR
include "unrestricted-use" stock, stock "in FIXED VALUES
quality inspection", and "blocked" stock. 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}
USER_DEFINED SMALLINT This is an user-defined multiplier. The usage This is user defined. This should be set to a
1_MULT to of It is optional. The default value of it is default value = 0;
USER_DEFINED zero.
5_MULT
VENDOR_CONS SMALLINT This multiplier is applied to the computation If Special_Stock_Cd in
_MULT of KPIs. This multiplier is set to 1 if the VendorConsignmentSpecialStockParameter
movement is into or out of a Vendor then
consignment. A vendor consignment is a set to 1 (on vendor consignment)
material movement where the material is else
located at the vendor location. set to default value (not on vendor
consignment)
endif
Column mapping
BATCH_NO VARCHAR(10) This is the source system unique identifier Pass 1: MCHB.CHARG
for the batch in the source system. A batch Pass 2: MSPR.CHARG
is a grouping of material manufactured in a Pass 3: MSKA.CHARG
single production run that is managed Pass 4: MKOL.CHARG
together. This applies to stocks of materials Pass 5: MSKU.CHARG
managed in batches. Pass 6: MSLB.CHARG
Pass 7: Default number
COMPANY_CD VARCHAR(4) This is the code representing the company Table: T001K
that the plant belongs to. Column: BUKRS
All Passes
Lookup to T001K.BUKRS where
T001K.BWKEY = VALUATION_AREA_CD
VALUATION_AREA_CD logic is in
VALUATION_AREA_CD attribute
COST_METHOD_ VARCHAR(2) This is the code representing the method of Not required
CD pricing to use in valuating stock of a
material. Examples include "Standard
Price", "Moving Average Price", or "Periodic
Unit Price".
DELETION_IND CHAR(1) This is a flag that indicates that this record Pass 1:
should be considered as deleted. 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'?
FISCAL_YEAR_V VARCHAR(4) The year of a given financial calendar that Pass 1: MARD.LFGJA
AL the Opening Balance Extract Date (As At Pass 2: MSPR.LFGJA
Date) falls in. Pass 3: MSKA.LFGJA
Pass 4: MKOL.LFGJA
Pass 5: MSKU.LFGJA
Pass 6: MSLB.LFGJA
Pass 7: MARC.LFGJA
INVENTORY_BLK CHAR(1) This indicates whether the Material at the Table: SEE SOURCE LOGIC
_IND Plant is blocked for an unspecified reason. Column: 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_CURREN VARCHAR(5) This is the code representing the currency in Table: T001
CY_CD which the company that created the Column: WAERS
document prefers to work. Currencies are
All Passes
applicable to monetary amounts. For
Lookup to T001K.WAERS where
example, if the currency which the
T001K.BWKEY = VALUATION_AREA_CD
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.
MATERIAL_ID VARCHAR(18) This is the source system unique identifier Pass 1: MARD.MATNR
of the material being stocked. Pass 2: MSPR.MATNR
Pass 3: MSKA.MATNR
Pass 4: MKOL.MATNR
Pass 5: MSKU.MATNR
Pass 6: MSLB.MATNR
Pass 7: MARC.MATNR
PLANT_ID VARCHAR(4) This is the source system unique identifier Pass 1: MARD.WERKS
of the plant where the material is stocked. Pass 2: MSPR.WERKS
Pass 3: MSKA.WERKS
Pass 4: MKOL.WERKS
Pass 5: MSKU.WERKS
Pass 6: MSLB.WERKS
Pass 7: MARC.WERKS
POSTING_PERIO NUMBER(2,0) The posting period of the Fiscal Year of a Pass 1: MARD.LFMON
D_NO given financial calendar that the Opening Pass 2: MSPR.LFMON
Balance Extract Date (As At Date) falls in. Pass 3: MSKA.LFMON
Pass 4: MKOL.LFMON
Pass 5: MSKU.LFMON
Pass 6: MSLB.LFMON
Pass 7: MARC.LFMON
SPECIAL_STOCK CHAR(1) This is a code representing types of stock Pass 1: Default short char
_CD that need special handling,e.g., Pass 2: MSPR.SOBKZ
consignment stock. Pass 3: MSKA.SOBKZ
Pass 4: MKOL.SOBKZ
Pass 5: MSKU.SOBKZ
Pass 6: MSLB.SOBKZ
Pass 7: Default short char
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), null
Same 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), null
Same 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
STOCK_TYPE_C VARCHAR(2) This is a code representing the type of stock Derived from Pivot in all cases. See
D with regard to its availability for issue. For STOCK_QTY
example: "unrestricted-use" stock is
available for issue, whereas stock "in quality
inspection" or stock that is "blocked" for
some unspecified reason is not.
STORAGE_LCTN VARCHAR(4) This is the code representing the physical Pass 1: MARD.LGORT
_CD storage location in the plant where the Pass 2: MSPR.LGORT
stocks are held. Pass 3: MSKA.LGORT
Pass 4: MKOL.LGORT
Pass 2:
Lookup to T001W.BWKEY where
MSPR.WERKS = T001W.WERKS
Pass 3:
Lookup to T001W.BWKEY where
MSKA.WERKS = T001W.WERKS
Pass 4:
Lookup to T001W.BWKEY where
MKOL.WERKS = T001W.WERKS
Pass 5:
Lookup to T001W.BWKEY where
MSKU.WERKS = T001W.WERKS
Pass 6:
Lookup to T001W.BWKEY where
MSLB.WERKS = T001W.WERKS
Pass 7:
Lookup to T001W.BWKEY where
MARC.WERKS = T001W.WERKS
Pass 3:
Lookup to MCHA.BWTAR where
MSKA.MATNR = MCHA.MATNR and
MSKA.WERKS = MCHA.WERS and
MSKA.CHARG = MCHA.CHARG
Pass 4:
Lookup to MCHA.BWTAR where
MKOL.MATNR = MCHA.MATNR and
MKOL.WERKS = MCHA.WERS and
MKOL.CHARG = MCHA.CHARG
Pass 5:
Lookup to MCHA.BWTAR where
MSKU.MATNR = MCHA.MATNR and
MSKU.WERKS = MCHA.WERS and
MSKU.CHARG = MCHA.CHARG
Pass 6:
Lookup to MCHA.BWTAR where
MSLB.MATNR = MCHA.MATNR and
MSLB.WERKS = MCHA.WERS and
MSLB.CHARG = MCHA.CHARG
Stock Overview
Target 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.
Column mapping
Derivation or
source
Column name Datatype Description mapping
ABS_STK_ACCR NUMBER This is the accuracy of the physical inventory levels expressed as a
CY_PCT 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.
Derivation or
source
Column name Datatype Description mapping
AVG_STCK_LVL_ NUMBER(18,3) This is the average of the stock levels for the time period concerned
QTY (day, week, or month). This is used in business questions such as the
following:
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 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 days
15 based on the Average of the Daily Close Stock Level of each day
Derivation or
source
Column name Datatype Description mapping
AVG_UR_STK_LV NUMBER(18,3) This is the average of the stock levels for the time period concerned
L_QTY (day, week, or month) for "unrestricted-use" stock types only. This is
used in business questions such as the following:
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 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 days
15 based on the Average of the Daily Close Stock Level of each day
Derivation or
source
Column name Datatype Description mapping
CLOSE_STCK_L NUMBER(18,3) This is the stock level at the end of a time period (day, week, or
VL_QTY month).
CLS_UR_STK_LV NUMBER(18,3) This is the stock level at the end of a time period (day, week, or month)
L_QTY for "unrestricted-use" stock types only.
CUMULATIVE_U NUMBER(18,3) This is the sum of the past usage of stocks for period of time (day,
SG_QTY week, or month).
FISCAL_PERIOD INTEGER This is a foreign key to the FISCAL entity that is identified by the
_SID relationship name "fiscal period" sourced from the Logical Data
Model.
FORECAST_USA NUMBER(18,3) This is the predicted usage of the stocks in the time period concerned
GE_QTY (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 INTEGER This is a foreign key to the MATERIAL STORAGE entity that is
_SID identified by the relationship name "material storage" sourced from
the Logical Data Model.
MAX_STK_LVL_Q NUMBER(18,3) This is the highest value of the stock level in a time period (day, week,
TY or month).
MAX_UR_STK_L NUMBER(18,3) This is the highest value of the stock level in a time period (day, week,
VL_QTY or month) for "unrestricted-use" stock types only.
MIN_STK_LVL_Q NUMBER(18,3) This is the lowest value of the stock level in the time period concerned
TY (day, week, or month).
MIN_UR_STK_LV NUMBER(18,3) This is the lowest value of the stock level in the time period concerned
L_QTY (day, week, or month) for "unrestricted-use" stock types only.
MOVING_AVG_U NUMBER(18,3) This is the moving average of the stock usage quantities for the time
SG_QTY 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 NUMBER(18,3) This is the moving average of the stock levels for the time period
_QTY 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 NUMBER(18,3) This is the moving average of the stock levels for the time period
_L_QTY 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_L NUMBER(18,3) This is the stock level at the beginning of a time period (day, week, or
VL_QTY month).
Derivation or
source
Column name Datatype Description mapping
OPN_UR_STK_L NUMBER(18,3) This is the stock level at the beginning of a time period (day, week, or
VL_QTY month) for "unrestricted-use" stock types only.
OVERSTOCK_QT NUMBER(18,3) This is the quantity of stock that is greater than the quantity needed to
Y meet short term demand.
OVRSPPLY_USG NUMBER(18,3) This is calculated by taking the replenishment period established for
_QTY 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_D NUMBER This is the number of physical inventory counts that have been
OC_CNT 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_ACC NUMBER This is the accuracy of the physical inventory levels expressed as a
RC_PCT 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 NUMBER(18,3) This is the quantity of expected future usage, reflecting either actual
_QTY 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_ NUMBER(18,3) This is the standard deviation of the stock usage quantities for a time
QTY 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 NUMBER This is the number of days over which a stock level was zero in a time
_CNT period (day, week, or month).
ZERO_STOCK_C NUMBER This is the number of times that the stock level dipped to zero time
NT period concerned (day, week, or month).
ZERO_STOCK_C INTEGER This is the date on which the Zero Stock Count field was last updated.
NT_DT
CREATED_DT DATE This represents the date and time of System generated
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.
CRRCTD_FRCST NUMBER(13,3) A manually entered value which corrects the Table: PROW
_QTY system calculated forecast value from a Column: KOPRW - CORRECTED
forecast run. FORECAST VALUE
FORECAST_MTH INTEGER This is a foreign key to the STOCK USAGE Table: PROP
D_SID FORECAST METHOD entity that is Column: PRMOD - FORECAST MODEL
identified by the relationship name "forecast
Lookup to STOCK_USG_FRCST_MTHD
method" sourced from the Logical Data
dimension to retrieve
Model.
FORECAST_MTHD_SID
where PROP.PRMOD =
FORECAST_MTHD_CD
FORECAST_PRD CHAR(1) This is the periodic code of the forecast (i.e. Table: MAPR
C_CD D = Daily, W = Weekly, M = Monthly). Column: PERKZ - PERIOD INDICATOR
FORECAST_PRD NUMBER(3) This is the count of periods included in the Table: PROP
_CNT forecast. Column: ANZPR - NUMBER OF
FORECAST PERIODS
FORECAST_RUN INTEGER(8) This is a foreign key to the TIME entity that Table: MAPR
_DT is identified by the relationship name "stock Column: DATUM - DATE AND TIME,
usage forecast was run at time" sourced CURRENT (APPLICATION SERVER
from the Logical Data Model.
FORECAST_STA INTEGER(8) This is a foreign key to the TIME entity that Table: PROP
RT_DT is identified by the relationship name "stock Column: PRDAT - DATE OF LAST
usage forecast period starts on time" FORECAST
sourced from the Logical Data Model.
FRCST_FSCL_P INTEGER This is a foreign key to the FISCAL entity Table: PROW
RD_SID that is identified by the relationship name Column: ERTAG
"stock usage forecast made for fiscal"
Lookup fiscal period in All Time using
sourced from the Logical Data Model.
PROW.ERTAG and the fiscal variant.
FRCST_PRD_ST INTEGER(8) This is a foreign key to the TIME entity that Table: PROW
RT_DT is identified by the relationship name "stock Column: ERTAG - FRST DY OF THE PRD
usage forecast period starts at date in time" TO WHCH THE VALS REFER
sourced from the Logical Data Model.
MATERIAL_SID INTEGER This is a foreign key to the MATERIAL entity Table: MAPR
that is identified by the relationship name Column: MATNR, WERKS
"material dim" sourced from the Logical
Lookup to Material Storage dimension to
Data Model.
retrieve Material_Strg_Sid where
MAPR.MATNR =
MATERIAL_STORAGE.MATERIAL_ID and
MAPR.WERKS =
MATERIAL_STORAGE.PLANT_ID
MATERIAL_STRG INTEGER This is a foreign key to the MATERIAL Table: MAPR
_SID STORAGE entity that is identified by the Column: MATNR, WERKS
relationship name "material storage dim"
Lookup to Material Storage dimension to
sourced from the Logical Data Model.
retrieve Material_Strg_Sid where
MAPR.MATNR =
MATERIAL_STORAGE.MATERIAL_ID and
MAPR.WERKS =
MATERIAL_STORAGE.PLANT_ID
To retrieve MARA.MEINS,
Lookup to MARA.MEINS where
MAPR.MATNR = MARA.MATNR
FORECAST_MET VARCHAR(60) This is the textual name that interprets the Table: DD07T
HOD_NM forecasting method code. Column: DDTEXT
Select DDTEXT from DD07T
where DOMNAME = 'PRMOD'
and DDLANGUAGE = Language Parameter
FORECAST_MTH INTEGER This is a data warehouse system generated The ETL generated unique identifier for the
D_SID unique identifier for the forecast version. dimension.
FRCST_MTHD_D VARCHAR(150) This is the primary key for this entity. This key is composed of:
IM_ID FORECAST_METHOD_CD
Stockout
Target 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
CREATED_DT DATE This represents the date and time of Created by the ETL.
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.
STOCKOUT_DIM VARCHAR(150) This is the primary key for this entity. This key is composed of:
_ID PLANT_ID
STORAGE_LCTN_CD
MATERIAL_ID
VALUATION_AREA_CD
VALUATION_TYPE_CD
STOCKOUT_DT
STOCKOUT_DT INTEGER This is the date when the stockout occurred.
Storage Bin
Target 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
Pass 2
default short char
Pass 3
default short char
BIN_LOAD_UOM VARCHAR(3) This is a code representing the unit of SAP short text: Weight Unit
_CD weight used if the capacities specified
represent mass. Pass 1
LAGP.GEWEI
Pass 2
default short char
Pass 3
default short char
Pass 3
set to 0
BIN_QUANTS_Q NUMBER(7,0) This is the number of quants in a storage SAP short text: Number of quants in storage
TY bin. This number is automatically filled by bin
the system during stock placements and Pass 1
stock removals. LAGP.ANZQU
Pass 2
set to 0
Pass 3
set to 0
BIN_SECTION_ID CHAR(1) This is the identifier for the Bin Sectioning. Pass 1
In stock placement strategies, this decides LAGP.PLAUF
which storage unit types and how many
storage units of each type can be placed Pass 2
into storage. The sectioning is determined default short char
dynamically in the storage bin by the first
storage unit placed in the bin. The Pass 3
sectioning is deleted as soon as the last unit default short char
has been removed from the bin.
BIN_SORT_FIEL VARCHAR(9) This is the sort order of the bins. It is used Pass 1
D_TXT by the system for sorting empty bins. By LAGP.SORLP
automatically setting an entry in the field
when the storage bins are created, the Pass 2
system ensures that materials are placed default short char
into stock in the warehouse in a different
manner. For example, the warehouse is not Pass 3
filled aisle by aisle, but evenly from front to default short char
back.
BIN_TOTAL_CAP NUMBER(11,3) This is the total capacity of the storage bin. SAP short text: Total capacity of storage bin
_QTY This value must correspond to the capacity Pass 1
usage values that can be defined in the LAGP.LKAPV
material master or for the storage unit type.
Pass 2
set to 0
Pass 3
set to 0
BIN_TYPE_CD VARCHAR(2) This is a code representing the classification SAP short text: Storage bin type
of storage bins according to physical
characteristics, e.g.; high bin, liquid storage Pass 1
bin, etc. LAGP.LPTYP
Pass 2
default short char
Pass 3
default short char
Pass 2
default short char
Pass 3
default short char
BIN_UNIT_MAX_ NUMBER(5,0) This is the maximum number of storage SAP short text: Maximum number of storage
QTY units in storage bin. units in storage bin
Pass 1
LAGP.MAXLE
Pass 2
set to 0
Pass 3
set to 0
BIN_UNIT_QTY NUMBER(9,3) This is the current number of storage units SAP short text: Number of storage units in
in the storage bin. This value is updated storage bin
during stock placements and removals. Pass 1
LAGP.ANZLE
Pass 2
set to 0
Pass 3
set to 0
Pass 2
set to default short char
Pass 3
set to default short char
BLOCK_REASON CHAR(1) This is the code representing why the stock SAP short text: Blocking reason
_CD is being blocked from using this storage bin.
Pass 1
LAGP.SPGRU
Pass 2
default short char
Pass 3
default short char
Pass 2
default short char
Pass 3
default short char
CHANGED_DT DATE This represents the date and time of update Created by the ETL.
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 Created by the ETL.
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.
Pass 2
set to default short char
Pass 3
set to default short char
INVENTORY_PR CHAR(1) This is an indicator of whether a storage bin SAP short text: Inventory in preparation
EP_IND has been recorded in system inventory as Pass 1
being counted. An "x" in this field indicates IF LAGP.IVIVO = X
that the storage bin is recorded in a system then
inventory for the purpose of being counted. SET INVENTORY_PREP_IND = 'Y'
This prevents a storage bin from being ELSE
recorded in two different inventory records SET INVENTORY_PREP_IND = 'N'
at the same time. This indicator is
automatically set during the physical Pass 2
inventory process. set to default short char
Pass 3
set to default short char
INV_MTHD_CD VARCHAR(2) Represents the type of physical inventory SAP short text: Inventory method
count to be used, or has already been
taken. Possible values include a "PE" which Pass 1
represents "continuous inventory upon LAGP.KZINV
placement into stock or "ST" represents
"annual inventory", etc. Pass 2
default short char
Pass 3
default short char
Pass 2
default short char
Pass 3
default short char
STORAGE_BIN_ VARCHAR(150) This is the primary key for this entity. This key is composed of:
DIM_ID WAREHOUSE_NO
STORAGE_TYPE_CD
STORAGE_BIN_ID
Pass 2
default short char
Pass 3
default short char
STORAGE_BIN_ INTEGER This is a data warehouse system generated System generated unique id.
SID unique identifier for the storage bin.
Pass 3
default short char
STORAGE_SECT VARCHAR(25) This is the textual description representing SAP short text: Name of storage area
ION_NM the storage sections that divide up a Pass 1
warehouse. Lookup T302T.LBERT
where T302T.LGNUM = LAGP.LGNUM and
T302T.LGTYP = LAGP.LGTYP and
T302T.LGBER = LAGP.LGBER and
SPRAS = LanguageParameter
Pass 2
default short char
Pass 3
default short char
Pass 3
default short char
Pass 2
T301T.LTYPT where
T301T.LGNUM = T301.LGNUM and
T301T.LGTYP = T301.LGTYP and
T301T.SPRAS = LanguageParmeter
Pass 3
default short char
WAREHOUSE_N VARCHAR(25) This is the textual description that SAP short text: Warehouse number
M represents a complex, physical warehouse description
structure within the Warehouse Pass 1
Management System. Lookup T300T.LNUMT
where T300T.LGNUM = LAGP.LGNUM and
T300T.SPRAS = LanguageParameter
Pass 2
Lookup T300T.LNUMT
where T300T.LGNUM = T301.LGNUM and
T300T.SPRAS = LanguageParameter
Pass 3
Lookup T300T.LNUMT
where T300T.LGNUM = T300.LGNUM and
T300T.SPRAS = LanguageParameter
Unit of Measure
Target 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.
Column mapping
CREATED_DT DATE This represents the date and time of ETL generated.
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.
EXTERNAL_UOM VARCHAR(3) The language dependant textual value Table: T006A - ASSIGN INTERNAL TO
_DSC displayed by the source system in place of a LANGUAGE-DEPENDENT UNIT
standard code used by the source system Column: MSEH3 - EXTERNAL UNIT OF
for a unit of measure. MEASUREMENT COMMERCIAL FO
Select T006A.MSEH3
from T006A, T006
where T006A.SPRAS = E (language)
and T006A.MSEHI = T006.MSEHI
UOM_DIM_DSC VARCHAR(20) This is the textual description of the type of Table: T006T, T006
measurement (i.e.; volume, weight or Column: TXDIM
length) for a unit of measure. Select T006T.TXDIM
from T006T, T006
where T006T.DIMID = T006.DIMID
and 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 Table: T006A, T006
measure. Column: MSEHT
Select T006A.MSEHT
from T006A, T006
where T006.SPRAS = E (language)
and T006A.MSEHI = T006.MSEHI
UOM_SID INTEGER This is a data warehouse system generated System generated unique id.
unique identifier for the unit of measure.
BUOM_SI_CNST NUMBER(9,6) This is the constant value used when Table: T006-UNITS OF MEASUREMENT
NT_VAL converting temperatures to the international Column: ADDKO-ADDITIVE CONSTANT
systems (SI) unit Kelvin. The SI unit is the FOR CONVERSION TO SI UNIT
basis for conversion from one unit of
T006.ADDKO where T006.DIMID =
measurement to another.
T006D.DIMID and
Basic equation: Measurement unit =
T006.MSEHI = T006D.MSSIE
(Numerator /Denominator) x SI unit.
Complete equation: Measurement unit =
T006-UNITS OF MEASUREMENT
(Numerator /Denominator * 10**Exponent +
T006D-Dimensions
Constant (temperature only)) * SI unit.
T006.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_DNMN NUMBER(10,0) This is the conversion factor for the Table: T006-UNITS OF MEASUREMENT
TR_VAL denominator to SI unit. SI unit represents Column: NENNR-DENOMINATOR FOR
SYSTEME INTERNATIONAL unit and is the CONVERSION INTO SI UNIT
basis for conversion from one unit of T006.NENNR where T006.DIMID =
measurement to another. Basic equation: T006D.DIMID and
Measurement unit = (Numerator T006.MSEHI = T006D.MSSIE
/Denominator) x SI unit. Complete
equation: Measurement unit = (Numerator T006-UNITS OF MEASUREMENT
/Denominator * 10**Exponent + Constant T006D-Dimensions
(temperature only)) * SI unit. T006.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 ETL derived. Changed_Dt is set to
of the warehouse record. This field is Created_Dt on insert of row.
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 ETL derived.
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.
DIMENSION_CD VARCHAR(6) This is a code representing the dimension Table: T006-UNITS OF MEASUREMENT
being measured using the UOM table. For Column: DIMID-DIMENSION KEY
example V = volume, W = mass, L = length,
etc.
DIMENSION_TXT VARCHAR(20) This is a textual description representing the Table: T006T-DIMENSION TEXT
dimension being measured using the UOM Column: TXTDIM-DIMENSION TEXT
table. For example volume, mass, length,
Filter by SPRAS (language code). Join to
temperature etc.
this table using the DIMENSION_KEY_CD
(DIMID).
FROM_UOM_CD VARCHAR(3) This is the code representing the unit of Table: T006-UNITS OF MEASUREMENT
measure being converted from. Column: MSEHI-UNIT OF MEASUREMENT
FUOM_SI_DNMN NUMBER(10,0) This is the conversion factor for the Table: T006-UNITS OF MEASUREMENT
TR_VAL denominator to SI unit. SI unit represents Column: NENNR-DENOMINATOR FOR
SYSTEME INTERNATIONAL unit and is the CONVERSION INTO SI UNIT
basis for conversion from one unit of
T006.NENNR from t1 where T006.MSEHI
measurement to another. Basic equation:
t1!= T006.MSEHI t2 and T006.DIMID t1 =
Measurement unit = (Numerator
T006.DIMID t2
/Denominator) x SI unit. Complete
equation: Measurement unit = (Numerator
T006-UNITS OF MEASUREMENT
/Denominator * 10**Exponent + Constant
T006.DIMID -Dimension key - Char(6)
(temperature only)) * SI unit.
T006.MSEHI -Unit of measurement -
Char(3)
FUOM_SI_EXPN NUMBER(5,0) This is the conversion factor for the base 10 Table: T006-UNITS OF MEASUREMENT
TN_VAL exponent, to SI unit. SI unit represents Column: EXP10-BASE TEN EXPONENT
SYSTEME INTERNATIONAL unit and is the FOR CONVERSION TO SI UNIT
basis for conversion from one unit of T006.EXP10 from t1 where T006.MSEHI
measurement to another. Basic equation: t1!= T006.MSEHI t2 and T006.DIMID t1 =
Measurement unit = (Numerator T006.DIMID t2
/Denominator) x SI unit. Complete
equation: Measurement unit = T006-UNITS OF MEASUREMENT
(Numerator /Denominator * 10**Exponent + T006.DIMID -Dimension key - Char(6)
Constant (temperature only)) * SI unit. T006.MSEHI -Unit of measurement -
Char(3)
FUOM_SI_NMRT NUMBER(10,0) This is the conversion factor for the Table: T006-UNITS OF MEASUREMENT
R_VAL numerator to SI unit. SI unit represents Column: ZAEHL-NUMERATOR FOR
SYSTEME INTERNATIONAL unit and is the CONVERSION TO SI UNIT
basis for conversion from one unit of
T006.ZAEHL from t1 where T006.MSEHI
measurement to another. Basic equation:
t1!= T006.MSEHI t2 and T006.DIMID t1 =
Measurement unit = (Numerator
T006.DIMID t2
/Denominator) x SI unit. Complete
equation: Measurement unit = (Numerator
T006-UNITS OF MEASUREMENT
/Denominator * 10**Exponent + Constant
T006.MSEHI - Unit of Measurement -
(temperature only)) * SI unit.
Char(3)
T006.DIMID - Dimension Key - Char(6)
TO_UOM_CD VARCHAR(3) This is the code representing the unit of Table: T006-UNITS OF MEASUREMENT
measure being converted to. Column: MSEHI - UNIT OF
MEASUREMENT
TUOM_SI_CNST NUMBER(9,6) This is the conversion factor for the Table: T006-UNITS OF MEASUREMENT
NT_VAL temperature constant, to SI unit. SI unit Column: ADDKO-ADDITIVE CONSTANT
represents SYSTEME INTERNATIONAL FOR CONVERSION TO SI UNIT
unit and is the basis for conversion from one
T006.ADDKO from t2 where T006.MSEHI
unit of measurement to another. Basic t1!= T006.MSEHI t2 and T006.DIMID t1 =
equation: Measurement unit = (Numerator T006.DIMID t2
/Denominator) x SI unit. Complete equation:
Measurement unit = (Numerator T006-UNITS OF MEASUREMENT
/Denominator * 10**Exponent + Constant T006.DIMID -Dimension key - Char(6)
(temperature only)) * SI unit. T006.MSEHI -Unit of measurement -
Char(3)
TUOM_SI_EXPN NUMBER(5,0) This is the conversion factor for the base 10 Table: T006-UNITS OF MEASUREMENT
TN_VAL exponent, to SI unit. SI unit represents Column: EXP10-BASE TEN EXPONENT
SYSTEME INTERNATIONAL unit and is the FOR CONVERSION TO SI UNIT
basis for conversion from one unit of
T006.EXP10 from t2 where T006.MSEHI
measurement to another. Basic equation:
t1!= T006.MSEHI t2 and T006.DIMID t1 =
Measurement unit = (Numerator
T006.DIMID t2
/Denominator) x SI unit. Complete
equation: Measurement unit =
T006-UNITS OF MEASUREMENT
(Numerator /Denominator * 10**Exponent +
T006.DIMID -Dimension key - Char(6)
Constant (temperature only)) * SI unit.
T006.MSEHI -Unit of measurement -
Char(3)
TUOM_SI_NMRT NUMBER(10,0) This is the conversion factor for the Table: T006-UNITS OF MEASUREMENT
R_VAL numerator to SI unit. SI unit represents Column: ZAEHL-NUMERATOR FOR
SYSTEME INTERNATIONAL unit and is the CONVERSION TO SI UNIT
basis for conversion from one unit of T006.ZAEHL from t2 where T006.MSEHI
measurement to another. Basic equation:
t1!= T006.MSEHI t2 and T006.DIMID t1 =
Measurement unit = (Numerator
T006.DIMID t2
/Denominator) x SI unit. Complete
equation: Measurement unit = (Numerator
T006-UNITS OF MEASUREMENT
/Denominator * 10**Exponent + Constant
T006.DIMID -Dimension key - Char(6)
(temperature only)) * SI unit.
T006.MSEHI -Unit of measurement -
Char(3)
UOM_CONV_DIM VARCHAR(150) This is the primary key for this entity. This key is composed of:
_ID FROM_UOM_CD
TO_UOM_CD
Valuation
Target 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).
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
CREATED_DT DATE This represents the date and time of ETL generated
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.
MATERIAL_ID VARCHAR(18) This is the source system unique identifier Table: MBEW
of the material being valuated. Column: MATNR-MATERIAL NUMBER
NK1
SAP short text: Material number
VALUATION_SID INTEGER This is a data warehouse system generated System generated unique identifier.
unique identifier for the valuation.
VLTN_UPRC_AM NUMBER(18,7) This is the unit price of the material in Local Table: SEE SOURCE LOGIC MAPPING
T Currency. Column: 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)
Vendor
Target 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
CHANGED_DT DATE This represents the date and time of update ETL generated. Changed_dt is set to
of the warehouse record. This field is Created_dt on insert of row.
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.
CITY_NM VARCHAR(35) This is the textual description of the city Table: LFA1-VENDOR MASTER
where the vendor is located. (GENERAL SECTION)
Column: ORT01-CITY
COMPANY_CD VARCHAR(4) This is the code representing the company, Table: LFB1-VENDOR MASTER
an organizational unit used for the purposes (COMPANY CODE)
of external accounting. Column: BUKRS
COUNTRY_CD VARCHAR(3) This is the code representing the country Table: LFA1-VENDOR MASTER
where the vendor is located. Column: LAND1-COUNTRY KEY
DISTRICT_NM VARCHAR(35) This is the name of the district where the Table: LFA1-VENDOR MASTER
vendor is located. It is appended to the city (GENERAL SECTION)
for providing further address detail. Column: ORT02-DISTRICT
INDUSTRY_CD VARCHAR(4) This is the code representing the industry Table: LFA1-VENDOR MASTER
that the vendor belongs to. Examples (GENERAL SECTION)
include trade, banking, manufacturing, Column: BRSCH-INDUSTRY KEY
health care, media, etc.
INDUSTRY_DSC VARCHAR(20) This is the textual description of the industry Table: T016T-INDUSTRY NAMES
that the vendor belongs to. Examples Column: BRTXT-DESCRIPTION OF THE
include trade, banking, manufacturing, INDUSTRY KEY
health care, media, etc. Lookup to T016T using Industry Code equal
to BRSCH and filtering by SPRAS
(language parameter).
PLAN_GROUP_C VARCHAR(10) This is the code representing the Table: LFB1-VENDOR MASTER
D classification of Vendors (and customers) (COMPANY CODE)
according to accounting rules, domestic, Column: FDGRV-PLANNING GROUP
foreign, high risk.
PLAN_GROUP_N VARCHAR(30) This is the textual description of the Table: T035T-PLANNING GROUP TEXTS
M classification of Vendors (and customers) Column: TEXTL-DESCRIPTION
according to accounting rules, domestic, Lookup on T035T using the Plan Group
foreign, high risk. Code equal to the GRUPP field and filtering
by SPRAS (language code)
POSTAL_CD VARCHAR(10) This is the postal code associated with the Table: LFA1-VENDOR MASTER
address of the vendor. (GENERAL SECTION)
Column: PSTLZ-POSTAL CODE
PURCHASE_OR VARCHAR(4) This is the code representing the purchasing Table: LFM1-VENDOR MASTER RECORD
G_CD organization with which this vendor is PURCHASING ORGANIZATION
associated. Column: EKORG-PURCHASING
ORGANIZATION
REGION_NM VARCHAR(20) This is the textual description of the region Table: T005U-TAXES: REGION KEY:
where the vendor is located. The relevant TEXTS
meaning depends on the country. In the Column: BEZEI-DESCRIPTION
USA the region would represent the state, in SELECT DISTINCT NULLIF("BLAND",’’)
Canada the province, in Switzerland the REGION_CD,
canton, in UK the county, etc. NULLIF("BEZEI",’’) REGION_NM
VENDOR_ACCO VARCHAR(10) This is the source system account number Table: LFA1-VENDOR MASTER
UNT_NO of the vendor (creditor). (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_NO
COMPANY_CD
PURCHASE_ORG_CD
VENDOR_LEVEL VARCHAR(35) This is the name of the level 1 to 5 parent of Table: VENDORHIERARCHY
1_NM to a Vendor. Vendors are part of a hierarchy, Column: LEVEL1_VENDOR_NM to
VENDOR_LEVEL where Vendors can belong to various levels LEVEL4_VENDOR_NM
4_NM 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.
VENDOR_NM VARCHAR(35) This is the name of the vendor. Table: LFA1-VENDOR MASTER
(GENERAL SECTION)
Column: NAME1-NAME 1
VENDOR_SHOR VARCHAR(10) This is the short or "significant" name of the Table: LFA1-VENDOR MASTER
T_NM vendor and is used for searches. (GENERAL SECTION)
Column: SORTL-SORT FIELD
VENDOR_SID INTEGER This is a data warehouse system generated System generated unique identifier.
unique identifier for the vendor.
VENDOR_TYPE_ VARCHAR(4) A code that classifies the vendor as an Table: LFA1-VENDOR MASTER
CD Employee, Plant, Supplier, etc. (GENERAL SECTION)
Column: KTOKK-VENDOR ACCOUNT
GROUP
VENDOR_TYPE_ VARCHAR(30) A textual description of the vendor type Table: T077Y-ACCOUNT GROUP NAMES
DSC code. Column: TXT30-ACCOUNT GROUP NAME
Lookup on T077Y using the Vendor Type Cd
(KTOKK from LFA1) and SPRAS equal to
language parameter.
VNDR_HIER_LEV SMALLINT This is the level number of the Vendor in the Table: VENDORHIERARCHY
EL_NO hierarchy. For example, if the Vendor is at Column: HIERARCHY_LEVEL_NO
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).
J P
JobStream details product
All Time, 9 version, 2
Batch, 13
Business Area, 16 V
Customer, 18
version
Financial Currency Conversion, 24
product, 2
Material, 28
Material Movement Activity, 31
Material Movement Document Class, 34
Material Reservation, 37
Material Storage, 40
Physical Inventory, 42
Plant, 44
Re-Ranking, 48
Stock Class, 50
Stock Overview, 54
Stock Usage Forecast, 62
Stock Usage Forecast Method, 64
Storage Bin, 66
Unit of Measure, 68
Valuation, 71
Vendor, 73
JobStreams
descriptions, 7-8
M
metadata tables
All Time, 85