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: 

Send Mail in loop with random error XS817 Cannot process message in SAP System

clemenssss
Explorer
0 Kudos

Hi Community,

We are sending HTML-formatted mails (created by FM WWW_HTML_FROM_LISTOBJECT) in a loop using cl_bcs=>create_persistent), set_send_immediately( abap_true ), ->send( ), COMMIT WORK.

Usually, the first mail in the loop is sent correctly but followup mails are sent correctly sometimes but by chance of roughly 50 % the mail is rejected with error XS 817 Cannot process message in SAP System.

No obvious rule: Sometimes 5 subsequent mails sent correctly, sometimes 6 run into error. It is completely unrelated to the mails content or size: The same mail that is sent correctly once may be rejected when sent again later and vice versa.

We already tried adding AND WAIT to the COMMIT WORK statement but this does not make any difference.

I could not find a solution in OSS. My suspicion is a memory buffer problem. Is there any way to clear all buffers before sending the next mail?

We are on S4HANA ON PREMISE 2021 Initial Shipment Stack sap.com SAP S/4HANA 2021
Basis 756 SAP_ABA 75G

Thanky ou for any helpful answers,

Regards, Clemens

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos

Please check the procedure: Error code XS817 - BC-SRV-COM Guided Answer - Guided Answers (sap.com)

In the SAP notes, you probably missed that one, 3043563 - Error XS817 “Cannot process message in SAP System, Error while automatically determining t..., which says that there's an additional detailed message:

Sandra_Rossi_0-1707138426512.png

Please look at it, and check again the SAP notes and the procedure.

If you cannot find anything new, your last chance is to contact the SAP support.