cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug data manager BADI end routine ?

Former Member
0 Kudos

It's required to make neccessary data transformantion when performing pakcage "import hierarchy from BW", which is complecaited and BPC own's conversion cannot make it.

We intend to develop DM badi END ROUTIEN to archive that.

But after we set debug user in BPC server manager and external breakpoint, surprisely runing this package ignores breakpoint and doesn't jump to debug window.

However, on condition of setting external breakpoint in class method CL_UJD_START_PACKAGE~RUN_PACKAGE, it indeed works.

Could someone explain this? thanks a lot.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

It's my mistake, forgetting compensate transformation file with ENDROUTINE section.

Thank you all.

former_member200327
Active Contributor
0 Kudos

Did you just set a break-point in CL_UJD_START_PACKAGE~RUN_PACKAGE or you also changed the value of SYNCHRONOUS variable? If you changed it then I can explain.

Cheers,

Gersh

Former Member
0 Kudos

Yes, I set set a break-point in CL_UJD_START_PACKAGE~RUN_PACKAGE and clearly running a bpc package could trigger this but it cannot go to the code line in BADI.

Please help.

former_member200327
Active Contributor
0 Kudos

I see. Problem is CL_UJD_START_PACKAGE~RUN_PACKAGE runs in Dialog mod and than it starts a job in background. Break-point doesn't work in background processes. You can try following that blog [http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/18300] [original link is broken] [original link is broken] [original link is broken];. Changing that variable will make that process run in Dialog mode and it should stop at your break-point.

Gersh

Former Member
0 Kudos

Hi Brad,

You can use program UJD_TEST_PACKAGE to debug your BADI code. First manually run the package to get the answer prompt details. Go to SE38 in BW and create a variant for above program with your answer prompt. Set a break point in your BADI code and run the above program in debugging mode. F8 in debugging mode should take you to your breakpoint in BADI.

Kalyan.

Former Member
0 Kudos

Hi Gersh

Actually I read before I posted here.

It seems it doesn't work like that states.

I used enhancement spot UJD_ROUTINE and implement interface method IF_UJD_ROUTINE~RUNROUTINE.

Is there any restriction for this?

Former Member
0 Kudos

Hi,

Have you solved the problem?

I used a bit of code to make the system wait for 60 seconds... and during that time I use SM50 to capture the debug session. I use the TVARVC table to update with some unique combinations with respect to what I am doing and capture them in the code while executing. It works pretty fine for me. I used this method in almost all enhancement spots such as write back, start/end routine, retraction etc.

If you are interested in my solution.... I will have to get the code and paste it here.

Waiting for your reply.

Regards,

Surya Tamada.

former_member200327
Active Contributor
0 Kudos

Are saying that you changed value of LF_SYNCHRONOUS from space to X and it still didn't stop at your break-point?

Can you see in SM66 if your load is running in Dialog or Background mode?

Former Member
0 Kudos

Yes, Surya.

I'm quite interested. Please teach a little.

former_member190501
Active Contributor
0 Kudos

Hi,

Try infinite loop in End routine of your logic as follows.

data: v_val(1) value ''.

DO.
if v_val = 'X'.
exit.
endif.
ENDDO.

Save and activate the method.

Run your package from BPC Excel and login into back end goto Tcode SM50. You can find a job there which is in running mode.

Select the process, Goto menu options select Program/Session-->Program -->Debugging.

Once system opens debugging session change v_val to X and proceed to debug of your logic.

Hope it helps..

regards,

Raju

Former Member
0 Kudos

Hi, Raju

I understood what you're saying but now the problem is it could jump to method CL_UJD_START_PACKAGE~RUN_PACKAGE but not to BADI code.