Application Development and Automation 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: 
Read only

Not able to debug inbound mail processing exit

Former Member
0 Likes
4,435

Hi Experts,

I want to debug an inbound mail processing. I have used SAPCONNECT user id in SICF transaction and have changed the user type from system to dialog and

assigned debugging authorization to the user SAPCONNECT.  In my exit class, I have written the code to wait for some time. After submitting mail from outlook

to SAP, I went to SM50 transaction and tried to debug by selecting program -> debugging option. But the debugging session is not opened in production

system. In development system, it is working. I have opened only session and tried in production but not able to debug.

Issue:  When we submit adobe offline form from outlook to SAP system, it is reaching the system and it can be found in inbound queue in SOIN transaction.

When I checked the trace, it is showing that the exit class is processed successfully. This exit class should process the form and send the mail back to the user.

But it is not working in production.  When I resend the form in SOIN  transaction, it is processing the form and it is sending the mail back to the user.

I wanted to check why the form is not getting processed while submitting the form from outllook. So I want to debug using SM50.

I request you to help in this.

Thanks & Regards,

Jay

1 ACCEPTED SOLUTION
Read only

VijayCR
Active Contributor
0 Likes
2,926

Hello Jay,

          Even we were facing the similar Issue we have used the program RSSOSOSTSTAT and FM

  SX_SNDREC_SELECT you cant get all the mails and their status.

Thanks,

Vijay.

10 REPLIES 10
Read only

VijayCR
Active Contributor
0 Likes
2,927

Hello Jay,

          Even we were facing the similar Issue we have used the program RSSOSOSTSTAT and FM

  SX_SNDREC_SELECT you cant get all the mails and their status.

Thanks,

Vijay.

Read only

Former Member
0 Likes
2,926

Hi Vijay,

Did you get solution for this issue as you were facing the similar issue. This issue is not with outgoing

mails.  This issue is with incoming mails to the SAP system. The above program can used to check the

outgoing mails from the system. The transaction is SOST. For incoming mails, you can use SOIN transaction. I can find mails in the inbound but the exit class is not working. So I need to debug the

exit class using SM50 transaction.  When I try to resend the mail from SOIN, it is working.

Dear All,

Please suggest me on this issue.

Thanks & Regards,

Jay

Read only

VijayCR
Active Contributor
0 Likes
2,926

Hello Jay,

     Just Check if you get any Similar FM in the program of SM50 where it fecthes all the workitems on a particular date.Let me know the program name for SM50 i will check and let you know.

Thank you,

Vijay.

Read only

Former Member
0 Likes
2,926

Hi Vijay,

When I try to debug the workprocess using SM66 or SM50, it is showing that the debugging started but

the debugging session (window) is not opening.

I need to debug the inbound mail processing, so I need to use SM66.  When we resend the mail from

inbound queue, it is working. So I need to debug the process when I submit the form from outlook.

This is strange issue. It may be system issue or basis issue.

Please let me know if you have any idea on this.

Thanks & Regards,

Jay

Read only

Former Member
0 Likes
2,926

Hi Friends,

When I tried to debug the inbound exit using SM66 transaction, I was not able to do this since the

debugger session was not opened.  We have multiple application servers in production system.

When I checked the work process, it was running on center instance application server. So I logged into

central instance application server and then tried to debug the work process. Then it opened the debugger session and then I was able to debug the issue.  In this case, there was exception in adobe standard

class while processing the adobe offline form.  Then we found that the HTTPS service was deactivated, so it was not processing the adobe offline form.

We have activated the HTTPS service on the central instance server and then the offline form was started

working and the issue was resolved. 

Hope it will help you if you get the similar problem.

Thanks & Regards,

Jay

Read only

Former Member
0 Likes
2,926

Hi Jay,

Your solution is too complex for me. Can you please explain how to identify the Central Instance server in a particular landscape?

I am also trying with the below solution. Please advise whether this will work or not.

The user name of our SAPCONNECT user is SMTPUSER. I have the password and will get debugging rights attached to it. Cant I debug with this user, as this user creates the whole trace logs etc?

Read only

Former Member
0 Likes
2,926

Hi Surya,

If you have debugging rights for the SAPCONNECT user, you can debug the inbound exit.

There are two ways to debug the inbound exit. You need to write a code to sleep for some time in the

exit class, so that it will stop and you can go to SM66 and debug the process.

Secondly, you can create break loop in the queue administration under service functions in the SCOT transaction. Here you can specify how much time it should stay idle.  Once it is created, you can send

the mail and go to SM66. There you can find the job and you can debug from there.

In our production system, we have multiple applicaiton servers. The system owner can give what are the

central instances.

Hope it helps you.

Thanks & Regars,

Jay

Read only

Former Member
0 Likes
2,926

Hi Jay and each and everybody who is facing a problem to debug inbound exit,

We found an easy method to debuginbound exit configured in SO50.

Step 1:- Go to transaction SOIN. Find your mail here. Your recent mail will be the top most entry.

Step 2:- Click on SEND REQUEST at the topmost left corner of this screen.

Step 3:- Click on Send again.

Step 4:- Click on Send again. If it fails once, try again and again until SMTP Envelope screen opens.

Step 5:- Change the 3rd entry DSN(N,E,A) to "A" and click OK.

Step 6:- Press F8. Here your break point should trigger.

The clue is from trace file of Inbound mail. By default HANDLE_REQUEST of CL_SMTP_EXT_SAPCONNECT will be triggered if any mail comes into SAP. This will be defined in Handler class of SAPCONNECT. HANDLER_REQUEST will call

   call method bcs_send_req->ibnd_proc_post_decr( In system line 260). This method will call EXIT_PROCESSING at line 28. This method will find your exit defined in SO50 and will call PROCESS_INBOUND of your exit. Thats it.  Happy debugging from now on.

A KIND REQUEST TO EACH AND EVERYBODY. PLEASE DO NOT USE COMPLEX TERMS WHILE GIVING YOUR SOLUTIONS. SCN WILL BE REFERRED BY ROOKIES AS WELL AS EXPERTS. GIVE YOUR SOLUTIONS IN NEAT AND LAYMAN TERMS SO THAT EACH AND EVERYBODY CAN UNDERSTAND. THIS WILL SERVE THE PURPOSE OF THIS SITE.

Read only

Former Member
0 Likes
2,926

Hello everybody,

Just a small addition to my earlier posting. MIME should be activated before following the above process. So first of all, run program RSCONN06 with "Always save" for Inbound mails. Now follow the above process.

Regards,

Surya.

Read only

Former Member
0 Likes
2,926

Hi Surya,

The above process will be used when you want to debug the inbound exit class by resending the inbound mail. If you want to debug the inbound exit class while sending mail from outlook to SAP, you can follow

the process which I mentioned in my above reply.

Thanks for sharing the information here. It may be helpful for others if they have any issue while debugging

the inbound exit class.

Thanks & Regards,

Jay