‎2005 Jan 24 2:07 PM
Hi,
Basically, the code looks like:
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_text
i_subject = subject ).
* add sender
* add recipient
* read the documents I want to send
LOOP AT lt_list_files INTO ls_list_files.
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = 'DOC'
i_attachment_subject = file_name
I_ATT_CONTENT_HEX = lt_content_hex.
ENDLOOP.
* add our document (and its attachments) to send request.
CALL METHOD send_request->set_document( document ).
* set send immediately flag
send_request->set_send_immediately( 'X' ).
* Send document
call method send_request->send( ).
COMMIT WORK.The problem is that if I send attachments lt_text becomes an attachment too (!?!) and I want it to be the E-Mail Body. Without attachments lt_text is sent as expected as an E-Mail Body.
Whys that ?
Mihai
‎2005 Jan 24 2:22 PM
Hi Mihai,
Not sure if this is what you are looking for, but there seems to be a SAP Note 489848, which you might want to refer.
If you have not already done so, you can try experimenting with the methods CREATE_FROM_TEXT and ADD_DOCUMENT_AS_ATTACHMENT.
Regards,
Anand Mandalika.
‎2005 Jan 24 2:22 PM
Hi Mihai,
Not sure if this is what you are looking for, but there seems to be a SAP Note 489848, which you might want to refer.
If you have not already done so, you can try experimenting with the methods CREATE_FROM_TEXT and ADD_DOCUMENT_AS_ATTACHMENT.
Regards,
Anand Mandalika.
‎2005 Jan 25 9:00 AM
Thank you !
This is the solution (edited from 'This seems to be the answer'.)
I also discovered () the function SO_DOCUMENT_SEND_API1 that enables one to specify the sender as well. I knew only SO_NEW_DOCUMENT_ATT_SEND_API1 but the problem was that in the sent email From shows the email of the user <[email protected]> who executed the program that called this function and I needed in From to be a generic email address something like [email protected].
Because of that I tried to use BCS classes
Message was edited by: Mihai Olaru
‎2005 Dec 19 8:25 PM
Hello,
I have s special question concerning the BCS class.
Is it possible to attach a SAP-Object ?
Example purchase order
obj bus2012
What method of cl_document_bcs can be used?
Do I have to create any kind of persistence before
calling a mehod?
Markus