<?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: Send Mail When Saving The Process Order in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165352#M1516432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In user exit you should not use commit work statement .It is rule. You can put the code in a function and call the function module in update mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kamath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Aug 2010 10:47:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-09T10:47:12Z</dc:date>
    <item>
      <title>Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165351#M1516431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to send a Mail with some details whenever we Create &amp;amp; Save a new Process Order in COR1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written my code at the below location where i have all the required data stored in the IT'S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enhancement - PPCO0001&lt;/P&gt;&lt;P&gt;FM - EXIT_SAPLCOBT_001&lt;/P&gt;&lt;P&gt;Include - zxco1u01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below code to send the Mail in the include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Send the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        document_data              = wa_doc_chng&lt;/P&gt;&lt;P&gt;        put_in_outbox              = 'X'&lt;/P&gt;&lt;P&gt;        commit_work                = ""&lt;/P&gt;&lt;P&gt;      tables&lt;/P&gt;&lt;P&gt;        packing_list               = it_objpack&lt;/P&gt;&lt;P&gt;        contents_txt               = it_objtxt&lt;/P&gt;&lt;P&gt;        receivers                  = it_reclist&lt;/P&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;        too_many_receivers         = 1&lt;/P&gt;&lt;P&gt;        document_not_sent          = 2&lt;/P&gt;&lt;P&gt;        document_type_not_exist    = 3&lt;/P&gt;&lt;P&gt;        operation_no_authorization = 4&lt;/P&gt;&lt;P&gt;        parameter_error            = 5&lt;/P&gt;&lt;P&gt;        x_error                    = 6&lt;/P&gt;&lt;P&gt;        enqueue_error              = 7&lt;/P&gt;&lt;P&gt;        others                     = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  To refresh SAP Work Office so that mail can be recieved immediataly.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      submit rsconn01 with mode = 'INT'&lt;/P&gt;&lt;P&gt;                      with output = ''&lt;/P&gt;&lt;P&gt;                       and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      message 'Problem in sending Email.' type 'I'.&lt;/P&gt;&lt;P&gt;    endif.              "  End of sy-subrc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my exporting parameter "commit_work" is blank, i have not passed "X" in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i pass "X" in this, it gives me a dump as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Short text&lt;/P&gt;&lt;P&gt;    Invalid COMMIT WORK in a COMMIT WORK or ROLLBACK WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happened?&lt;/P&gt;&lt;P&gt;    Error in the ABAP Application Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The current ABAP program "SAPLSOI1" had to be terminated because it has&lt;/P&gt;&lt;P&gt;    come across a statement that unfortunately cannot be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;    The call of a COMMIT WORK in a FORM, that will not be executed until&lt;/P&gt;&lt;P&gt;    the commit or rollback point of the caller using the variant&lt;/P&gt;&lt;P&gt;    PERFORM ... ON COMMIT or PERFORM ... ON ROLLBACK is not permitted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trigger Location of Runtime Error&lt;/P&gt;&lt;P&gt;    Program                                 SAPLSOI1&lt;/P&gt;&lt;P&gt;    Include                                 LSOI1U32&lt;/P&gt;&lt;P&gt;    Row                                     154&lt;/P&gt;&lt;P&gt;    Module type                             (FUNCTION)&lt;/P&gt;&lt;P&gt;    Module Name                             SO_DOCUMENT_SEND_API1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i take out "X" from "commit_work", it does not send mail and also the transaction does not give any Dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help out me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 10:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165351#M1516431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T10:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165352#M1516432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In user exit you should not use commit work statement .It is rule. You can put the code in a function and call the function module in update mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kamath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 10:47:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165352#M1516432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T10:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165353#M1516433</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 have tried the Same Code at the below location and it does work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM - EXIT_SAPLCOZV_001&lt;/P&gt;&lt;P&gt;Include - ZXCO1U06&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please let me know what is the difference between these two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 11:36:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165353#M1516433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T11:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165354#M1516434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you may be aware, in order to avoid data inconsistency SAP is using bundling techniques and lock mechanisms . PERFORM..... ON  COMMIT, and CALL FM... IN UPDATE TASK etc are the bundling techniques that SAP is normally using. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now during customer exit, what we are doing is we are just introducing a new piece of code or some more logic to change some value, or will do some validation etc.....SAP itself will have a bundling technique here, like a lot perform on commit statements are already bundled but not yet committed, or a lot of IN UPDATE TASK FMs are logged into table VBLOG , waiting for a COMMIT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your code what you had done is you just implicitly called a commit statement,which may be before actual intended COMMIT statement, coz you are totally disturbing SAP logic of database update. Thats why SAP is giving dump, the dump analysys is also saying the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use your send mail function in this exit itself without COMMIT statement , once the transaction COMMIT happen, this will send mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now why it is not giving dump in another exit: SAP code is just checking whether it cause any inconsistency due to this commit statement, if it is not, then program will flow with out any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Antony Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Antony Thomas on Aug 9, 2010 8:25 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 12:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165354#M1516434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T12:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165355#M1516435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i write the below code in FM = &lt;STRONG&gt;EXIT_SAPLCOBT_001&lt;/STRONG&gt; and include = &lt;STRONG&gt;zxco1u01&lt;/STRONG&gt;, it does not work for sending the mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Mail Data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; types: begin of ty_mail,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        tcode type zmail-tcode,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        email type zmail-email,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        end of ty_mail.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;IT Creation.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data:  it_mail type standard table of ty_mail.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;WA Creation.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data:  wa_mail type ty_mail.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Email Related Internal Tables.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data:  it_reclist        type standard table of somlreci1,     "Recipients&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_objpack        type standard table of sopcklsti1,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_objhead        type standard table of solisti1,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_objtxt         type standard table of solisti1 initial size 0 with header line,      "Body of EMail&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_objbin         type standard table of solisti1,      "Attachment of EMail&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_contents_hex   like standard table of solix,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_objbin1        type standard table of solisti1,      "Attachment of EMail&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_contents_hex1  like standard table of solix.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Email Related Work Area.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data:  wa_doc_chng       type sodocchgi1.     "attributes of document to send&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data:  l_reclist               like line of it_reclist,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        l_objpack               like line of it_objpack,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        l_tab_lines             type i.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; data:  lv_answer   type string,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        w_msg1(100) type c,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        w_gamng     type string.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; select tcode email from zmail into table it_mail&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        where tcode = 'ZQA15'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   refresh it_objtxt[].&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   it_objtxt = '-----------------------------------------------------------------------------------------------------'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   concatenate 'Order Number - '  header_table-aufnr into it_objtxt separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   concatenate 'Plant - '  header_table-werks into it_objtxt separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   concatenate 'Material No. - '  position_table-matnr into it_objtxt separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   concatenate 'Material Description - '  header_table-ktext into it_objtxt separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   concatenate 'Batch No. - '  position_table-charg into it_objtxt separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   w_gamng = header_table-gamng.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   concatenate 'Batch Size - '  w_gamng into it_objtxt separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append it_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   concatenate 'MFG. Date - '  position_table-verid into it_objtxt separated by space.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   refresh it_reclist[].&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   loop at it_mail into wa_mail.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     clear  l_reclist.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_reclist-receiver    = wa_mail-email.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_reclist-express     = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_reclist-rec_type    = 'U'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_reclist-no_forward  = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     append l_reclist to it_reclist.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     clear wa_mail.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Fill the document data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   wa_doc_chng-doc_size = 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Populate the subject/generic message attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   wa_doc_chng-obj_langu = sy-langu.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   wa_doc_chng-obj_name  = 'PO DETAILS'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   wa_doc_chng-obj_descr = 'PO Details To QC'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   wa_doc_chng-sensitivty = 'F'.          "  Send mail as a confidential&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   wa_doc_chng-no_change  = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Describe the body of the message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   if it_objpack is initial.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_objpack-transf_bin = space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_objpack-head_start = 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_objpack-head_num   = 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_objpack-body_start = 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     describe table it_objtxt lines l_objpack-body_num.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     l_objpack-doc_type   = 'RAW'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     append l_objpack to it_objpack.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     clear  l_objpack.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     clear l_tab_lines.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Send the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       document_data              = wa_doc_chng&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       put_in_outbox              = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       commit_work                = ''&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       packing_list               = it_objpack&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       contents_txt               = it_objtxt&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       receivers                  = it_reclist&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       too_many_receivers         = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       document_not_sent          = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       document_type_not_exist    = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       operation_no_authorization = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       parameter_error            = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       x_error                    = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       enqueue_error              = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       others                     = 8.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  To refresh SAP Work Office so that mail can be recieved immediataly.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     submit rsconn01 with mode = 'INT'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     with output = ''&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                      and return.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   else.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     message 'Problem in sending Email.' type 'I'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   endif.              "  End of sy-subrc&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endif.                "  End of lw_answer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i write the same above code in FM = &lt;STRONG&gt;EXIT_SAPLCOZV_001&lt;/STRONG&gt; and include = &lt;STRONG&gt;zxco1u06&lt;/STRONG&gt;, it does work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to understand why it works at one place and does not at the other?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 12:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165355#M1516435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T12:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165356#M1516436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Parveen, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned in previous thread, first exit may be calling in midst of a transaction, where an implicit commit will create inconsistency, so SAP wont allow you to proceed further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case secod exit, where you are successfull coz, an implicit commit wont create any problem here.so it allows you to proceed further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need more insight into this area, probably you can go through documents regarding database updates, LUWs, lock mechanisms etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Antony Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 12:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165356#M1516436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T12:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165357#M1516437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved this problem at my end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks at a lot for all the help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 09:36:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165357#M1516437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T09:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Send Mail When Saving The Process Order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165358#M1516438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using 'SO_NEW_DOCUMENT_ATT_SEND_API1' in user exit EXIT_SAPFP50M_002 include zxpadu02. I am calling a smartform &lt;/P&gt;&lt;P&gt;converting to PDF and sending as attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me it generates entry in table SOST and the mail stays in the SAP outbox with the status 'waiting for communication'.&lt;/P&gt;&lt;P&gt;I tried to run RSCONN01 my self. it doesnt send the email. Other thing i see is even though it adds record to SOST table, but does not show the email in scot as pending. If I send email from a Z program this works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with and without commit both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how did you resolve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surinder Pal Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 20:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-mail-when-saving-the-process-order/m-p/7165358#M1516438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T20:10:25Z</dc:date>
    </item>
  </channel>
</rss>

