15
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2011 SAP AG 1 Formatting BEx Standard 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: Rajesh Pillai & Vidya Sagar Nalamalapu 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.

Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

  • Upload
    vukhue

  • View
    229

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 1

Formatting BEx Standard

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: Rajesh Pillai & Vidya Sagar Nalamalapu

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.

Page 2: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 2

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

Page 3: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 3

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.

Step by Step Solution

Workbook Template Creation

Company Logo Insertion

Use Workbook Template

Formatting Report Output

Highlighting keyfigures

Define Macros

Workbook Template Creation

Queries are inserted into workbooks so you can display them. When you insert a query, a link is made between the cell areas of the worksheet and the data of the InfoProvider upon which the query is based. A link therefore exists between the Business Explorer and the Business Information Warehouse Server (BW Server). This link stays in place until you interrupt it.

When you open a query and insert it into a workbook, the query is calculated and the view (initial view) of the data established in the Query Designer is displayed.

We can create workbook templates, into which you can insert your queries. Workbook templates contain the following elements:

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.

Page 4: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 4

Company Logo Insertion

1. Select the cell you want to insert the logo.

2. Go to tool bar insert and select picture from file.

3. Select your desired logo from the location. The logo will be appeared and you can format as per your requirement.

Page 5: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 5

How to use workbook template

1. There are two ways to use the template.

Selecting the template form list of templates.

Using as a permanent template the template is a default template to the every query.

->Go to tool bar select business explorer->settings->new workbook on embed->is selected from list.

->Go to tool bar select business explorer->settings-> permanent template.

2. Save as new work book.

Page 6: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 6

3. Execute your desired query using the template.

Select the query from Bex analyzer selects open queries.

Select query.

4. Select the template.

5. The query result is appeared in the selected template.

Page 7: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 7

Formatting Report Output

The below template can be customized in various ways. Go through the steps one by one to explore the details.

To start the customization process

Click the Format Menu in Excel.

Click the Style submenu as in below screen shot.

Page 8: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 8

1. The following window appears.

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

To change the Result cell text, perform the following:

Click Modify. This displays all the standard formatting option as shown below.

Select Font, Color (Background/ Font).

Page 9: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 9

3. Click OK on both the screens. The entire BEx output result row Font and color is modified.

4. Change the Result Values by repeating steps 1-3.

Modify template to work for all queries

In this step, the Standard BEx template delivered by SAP is changed to work for all other queries output in the new Template format.

To modify the template

Highlighting Keyfigures

1. Select the key figure and right click on select the properties from the context menu.

2. The below properties will appear.

Page 10: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 10

3. From display select highlighting click ok.

4. Save and execute the query.

5. We can see the highlighted key figure values as below.

Page 11: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 11

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.

3. Go to tools select macro ->Visual Basic Editor.

Page 12: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 12

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

Page 13: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 13

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).

Page 14: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 14

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

Page 15: Formatting BEx Standard Template - Community Archive · Formatting BEx Standard Template Applies to: SAP BW 3.5 and BI 7.0. For more information, visit the EDW homepage. ... Click

Formatting BEx Standard Template

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2011 SAP AG 15

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.