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.