Debugging a planning function of type formula in BW-IP
Function type Formula in BW-IP in SAP NetWeaver BW 7.30, SP11; BW 7.31, SP 11 and BW 7.40 SP06.
If a planning function of type formula does not calculate the values as expected it was up to now hard to analyze why the formula worked as it did.
In order to get an idea how the formula worked it was possible to insert messages in the formula coding – a quite cumbersome method.
Starting with SAP NetWeaver BW 7.30, SP11; BW 7.31, SP 11 and BW 7.40 SP06 it there is the debugging script RSPLFC_DEBUGGING_SCRIPT_FOX available that allows to easily debug FOX formulas.
Author: Hans-Georg Beuter
Company: SAP AG
Created on: 2014
After the FOX debugging was started on a preparation screen break points can be set and the variables which shall be displayed can be chosen (by default all variables used in the FOX are displayed).
This preparation screen is displayed for each new block. You can skip debugging a block which might be helpful in case you want to analyze the FOX execution for a subsequent block.
The displayed variables can be chosen and you can toggle between the display of all and the selected variables.
By using F3 you can exit the FOX debugging and return to normal ABAP-Debugging. Usually you will return to the generated coding which processes the FOX. Restarting the debugging script you can continue the FOX debugging.
How to start the formula debugger
To start the formula debugger you have to start the new ABAP Debugger before the FOX is executed (e.g. the first executable line of method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE in class CL_RSPLFC_FORMULA). You have to go to the Script Tab and press the button Load Script. On the “Load Debugger Script” popup enter the script name:
Start the Formula Debugging by pressing the button “Start Script”.
For easier debugging and better performance during debugging it is recommended to start the debugging with as few data as possible. Therefore you should use a filter which is as restrictive as possible.
With SAP NetWeaver BW 7.30, SP11; BW 7.31, SP11 and BW 7.40 SP5 a debugging script is available to get a better insight what happens during formula execution. The functionality is also available via note since SAP NetWeaver BW 7.30, SP5; BW 7.31, SP5 and BW 7.40 SP5 via note 1952231 (which contains some manual activities).