Professional Documents
Culture Documents
EMC T D: Rma Balances (Extract Stage To Revenue Stage)
EMC T D: Rma Balances (Extract Stage To Revenue Stage)
EMC
TECHNICAL DESIGN
RMA BALANCES
(Extract Stage to Revenue Stage)
Table of Contents
DOCUMENT CHANGE CONTROL.......................................................................................................................................3
APPROVAL.................................................................................................................................................................................3
GENERAL REQUIREMENTS.................................................................................................................................................4
1. INTRODUCTION...............................................................................................................................................................5
2. DOCUMENT SCOPE.........................................................................................................................................................5
3. DESCRIPTION...................................................................................................................................................................5
4. ASSUMPTIONS..................................................................................................................................................................5
5. EXTRACT DESIGN...........................................................................................................................................................6
6. TABLES & CONDITIONS................................................................................................................................................8
A. SOURCE TABLES................................................................................................................................................................8
B. TABLE JOIN CONDITIONS...................................................................................................................................................8
C. SOURCE FILTER CONDITIONS............................................................................................................................................8
D. LOOKUP CONDITIONS........................................................................................................................................................9
E. SOURCE TO TARGET COLUMN MAPPINGS.........................................................................................................................9
F. W_ RMA_BALANCES _FS MAPPING FIELDS...............................................................................................................10
G. ACQCO_FLG: ACQCO_FLG WILL BE POPULATED BASED ON THE FOLLOWING.........................................................13
7. SAMPLE DATA................................................................................................................................................................15
A) RMA BALANCES......................................................................................................................................................15
Source Table:......................................................................................................................................................................15
Target Table........................................................................................................................................................................16
8. PARAMETERS AND VARIABLES...............................................................................................................................18
A. SESSION NUMBERS & NAMES..........................................................................................................................................18
9. ETL MAPS.........................................................................................................................................................................18
A. MAPS TO COMPLETE........................................................................................................................................................18
B. MAP(S) COMPLETED........................................................................................................................................................18
10. WORKFLOW/ SESSION SETTINGS........................................................................................................................18
11. CONTROL M JOBS.....................................................................................................................................................19
12. REFRESH FREQUENCY............................................................................................................................................19
13. SUSPENSE/ERROR HANDLING..............................................................................................................................19
14. TESTING.......................................................................................................................................................................19
15. ISSUES AND ADDITIONAL CONSIDERATIONS.................................................................................................20
16. DEPENDENCIES..........................................................................................................................................................20
17. Reviewers.......................................................................................................................................................................20
Approval
General Requirements
RMA Balances
Name: (Required)
GDW
Application: (Required)
GDW.TD.RBI.0003-1 TD
ID: (Required)
Priority: (Required)
BI.FD.0011.GDW:RMA Balances
Functional Design Reference: (Required)
Comments: (Required)
1. Introduction
This document will address the design of the ETL processes to extract data from the EXTRACT staging
environment, transform it and load to the LOAD staging environment for the RMA Balances Fact will be part of
the new Global Data Warehouse (GDW).
2. Document Scope
This document will cover the technical design details related to creating maps and configuring workflows and
sessions for given subject area.
This document also includes
the structure of the target table(s)
the data source(s) for the target table(s)
join logic between source tables
the ETL maps that will extract the data from the EXTRACT staging environment to the LOAD staging
environment for final load to the REVENUE HUB in the GDW.
This document does not include details of the actual code used to extract data from each source table to load the
target. Details on each map built will be added to this document by the assigned developer as and when each map
is completed or updated.
3. Description
The system of record for RMA Balances is SAP ECC this will hold the ordered but not delivered data.
The RMA Balances Fact table will hold a snapshot of data which is ordered but not delivered. . This table will be
refreshed 3 times a day and the final snapshot data available for some time each day. The system of record for
RMA issues is SAP ECC. The data will pass into the SAP Business Warehouse (BW), be processed for GDW in
BW, and provided via an Open Hub table /BIC/OHZRBAL_D01 is used to load the RMA Balances and Rollup RMA
Balances data into the Extract Schema table W_BW_ZRBAL_D01.
4. Assumptions
The accuracy of the results supplied by this design relies on several key assumptions and key facts listed below:
The BW data will be made available to GDW, likely by means of Open Hub as a table in the BW
database readable by Informatica.
In GDW Open Hub we need to include the RMA_Balances fields, RollupRMA fields, Summary Rollup
fields into one table.
GDW loading from Open Hub to Extract Schema will we a Pass through One to One mapping.
GDW Stage Loading from Extract to Load will be incremental.
Lookup on Dimensions is needed from Extract to Load Stage on the Dimension Tables.
All foreign keys (the dimension IDs) should be indexed in Load Staging Area.
GDW Loading from Load to Revenue will be a Pass through One to One mapping along with the Control
Columns.
These should be determined by the developer as part of the individual unit testing and tuning of each map.
Records can be stacked, i.e. you can run multiple times from EXTRACT to LOAD Schema
environments before loading to the final dimension table.
5. Extract Design
The extract design for RMA Balances is a straightforward extract, transform, load process. The standard order
RMA Balances data will be sourced from an SAP BW Open Hub table SAPSR3. / BIC/OHZRBAL_D01
ETL Steps for Backlog Fact is as follows.
ii. Create a new Pass through one to one mapping to load the data from SAP BW Open Hub to the
Extract Stage table / BIC/OHZRBAL_D01 which identifies the Incremental record changes to
process for the daily load.
iii. Create New Map/Maps between the EXTRACT Stage table and the LOAD Stage table to load
the data into the Stage table LOAD.W_RMA_BALANCES_FS.
iv. Lookup on the Dimensional Tables to get the data from all Dimensional tables.
vi. Create new map to load the data from Load stage to Revenue stage to load the data into
REVENUE.W_RMA_BALANCES_F.
viii. Purge older daily snapshots from the EXTRACT_REV table and the REVENUE fact. Drops all
date stamps in the previous two calendar months (but not the current) excepting the first day of
any month, all Mondays, and any day in the last two weeks of a quarter (after the 16th).
ix. For Reporting purpose we need to pull the RMA_BALANCES data from BRMSMDM table in
to the new REVENUE schema table REVENUE.W_RMA_BALANCES_F.
x. Below is the code to identify the data and delete the records from Revenue table
REVENUE.W_RMA_BALANCES_F (Only SAP Data)
cursor del_daily_back is
select
distinct SNPSHT_DT_STMP
from REVENUE.W_RMA_BALANCES_F b
where SNPSHT_DT_STMP between
(add_months(last_day(trunc(sysdate)), -3) + 2) and
(add_months(last_day(trunc(sysdate)), -1) + 0)
and to_char(sysdate,'DD') <> '01'
and rtrim(ltrim(to_char(SNPSHT_DT_STMP, 'DAY'))) <> 'MONDAY'
and and to_char(SNPSHT_DT_STMP,'MMYYYY') = to_char(RPTG_DT,'MMYYYY')
and (
to_char(SNPSHT_DT_STMP, 'MM') not in ('03','06','09','12')
or to_number(to_char(SNPSHT_DT_STMP, 'DD')) < 16
);
Below is the code to identify the data and delete the records from EXTRACT_REV table
SAPSR3. W_BW_ZRBAL_D01
cursor del_daily_back is
select
distinct SNPSHT_DT_STMP
from SAPSR3. W_BW_ZRBAL_D01 b
where SNPSHT_DT_STMP between
(add_months(last_day(trunc(sysdate)), -3) + 2) and
(add_months(last_day(trunc(sysdate)), -1) + 0)
and to_char(sysdate,'DD') <> '01'
and rtrim(ltrim(to_char(SNPSHT_DT_STMP, 'DAY'))) <> 'MONDAY'
and to_char(SNPSHT_DT_STMP,'MMYYYY') = to_char(RPTG_DT,'MMYYYY')
and (
to_char(SNPSHT_DT_STMP, 'MM') not in ('03','06','09','12')
or to_number(to_char(SNPSHT_DT_STMP, 'DD')) < 16
);
a. Source Tables
The following temporary and target tables are required for Backlog Fact:
The following join conditions apply for maps pulling from more than 1 source table:
Map Name Condition Name Target Table Source Tables Join Condition
d. Lookup Conditions
The following extract tables should be used as lookup sources if one of the primary tables has changed:
The column mappings from Source (EXTRACT_REV Stage) to Target (LOAD Stage) are attached. This does
not include any intermediary table mappings or control columns.
Open Hub (RMA_Balances from Extract to Load) to GDW Mapping Sheet:
Extract_to_Load_Ma
p1.xlsx
This mapping is used for historical data conversion from BRMSMDM.RMA_BALANCES and
RMA_EVAL_BALANCES
RMA_BALANCES,
SLS_ORD_LN_ID
RMA_EVAL_BALANCES LINE_ID W_RMA_BALANCES_F
RMA_BALANCES,
COMPANY_CD
RMA_EVAL_BALANCES ORG_ID W_RMA_BALANCES_F
RMA_BALANCES,
RMA_LN_NUM
RMA_EVAL_BALANCES RMA_LINE_NUMBER W_RMA_BALANCES_F
RMA_BALANCES,
ACTVT_DT
RMA_EVAL_BALANCES ACTIVATE_DATE W_RMA_BALANCES_F
RMA_BALANCES,
ACTVT_DT_WID
RMA_EVAL_BALANCES W_RMA_BALANCES_F
SHIP_TO_LOCATION_DIM_ID W_RMA_BALANCES_F SHIP_TO_LOC_WID
RMA_EVAL_BALANCES BILL_TO_LOCATION_DIM_ID W_RMA_BALANCES_F BILL_TO_LOC_WID
RMA_BALANCES,
DEAL_NUM
RMA_EVAL_BALANCES DEAL_NUMBER W_RMA_BALANCES_F
RMA_BALANCES,
RMA_LN_CMNT
RMA_EVAL_BALANCES RMA_LINE_COMMENTS W_RMA_BALANCES_F
RMA_EVAL_BALANCES CATEGORY_CODE W_RMA_BALANCES_F CAT_CD
RMA_BALANCES,
TRY_BUY_FLG
RMA_EVAL_BALANCES TRY_BUY_FLAG W_RMA_BALANCES_F
RMA_BALANCES,
LIC_MDL_PROD_WID
RMA_EVAL_BALANCES PSI_LINE_ID W_RMA_BALANCES_F
RMA_BALANCES,
PSI_LN_NUM
RMA_EVAL_BALANCES PSI_LINE_NUMBER W_RMA_BALANCES_F
REPORTING_DATE W_RMA_BALANCES_F RPTG_DT
REPORTING_DATE_TIME_DI
RPTG_DT_WID
M_ID W_RMA_BALANCES_F
RMA_BALANCES, SOLD_TO_LOCATION_DIM_I
SOLD_TO_LOC_WID
RMA_EVAL_BALANCES D W_RMA_BALANCES_F
RMA_BALANCES, INSTALL_AT_LOCATION_DIM
INSTL_AT_LOC_WID
RMA_EVAL_BALANCES _ID W_RMA_BALANCES_F
ENDUSER_LOCATION_DIM_I
ENDUSR_LOC_WID
RMA_EVAL_BALANCES D W_RMA_BALANCES_F
APPROVAL_DATE W_RMA_BALANCES_F APRVL_DT
RMA_BALANCES,
APRVL_DT_WID
RMA_EVAL_BALANCES W_RMA_BALANCES_F
RMA_BALANCES, OPERATING_UNIT_ORGNZTN
OPER_UNIT_ORG_WID
RMA_EVAL_BALANCES _DIM_ID W_RMA_BALANCES_F
RMA_BALANCES,
EVAL_MRGN_FLD_COST
RMA_EVAL_BALANCES EVAL_MARGIN_FIELDCOST W_RMA_BALANCES_F
RMA_BALANCES,
EVAL_BLP_USD
RMA_EVAL_BALANCES EVAL_BLP_DOLLARS W_RMA_BALANCES_F
RMA_BALANCES,
EVAL_LIST_USD
RMA_EVAL_BALANCES EVAL_LIST_DOLLARS W_RMA_BALANCES_F
RMA_BALANCES, BUNDLE_INVENTORY_ITEM_I
BNDLE_ITEM_NUM
RMA_EVAL_BALANCES D W_RMA_BALANCES_F
RMA_EVAL_BALANCES W_RMA_BALANCES_F BNDLE_PROD_WID
UNBUNDLED_INVENTORY_IT
UNBNDLE_ITEM_NUM
EM_ID W_RMA_BALANCES_F
RMA_EVAL_BALANCES W_RMA_BALANCES_F UNBNDLE_INV_ITEM_WID
RMA_BALANCES,
REV_FLG
RMA_EVAL_BALANCES REVENUE_FLAG W_RMA_BALANCES_F
From the above query you get the CUST_SITE_NUM and WHICK_CUST Below is the logic to get the
acquired company flag. WHICH_CUST will be taken from the above query.
7. Sample Data
The following are sample records of how the Fact records should look when populated.
a) RMA BALANCES
Source Table:
/BIC/ZGSOT11I
/BIC/ZGSHP11I
/BIC/ZGINP11I
/BIC/ZGCOSTDT
/BIC/ZGCOEDDT
/BIC/ZGBUNMO
/BIC/ZGUNBUN
Target Table
W_RMA_BALANCES_FS
PSI_PROD_WID
SLS_ORD_LN_ID
COMPANY_CD
RMA_LN_NUM
ACTVT_DT
ACTVT_DT_WID
SHIP_TO_LOC_WID
BILL_TO_LOC_WID
DEAL_NUM
RMA_LN_CMNT
CAT_CD
TRY_BUY_FLG
PSI_LN_ID
PSI_LN_NUM
RPTG_DT
RPTG_DT_WID
SOLD_TO_LOC_WID
INSTL_AT_LOC_WID
ENDUSR_LOC_WID
APRVL_DT
APRVL_DT_WID
OPER_UNIT_ORG_WID
EVAL_MRGN_FLD_COST
EVAL_BLP_USD
EVAL_LIST_USD
BNDLE_ITEM_NUM
BNDLE_PROD_WID
UNBNDLE_ITEM_NUM
UNBNDLE_PROD_WID
REV_FLG
TRNS_UPDT_RSN
ORIG_DSTRCT
GEO_FLG
TIER_2_PRTNER_CUST_LOC_WID
ACQCO_FLG
RPTG_YR_QTR_ABBRV
DEL_FLG
COST
DOLLARS
PLANT_WID
TIER_2_PRTNER_LOC_WID
ENDUSR_CUST_WID
INSTL_AT_CUST_WID
OPP_HRD_ROW_WID
QUOTE_HDR_WID
SLSREP_RSRC_ID
SOLD_TO_CUST_WID
SOLUTN_ID
W_SESSION_NUMBER
W_LAST_UPDATED_BY
W_INSERT_DT
W_UPDATE_DT
W_SOURCE
W_ROW_HASH
The following are the parameters and variables required for this process <to be completed>:
Session Numbers/Names are used to keep track of what maps were run, what tables were updated and also to keep
a record count on the tables updated.
Session Numbers & Names are assigned by the ETL team and can be found in e-room at the following link:
9. ETL Maps
a. Maps to complete
Map
Map Name Source Tables Target Tables Map Type
Purpose
Component Type Description
b. Map(s) Completed
Map
Map Name Source Tables Target Tables Map Type
Purpose
Component Type Description
<to be completed>
Please refer to the ETL Development Guidelines for EXTRACT_REV to LOAD Schema for further details on
Suspense/Error Handling Processes on W_REVENUE_SUSPENSE_S Table.
14. Testing
16. Dependencies
17. Reviewers