Tuesday, November 22, 2011

Debugging BPC 10 for NetWeaver

Debugging in BPC 10

In my opinion the ability to debug is one of the biggest advantages in the BPC for NetWeaver platform.  It has proven to be a huge asset when writing custom logic (BAdi’s and custom integration scenarios) in addition to general troubleshooting tasks.

The good news is that the latest release of BPC for NetWeaver (BPC 10) also allows you to debug the BW tier but there have been a couple of changes that you need to be aware of:

  1. The .NET tier has been removed from the 10.0 release of BPC for NetWeaver.  This means you don’t have to map accounts on the .NET tier to enable debugging anymore.
  2. The entry point for debugging has changed

After reading this (short) blog you will be prepared to debug BPC 10 for NetWeaver to your heart’s content.

Let’s get started…

Setting up your debug user

The only thing you need to start debugging BPC 10 is a valid BW user account with the same access as the BPC BW System Account.  You can find the required roles in section 4.1 of the Installation guide.

Once that is complete, grant the user the appropriate rights to the environment / model (application set / application) and set your breakpoints.

Where do I set my breakpoints?

There has been a pretty good amount of rework in the UJ package for BPC 10 and this has also impacted where you need to set your breakpoints.  I’ll cover two different scenarios below, debugging EPM Add-In and Administration functions and debugging data manager packages.

Debugging EPM Add-In and Administration functions

  1. Log into the BPC client you want to debug (EPM Add-In or Web Administration console) with your BW debug user account.
  2. Go to the portion of the use case you want to debug, but don’t execute the action yet.
  3. Log into SAPGUI with your BW debug user.image
  4. Go to transaction SE80
  5. Navigate to the class CL_BPC_REST_RES (under package UJX, embedded package UJX0).
  6. Go to line 56 of the HANDLE_REQUEST method and set an external breakpoint.
    • Note – If you know the specific location you want to debug you can set the external breakpoint there and skip the breakpoint mentioned above.
  7. Switch to the BPC client and execute the action you want to debug.
  8. This will launch a SAPGUI debugging session
  9. The case statement on line 60 will get you to the code you need to evaluate.

image

Debugging Data Manager Packages

image

  1. Log into SAPGUI with your BW debug user.
  2. Go to transaction SE80
  3. Navigate to the class CL_UJXD_PACKAGES_RES (under package UJX, embedded package UJXD).
  4. Go to line 179 of the DO_POST method and set an external breakpoint.
  5. Switch to the BPC client and execute the data manager package you want to debug.
  6. This will launch a SAPGUI debugger
  7. Double click on the ‘ls_package_run-if_debug’ exporting parameter and set its value to true (represented by the character X).
  8. You can then continue to any downstream external breakpoints you already set (for instance, in your BAdi) or can step through the code line by line.

image

No comments:

Post a Comment