How to debug fox formula functions?

How to debug fox formula functions?

For fox formula functions in BW IP (BW Integrated planning) there is option to execute them in trace and track the result. Sometimes there is a need of a more detailed analysis of the data.

To debug a fox formula follow the steps:

  1. Go to transaction Se24 and enter in the class browser class name: CL_RSPLFR_CONTROLLER. Press button display.
  2. On the tab “Methods” find method “EXECUTE_SERVICE” and click twice on it to open it.
  3. Press button “Set session break-point”. This will set break-point on the first possible place in this method “ GET TIME STAMP FIELD l_tim_exec_init. ” Break-point means that the program will stop there and start the ABAP debugger for detailed analysis.
  4. Start transaction RSPLAN and select the planning sequence containing fox formula you want to debug. Press display and select the step. Press button Execute Step with trace. This will start the ABAP debugger.
  5. In the ABAP debugger go to the last tab, which is “Script”. Press “Load script” button and enter script name: RSPLFC_DEBUGGING_SCRIPT_FOX. Press Save script. Press button “Start script”.
  6. The FOX debugger is started. You can set break-points if needed or just press button “start debugging”. The debugger will show you all the variables values, planning data and reference data, which can help you find the problem in your code. Button F5 is used as in the standard ABAP debugger for executing the next step.
Notes:

 

In the section “Block values” of the FOX debugger you can see the selection of the filter variables from the planning sequence.  With the button “Choose variables to display” you can select, which variable values you want to track.

When you are ready you can press F8 to exit the debugger. On the next execution you need to load the script again. When you are finished with the debugging, you can remove the session break-point or log out and log in in the system again.

For better results when using the FOX debugger it is good if you can filter the data to a few records only.

Another way of checking the value of a variable in the FOX formula is setting a message in the code. Here is one simple example:    MESSAGE I001SEM 003 WITH ‘ Value of the variable is: ‘ VARIABLE1.

Leave a Reply

Your email address will not be published. Required fields are marked *

3 × five =