Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Debug Class Methode - Inbound Mail Processing (SO50 - Custom Class)

Former Member
0 Kudos
1,906

Hello Cracks

I've got a problem with the debugging of the inbound mail processing. Everything is just like the description in the very helpful webblog from Thomas Jung.

/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher

The mails come into our configurated system. My problem is, that I can't debug the methode from the inbound class.

When I just set an external brakepoint in the sourcecode of the methode, nothing happens when i send a mail to our system. Isn't there a way to debug the source?

I hope you have a solution for this problem.

Thanks for your help

Greetings Boris

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos
427

Hello Boris

I am not sure if my tip will work in your case but it worked in case of debugging an old-fashioned SAP forms.

Put the following coding (endless loop) into your class where you want to start debugging:

DATA:
  lx_continue(1)    TYPE c.

*  IF ( syst-uname = <specific user> ).
  DO.
    IF ( lx_continue = 'X' ).
      EXIT.
    ENDIF.
  ENDDO.
*  ENDIF.

When you process an inbound mail you should see the corresponding process in transaction <b>SM50</b>. Choose menu <i>Program/Modus -> Program -> Debugging</i>.

If this works then you will jump into the ABAP debugger right at the coding above. Set <b>lx_continue = 'X'.</b> and continue debugging.

If you do <b>not</b> see your process in SM50 then this trick does not work here.

Regards

Uwe

6 REPLIES 6

uwe_schieferstein
Active Contributor
0 Kudos
428

Hello Boris

I am not sure if my tip will work in your case but it worked in case of debugging an old-fashioned SAP forms.

Put the following coding (endless loop) into your class where you want to start debugging:

DATA:
  lx_continue(1)    TYPE c.

*  IF ( syst-uname = <specific user> ).
  DO.
    IF ( lx_continue = 'X' ).
      EXIT.
    ENDIF.
  ENDDO.
*  ENDIF.

When you process an inbound mail you should see the corresponding process in transaction <b>SM50</b>. Choose menu <i>Program/Modus -> Program -> Debugging</i>.

If this works then you will jump into the ABAP debugger right at the coding above. Set <b>lx_continue = 'X'.</b> and continue debugging.

If you do <b>not</b> see your process in SM50 then this trick does not work here.

Regards

Uwe

Former Member
0 Kudos
427

Hello Uwe

Thanks for your suggestion, but unfortunately I din't get any process in the SM50.

So it seems, that this soulution dosn't work in this case.

Former Member
0 Kudos
427

Hello,

with the endless loop trick I can see the the process in SM50. However when I try to step into debugging nothing happens.

First it asks me if I want to debug and then just nothing (no message, etc)

Does the user that runs this process needs to have debugging rights?

Usually this is a something like an Mailadmin user you can setup up with SICF / Servicename: SAPCONNECT.

Thx

sanju_joseph
Product and Topic Expert
Product and Topic Expert
0 Kudos
427

Hi,

Thought of adding this wiki link,that will be useful for everyone struggling to debug so50 exit class

http://wiki.sdn.sap.com/wiki/x/cQGbBg

Best Regards,

Sanju

Former Member
0 Kudos
427

Hi Boris,

I am in a similar situation where I am not able to figure out whether by Exit class configured in SO50 is being trigerred or not.

Did you solev your problem abut this? What was the problem/solution.

Thanks,

Prakash Pandey

0 Kudos
427

This is how I debug inbound email.

Make sure user of the SAPCONNECT service in SICF has debug access.

I believe the user also has to be a dialog user.

To turn on debugging Go to transaction SCOT and enter DBG+ in the input field

Go to class CL_SMTP_EXT_SAPCONNECT (SE80 -> choose class/interface)

Expand method folder and double click on HANDLE_REQUEST method

Place an external break point on the line of code "while debug = sx_false". Make sure you set the external debug user to the user running the SAPCONNECT service in SICF.

Place an external break point in the desired exit class configured in SO50.

In SE80 select the desired class.

Expand method folder and double click method PROCESS_INBOUND

Place an external break point on desired line of code.

Send an email to SAP.

Debugging session should appear. Set the DEBUG flag to X to exit loop. Then hit F8. The debug session should proceed to your break point set earlier in the exit class from SO50.

Turn off debugging when finished by going to SCOTT and entering DBG- in input field.