cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Badi Z de CRM_MKTLIST_BADI

Former Member
0 Kudos

Hi Experts.

We have created a Z version of badi CRM_MKTLIST_BADI, because we need to modify the grouping of the BPs to be created with ELM.

How can we debug the Badi, especially the method create_person. ??

I will be greatful for your help.

Best regards,

Cristina

Accepted Solutions (0)

Answers (1)

Answers (1)

siva_velama2
Explorer
0 Kudos

Hi Christina,

If you would like to debug your code in the implementation, do following steps

1. Go to Transaction code - SE19.

2. Give your Z* Implementation name and press display

3. Go to method 'create_person'.

4. Place curson in the line of code inside and press stop(Breakpoint icons above).

OR you can simpley put BREAK XXXXXX(ur log on name User name)

After doing this, you need to execute transaction of market list , while running code it will stop at your breakpoint then you can execute line by line code in Method

Hope this helps!!

Siva

Former Member
0 Kudos

Hi Silva:

We have done everything as you said. The curios thing is, that it does not stop in the breakpoint. We thought it had to do with the workflow, you know that the user is WF-BATCH. We tried a debugging of workflow, but it did not result either.

Cristina

nicolas_busson
Active Contributor
0 Kudos

Hi Cristina,

One simple trick to debug this kind of process: include an infinite loop at the beginning of your code.

Something like :


While lv_tmp is initial
* do nothing
Endwhile

Then start the process: you will see your program running in SM50... the only thing you have to do is to right click and select "DEBUG PROGRAM": change the value of lv_tmp in debug mode so that your program will go on...

Regards,

Nicolas.

Former Member
0 Kudos

Thanks Niclas.

That was very helpful. We applied a kind of loop, which is working have the way. There is an entry corresponding to the Z class of the BAdI in the SM50.

But we still do not manage to debug the method PERSON_CREATE, which will be run by WF-BATCH user.

We have put a lot of breakepoints but the debug does not stop there.

Best regards,

Cristina

nicolas_busson
Active Contributor
0 Kudos

Hi Cristina,

Your breakpoints will never stop... So what you have to do in more details is:

1) Put the "While... Endwhile" thing just before the code you would like to debug.

2) Start your process.

3) As an infinite loop is running this will give you the time you need to start tcode SM50

4) There, select the line with your process

5) Goto menu "Program/Session >> Program >> Debugging"

6) Answer "YES" in the popup to start debugging your method.

Regards,

Nicolas.

Former Member
0 Kudos

Nicolas:

Thanks for your answer. It helped us to get to the clas of the badi.

The solution was to put the CRM_DEBUG_CODE parameter in the user parameters with value MKTLIST.

By this way finally we were able to get into the badi itself.

Thanks once again.

Cristina