Skip to Content
Author's profile photo James Lim

How to debug ‘Business Rule(Table Based Logic)’ in BPC for Microsoft platform

A few weeks ago, I visited one of our customer sites and did some technical consulting.

While I was working with them, one of customer told me that Business Rule didn’t work suddenly. That business rule was working properly before I visited. :(.

So I checked business rule (It was for currency conversion) and found nothing that needed to be fixed.  .

As we know, it is really hard to find out the root cause because Business Rule just returned ‘FX-XXX’ error message. Even though it gives some clues but sometimes it is not the root cause then user will be lost what they need to fix..

So I tried to find how to debug easily for escaping this situation because customer started to suspect me that I had ruined that logic. (Of course I didn’t!!!) .

As we know, All Business rule stored procedure is encrypted so customer and partners could not debug it in the source code level of stored procedure..

BUT… (There is always BUT. 🙂 .

We can get more detail error message from the management studio using my method that I will explain..

First, we need to create temporary scope table.Usually Scope table will be created automatically based on the passing parameters but we need to create it to run it in management studio..

Here is scope table structure. You can give any name for it because we will use it when we call stored procedure..


Second, fill some values in the table.

This value should be same value when you run that Business Rule..


Third, Execute SPRUNXXXX stored procedure in the management studio..

You need to specify correct one because there are several stored procedures in BPC. For example, Currency conversion is SPRUNCONVERSION, Account Transformation is SPRUNCALCACCOUNT etc. Now you can see the result as below screenshot.

Please remember when you run SPRUNXXXX stored procedure, you should use scope table name that we created. Below example shows that scope table name is ‘Test_Scope’


As you can see, you will find more detail information here.In this example, it says Currency_type is invalid column. It means mbrrptcurrency table should have currency_type column (property) but it doesn’t have.

Therefore, if we create Currency_type property for RPTCURRENCY dimension and fill in proper value, we can solve issue.

By the way, the customer that I addressed earlier had wrong property value in their time dimension but it was processed properly because it was a property value. I also solved that case using this way.This is not the solution for all cases but I am pretty sure it will give more hints.

If you have any questions. Please comment it.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Hi James,
      Thank you for the blog. Your approach defiantly helps us to debug fast and find more apt error msgs. I hope the standard error msgs in BPC would even be made more informative.


      Author's profile photo Roberto De la Torre
      Roberto De la Torre

      Hello Lim, thanks for this post, your have an amazing content here 🙂
      Since this is an old post, don't know if you can see this but maybe you can answer me one day:

      I assume that when you run SPRUNXXXX is an execution directly on Productive for example, so you actually are executing the Business rules.

      I mean its not a Simulation it's an execution, Is this correct? If not is there any way to avoid to write data?


      Author's profile photo James Lim
      James Lim
      Blog Post Author

      Hi Robert, I am sorry for late comment due to my vacation.

      As you said, it will write data into DB becasue it is based on the stored procedure,

      Therefore, you should test it with Development server first.

      As I know, there is no feature in the SPRUNXXX program like Logic Simulation engine.



      James Lim