query tricks

24
© 2007 Wellesley Information Services. All rights reserved. Tips and Tricks for Generating High-Quality Financial Reports in SAP BW 3.x and SAP NetWeaver BI Jeevan K. Ravindran InfoElixir 1 1 In This Session ... Advanced SAP BEx tips, tricks, and features are explained with business case studies/examples Discover the tool and technique to mass process workbooks Understand methods to make SAP BW reports fiscally compliant during a fiscal year change Learn techniques to ensure data accuracy by employing reconciliation techniques 2 2 What We’ll Cover … Advanced SAP BEx tips and tricks Technique to process workbooks en masse Formatting tips and tricks Alerts and exceptions – make the system do the job Reconciliation options Fiscal year change Wrap-up _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________

Upload: sgsathish11

Post on 08-Apr-2015

846 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Query Tricks

© 2007 Wellesley Information Services. All rights reserved.

Tips and Tricks for Generating High-Quality Financial Reports in SAP BW 3.x and SAP NetWeaver BI

Jeevan K. RavindranInfoElixir

11

In This Session ...

• Advanced SAP BEx tips, tricks, and features are explained with business case studies/examples

• Discover the tool and technique to mass process workbooks

• Understand methods to make SAP BW reports fiscally compliant during a fiscal year change

• Learn techniques to ensure data accuracy by employing reconciliation techniques

22

What We’ll Cover …

• Advanced SAP BEx tips and tricks • Technique to process workbooks en masse• Formatting tips and tricks• Alerts and exceptions – make the system do the job• Reconciliation options• Fiscal year change• Wrap-up

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 2: Query Tricks

33

Five Advanced BEx Tips and Tricks

1. Select between Document, Local, and Group Currency Amounts• Advanced BEx features – a crash course

2. Calculate with attributes of a characteristic3. Create exception on a characteristic4. Alert level and process chain5. Customer exit variables and Trial Balance report

44

SAP BEx Features List

• The advanced reporting techniques are made possible by employing these BEx features:

Replacement path variablesFormula variablesCustomer exit variablesVirtual characteristics and key figures (not explained here)Visual Basic for Applications (VBA) in BEx workbooks

• Three uses of Replacement Path Variables (RPV)In the characteristic/hierarchy restrictionIn the text variablesInside formula variable

5

Characteristic/Hierarchy Value Restriction

• RPV populates characteristic value with results from another query

This can be performance intensiveUse “value set” to precalculate values (e.g., Top Nvendors)Use BEx broadcasting to precalculate in SAP NetWeaver® BI

5

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 3: Query Tricks

66

Characteristic/Hierarchy Value Restriction (cont.)

• Definition steps

• Query vs. value setIf current data is required, then use query for replacement pathOtherwise, explore the possibility of using “value set”

12

3

77

In the Text Variables

• Options to select these values from the connected characteristic

1 = Key value, 2 = Description, or 3 = External value

2

3

1

RPV definition steps – For text variable

88

Inside Formula Variable

• Formula variableFormula variable accepts numeric valuesA formula variable is created in the Calculated Key Figure definition screenFormula variable can accept user entered value, replacement path value, or customer exit (ABAP) value

• Replacement path in formula variableAny characteristic in the query can be usedReplace value with one of the following:

(1) Key, (2) External characteristic value,(3) Description, (4) Attribute value, (5) Hierarchy attribute

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 4: Query Tricks

9

Company Co G/L Accoun YTD Dec 2006 YTD Dec 2006 Beginning Bala Beginning Bala Jan 2007 Activity Jan 2007 Activity Jan YTD Jan YTD4000 100000 £0.00 $0.00 £0.00 $0.00 £0.00 $0.004000 100001 £0.00 $0.00 £0.00 $0.00 $37,550.09 £0.00 $37,550.094000 100002 £0.00 $0.00 £0.00 $0.00 £19,136.24 £19,136.24 $0.004000 100003 £0.00 $9,747.62 £0.00 $9,747.62 $ (33,215.63) £0.00 $ (23,468.01)4000 100004 £4,976.06 $98,340.95 £4,976.06 $98,340.95 £ (16,935.81) $93,035.51 £ (11,959.75) $191,376.464000 100005 £50,202.13 $1,731,711.17 £50,202.13 $1,731,711.17 £47,326.96 $11,448,260.85 £97,529.09 $13,179,972.024000 100006 £884,022.24 $0.00 £884,022.24 $0.00 £5,832,742.71 £6,716,764.95 $0.004000 100007 £0.00 $6,050.18 £0.00 $6,050.18 $100,408.74 £0.00 $106,458.924000 100008 £0.00 $0.00 £0.00 $0.00 $ (34,941.82) £0.00 $ (34,941.82)4000 100009 £0.00 $985,524.31 £0.00 $985,524.31 $5,143,117.10 £0.00 $6,128,641.41

9

Tip 1: Select Between Doc, Local, and Group Currency Amounts• How can the report show one currency amount based

on user selection?Show Document vs. Local vs. Group Currency Amount

No separate queries per key figure No separate set of key figures that results in a huge report

Amt in GBP

Amt in USD

Two sets of amounts (GBP, USD) for 12 periods makes the report hard to read!

Warning

1010

Tip 1: Select Between Doc, Local, and Group Currency Amounts (cont.)• Solution

Prompt for key figure value in the selection screenUse formula variable

Use the above-selected value to pick the appropriatekey figure

Use IF condition in the calculated key figure

1111

Tip 1: Select Different Currency Amounts – Steps

Step 1: Create a New CKF

Step 2: Create a new Formula Variable (FV)

Step 3: FV Definition

Step 4: Variable’s features

Step 5: Variable’s value type

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 5: Query Tricks

1212

Tip 1: Select Different Currency Amounts – Steps (cont.)

Step 6: Save Formula Var (FV)

Step 7: Select FV

Step 8: Write the IF conditionStep 9: Give a Technical Name

Step 10: Use the Calc. Key Fig. in the query

1313

Tip 1: Select Between Doc, Local, and Group Currency Amounts• Output when the Local currency is selected

• Output when the Group currency is selected

Company Cod G/L Account YTD Dec 2006 Beginning Balance Jan 2007 Activity Jan YTD Feb 2007 Activity Feb YTD4000 100000 $0.00 $0.00 $0.00 $0.004000 100001 $0.00 $0.00 $37,550.09 $37,550.09 $ (23,035.80) $14,514.294000 100002 $0.00 $0.00 $0.00 $0.004000 100003 $9,747.62 $9,747.62 $ (33,215.63) $ (23,468.01) $ (212,284.71) $ (235,752.72)4000 100004 $98,340.95 $98,340.95 $93,035.51 $191,376.46 $8,700,110.75 $8,891,487.214000 100005 $1,731,711.17 $1,731,711.17 $11,448,260.85 $13,179,972.02 $ (12,255,891.85) $924,080.174000 100006 $0.00 $0.00 $0.00 $0.004000 100007 $6,050.18 $6,050.18 $100,408.74 $106,458.92 $ (17,991.09) $88,467.834000 100008 $0.00 $0.00 $ (34,941.82) $ (34,941.82) $34,941.82 $0.00

C o m p a n y C o G /L A c co u n Y T D D e c 2 0 0 6 B e g in n ing B a la n ce Ja n 2 0 0 7 A c tiv ity Ja n Y T D F e b 2 0 0 7 A ctiv ity F e b Y T D4 0 0 0 10 0 0 0 0 £0 .0 0 £ 0 .0 0 £ 0 .0 0 £ 0.0 04 0 0 0 10 0 0 0 1 £0 .0 0 £ 0 .0 0 £ 0 .0 0 £ 0.0 04 0 0 0 10 0 0 0 2 £0 .0 0 £ 0 .0 0 £ 1 9 ,1 3 6 .2 4 £ 1 9 ,1 3 6 .2 4 £ (1 1 ,7 3 9 .8 6 ) £ 7,3 9 6.3 84 0 0 0 10 0 0 0 3 £0 .0 0 £ 0 .0 0 £ 0 .0 0 £ 0.0 04 0 0 0 10 0 0 0 4 £4 ,9 7 6.0 6 £ 4 ,9 7 6 .0 6 £ (1 6 ,9 3 5 .8 1 ) £ (1 1 ,9 5 9 .7 5 ) £ (1 0 8 ,1 7 8 .2 1 ) £ (1 20 ,1 3 7.9 6 )4 0 0 0 10 0 0 0 5 £ 50 ,2 02 .1 3 £ 5 0 ,2 0 2 .1 3 £ 4 7 ,3 2 6 .9 6 £ 9 7 ,5 2 9 .0 9 £ 4 ,4 3 3 ,5 1 1 .3 5 £4 ,5 3 1,0 4 0.4 44 0 0 0 10 0 0 0 6 £ 8 84 ,0 22 .2 4 £ 8 8 4 ,0 2 2 .2 4 £ 5 ,8 3 2 ,7 4 2 .7 1 £ 6 ,7 1 6 ,7 6 4 .9 5 £ (6 ,2 4 5 ,8 6 0 .0 8 ) £ 4 7 0,9 0 4.8 74 0 0 0 10 0 0 0 7 £0 .0 0 £ 0 .0 0 £ 0 .0 0 £ 0.0 04 0 0 0 10 0 0 0 8 £0 .0 0 £ 0 .0 0 £ 0 .0 0 £ 0.0 04 0 0 0 10 0 0 0 9 £0 .0 0 £ 0 .0 0 £ 0 .0 0 £ 0.0 0

Output in GBP

Output in USD

1414

Five Advanced BEx Tips and Tricks

1. Select between Document, Local, and Group Currency Amounts• Advanced BEx features – a crash course

2. Calculate with attributes of a characteristic3. Create exception on a characteristic4. Alert level and process chain5. Customer exit variables and Trial Balance report

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 6: Query Tricks

1515

Tip 2: Calculate with Attributes of a Characteristic

• How can you include characteristic/attribute in computations?

Classic business case:Compute total price using the attribute “Price” under characteristic “Material”

Financial business case: How much the customer is over the credit limit

• SolutionGet the customer’s credit limit from customer master data into a key figure

Create a formula variable to get the attribute of 0CUSTOMER

Compute the difference between “account balance” and “credit limit”

1616

Tip 2: Calculate with Attributes of a Characteristic (cont.)

• Create a formula variable to get credit limit valueFrom 0CUSTOMER’s attribute

Step 1: Create a new Formula Var. (FV)

Step 2: Process FV by Replacement Path

Step 3: Select Reference Characteristic

1

2

1717

Tip 2: Calculate with Attributes of a Characteristic (cont.)

• Select Attribute of 0CUSTOMER

Step 4: Select the attribute of the characteristic

Step 5: Save the Formula Variable

Step 6: Use the FV in a Calc. Key Fig.

Step 7: Use the Cal. Key Figure in query

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 7: Query Tricks

1818

Five Advanced BEx Tips and Tricks

1. Select between Document, Local, and Group Currency Amounts• Advanced BEx features – a crash course

2. Calculate with attributes of a characteristic3. Create exception on a characteristic4. Alert level and process chain5. Customer exit variables and Trial Balance report

1919

Tip 3: Create Exception on a Characteristic

• Exceptions are created only on a key figure• Steps to create an exception on a characteristic

Suited for characteristic with mostly numeric valuesStep 1: Create a formula variable (refer to previous tips)

Use replacement path in the formula variableSelect the characteristic

Step 2: Use the formula variableAfter you finish, use the formula variable in the calculated key figure

Step 3: Create exceptionCreate exception on the calculated key figure created in Step 2

2020

Five Advanced BEx Tips and Tricks

1. Select between Document, Local, and Group Currency Amounts• Advanced BEx features – a crash course

2. Calculate with attributes of a characteristic3. Create exception on a characteristic4. Alert level and process chain5. Customer exit variables and Trial Balance report

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 8: Query Tricks

2121

Tip 4: Alert Level and Process Chain

• Alert level Value 8 or 9 in exception of a queryReporting agent that uses the query will cause the termination of the process chain

• Business caseStop data load based on the result of a query

If the account balance in SAP BW is not same as in SAP R/3• Solution

Step 1: Create an exception for the business condition

Set the “Alert Level” to Bad 8or Bad 9

2222

Tip 4: Alert Level and Process Chain (cont.)

• Solution (cont.)Step 2: Create reporting agent setting

Use the exception

Step 3: Execute process chainIf the exception condition is met, then the process chain will not proceed

Details

2323

Five Advanced BEx Tips and Tricks

1. Select between Document, Local, and Group Currency Amounts• Advanced BEx features – a crash course

2. Calculate with attributes of a characteristic3. Create exception on a characteristic4. Alert level and process chain5. Customer exit variables and Trial Balance report

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 9: Query Tricks

2424

Tip 5: Customer Exit Variables and Trial Balance Report

• Objective: Create YTD Trial Balance report from G/L transactions InfoProvider

Period balance For balance sheet accounts, it is the sum of all activities since inceptionFor income statement accounts, it is the sum of all activities since the beginning of a selected year

ChallengeTwo different criteria to derive the same account balance

SolutionUse customer exit variable

2525

Tip 5: Customer Exit Variables and Trial Balance Report (cont.)• Steps

1. Accept the “as of” period (0RMA_FIP) in the selection screen2. Balance in Balance Sheet accounts

Use the indicator – “X” for balance sheet accountIn 0FISCPER time restriction, use the offset -9999 in “from value” and offset 0 in “to value” for 0RMA_FIPHide this calculated key figure

2626

Tip 5: Customer Exit Variables and Trial Balance Report (cont.)

3. Create a customer exit variable – ZFYPJAN This variable gets “Beginning of Year” (e.g., Jan)

4. Balance in Income Statement (P&L) accountsUse the value “#” (Blank) for indicator balance sheetFor 0FISCPER time restriction, use “ZFYPJAN” as “from value” and 0RMA_FIP as “to value” (Fig 1)Hide this calculated key figure

5. Add the two balances to get the Period balance (Fig 2)Show this value in the output

Fig 2Fig 1

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 10: Query Tricks

2727

What We’ll Cover …

• Advanced SAP BEx tips and tricks • Technique to process workbooks en masse• Formatting tips and tricks• Alerts and exceptions – make the system do the job• Reconciliation options• Fiscal year change• Wrap-up

2828

Processing Workbooks En Masse

• ScenarioProcess a workbook for many selections

For example, DSO report for 80 countries for different monthsAccount balance report for 90 company codes

• Possible solutions1. Use precalculation server for workbooks

This solution is only available from SAP BW 3.5 onwardsMany variants and broadcaster settings have to be created

2. Run manuallyTime consuming, cumbersome, and error prone

3. Automation using VBA

2929

SAPBExqueries sheet

• When you save a workbook, a repository sheet named “SAPBExqueries” is inserted in the workbook

This “hidden” sheet has a specific structureSAP can change the structure of this sheetThis sheet contains QueryId, variable values, etc.

Use macro SAPDebugprint to decipher this sheet’s contents

A variable’s name is in column FZ, values in GE and GG

Warning

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 11: Query Tricks

3030

Tool to Automate Workbook Execution

• ObjectiveAccept the selection screen values in an Excel file

When you click the “Run Workbook” button, these values will be passed into the workbook specified in Column CSee the “Help” sheet in the Excel file in the CD for more details

3131

Prerequisites to Use Workbook Automation Tool

• In the workbook properties, “Save and reuse variable values” must be turned ON

Thus user interaction is eliminated

• Before executing the Automation tool (Excel sheet), start the BEx analyzer

Start All Programs Business Explorer Analyzer

32

Workbook Automation Tool: Details

• How does this tool work?The VBA code in the automation tool calls the BEX VBA “SAPBEXrefresh” function to run the workbookThe variable values are set directly using a VBA statement

Alternatively, use “SAPBEXsetVariables” functionThe tool currently supports only single value and intervals

You can change VBA code to accept select options

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 12: Query Tricks

3333

What We’ll Cover …

• Advanced SAP BEx tips and tricks • Technique to process workbooks en masse• Formatting tips and tricks• Alerts and exceptions – make the system do the job• Reconciliation options• Fiscal year change• Wrap-up

3434

Formatting in BEx Workbook

• Use BEx toolbar’s formatting optionIf you use Excel’s formatting option, then those cells will be overwritten by SAP’s standard option the next time you refresh the workbook

• The four options in BEx tool bar are listed below

Font – Helps you to change the fontPatterns – Here you can change the fill (cell shade) colorBorders – Lets you change the borders for the selected cellsAlignment – Here you can set word wrap, merge cells, etc.

3535

Formatting in BEx Workbook (cont.)

• Create a workbook template for the company/dept.In the workbook

Insert logos and branding elements (colors, font, etc.)You can also move the results area

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 13: Query Tricks

3636

Formatting in SAP NetWeaver BI Workbook

• Convert to Formula mode

This option enables you to use Excel formatting capabilitiesThis formatting will not be overwritten by SAPSAP generates the BExGetData formula in the data cells of the analysis grid

When you navigate in your query results, only the values for the data are retrieved from the server; standard formatting information is not retrieved

3737

Formatting in SAP NetWeaver BI Using Report Designer

• Starting point – Query Easily convert existing query output to Report Designer

• Formatting options in Report DesignerInsert customized page header/footerInsert rows, columns; change height; etc.Apply group level changesStandard formatting options

Font, orientation, borderCell-level formatting is also possible

Change background colorField wrapping, etc.

3838

Formatting in SAP NetWeaver BI Using Report Designer (cont.)

• Conditional formattingAllows you to format separately based on characteristic values

Example: If the vendor is AGILYSYS INC, then show the output in a green color

Use the menu optionPlace the cursor on the cell of the characteristicUse menu option: Format Conditional Formatting In the dialog box, select the characteristic value

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 14: Query Tricks

3939

What We’ll Cover …

• Advanced SAP BEx tips and tricks • Technique to process workbooks en masse• Formatting tips and tricks• Alerts and exceptions – make the system do the job• Reconciliation options• Fiscal year change• Wrap-up

4040

Alerts and Exceptions – Make the System Do the Job

• Use exceptions to spot anomalies in the reportExceptions are created on a key figure

• Create alerts to notify the exception casesUse a reporting agentUse BEx Broadcaster

41

Steps to Create Exceptions

1. From the tool bar, click on the Exception icon

2. In the new pop-up screen, enter a description and select the key figure

41

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 15: Query Tricks

4242

Steps to Create Exceptions (cont.)

3. Click New

4. Enter criteria. (While entering negative values, From value should be greater than To value.)

5. Accept the criteria. Click Transfer.

6. Go to the Cell Restrictions Tab. Click New.

4343

Steps to Create Exceptions (cont.)

7. Select cell restriction condition (important step)

8. (Optional) Select scope of restriction

9. Final step is to click OK

4444

What We’ll Cover …

• Advanced SAP BEx tips and tricks • Technique to process workbooks en masse• Formatting tips and tricks• Alerts and exceptions – make the system do the job• Reconciliation options• Fiscal year change• Wrap-up

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 16: Query Tricks

45

Objectives of Data Reconciliation

• Why reconcile?To verify data accuracy in SAP BWTo check data quality in SAP BWValidate (health check) data model and Data Warehouse (DWH) architecture

Data transformation and aggregation• How do you reconcile?

1. Get the same business data using an alternative source2. Compare that data with the data in “productive" InfoProviders

Create a MultiProvider = (productive InfoProvider + alternate source)Create validation queries on that MultiProvider

45

4646

Data Reconciliation – Alternate Sources of Data

• Use SAP-supplied reconciliation data sourcesFI/CO: 0CO_OM_CCA_1, 0CO_OM_CCA_9, 0FIGL_6, etc.

• Create generic data sourcesCompare data from generic data source to “productive” cube

• Compare InfoProvider (IP) contents to PSARemote cube based on “export data source” of PSA tableCompare this remote cube’s data with productive IP’s data

• Use remote cube (Virtual InfoProvider)Create a Virtual InfoProvider (VIP) to read data from SAP R/3

E.g., get data from Special Ledger table or GLT0 tableCompare the VIP’s data to that of productive IP’s data

Take-home material contains detailed info on this topic

4747

What We’ll Cover …

• Advanced SAP BEx tips and tricks • Technique to process workbooks en masse• Formatting tips and tricks• Alerts and exceptions – make the system do the job• Reconciliation options• Fiscal year change• Wrap-up

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 17: Query Tricks

4848

Fiscal Year Change

• ObjectiveEnsure SAP BW reports work with old and new fiscal calendar

• Two approaches: Historical Truth vs. RevisionismHistorical Truth

“As-is” situation Keep the old data as it is

Revisionism“The way to be” situation Change historical data with the new fiscal year settings

4949

Riddle on Calendar

Was it born out of chaos from priests’ twist? Was it born out of affair from Emperor’s tryst?A Calendar that bore an Emperor’s nameA Calendar, that attained global fame.© Jeevan Kumar Ravindran

Question: Name the CalendarYour Fiscal year project does not have to be a riddle or a puzzle. If you plan in advance, there is no need for any twists or trysts.

5050

An Easy Method to Make SAP BW Reports Fiscally Compliant• In SAP ERP – use the existing fiscal year variant

Change the period valuesShorten the transitioning year’s fiscal calendarNew Special Ledger (SL) for reporting (optional)

• In SAP BW (SAP NetWeaver BI) Two major areas of change:

Presentation – selection screen in new calendar formatProcessing – conversion of selected period values

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 18: Query Tricks

5151

Fiscal Year Change – Fiscal to Calendar

• Presentation – selection screen values Before fiscal year change (1 Year = April to March)

Example: In 2005, the fiscal period 005/2005 equals August/2005

After fiscal year change (1 Year = Jan to Dec)New calendar starting from 2006: fiscal month equals calendar month

In Year 2005, period 005/2005 was calendar month August

Before Fiscal Year change

In new fiscal calendar, the old period 005/2005 should be

treated as calendar month May

After Fiscal Year change

5252

Fiscal to Calendar Year Change – Presenting Variables

• Objective: Accept the selection screen variable in the new calendar’s format

Instead of using fiscal year variant (FYV) – V3, use K4 in the dummy restricted key figure

This key figure value will be hidden in the query resultFYV – “V3” runs April to March until 2005; and beginning in 2006, V3 runs from January to December

Note: This variable (ZFSYRPR) is later used in the processing step

Note

5353

Fiscal to Calendar Year Change – Processing Variables

• Steps to convert Key figures restricted on 0FISCPERStep 1 – (only once)

Define a customer exit variable – ZCALFIS1This customer exit variable will be based on the variable defined for presentation (ZFSYRPR)

Step 2 – (only once)Write ABAP code to derive the fiscal period value from the calendar month in the BEx variable user exit – RSR00001

Step 3 – in all queriesUse the variable ZCALFIS1Use normal fiscal year variant – V3

Step 3 – Change RKFs

Step 1 – Create a customer-exit variable

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 19: Query Tricks

5454

What We’ll Cover …

• Advanced SAP BEx tips and tricks • Technique to process workbooks en masse• Formatting tips and tricks• Alerts and exceptions – make the system do the job• Reconciliation options• Fiscal year change• Wrap-up

5555

Resources

• BW ExpertJoerg Boeke, “22 Functions to Automate and Enhance Your BW Reports in Excel,” (BW Expert, March 2004).

• SAP Developer NetworkSearch on How to guide: BW and Excel FeaturesHow To… Reconcile Data Between SAP Source Systems and SAP NetWeaver BI

www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7a5ee147-0501-0010-0a9d-f7abcba36b14

5656

7 Key Points to Take Home

• By using advanced BEx features, such as Formula variables and Replacement path, users can create reports with rich features

• BEx variable user exit improves flexibility to report on various time frames

• VBA functions in BEx open the door to perform many useful functions with the query and query output

• New formatting options with SAP Netweaver BI in BEx Analyzer, Report Designer, and Web Application Designer eliminate the need for third-party reporting applications

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 20: Query Tricks

5757

7 Key Points to Take Home (cont.)

• Make the system work for you: Create exceptions on anomalies and automate sending alerts

• Reconciliation of SAP BW data to your source system ensures data accuracy and instills credibility in SAP BW users

• During fiscal year change, you can make BEx queries work with a new calendar without converting data in all the cubes

5858

Your Turn!

How to contact me:Jeevan Kumar Ravindran

[email protected]

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

_________________________________

Page 21: Query Tricks

Notes: ______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

Page 22: Query Tricks

Notes: ______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

Page 23: Query Tricks

Notes: ______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

______________________________________________________________________________

Page 24: Query Tricks

Wellesley Information Services, 990 Washington Street, Suite 308, Dedham, MA 02026

Copyright © 2007 Wellesley Information Services. All rights reserved.