cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug transformation routines ?

ravindra_tumuluri
Contributor
0 Kudos

Hello experts,

Can anyone pls guide me on how to debug routines in transformation ?

Any doc is available ?

Regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

former_member192700
Active Contributor
0 Kudos

Hi Ravi,

Sorry, the feature Prakash mentioned was available prior to SAP NetWeaver 2004s, namely via PSA maintenance.

To debug a transformation, you have to create a Data Transfer Process (DTP), and choose on the 'Execute' tab strip the Processing Mode 'Serially in Dialog Process (for debugging)'. You can then specify where the system should stop for debugging.

Cheers

SAP NetWeaver 2004s Ramp-Up BI Back Office Team

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

Don't know if this will help but...

Getting around the BW3.x code and debugging became straightforward using the standard method described above through RSMO->simulate.

In 2004s however, getting into the debugger is easy enough but finding a way through the new OO style code was very time consuming.

The easiest quick trick I used in 2004s (in a dev system) is to put in a breakpoint in the customer parts of the transformation e.g., BREAK USERNAME and then run the simulate without any other breakpoints selected.

However for the production system we couldn't change the code like that and also we implemented logical partitioning so we had dozens of identical cubes per infosource and it was impossible to use the standard simulate and find an error. So I call a function module in every start routine which switches on or off an infinite loop according to a flag put into an info object masterdata table. The masterdata table (in 3.x) contains a key of infosource and target - so you can make a change in the masterdata and isolate only a single target for debugging. Once the breakpoint is activated you access it via SM50 and trap the package which is clearly identified with function module name in the list.

This worked well for but a further extension to the masterdata table breakpoint idea is to add fields in the infoobject masterdata for data_package_ID and record_ID. The benefit of using the Function module is that you can change it and transport it independently of all your update rules (though also the risk for system-wide problems is also there if your f-module causes problems!).

Cheers

GB

Former Member
0 Kudos

Hello Sir, How are you,

Goto Monitor ->> select data packet -> right click and select simulate -->> you can choose activate update in update rules or transfer rules or both -->> select accordingly -->> now you can choose no of records or specific records(Rec From. and No. Of Recs). -->> enter. Now select all the records and execute.

It will go into debugging mode and start of the routine. you can use Page Down or Page Up for specific code. Put one more breake point there and press F8. You will reach there.

Or simply write BREAK-POINT in your routine and press F8 it will go there(if not again F8).

More info at :

http://help.sap.com/saphelp_nw04/helpdata/en/cd/be623cbc69c613e10000000a114084/frameset.htm

Hope it Helps

Srinivas Neelam

ravindra_tumuluri
Contributor
0 Kudos

Hello, thanks a lot Andreas.

Srini : I am in NW 2004S. Your solution is good for older versions..

Ravindra

Former Member
0 Kudos

Hi Ravindra,

Select your info package -> Go to Monitor-> Select the data packet-> Go to details tab->Select transfer node->Right click and select simulate update -> Select the checkbox activate debugging in transfer rules .

It will take you to the transfer routine code.

Regards,

Prakash B

Former Member
0 Kudos

hi

there are three ways to debug

The best option is the infinite loop in the start routine of the update rules. Your code may be as follows:

data: t_debug_flag_start value 'X'.

if t_debug_flag_start = 'X'.

do.

if t_debug_flag_start = ' '.

exit.

endif.

enddo.

endif.

Now when you execute the infopackage you would find that a generated program GP*** in sm50. You can debug the generated program by changing the value of t_debug_start.

  • ) The second method is to create a breakpoint in the generated program of the update rule.

*) The third method is the simulate update from the monitor of the request.In RSMO(Monitoring), choose the data package that you want to debug-> right click-> simulate update->check the check box for activate the debugging in update rules and go ahead with the process.

check this link also