09-21-2010 2:58 PM
Hi to all,
I was asked to insert an hyperlink in an e-mail generated in an abap report (using SO_DOCUMENT_SEND_API1 function module)
the hyperlink is too long and aftermore it should be parametrized using one or more of the following commands:
BI_COMMAND_1-'CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1=SELECTION_INPUT_STR (this one should be set equal to Purchasing Order )
how can I use the link in the e-mail if is too long (when I try to use hyperlink it gets wrong ? ).
Thanks in advance
Andrew
09-21-2010 3:04 PM
Hi!
You emali must be in HTML format.
Here's an example of the lin, within the email body:
<a href="http://sap.com">SAP's homepage</a>
Make your email to HTML format:
* Document properties
CLEAR ls_packlist.
ls_packlist-head_start = 1.
ls_packlist-head_num = 0.
ls_packlist-body_start = 1.
ls_packlist-body_num = l_tab_lines.
ls_packlist-doc_type = 'HTM'.
APPEND ls_packlist TO lt_packlist.
* Send mail
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = ls_docudata
sender_address = l_sender
sender_address_type = 'SMTP'
commit_work = 'X'
TABLES
packing_list = lt_packlist
object_header = lt_objhead
contents_txt = lt_text
contents_bin = gt_pdf
receivers = lt_email_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Regards
Tamá