2015 Dec 29 7:53 PM
Hi
we are sending an email to customer using our custom program . This email, should be seen as part of the attachments when anyone opens the sales order. I know that GOS can be used to create attachments in Sales Order. But can we attach an email that is sent from SAP to the attachments list?
Please let me know if this is possible.
Thanks,
Vishwa.
2016 Jan 03 9:01 PM
Hi
You can create a binary relation to the SO using CREATE_LINK of class CL_BCS
To read all linked mails use eg CL_BINARY_RELATION=>READ_LINKS ( IT_RELATION_OPTIONS-LOW = 'BCSAPPLSRQ' )
To display the mail you can do something like this:
DATA: lr_doc TYPE REF TO CL_DOCUMENT_BCS.
lr_doc ?= CL_BCS=>GET_INSTANCE_BY_OID( ... )->SEND_REQUEST->GET_DOCUMENT( ).
lr_doc->IF_DOCUMENT_DISPLAY_BCS~DISPLAY_OUTPLACE( ).
The send request must be stored for this solution!
Regards
2016 Jan 03 9:01 PM
Hi
You can create a binary relation to the SO using CREATE_LINK of class CL_BCS
To read all linked mails use eg CL_BINARY_RELATION=>READ_LINKS ( IT_RELATION_OPTIONS-LOW = 'BCSAPPLSRQ' )
To display the mail you can do something like this:
DATA: lr_doc TYPE REF TO CL_DOCUMENT_BCS.
lr_doc ?= CL_BCS=>GET_INSTANCE_BY_OID( ... )->SEND_REQUEST->GET_DOCUMENT( ).
lr_doc->IF_DOCUMENT_DISPLAY_BCS~DISPLAY_OUTPLACE( ).
The send request must be stored for this solution!
Regards
2016 Jan 08 12:08 AM
Hi
Thanks for your reply. We are doing something similar, as attaching to GOS is really not happening.
Thanks,
Vishwa.
2020 Jul 10 10:54 AM
Hi Vishwa,
And what is this "something similar"? Can you please share, I am facing the same Problem and could not make the solution proposal of Dominik working, either.
Thanks in Advance,
Erlend
2022 May 18 6:14 PM
Hi Vishwa and Erlend,
@Vishwa : Could you please share your source code ?
@Erlend : Did you find another solution ?
Thanks in advance for your help.
Valery