Tuesday, February 28, 2017

New school on teachable.com


My SAP BCP and HANA school is now on teachable.com

This school contains two great courses. One for SAP BPC Fundamentals for application design, and the other a SAP BPC Price Planning Application. 

What makes teachable so great is that you can subscribe to the course on a monthly basis or pay an annual subscription rate at a reduced cost.

The school can be accessed here.

Monday, February 27, 2017

Characteristic Relationships as AMDP


Characteristic Relationships as AMDP

In the course of the last few days I have been working on a BW system 740 SP10 and trying to get a Characteristic Relationship with an ABAP Managed Database Procedure to work. I have followed all the documentation published by SAP and countless blogs, but I continued to get errors.

Whenever I execute a planning sequence, I get a short dump:


There is no information in this short dump. Looking at the HANA logs, and a little more information is obtained:

Procedure/Function 'SAPXXX'.'ZCL_DEMO=>DERIVE' not found in catalog!

Solution

The solution to this problem is hidden away in the ABAP documentation and is not intuitive at all. I have added the full process to create a CR with AMDP to my teachable course, that you can access here:




Wednesday, February 22, 2017

Saturday, February 18, 2017

Price Planning in BPC


Price Planning in BPC

I have released a new set of videos on Price Planning on BPC. The course is not 100% complete, but you can access the completed videos on YouTube. All the links to the videos are on the SAP BPC Price Planning page, and you access the first video right here:



Let me know what up think.

Friday, January 13, 2017

Debugging FOX: Part 2


 

In this second post on ways to debug FOX code in SAP BPC Embedded/BI-IP, I will focus on the debugging of the generated ABAP code.

Two methods exists:
1 - Debug the fox code itself as FOX script, covered here, and
2 - Debug the generated ABAP code, covered in this post.

Debug FOX Code ABAP


This method of debugging is very helpful if you know some ABAP, of course, as it shows you on source code level the statements that are being executed. Once you get to grips with the way the statements work, it becomes a lot easier and it is my preferred way of debugging.

To start off, go the transaction RSPLAN and select the FOX code you want to debug. In the code at the point you want the breakpoint, simply add the statement BREAK-POINT.



Execute the code with Trace Mode and you will step into the  ABAP Debugger. Some this to look out for in the debugging of FOX:

Key Figure Value assignment, for example:

REF_AMOUNT = {0AMOUNT, # }.

Is generated in ABAP as:

G_OPER = '0AMOUNT'.

GS_OPER-0FISCPER = '0000000'.

A further ABAP statement is generated that reads the reference data table to get the value:

PERFORM GET_OPER USING XT_REF_DATA GS_OPER CHANGING XT_MESG _E00001 .

Stepping into this statement and the assignment takes place here:

READ TABLE ith_data ASSIGNING <s_data> WITH TABLE KEY s_chas is_oper.
 IF sy-subrc 0.

is_oper contains the values of the block characteristics and the fields to be changed and is used a the key for the table read against the reference data. This is why, when the fields to be changed contains more than one characteristic value, a foreach loop is required, else the io_oper structure will be incomplete. This is further supported by the fact that a READ statement is executed, rather than a LOOP... WHERE

sy-subrc of course gives the indication whether a record has been found or not. 


FOREACH Loops

The generated code for the FOREACH loop is generated as follows:
PERFORM SET_CURSOR TABLES LT_CUR_00001
                   USING LT_CUR_FIELDS_00001 XT_REF_DATA
                   CHANGING L_CUR_00001_CNT.
LOOP AT LT_CUR_00001.


It is quite convenient to view the data in the reference table and to get the record of the current iteration. From here, everything follows the same pattern of Key Figure Value assignment and then the table read.

Happy debugging and let me know what your thoughts are on this post.

I will also be making a video, and will update this entry as soon as it is done.


Thursday, January 12, 2017

Trend of SAP BPC around the world.


Google Trends gives a nice view of the interest of SAP BPC over time as well as interest around the globe. The global view in particular is interesting. It is not surprising to me that the largest interest in from India, however, I would have expected some interest from Australia and Brazil.



The time view shows that SAP BPC as a search term has remained pretty consistent since 2011.



Do these statistics agree with your perceptions of SAP BPC in the market?

Wednesday, January 11, 2017

Debugging FOX: Part 1





In this first post I want to address the two ways to debug FOX code in SAP BPC Embedded/BI-IP. 

Two methods exists:
1 - Debug the fox code itself as FOX script, covered in this post
2 - Debug the generated ABAP code, covered in part 2.


Debug FOX Code as Script
This method allows you to trace the values in the script. And you will be able to see the block characteristics as well as the fields to be changed and trace the values quite easily. To debug using this method follow the steps below:


In Transaction SE80, select class CL_RSPLFR_CONTROLLER




Expand Methods and Select the Method execute_service and double click.




Go to line 105 and set a break-point




Once set, go to transaction RSA1, and select the planning sequence and the step you want to test.







Add the variables you need and then select 'Execute step with trace'. The ABAP debugger 
will pop up and stop at line 105 where we set the breakpoint. Select the script tab:



And select Load Script. Keep the Script Source Database and under script name, select or enter RSPLFC_DEBUGGING_SCRIPT_FOX






Click on the Start Script Button 


You should now see the debugging screen with your FOX Script:



To start the debugging process, press the Start Debugging button or F8.

The following features are available:

Block Values: Display the block characteristic values
Show Messages: Display any messages
Choose Variables for Display: This will allow you to display the values of all fields to be changed.
Toggle Variables for Display: Switches the variable display on and off.
Toggle Ref-Data Display: Switches the display of the reference data tables on and off.
Toggle Block Value Display: Switches the display of the block data tables on and off.