Currency
Transcript of Currency
© 2008 Wellesley Information Services. All rights reserved.
Crack the Currency and Unit Conversion Code
Chip BrennerBreakwater Consulting
2
What We’ll Cover …
• Overview of Currency Conversion• Step-by-Step Guide to Create a Currency Translation Type• Examples of Using Currency Conversion• Overview of Unit Conversion• Step-by-Step Guide to Create a Unit Conversion DSO• Examples of Using Unit Conversion• Wrap-up
3
Why Is Currency Conversion Needed?
• Some extractors do not include Local and Group currency• Currency conversion could allow a consistent currency for
metrics • Conversion allows values to be calculated at specified rates
For instance, to compare values at plan rates
4
How Does Currency Conversion Work?
• In SAP NetWeaver® BI, exchange rates can be read from SAP ERPThis ensures the rates are the same as in SAP ERP
• Exchange rates are stored by date so that they can change throughout the year
• For each exchange rate, there is a rate typeThis allows different rates to be used (example: Plan vs. actual)
• Currency conversion utilizes a combination of date, exchange-rate type, and the “from-currency-to-currency” function to get the rate
5
Overview of Currency Conversion
6
Overview of Currency Conversion (cont.)
• Currency Conversion can be calculated within a query or in the back-end system
Currency Conversion in a QueryBest used if values change
Example: User inputs the “to” currencyExample2: Rates may change (plan rates)
Currency Conversion in a transformationImproved performance for reporting
Example: Use the M rate in SAP ERP to translate actuals for that month
7
Overview of Currency Conversion (cont.)
• Example
To Convert EUR to USD on April 1 using the M rate100 EUR / 0.63235 = $158.14
8
What We’ll Cover …
• Overview of Currency Conversion• Step-by-Step Guide to Create a Currency Translation Type• Examples of Using Currency Conversion• Overview of Unit Conversion• Step-by-Step Guide to Create a Unit Conversion DSO• Examples of Using Unit Conversion• Wrap-up
9
Step 1: Name the Currency Translation Type
• Let’s walk through creating a Currency Translation Type –T-Code RSCUR. We’ll take as our example converting Document Currency to Company Code Currency at the plan rate.
10
Step 2: Exchange Rate Type
• The exchange rate type can be hardcoded, filled with a query variable, or determined by the InfoObject
11
Step 3: Define Currencies
• The Source and Target currencies need to be defined. In this example the target currency is determined by the currency of thecompany code (local currency).
12
Step 4: Define Time Periods
• Finally, the time period for the rate must be specified
13
Step 5: Transfer Exchange Rates
• Transferring Exchange Rates from SAP ERP
14
Step 5: Transfer Exchange Rates (cont.)
• Transferring Exchange Rates from SAP ERP (cont.)
15
Summary of Currency Translation
• Convert all currencies to Company Code currencyDynamically converts based on the 0Comp_Code in the record
• Use the Plan Rate for the Conversion• Use the date from Fiscal Year/Period
The conversion will dynamically convert the amounts based on 0FISCPER in the data record
16
What We’ll Cover …
• Overview of Currency Conversion• Step-by-Step Guide to Create a Currency Translation Type• Examples of Using Currency Conversion• Overview of Unit Conversion• Step-by-Step Guide to Create a Unit Conversion DSO• Examples of Using Unit Conversion• Wrap-up
17
Example (1): Currency Conversion in a Query
• Conversion can happen directly in a query if it is not feasible to store the data in the back end
In the query, select a key figure restricted by the “from currency” in the translation type
In this case converting from Comp Code Currency to Group Currency
18
Example (1): Currency Conversion in a Query (cont.)
• On the conversion Tab, select the Conversion Type (ZPLANRATE)
19
Example (1): Currency Conversion in a Query (cont.)
• Query example showing FI rate vs. Plan Rate
In this example, it would be possible to explain the exchange rate portion of variances using a different calculation
Actual Amount @ Plan Rate – Actual Amount @ FI Rate
20
Example (2): Allow User to Pick Target Currency
• Enter the actual exchange rate typeAlternatively create an Exchange Rate Type Variable in Query Designer and add to RSCURR
21
Example (2): Allow User to Pick Target Currency (cont.)
• Create or use a Currency Variable in Query Designer and add to RSCURR
22
Example (2): Allow User to Pick Target Currency (cont.)
• Add the Conversion Type to the query
23
Example (3): Showing Group Currency and User Selected Currency
24
Currency Display
• Allows the sign for the currency to be displayed differently than standard settings (e.g., USD instead of $)
• Can use prefix/suffix as well
25
Currency Conversion in a Transformation
• Stores the converted amounts so that the front end doesn’t have to calculate them
26
What We’ll Cover …
• Overview of Currency Conversion• Step-by-Step Guide to Create a Currency Translation Type• Examples of Using Currency Conversion• Overview of Unit Conversion• Step-by-Step Guide to Create a Unit Conversion DSO• Examples of Using Unit Conversion• Wrap-up
27
Overview of Unit Conversion
• Why is Unit Conversion needed?In most cases, units might be bought or sold in different units of measureUnit Conversion allows a consistent unit of measurement for metrics
• Two approachesUnit Conversion using table T006
Note T006 Conversions will not allow cross-dimensional calculations (e.g., grams to cubic meters)
DSO solutions – using a generated Data Store to create all of the conversion factors (in this example UOM0MATE on 0Material)
28
Overview of Unit Conversion (cont.)
• Transfer of Central Units of Measure from SAP ERP
29
Overview of Unit Conversion (cont.)
• Similar to Currency, the units are converted …
30
Overview of Unit Conversion (cont.)
• Unit Conversion can be calculated within a Query or in the back-end system
Unit Conversion in a QueryBest used if values change
Example: User inputs the “to” unitCaution: To Units may not all be populated
Currency Conversion in a transformationImproved performance for reporting
Example: Convert to Base Unit of Measure from Material t
31
What We’ll Cover …
• Overview of Currency Conversion• Step-by-Step Guide to Create a Currency Translation Type• Examples of Using Currency Conversion• Overview of Unit Conversion• Step-by-Step Guide to Create a Unit Conversion DSO• Examples of Using Unit Conversion• Wrap-up
32
Step 1: Generate the DSO from 0Material in Transaction RSD1
33
Step 2: Create a Transformation on the DSO from 0MAT_UNIT_ATTR
34
Step 3: Create the InfoPackage and DTP and Load the Data
• Data Transfer Process (DTP) should not be loaded until Master Data loads are complete
In this case after 0Material has been loaded• RSRV has tasks to check that all conversions are available
Consistency Check for Base Unit of Measure
35
Step 4: Create a Quantity Conversion — T-Code RSUOM
• (4.a) Name the Conversion Type
36
Step 4: Create a Quantity Conversion — T-Code RSUOM(cont.)• (4.b) Define how the conversion will be done
37
Step 4: Create a Quantity Conversion — T-Code RSUOM(cont.)
• (4.c) Define Source and Target
38
RSRV Contains Checks for the Units of Measure
39
RSRV Contains Checks for the Units of Measure (cont.)
40
What We’ll Cover …
• Overview of Currency Conversion• Step-by-Step Guide to Create a Currency Translation Type• Examples of Using Currency Conversion• Overview of Unit Conversion• Step-by-Step Guide to Create a Unit Conversion DSO• Examples of Using Unit Conversion• Wrap-up
41
Unit of Measure Conversion in a Query
• Conversion can happen directly in a query if it is not feasible to store the data in the back end
In the query, select a key figure and add the Conversion Type
42
Unit of Measure Conversion in a Query (cont.)
43
Unit of Measure Conversion in a Query (cont.)
• UOM Conversion attempts to read all DSO Conversion factors into memory for performance
Smaller values can be maintained if necessary
44
Unit of Measure Conversion in a Transformation
45
What We’ll Cover …
• Overview of Currency Conversion• Step-by-Step Guide to Create a Currency Translation Type• Examples of Using Currency Conversion• Overview of Unit Conversion• Step-by-Step Guide to Create a Unit Conversion DSO• Examples of Using Unit Conversion• Wrap-up
46
Resources
• www.sdn.sap.comGet your exchange rate updated in real time in SAP
www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6b5de790-0201-0010-3cb9-f03e8c4aeb12
• SAP Notes• Note 624562 - Currency Translation – Trace• Note 1074971 - Optimizing qty conversion/crcy translation at
query runtime• SAP Help
• BI Platform> OLAP> Special OLAP Functions and Services> Currency Translation
• BI Platform> OLAP> Special OLAP Functions and Services> Unit Conversion
47
7 Key Points to Take Home
• Conversion allows greater flexibility in report creation• Currency conversion can be utilized to translate values that may
not be in extractors• Currency conversion can be utilized to allow reporting in any
currency (even letting the user choose the currency)• Utilizing currency conversion can help in analyzing budget
variances to determine how much of the variance is associated with exchange rates
• Unit Conversion can allow for better reporting standardization, thus improving metrics
• Using the DSO approach, the unit conversions can be read from SAP ERP
• Using either approach in a transformation can reduce the amount of code included in transformations and potentially improve query run times
49
DisclaimerSAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver®, Duet™, PartnerEdge, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Wellesley Information Services is neither owned nor controlled by SAP.