Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
gerd_schoeffl
Advisor
Advisor

In his blog Hans-Georg Beuter has given some details on how you can debug Fox formulas (http://scn.sap.com/community/data-warehousing/business-planning/blog/2014/09/08/debugging-a-planning...). In this blog we would like to show you in a screen cam how the debugging works.

1st Step: Set a Break-Point in ABAP (0-26s)

The Fox debugging uses a so-called debugging script in the ABAP debugger. In order to activate it we need to stop in the ABAP debugger first. We start by setting a break-point in the ABAP coding. We open the transaction se80, navigate to the class CL_RSPLFR_CONTROLLER, and search for the method EXECUTE_SERVICE. The method calls the execution of the planning function. We set a break-point in the first line of the coding.

2nd Step: Start the Planning Function (27s-44s)

We start our planning function from a planning sequence. Thus we open the Data Warehousing Workbench (rsa1), make sure we are displaying our planning
sequences, and display the corresponding sequence. We select the Fox formula we want to debug. As we can debug Fox formulas only in ABAP execution we need to make sure the Fox formula is not executed in memory. If you are using PAK then you can switch the execution to ABAP by setting the user parameter  RSPLS_HDB_SUPPORT to HBD_OFF for the current user (see note 1637199). Another optio is to execute the planning function in trace mode as this always forces an execution ion ABAP. We choose this (more direct) option.

3rd Step: Start the Fox Debugger (45s-1:03s)

We stop at the break-point before the execution of the actual planning function and see the ABAP debugger. We change to the tab ‘Script’ and load the script ‘RSPLFC_DEBUGGING_SCRIPT_FOX’. After that we start the script.

4th Step: Step into the First Block (1:04s-1:15s)

We now can see the fox debugger. We see the fox coding and also the selection (block values) for the first data block (Remember: when a planning function is executed then the data is partitioned into smaller blocks and the actual planning logic is executed for each of these blocks. The blocking is defined by
the selection of the characteristics that are to be changed. A block contains all data within the selected data where all characteristics that are NOT to be
changed have the same value).

In order to start the debugging press ‘Start Debugging’. If you want you can set a break-point before starting the debugging.

5th Step: Debug the Function Logic (1:16s-end)

You can now use several features in the debugger. You can set break-points, move forward by a single step, or jump to the next break-point.

You can also display the current block values again, show messages, choose which (Fox) variables should be displayed, display the reference data for the current block, and toggle the display for the plan data in order to show the entire records (not just the characteristics that are to be changed).

As we step through the coding we can see the values of the variables and the plan data changing.

When we press F8 and do not have set a break-point inside the Fox coding we will jump to the next block (2:25s). By using ‘Start Debugging’ we can step into the next block or skip the block. If we want to stop the debugging you can simply use the yellow ‘log off’ button (2:40s).

You will end up in the ABAP debugger again. You can either simply continue by pressing ‘F8’ or in some cases might have to switch to the standard display, delete the break-point, and finish by pressing ‘F8’.

12 Comments