How To Debug Update Rules and Transfer Rules
Transfer rules and Update rules are the main areas within a BW system where the BW professional can
transform your transaction system data into the required format for what ever InfoObject / InfoProvider is
being updated.
Quite often when ABAP is used as part of your transfer and update rules there is a need to debug the code
to ensure you don’t introduce any problems into your production environment.
When data is loaded into a BW system the a background process is used. This means you can not run the
data load in debug mode as you would most other programs. What you need to do is run the load program
in Simulation mode.
The first step to take is set a breakpoint in you coded Update/Transfer rule. This can be achieved by:
Setting a breakpoint within the generated program once the rule has been activated.
Locate the code manually during your debug session and setting a break-point.
Hard code a breakpoint in the rule as shown below:
o if sy-uname = 'MYUSERID'.
break.
o endif.
My preferred method is the first option. I try not to hard code breakpoints (second option) as I sometimes
forget to remove the code once I have finished debugging and the third option takes I find take too long.
To set a break-point in the activated code you have to find the activated program and then search for your
code that you want to debug. Follow these 4 steps (Update Rule):
1, View the code for the Update Rule.
2, Locate the code that you want to debug and remember some content that will identify the code that you
need to debug.
3, Come back out of the code and activate your Update rule. Once activated, select “Display Activated
program from the Extra’s menu.
4, Search for the code that you located in step 2 and set the break-point.
Once your beak-point has been set you then need to run the update/transfer rule in simulation mode. To
achieve this you must have already loaded data into the PSA. Follow these steps:
1, Navigate to the PSA under the Monitoring section with transaction RSA1. Find the PSA Request that you
want to debug and select the ‘Simulate/Cancel update’ option from the right mouse click menu.
2, The screen will then show the details tab of the InfoPackage Monitor for the specific request. Right-click
on a selected Data-Packet and select Simulate.
3, Select the appropriate ‘Activate Debugging’ option for your rule (Update/transfer). Select the radio button
to determine the number of records that you want to process in you debugging session and select the
‘Perform Simulation’ button.
4, Select the Data Packets, Number of Records and then the continue button.
5, The update process will start and your screen will show the debug window. Press ‘F8’ to run through your
program. It will then stop at the breakpoint you set earlier.