Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

mail and hyperlink

Former Member
0 Kudos

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

1 REPLY 1

Former Member
0 Kudos

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á