‎2009 Sep 14 9:49 AM
Hi all,
I have a variable of type XSTRING, i need to send this PDF file as an attachement to a mail. How can i do this?
Thanks in advance.
Warm regards,
Harshad.
‎2009 Sep 14 10:14 AM
Hello,
1. Use the method XSTRING_TO_SOLIX of class CL_DOCUMENT_BCS to convert to SOLIX_TAB.
2. Call the method ADD_ATTACHMENT class CL_DOCUMENT_BCS to add the attachment.
For further details look into the SAP example BCS_EXAMPLE_5.
Else use the method XSTRING_TO_SOLIX of class CL_DOCUMENT_BCS to get the hex contents & pass the resultant table to CONTENTS_HEX of the FM: SO_NEW_DOCUMENT_ATT_SEND_API1.
BR,
Suhas
‎2009 Sep 14 10:19 AM
Hi
Take ur XSTRING data into one Internal table and use:
call function 'EFG_GEN_SEND_EMAIL'
exporting
i_title = 'KPI Report - Status'(046)
i_sender = g_sender
i_recipient = g_email
i_flg_commit = k_x
i_flg_send_immediately = k_x
tables
i_tab_lines = it_tab_soli
exceptions
not_qualified = 1
failed = 2
others = 3.
if sy-subrc <> 0.
write:/ sy-subrc.
endif.
Regards,
Sreeram
‎2009 Sep 23 11:52 AM