Skip to Content
author's profile photo Former Member
Former Member

Formatting lines within BEx

Hello all BW experts.

I am facing issues when trying to format lines within Bex : as for exceptions on ratios, I want lines to be colored green when a characteristic has a value A and colored red when that characteristic has a value B.

Does anyone know how to proceed?

I tried Excel conditional formatting on the workbook but it is reinitialized when I refresh the query.

Thanks for your help

André

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 04, 2005 at 03:42 AM

    Hi Andre,

    I will be watching to the "right" answer to your question. I hope to learn something.

    In the meantime, you might consider using the Excel conditional formatting and having BW reset it each time the query is refreshed.

    To get the code for the conditional formatting, just turn on the macro recorder (Tools >> Macro >> Record New Macro) and set up the conditional formatting once manually.

    Then, locate the code Module named SAPBEX in your workbook (not to be confused with the BW Analyzer itself, which is named sapbex.xla). In the SAPBEX code module will be a subroutine named SAPBEXonRefresh(queryID as String, resultArea as Range). The BW Analyzer runs this routine (initially empty) every time a query result table is filled (query refreshed or a change in navigational state). The queryID tells you which query was refreshed (if there is more than one in the workbook) and resultArea tells you exactly where the result table is located.

    If you are using Excel newer than 2002, AND you are not using a template, you might not find the Module and subroutine I just wrote about. In which case, you can just add a new code Module (Instert >> Module) and type in a line that reads:

    Sub SAPBEXonRefresh(queryID as String, resultArea as Range)

    Then, paste the code that the macro recorder created. And, voila! You have the conditional formatting set up every time.

    - Pete

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.