<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAPMail in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142160#M114920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually I had to do the same now and tried to use your mentioned FM.&lt;/P&gt;&lt;P&gt;After some reading of the documentation I finally managed to get this running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a code snippet from my test ABAP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MOVE sy-uname TO reclist-receiver.
MOVE 'B' TO reclist-rec_type.
APPEND reclist.

DATA:
  objpara TYPE STANDARD TABLE OF soparai1 WITH HEADER LINE
  .
doc_chng-proc_type = 'T'.
doc_chng-proc_name = 'IW53'.
doc_chng-skip_scren = 'X'.

objpara-name = 'IQM'.
objpara-low = '20000063'.
APPEND objpara.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
     EXPORTING
          document_data              = doc_chng
          put_in_outbox              = 'X'
     TABLES
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = html_tab
          contents_txt               = objtxt
          receivers                  = reclist
          object_para                = objpara
     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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I did not include all the coding necessary for sending and building the attachment. However, when receiving this mail inside the Business Workplace I can use the context menu of this mail and select 'Execute'.&lt;/P&gt;&lt;P&gt;Right after this the transaction 'IW53' is called and I find myself inside the document '20000063'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's all. Now I'm trying to find how I can create a link inside the text to let the receiver simply click on it to jump into the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Michael Fritz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Michael Fritz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Feb 2006 12:30:55 GMT</pubDate>
    <dc:creator>MichiFr</dc:creator>
    <dc:date>2006-02-24T12:30:55Z</dc:date>
    <item>
      <title>SAPMail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142158#M114918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I like to send a SAPMail with  FU SO_NEW_DOCUMENT_SEND_API1. &lt;/P&gt;&lt;P&gt;This works fine for me. But now I need also a link to a Transaction in this Mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the PROC_TYPE param, but I does not work!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should be something like this &lt;/P&gt;&lt;P&gt;PROC_TYPE = 'T'&lt;/P&gt;&lt;P&gt;PROC_NAME = 'CO01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it also possible to pass some inital values to this transaction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2006 12:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142158#M114918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-20T12:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAPMail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142159#M114919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not use the PROC_TYPE parameter so far but reading the FU documentation there are some more (table-) parameters which you can fill in to pass values to your transaction:&lt;/P&gt;&lt;P&gt;OBJECT_PARA can hold SET/GET parameters&lt;/P&gt;&lt;P&gt;OBJECT_PARB can hold some data to pass them to the global memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps somebody else can comment on the failing execution of your passed transaction code. I assume, however, that you or the receiver of your mail has got the needed authorization to execute this transaction? Furthermore I assume that you specified a SAP user as receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 10:04:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142159#M114919</guid>
      <dc:creator>MichiFr</dc:creator>
      <dc:date>2006-02-21T10:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAPMail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142160#M114920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually I had to do the same now and tried to use your mentioned FM.&lt;/P&gt;&lt;P&gt;After some reading of the documentation I finally managed to get this running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a code snippet from my test ABAP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MOVE sy-uname TO reclist-receiver.
MOVE 'B' TO reclist-rec_type.
APPEND reclist.

DATA:
  objpara TYPE STANDARD TABLE OF soparai1 WITH HEADER LINE
  .
doc_chng-proc_type = 'T'.
doc_chng-proc_name = 'IW53'.
doc_chng-skip_scren = 'X'.

objpara-name = 'IQM'.
objpara-low = '20000063'.
APPEND objpara.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
     EXPORTING
          document_data              = doc_chng
          put_in_outbox              = 'X'
     TABLES
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = html_tab
          contents_txt               = objtxt
          receivers                  = reclist
          object_para                = objpara
     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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I did not include all the coding necessary for sending and building the attachment. However, when receiving this mail inside the Business Workplace I can use the context menu of this mail and select 'Execute'.&lt;/P&gt;&lt;P&gt;Right after this the transaction 'IW53' is called and I find myself inside the document '20000063'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's all. Now I'm trying to find how I can create a link inside the text to let the receiver simply click on it to jump into the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Michael Fritz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Michael Fritz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 12:30:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142160#M114920</guid>
      <dc:creator>MichiFr</dc:creator>
      <dc:date>2006-02-24T12:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAPMail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142161#M114921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your message, the main clue was for me &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;[...]&lt;/P&gt;&lt;P&gt;However, when receiving this mail inside the Business Workplace I can use the context menu of this mail and select 'Execute'.&lt;/P&gt;&lt;P&gt;[...]&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have expected a link in the mail-body &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the params do not work for me. Do you realy use the 'T'-param and not the 'U'?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2006 13:36:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142161#M114921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-27T13:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAPMail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142162#M114922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   PROC_TYPE has to be 'T'.&lt;/P&gt;&lt;P&gt;   look at report : RSRRRS01 for any info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;GSR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2006 14:02:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142162#M114922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-27T14:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAPMail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142163#M114923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I have expected a link in the mail-body &lt;/P&gt;&lt;P&gt;Yes, me too, however AFAIK you must use the context menu of the mail message and click at 'Execute'. Perhaps sbdy else has got a hint for us?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But the params do not work for me. Do you realy use&lt;/P&gt;&lt;P&gt;&amp;gt; the 'T'-param and not the 'U'?&lt;/P&gt;&lt;P&gt;Yes, I did it as shown in my small example coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2006 14:06:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapmail/m-p/1142163#M114923</guid>
      <dc:creator>MichiFr</dc:creator>
      <dc:date>2006-02-27T14:06:38Z</dc:date>
    </item>
  </channel>
</rss>

