sapexperts _ 3 steps to set debug options for fast issue resolution.pdf

5
3 Steps to Set Debug Options for Fast Issue Resolution by Prakash Darji, Senior Director of Solution Management in the Enterprise Performance Management Area Within SAP BusinessObjects Ryan Leask, Senior Director, Solution Strategy for SAP’s Business User and Line of Business Sales Organization May 21, 2009 Because logging and tracing doesn’t always help you resolve some issues within the SAP BusinessObjects Planning and Consolidation 7.0, version for SAP NetWeaver product, you may need to debug an issue. Debugging allows you to step through the code line by line to isolate any issues or unexpected behavior. To debug code within the ABAP tier, follow these steps: Step 1. Specify the debug users in BPC Server Manager. Step 2. Set a breakpoint in the SAP BPC function module. Step 3. Debug the SAP BPC application. Note There are currently two platforms of SAP BusinessObjects Planning and Consolidation: SAP BusinessObjects Planning and Consolidation 7.0, version for the Microsoft Platform, and SAP BusinessObjects Planning and Consolidation 7.0, version for SAP NetWeaver (these are the official names). For the purposes of this article, we use the unofficial abbreviation SAP BPC, with the understanding that we are talking about the version for SAP NetWeaver. Step 1. Specify the Debug Users in BPC Server Manager You can authorize up to five users for the task of debugging a specific SAP BPC application. 1. Launch Server Manager and then follow menu path Option > Maintain Debug Users. 2. In the Maintain Debug Users screen, enter the BPC User ID for the user with the task of debugging programs and applications, and then map a Debug User ID and password to that person, as shown in Figure 1 . Click the Update button, and then repeat this step for other users.

Upload: bhupendrasingh1975

Post on 06-Dec-2015

7 views

Category:

Documents


3 download

DESCRIPTION

SAPexperts _ 3 Steps to Set Debug Options for Fast Issue Resolution.pdf

TRANSCRIPT

3 Steps to Set Debug Options for FastIssue Resolutionby Prakash Darji, Senior Director of Solution Management inthe Enterprise Performance Management Area Within SAPBusinessObjectsRyan Leask, Senior Director, Solution Strategy for SAP’sBusiness User and Line of Business Sales OrganizationMay 21, 2009Because logging and tracing doesn’t always help you resolvesome issues within the SAP BusinessObjects Planning andConsolidation 7.0, version for SAP NetWeaver product, youmay need to debug an issue. Debugging allows you to stepthrough the code line by line to isolate any issues orunexpected behavior. To debug code within the ABAP tier,follow these steps:

Step 1. Specify the debug users in BPC ServerManager.

Step 2. Set a breakpoint in the SAP BPC functionmodule.

Step 3. Debug the SAP BPC application.

NoteThere are currently two platforms of SAP BusinessObjectsPlanning and Consolidation: SAP BusinessObjects Planningand Consolidation 7.0, version for the Microsoft Platform,and SAP BusinessObjects Planning and Consolidation 7.0,version for SAP NetWeaver (these are the official names).For the purposes of this article, we use the unofficialabbreviation SAP BPC, with the understanding that we aretalking about the version for SAP NetWeaver.

Step 1. Specify the Debug Usersin BPC Server Manager

You can authorize up to five users for the task of debugging aspecific SAP BPC application.

1. Launch Server Manager and then follow menu pathOption > Maintain Debug Users.

2. In the Maintain Debug Users screen, enter the BPCUser ID for the user with the task of debuggingprograms and applications, and then map a DebugUser ID and password to that person, as shown inFigure 1. Click the Update button, and then repeat thisstep for other users.

Figure 1

Set up the users responsible for debugging

Moving forward, the SAP BPC user will connect to ABAPusing the BPC User ID, instead of the ABAP service user IDthat is traditionally used. Because the debug users are dialogusers, they can set breakpoints.

Step 2. Set a Breakpoint in theSAP BPC Function Module

The only time debugging is needed is when a user encountersan error within the product. When encountering an error, andyou need to debug, you first have to figure out which functionmodule in the product is causing this error. There are twopossible scenarios:

The function module is easy to find

The function module is not easy to find

For example, a user can have an error in the SAP BPC Excelclient, and in that scenario, when debugging you may notknow which function module is causing the issue. However, ifthe error occurs on a specific action, for example, adding adimension in the SAP BPC Administration Console, then it ispretty easy to identify the function module to set the

Figure 2

Open the Object Navigator using transactionSE80 to search for the package containingthe function module in which you want toset a breakpoint

breakpoint for debugging.

Once you’ve identified the function module you can set abreakpoint for debugging.

In this example, let’s assume the user gets an error trying toadd a dimension. To begin, you need to find the functionmodule for adding a dimension. All SAP BPC functionmodules are organized by packages. You need to find thepackage that contains the function module you need to debug.Usually, this is pretty easy to find based on the descriptions ofthe packages and the function modules. To do so, runtransaction SE80, select a Package, and then select UJ, asshown in Figure 2. Click the display icon to see all objectswithin this package. All function modules within BPC areincluded in this package or a sub-package of this package.

In this case, you’ve navigated through the UJ package to UJAsub-package, and then UJA1 sub-package. Here you see afunction module called “UJA_API_ADD_DIMENSION,” which isthe function module for adding a dimension (Figure 3).

Figure 3

Select the function module for thefunctionality you need to debug

Once you have the function module, you can set thebreakpoint as an external session breakpoint. To set thebreakpoint, click the external breakpoint icon on the toolbar,and then click the line of code at which you want thebreakpoint to be set.

For more information about using the ABAP Debugger, werecommend that you read the article “Introducing the NextGeneration of ABAP Debugging — the New ABAP Debugger”by Boris Gebhardt and Christoph Stöck.

If you don’t know the function module to debug, there is asimple way to start debugging any functionality within the SAPBPC product. All external SAP BPC function modules call thecentralized function module UJ0_ON_NEW_RFC whenestablishing a connection to ABAP. Therefore, you can set abreakpoint here if you don’t know the function module that youneed to debug. This then jumps into your breakpoint on every

call to the ABAP tier.

Step 3. Debug the SAP BPCApplication

The easiest way to debug an issue is to step through yourprocess to reproduce the issue within the client. For example,if you have an issue creating a dimension, you need to set abreakpoint in the Function Builder. Once the breakpoint is setin the Function Builder, you can reproduce the steps thatcaused the error (in this case “Add a New Dimension”). Toreproduce the steps, first launch the SAP BPC client, in thiscase, the Administration Console, and try to add a dimension.

When you execute the Add a New Dimension function, anSAPGUI session is launched that jumps to the breakpoint soyou can debug the issue. To help you in the debuggingprocess, all function modules for SAP BPC have the followingexporting parameters:

ET_MESSAGE (also, the UJ0_T_MESSAGE)

ET_SUCCESS, which should always be set as Y (Yes)for all successful calls to ABAP

To see if the API is successful, click the ET_SUCCESS field.To display the detailed errors, check the ET_MESSAGE field.