Академический Документы
Профессиональный Документы
Культура Документы
Template
Applies to:
SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage.
Summary
This document explains how to format the BEx template which includes creating templates, company logos,
with adjustments to query output such as last refresh date, user, query technical names etc.
Authors:
Company: Accenture
Created on: 15 March 2011
Author Bio
Rajesh Pillai is working as a Senior SAP BI Consultant with Accenture having 5+ years of core experience
and has worked on Implementation and Support projects.
Vidya Sagar Nalamalapu is working as SAP BI Consultant with Accenture and he has 3+ years of experience
in SAP BI and has worked on Implementation and Support projects.
Table of Contents
Introduction ......................................................................................................................................................... 3
Step by Step Solution...................................................................................................................................... 3
Workbook Template Creation ...................................................................................................................................... 3
Company Logo Insertion .............................................................................................................................................. 4
How to use workbook template .................................................................................................................................... 5
Formatting Report Output ............................................................................................................................................ 7
Highlighting Keyfigures ................................................................................................................................................ 9
Define Macros ............................................................................................................................................................ 11
Conclusion ........................................................................................................................................................ 13
Related Content ................................................................................................................................................ 14
Disclaimer and Liability Notice .......................................................................................................................... 15
Introduction
We have seen lot of threads in SDN forum asking questions related to the format of BEx template, macros
etc. Here we are trying to explain how to format the report output, query properties, macros, creating logos
etc. Hopefully it will be useful to anyone else who's about to work on this. If there's anything we've missed or
got wrong, then please feel free to edit it or contact us and we'll try to explain.
Highlighting keyfigures
Define Macros
Preset positions for the different areas (title, filter cells, results area, text element)
Format settings: You can change the background pattern, color scheme, and so on.
Logo, Bitmaps
VBA macros
1. Execute a query.
2. Format the report as per our requirement.
3. Save the report as a workbook.
3. Select your desired logo from the location. The logo will be appeared and you can format as per your
requirement.
As shown, there are number of SAPBEX formats available. Each of these relates to another cell of BEx
(Header, Cell Data, Result Row, Hierarchies, etc.). Also, they depend on data types.
2. Change result row header and data values format
Click Modify. This displays all the standard formatting option as shown below.
3. Click OK on both the screens. The entire BEx output result row Font and color is modified.
Define Macros
Using Macros we can adjust the query output such as last refresh date, user, color and technical name of
query.
1. Create a macro go to tools select macro from the drop down menu.
2. The below popup will appeared; give the macro name and push the create button; the macro is
created.
4. The below screen will appeared in this screen shows all the bex analyzer sheets select your desired
sheet and double click it the code page will appeared as below shown.
5. In the code page write the code and run as shown below.
For example: the below code changes the color of the cells from A1 to B5 in the current sheet.
Sub Macro1()
Dim i As Integer
Dim j As Integer
For i = 1 To 2
For j = 1 To 5
If Cells(i, j) >= 0 Then
With Cells(i, j).Interior
ColorIndex = 4
Pattern = xlSolid
End With
Else
If Cells(i, j) < 0 And Cells(i, j) >= -0.5 Then
With Cells(i, j).Interior
ColorIndex = 6
Pattern = xlSolid
End With
Else
With Cells(i, j).Interior
ColorIndex = 3
Pattern = xlSolid
End With
End If
End If
Next j
Next i
End Sub
Note: To create the last refresh date, user and the technical name of the query repeat the steps 1 to 5
Conclusion
We can create workbook templates, into which you can insert your queries. Workbook templates can contain
pre-determined items for the area of the query, formatting settings, logos, VBA macros, and so on. When
inserting a query into the workbook, a VBA routine is automatically generated in the workbook. We can also
connect the Business Explorer with your own VBA programs (Visual Basic for Applications).
Related Content
http://help.sap.com/
http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55d2e09411d2acb90000e829fbfe/frameset.htm
For more information, visit the EDW homepage