‎2015 Jul 07 3:47 PM
hi all!
With the help of classes cl_send_request_bcs and cl_document_bcs we manage to send an email to an external email address outside our SAP system. When we add another email addres as reply email address instead of the name of the user which is sending the emailaddress
We cannot link the email object, which is created with the class CL_DOCUMENT_BCS, with another object.
For example an Purchase Order.
With the methods:
TRY.
CALL METHOD cl_document_bcs->get_doctp
RECEIVING
result = lv_mess_key-doctp.
CALL METHOD cl_document_bcs->get_docyr
RECEIVING
result = lv_mess_key-docyr.
CALL METHOD cl_document_bcs->get_docno
RECEIVING
result = lv_mess_key-docno.
CATCH cx_os_object_not_found .
ENDTRY.
We can receive some masterdata of the email. But i don´t know a method which returns the master data of the folder where the email is put into.
How can we find this folder data?
Also in the table SOFM there are no records if we send the email with another reply email address instead of the email address of the sap user which is sending it. If the send it with the email adress of the user as reply address an record is created in the table SOFM.
kind regards
Anton Pierhagen
‎2015 Jul 09 10:17 AM
Found the solution! In logic of the SOST transaction the table SOPR is being used to refer to an folder. If i use this folder within the binding of my email object to the sales order object, the linking works correctly.
So thanks for replying!
‎2015 Jul 07 5:07 PM
What I could find is Outbox folder is only updated, if in case the sending user has an outbox (check comments in CL_BCS_DISTRIBUTE=>PUT_INTO_OUTBOX). That must be the reason why SOFM is not updated in your scenario.
Thanks,
Juwin
‎2015 Jul 07 7:14 PM
I further found that, inorder to link the email to another object, you can use SOOD object. SOOD object doesn't require folder name information.
Thanks,
Juwin
‎2015 Jul 09 9:11 AM
Hi Juwin
Unfortunately that is not the solution.
Do you know how i can find out which folder the email object is written to?
‎2015 Jul 09 10:17 AM
Found the solution! In logic of the SOST transaction the table SOPR is being used to refer to an folder. If i use this folder within the binding of my email object to the sales order object, the linking works correctly.
So thanks for replying!