<?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: Simple mail functionality in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959038#M698081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thor thor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are right, ECC600 has an import parameter commit_work.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if commit_work = on.&lt;/P&gt;&lt;P&gt;    commit work.  "Line 353&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module must not be called with parameter commit_work = 'X'. In the scope of any SAP transaction, nobody except SAP is allowed to and knows when to COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct the program. Make comment of line COMMIT_WORK = ... because SPACE is the default.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2007 13:30:36 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-10-16T13:30:36Z</dc:date>
    <item>
      <title>Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959030#M698073</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 am testing the simple mail functionality in transaction VA01. &lt;/P&gt;&lt;P&gt;In customizing (output determination &amp;#150; processing routines) for simple mail is being used a program and a smartform. It was not me who developed them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that when I try to test this through VA01 (I choose simple mail, etc), I get a dump saying: &amp;#145;Invalid commit work in an update function module. Termination occurred in the ABAP program &amp;#145;SAPLSOI1&amp;#146; &amp;#150; in &amp;#147;SO_DOCUMENT_SEND_API1&amp;#148;. The main program was &amp;#147;RSM13000&amp;#146;&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem now is how can I try to debug this when I am in transaction VA02? I am not able to execute the program I have in customizing&amp;#133; &lt;/P&gt;&lt;P&gt;How can I found more information about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 12:33:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959030#M698073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T12:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959031#M698074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the code is triggered in update mode u cant execute commit work and hence u cant debug,-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 12:40:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959031#M698074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T12:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959032#M698075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This commit work is happening in a standard FM: SO_DOCUMENT_SEND_API1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set commit work&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if commit_work = on.&lt;/P&gt;&lt;P&gt;    commit work.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only want to know how can i test this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 12:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959032#M698075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T12:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959033#M698076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thor thor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to find out where the COMMIT WORK comes from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;transactions VA01 and VA02 do all their database update (obviously including the mail task) in a separate process called UPDATE TASK. One or more functions are called in UPDATE TASK. That means all interface data are stored in a buffer. When the calling program issues a COMMIT WORK at the end of the transaction, the buffer is processed.&lt;/P&gt;&lt;P&gt;If the COMMIT WORK is not issued or a ROLLBACK WORK occurs, all the data are deleted.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 12:57:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959033#M698076</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-10-16T12:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959034#M698077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope you have configured custom code for o/p type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before saving output, give /H in command line and save, immediately after that swith on update debugging from &lt;/P&gt;&lt;P&gt;menu bar&amp;gt;.Settings&amp;gt;update debugging, &lt;/P&gt;&lt;P&gt;set break point in the subroutine in ur code, Menu&amp;gt;break ponits&amp;gt;subroutine.&lt;/P&gt;&lt;P&gt;then press F8, it will take you to the code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 12:58:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959034#M698077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T12:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959035#M698078</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;The commit work comes from function module: SO_DOCUMENT_SEND_API1 (lines 352). But i am not able to debug this... and i am not able to know why i have this error...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 12:59:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959035#M698078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T12:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959036#M698079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thor thor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your system is not consistent, what realease?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have no COMMIT WORK in this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SO_OBJECT_SEND' starts in line 322 and ends in 355 (release 46C). I checked our ECC600 Retail system, no COMMIT WORK either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may check the version history of the function and I'r recommend uregtly to restore the orginal version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the one who did the modification may be sent anywhere.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 13:08:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959036#M698079</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-10-16T13:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959037#M698080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weird..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with SAP ECC 6.0 - release 700&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In version history no one has modified the program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function so_document_send_api1.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Lokale Schnittstelle:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(DOCUMENT_DATA) LIKE  SODOCCHGI1 STRUCTURE  SODOCCHGI1&lt;/P&gt;&lt;P&gt;*"     VALUE(PUT_IN_OUTBOX) LIKE  SONV-FLAG DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(SENDER_ADDRESS) LIKE  SOEXTRECI1-RECEIVER DEFAULT SY-UNAME&lt;/P&gt;&lt;P&gt;*"     VALUE(SENDER_ADDRESS_TYPE) LIKE  SOEXTRECI1-ADR_TYP DEFAULT 'B'&lt;/P&gt;&lt;P&gt;*"     VALUE(COMMIT_WORK) LIKE  SONV-FLAG DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(SENT_TO_ALL) LIKE  SONV-FLAG&lt;/P&gt;&lt;P&gt;*"     VALUE(NEW_OBJECT_ID) LIKE  SOFOLENTI1-OBJECT_ID&lt;/P&gt;&lt;P&gt;*"     VALUE(SENDER_ID) LIKE  SOUDK STRUCTURE  SOUDK&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      PACKING_LIST STRUCTURE  SOPCKLSTI1&lt;/P&gt;&lt;P&gt;*"      OBJECT_HEADER STRUCTURE  SOLISTI1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"      CONTENTS_BIN STRUCTURE  SOLISTI1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"      CONTENTS_TXT STRUCTURE  SOLISTI1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"      CONTENTS_HEX STRUCTURE  SOLIX OPTIONAL&lt;/P&gt;&lt;P&gt;*"      OBJECT_PARA STRUCTURE  SOPARAI1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"      OBJECT_PARB STRUCTURE  SOPARBI1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"      RECEIVERS STRUCTURE  SOMLRECI1&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      TOO_MANY_RECEIVERS&lt;/P&gt;&lt;P&gt;*"      DOCUMENT_NOT_SENT&lt;/P&gt;&lt;P&gt;*"      DOCUMENT_TYPE_NOT_EXIST&lt;/P&gt;&lt;P&gt;*"      OPERATION_NO_AUTHORIZATION&lt;/P&gt;&lt;P&gt;*"      PARAMETER_ERROR&lt;/P&gt;&lt;P&gt;*"      X_ERROR&lt;/P&gt;&lt;P&gt;*"      ENQUEUE_ERROR&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data begin of object_hd_change.&lt;/P&gt;&lt;P&gt;        include structure sood1.&lt;/P&gt;&lt;P&gt;data end of object_hd_change.&lt;/P&gt;&lt;P&gt;data begin of attach_hd_change.&lt;/P&gt;&lt;P&gt;        include structure sood1.&lt;/P&gt;&lt;P&gt;data end of attach_hd_change.&lt;/P&gt;&lt;P&gt;data begin of object_data.&lt;/P&gt;&lt;P&gt;        include structure soodd.&lt;/P&gt;&lt;P&gt;data end of object_data.&lt;/P&gt;&lt;P&gt;data begin of objhead occurs 1.&lt;/P&gt;&lt;P&gt;        include structure soli.&lt;/P&gt;&lt;P&gt;data end of objhead.&lt;/P&gt;&lt;P&gt;data begin of objcont occurs 100.&lt;/P&gt;&lt;P&gt;        include structure soli.&lt;/P&gt;&lt;P&gt;data end of objcont.&lt;/P&gt;&lt;P&gt;data begin of atthead_tab occurs 1.&lt;/P&gt;&lt;P&gt;        include structure soli.&lt;/P&gt;&lt;P&gt;data end of atthead_tab.&lt;/P&gt;&lt;P&gt;data begin of attcont_tab occurs 10.&lt;/P&gt;&lt;P&gt;        include structure soli.&lt;/P&gt;&lt;P&gt;data end of attcont_tab.&lt;/P&gt;&lt;P&gt;data begin of atthead occurs 1.&lt;/P&gt;&lt;P&gt;        include structure soli.&lt;/P&gt;&lt;P&gt;data end of atthead.&lt;/P&gt;&lt;P&gt;data begin of attcont occurs 10.&lt;/P&gt;&lt;P&gt;        include structure soli.&lt;/P&gt;&lt;P&gt;data end of attcont.&lt;/P&gt;&lt;P&gt;data begin of new_pack_list occurs 10.&lt;/P&gt;&lt;P&gt;        include structure soxpl.&lt;/P&gt;&lt;P&gt;data end of new_pack_list.&lt;/P&gt;&lt;P&gt;data begin of rec_table occurs 10.&lt;/P&gt;&lt;P&gt;        include structure soos1.&lt;/P&gt;&lt;P&gt;data end of rec_table.&lt;/P&gt;&lt;P&gt;data begin of object_fl_change.&lt;/P&gt;&lt;P&gt;        include structure sofm1.&lt;/P&gt;&lt;P&gt;data end of object_fl_change.&lt;/P&gt;&lt;P&gt;data rcode like sonv-rcode.&lt;/P&gt;&lt;P&gt;data object_type like sood-objtp.&lt;/P&gt;&lt;P&gt;data object_id_new like soodk.&lt;/P&gt;&lt;P&gt;data file_format(3).&lt;/P&gt;&lt;P&gt;data: originator      like soos1-recextnam,&lt;/P&gt;&lt;P&gt;      originator_type like soos1-recesc.&lt;/P&gt;&lt;P&gt;data: hex_size like sy-tabix.&lt;/P&gt;&lt;P&gt;data: old_object like swotobjid,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    * sh070900 5.0A reconvert R30 into OBJ Docs is possible.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      sood_id like soodk.&lt;/P&gt;&lt;P&gt;data: old_folder_id like soodk,&lt;/P&gt;&lt;P&gt;      old_object_id like soodk,&lt;/P&gt;&lt;P&gt;      old_forwarder like soud-usrnam,&lt;/P&gt;&lt;P&gt;      old_object_data like sood2.&lt;/P&gt;&lt;P&gt;data hex_mode type sonv-flag value space.&lt;/P&gt;&lt;P&gt;data dummy_hex type solix_tab.&lt;/P&gt;&lt;P&gt;**data i.&lt;/P&gt;&lt;P&gt;**if sy-uname = ''&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; while i ne 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; endwhile.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;**endif.&lt;/P&gt;&lt;P&gt; describe table contents_bin lines hex_size.&lt;/P&gt;&lt;P&gt; if hex_size gt 0.&lt;/P&gt;&lt;P&gt;   call function 'SO_CONVERT_CONTENTS_BIN'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      it_contents_bin = contents_bin[]&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      et_contents_bin = contents_bin[].&lt;/P&gt;&lt;P&gt;   data l_new_size     type i.&lt;/P&gt;&lt;P&gt;   data l_line_size    type i.&lt;/P&gt;&lt;P&gt;   data l_new_doc_size type i.&lt;/P&gt;&lt;P&gt;   describe table contents_bin lines l_new_size.&lt;/P&gt;&lt;P&gt;   if l_new_size &amp;lt;&amp;gt; hex_size.&lt;/P&gt;&lt;P&gt;     describe field contents_bin-line length l_line_size in character mode.&lt;/P&gt;&lt;P&gt;     loop at packing_list where transf_bin = on.&lt;/P&gt;&lt;P&gt;       packing_list-body_start = packing_list-body_start * 2 - 1.&lt;/P&gt;&lt;P&gt;       packing_list-body_num = packing_list-body_num * 2.&lt;/P&gt;&lt;P&gt;       l_new_doc_size = packing_list-body_num * l_line_size / 2.&lt;/P&gt;&lt;P&gt;       if packing_list-doc_size &amp;lt;= l_new_doc_size.&lt;/P&gt;&lt;P&gt;         packing_list-doc_size = l_new_doc_size * 2.&lt;/P&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;P&gt;       modify packing_list.&lt;/P&gt;&lt;P&gt;     endloop.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; describe table contents_hex lines hex_size.&lt;/P&gt;&lt;P&gt; if hex_size gt 0.&lt;/P&gt;&lt;P&gt;   refresh contents_bin.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MOVE CONTENTS_HEX[] TO CONTENTS_BIN[].&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   hex_to_cont contents_hex contents_bin.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* transfer document data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform transfer_objdat_to_obj using document_data&lt;/P&gt;&lt;P&gt;                                       object_hd_change&lt;/P&gt;&lt;P&gt;                                       object_fl_change.&lt;/P&gt;&lt;P&gt;  perform set_default_object_data using object_hd_change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* read object out of table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* take API1, so no receiver conversion is necessary here&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  read table packing_list index 1.   "first object is document&lt;/P&gt;&lt;P&gt;  if sy-subrc ne ok.   "no packing list&lt;/P&gt;&lt;P&gt;    raise parameter_error.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  perform read_object_out_of_tables tables object_header&lt;/P&gt;&lt;P&gt;                                           contents_txt&lt;/P&gt;&lt;P&gt;                                           contents_bin&lt;/P&gt;&lt;P&gt;                                           objhead&lt;/P&gt;&lt;P&gt;                                           objcont&lt;/P&gt;&lt;P&gt;                                  using    packing_list&lt;/P&gt;&lt;P&gt;                                           object_data&lt;/P&gt;&lt;P&gt;                                           rcode.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* parameters    for tracing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LOOP AT OBJHEAD.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PERFORM  TRACE(RSSOEXTR) USING 'OBJHEAD'  OBJHEAD-LINE.&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;  if rcode ne ok.   "no object found&lt;/P&gt;&lt;P&gt;    raise parameter_error.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* out of object data use only extern content flag and perhaps the size&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  move object_data-extct to object_hd_change-extct.&lt;/P&gt;&lt;P&gt;  if object_hd_change-objlen = 0       or&lt;/P&gt;&lt;P&gt;     object_hd_change-objlen is initial.&lt;/P&gt;&lt;P&gt;    move object_data-objlen to object_hd_change-objlen.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform format_prepare_for_insert in program sapfssoa          "873845&lt;/P&gt;&lt;P&gt;       using packing_list-transf_bin&lt;/P&gt;&lt;P&gt;             dummy_hex&lt;/P&gt;&lt;P&gt;    changing objhead[]&lt;/P&gt;&lt;P&gt;             objcont[]&lt;/P&gt;&lt;P&gt;             packing_list-doc_type&lt;/P&gt;&lt;P&gt;             object_hd_change-file_ext&lt;/P&gt;&lt;P&gt;             rcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move packing_list-doc_type to object_type.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* for old types move size to header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform size_to_header tables objhead&lt;/P&gt;&lt;P&gt;                         using  object_type&lt;/P&gt;&lt;P&gt;                                document_data-doc_size.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get    now all attachments, decreibed in packing list&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  refresh new_pack_list.&lt;/P&gt;&lt;P&gt;  refresh atthead_tab.&lt;/P&gt;&lt;P&gt;  refresh attcont_tab.&lt;/P&gt;&lt;P&gt;  loop at packing_list from 2.&lt;/P&gt;&lt;P&gt;    clear new_pack_list.&lt;/P&gt;&lt;P&gt;    perform read_object_out_of_tables tables object_header&lt;/P&gt;&lt;P&gt;                                             contents_txt&lt;/P&gt;&lt;P&gt;                                             contents_bin&lt;/P&gt;&lt;P&gt;                                             atthead&lt;/P&gt;&lt;P&gt;                                             attcont&lt;/P&gt;&lt;P&gt;                                    using    packing_list&lt;/P&gt;&lt;P&gt;                                             object_data&lt;/P&gt;&lt;P&gt;                                             rcode.&lt;/P&gt;&lt;P&gt;    check rcode = ok.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  * sh240899 46C check for executable mail attachment (MAPI)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if packing_list-doc_type = 'R3O'.&lt;/P&gt;&lt;P&gt;      read table attcont index 21 into old_object.&lt;/P&gt;&lt;P&gt;      if old_object-objtype = 'SOFM'.&lt;/P&gt;&lt;P&gt;        read table attcont index 22.&lt;/P&gt;&lt;P&gt;        if attcont = 'PROCESS'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        * it's an attachment created by MAPI because of an executable&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        * mail&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        * read old mail and fill new one with process parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          move: old_object-objkey(17) to old_folder_id,&lt;/P&gt;&lt;P&gt;                old_object-objkey+17(17) to old_object_id,&lt;/P&gt;&lt;P&gt;                old_object-objkey+34(12) to old_forwarder.&lt;/P&gt;&lt;P&gt;          call function 'SO_OBJECT_READ'&lt;/P&gt;&lt;P&gt;               exporting&lt;/P&gt;&lt;P&gt;                    folder_id                  = old_folder_id&lt;/P&gt;&lt;P&gt;                    forwarder                  = old_forwarder&lt;/P&gt;&lt;P&gt;                    object_id                  = old_object_id&lt;/P&gt;&lt;P&gt;               importing&lt;/P&gt;&lt;P&gt;                    object_hd_display          = old_object_data&lt;/P&gt;&lt;P&gt;               tables&lt;/P&gt;&lt;P&gt;                    objpara                    = object_para&lt;/P&gt;&lt;P&gt;                    objparb                    = object_parb&lt;/P&gt;&lt;P&gt;               exceptions&lt;/P&gt;&lt;P&gt;                    folder_not_exist           = 4&lt;/P&gt;&lt;P&gt;                    folder_no_authorization    = 5&lt;/P&gt;&lt;P&gt;                    object_not_exist           = 6&lt;/P&gt;&lt;P&gt;                    object_no_authorization    = 7&lt;/P&gt;&lt;P&gt;                    operation_no_authorization = 8&lt;/P&gt;&lt;P&gt;                    owner_not_exist            = 9&lt;/P&gt;&lt;P&gt;                    parameter_error            = 10&lt;/P&gt;&lt;P&gt;                    others                     = 15.&lt;/P&gt;&lt;P&gt;          if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            move: old_object_data-vmtyp to object_hd_change-vmtyp,&lt;/P&gt;&lt;P&gt;                  old_object_data-skips to object_hd_change-skips,&lt;/P&gt;&lt;P&gt;                  old_object_data-acnam to object_hd_change-acnam,&lt;/P&gt;&lt;P&gt;                  old_object_data-acmem to object_hd_change-acmem.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;          continue.&lt;/P&gt;&lt;P&gt;        elseif attcont = 'DISPLAYATTACHMENT'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        * sh070900 5.0A reconvert R30 into OBJ Docs is possible.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        * get object instance and method into attachment body&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          refresh: attcont, atthead.&lt;/P&gt;&lt;P&gt;          move old_object-objkey+17(17) to sood_id.&lt;/P&gt;&lt;P&gt;          perform socx_select(sapfsso0) tables atthead&lt;/P&gt;&lt;P&gt;                                               attcont&lt;/P&gt;&lt;P&gt;                                               object_para&lt;/P&gt;&lt;P&gt;                                               object_parb&lt;/P&gt;&lt;P&gt;                                        using  sood_id&lt;/P&gt;&lt;P&gt;                                               hex_mode&lt;/P&gt;&lt;P&gt;                                               rcode.&lt;/P&gt;&lt;P&gt;          move atthead[] to attcont[].&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        * fill new packing list parameter&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          describe table atthead lines packing_list-head_num.&lt;/P&gt;&lt;P&gt;          describe table attcont lines packing_list-body_num.&lt;/P&gt;&lt;P&gt;          packing_list-doc_size = '255'.&lt;/P&gt;&lt;P&gt;          packing_list-doc_type = obj.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    move-corresponding packing_list to new_pack_list.&lt;/P&gt;&lt;P&gt;    move: packing_list-obj_descr     to new_pack_list-objdes,&lt;/P&gt;&lt;P&gt;          packing_list-obj_name      to new_pack_list-objnam,&lt;/P&gt;&lt;P&gt;          packing_list-doc_size      to new_pack_list-objlen,&lt;/P&gt;&lt;P&gt;          packing_list-obj_langu     to new_pack_list-objla,&lt;/P&gt;&lt;P&gt;          packing_list-mess_type     to new_pack_list-extct,&lt;/P&gt;&lt;P&gt;          packing_list-doc_type      to new_pack_list-objtp,&lt;/P&gt;&lt;P&gt;          packing_list-transf_bin    to new_pack_list-transf_bin."873845&lt;/P&gt;&lt;P&gt;    describe table atthead_tab lines new_pack_list-head_start.&lt;/P&gt;&lt;P&gt;    add 1 to new_pack_list-head_start.&lt;/P&gt;&lt;P&gt;    describe table attcont_tab lines new_pack_list-body_start.&lt;/P&gt;&lt;P&gt;    add 1 to new_pack_list-body_start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform format_prepare_for_insert in program sapfssoa        "873845&lt;/P&gt;&lt;P&gt;         using packing_list-transf_bin&lt;/P&gt;&lt;P&gt;               dummy_hex&lt;/P&gt;&lt;P&gt;      changing atthead[]&lt;/P&gt;&lt;P&gt;               attcont[]&lt;/P&gt;&lt;P&gt;               new_pack_list-objtp&lt;/P&gt;&lt;P&gt;               new_pack_list-file_ext&lt;/P&gt;&lt;P&gt;               rcode.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  get new sizes (also for attcont, someone forgot this...)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    describe table atthead lines new_pack_list-head_num.&lt;/P&gt;&lt;P&gt;    describe table attcont lines new_pack_list-body_num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at atthead.&lt;/P&gt;&lt;P&gt;      clear atthead_tab.&lt;/P&gt;&lt;P&gt;      move atthead to atthead_tab.&lt;/P&gt;&lt;P&gt;      append atthead_tab.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    loop at attcont.&lt;/P&gt;&lt;P&gt;      clear attcont_tab.&lt;/P&gt;&lt;P&gt;      move attcont to attcont_tab.&lt;/P&gt;&lt;P&gt;      append attcont_tab.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;    append new_pack_list.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* transfer receiver data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform transfer_rec_to_tab tables receivers&lt;/P&gt;&lt;P&gt;                                     rec_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* sender in right format&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  move sender_address to originator.&lt;/P&gt;&lt;P&gt;  perform convert_sndart_esc using sender_address_type&lt;/P&gt;&lt;P&gt;                                   originator_type.&lt;/P&gt;&lt;P&gt;  call function 'SO_OBJECT_SEND'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          EXTERN_ADDRESS             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          FOLDER_ID                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          FORWARDER                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            object_fl_change           = object_fl_change&lt;/P&gt;&lt;P&gt;            object_hd_change           = object_hd_change&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          OBJECT_ID                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            object_type                = object_type&lt;/P&gt;&lt;P&gt;            outbox_flag                = put_in_outbox&lt;/P&gt;&lt;P&gt;            originator                 = originator&lt;/P&gt;&lt;P&gt;            originator_type            = originator_type&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          OWNER                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          STORE_FLAG                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            object_id_new              = object_id_new&lt;/P&gt;&lt;P&gt;            sent_to_all                = sent_to_all&lt;/P&gt;&lt;P&gt;            originator_id              = sender_id&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            objcont                    = objcont&lt;/P&gt;&lt;P&gt;            objhead                    = objhead&lt;/P&gt;&lt;P&gt;            objpara                    = object_para&lt;/P&gt;&lt;P&gt;            objparb                    = object_parb&lt;/P&gt;&lt;P&gt;            packing_list               = new_pack_list&lt;/P&gt;&lt;P&gt;            att_head                   = atthead_tab&lt;/P&gt;&lt;P&gt;            att_cont                   = attcont_tab&lt;/P&gt;&lt;P&gt;            receivers                  = rec_table&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            object_not_sent            = 15&lt;/P&gt;&lt;P&gt;            object_type_not_exist      = 17&lt;/P&gt;&lt;P&gt;            operation_no_authorization = 21&lt;/P&gt;&lt;P&gt;            parameter_error            = 23&lt;/P&gt;&lt;P&gt;            too_much_receivers         = 73&lt;/P&gt;&lt;P&gt;            others                     = 1000.&lt;/P&gt;&lt;P&gt;  case sy-subrc.&lt;/P&gt;&lt;P&gt;    when ok.&lt;/P&gt;&lt;P&gt;      move object_id_new to new_object_id.&lt;/P&gt;&lt;P&gt;    when object_not_sent.&lt;/P&gt;&lt;P&gt;      perform transfer_tab_to_rec tables rec_table&lt;/P&gt;&lt;P&gt;                                         receivers.&lt;/P&gt;&lt;P&gt;      raise document_not_sent.&lt;/P&gt;&lt;P&gt;    when too_much_receivers.&lt;/P&gt;&lt;P&gt;      raise too_many_receivers.&lt;/P&gt;&lt;P&gt;    when object_type_not_exist.&lt;/P&gt;&lt;P&gt;      raise document_type_not_exist.&lt;/P&gt;&lt;P&gt;    when operation_no_authorization.&lt;/P&gt;&lt;P&gt;      raise operation_no_authorization.&lt;/P&gt;&lt;P&gt;    when parameter_error.&lt;/P&gt;&lt;P&gt;      raise parameter_error.&lt;/P&gt;&lt;P&gt;    when others.&lt;/P&gt;&lt;P&gt;      raise x_error.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MOVE OBJECT_ID TO NEW_OBJECT_ID.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform transfer_tab_to_rec tables rec_table&lt;/P&gt;&lt;P&gt;                                     receivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set commit work&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if commit_work = on.&lt;/P&gt;&lt;P&gt;    commit work.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endfunction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 13:16:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959037#M698080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T13:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Simple mail functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959038#M698081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thor thor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are right, ECC600 has an import parameter commit_work.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if commit_work = on.&lt;/P&gt;&lt;P&gt;    commit work.  "Line 353&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module must not be called with parameter commit_work = 'X'. In the scope of any SAP transaction, nobody except SAP is allowed to and knows when to COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct the program. Make comment of line COMMIT_WORK = ... because SPACE is the default.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 13:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-mail-functionality/m-p/2959038#M698081</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-10-16T13:30:36Z</dc:date>
    </item>
  </channel>
</rss>

