<?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 Perform on commit or Update function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544904#M1752386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a basic requirement like sending invoice outputs as email attachment. For this i have created a Z include and attached it to NACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its working fine. Further to my requirement i need update the invoice in DMS. For this i am using the same include. After sending mail part i have written code for DMS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to generate the DMS number using BAPI_DOCUMENT_CREATE2 and attaching document using CVAPI_DOC_CHECKIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is now after calling create BAPI and chekin&amp;nbsp; Bapi, i am using commit BAPI. This is generating a runtime error like not use commit statement or BAPI before system commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To over come this i read, update fm and perform is commit is available. Now i have created a FM, processing type as update and Coll.run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside Fm if use commit i am getting run time error, if dont use the dms number is not generating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest how to proceed further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;NN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 15:29:19 GMT</pubDate>
    <dc:creator>former_member576008</dc:creator>
    <dc:date>2013-06-26T15:29:19Z</dc:date>
    <item>
      <title>Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544904#M1752386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a basic requirement like sending invoice outputs as email attachment. For this i have created a Z include and attached it to NACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its working fine. Further to my requirement i need update the invoice in DMS. For this i am using the same include. After sending mail part i have written code for DMS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to generate the DMS number using BAPI_DOCUMENT_CREATE2 and attaching document using CVAPI_DOC_CHECKIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is now after calling create BAPI and chekin&amp;nbsp; Bapi, i am using commit BAPI. This is generating a runtime error like not use commit statement or BAPI before system commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To over come this i read, update fm and perform is commit is available. Now i have created a FM, processing type as update and Coll.run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside Fm if use commit i am getting run time error, if dont use the dms number is not generating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest how to proceed further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;NN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 15:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544904#M1752386</guid>
      <dc:creator>former_member576008</dc:creator>
      <dc:date>2013-06-26T15:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544905#M1752387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use commit work statement in an update function module. Please refer to the following link:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/thread/1665041"&gt;http://scn.sap.com/thread/1665041&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you are using two commit work statements one after BAPI_DOCUMENT_CREATE2 and other after .CVAPI_DOC_CHECKIN. If you don't use first commit work then the bapi does not create document and hence attachment would not happen. What you can do is that just use BAPI_DOCUMENT_CREATE2 in the update function module without commit statement. This would be commited automatically after the system commit. For creating attachment,&amp;nbsp; event of object "DRAW" (I think "CREATED" ) is raised whenever a DMS document is generated(check tcode SWEL). You can call CVAPI_DOC_CHECKIN to add attachment in a new FM which would be entered as receiver in SWE2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 15:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544905#M1752387</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2013-06-26T15:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544906#M1752388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NK,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably your error becomes because these code it's in UPDATE TASK execution. In this type of execution is prohibited the use of COMMIT WORK because it's automatically called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 16:01:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544906#M1752388</guid>
      <dc:creator>aferngas</dc:creator>
      <dc:date>2013-06-26T16:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544907#M1752389</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;Yes, you got my trouble / point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event 'CREATED' is triggered when i created in CV01N but not using the BAPI_DOCUMENT_CREATE2. Checked it SWEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i missing any parameter to trigger an event? let me check. Please suggest if there is no event triggered using event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;NN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 19:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544907#M1752389</guid>
      <dc:creator>former_member576008</dc:creator>
      <dc:date>2013-06-26T19:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544908#M1752390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's what my problem. Please suggest any alternatives.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 00:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544908#M1752390</guid>
      <dc:creator>former_member576008</dc:creator>
      <dc:date>2013-06-27T00:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544909#M1752391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then try raising the event using FM "SWE_EVENT_CREATE" after the bapi "BAPI_DOCUMENT_CREATE2".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 06:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544909#M1752391</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2013-06-27T06:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544910#M1752392</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;Try to use the same bapi 'BAPI_DOCUMENT_CREATE2' to attach the files as well, just pass the attachment in the tables parameter 'DOCUMENTFILES'. There is no need to of another function module 'CVAPI_DOC_CHECKIN' for uploading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Bala Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 07:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544910#M1752392</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2013-06-27T07:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544911#M1752393</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;Have you used "BAPI_TRANSACTION_COMMIT" to commit the changes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it will call a function module to refresh the buffer if previous BAPI have any errors or not...With commit functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;Gangadhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 07:29:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544911#M1752393</guid>
      <dc:creator>former_member223133</dc:creator>
      <dc:date>2013-06-27T07:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544912#M1752394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NK,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try taking all the code and encapsulated in a module function and call it in another thread by asynchronously RFC call. Obviously your RFC destination it will be the same system (loopback) and it will need a COMMIT inside this remote call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 08:35:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544912#M1752394</guid>
      <dc:creator>aferngas</dc:creator>
      <dc:date>2013-06-27T08:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544913#M1752395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must not use any commit either in update task or in a perform at commit form. So create a RFC enabled wrapper that will execute the BAPI and the COMMIT-WORK, and call this FM &lt;A href="http://help.sap.com/abapdocu_731/en/abapcall_function_background_task.htm"&gt;IN BACKGROUND TASK&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 11:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544913#M1752395</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2013-06-27T11:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Perform on commit or Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544914#M1752396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, its working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a RFC FM and a report. From FM scheduled the report using JOB_OPEN/CLOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have moved the values using &lt;SPAN class="L0S52"&gt;&lt;STRONG&gt;EXPORT values &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATABASE &lt;/SPAN&gt;indx&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;st&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ID &lt;/SPAN&gt;indxkey&lt;/STRONG&gt;&lt;SPAN class="L0S55"&gt; and imported the same in the report. Because export/import abap memory is not working in scheduled jobs.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;My DMS document number is generated and pdf document attached.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;I have called the FM like below&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;call &lt;SPAN class="L0S52"&gt;function &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;FM &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;starting &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;new &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;task XXXX.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In update debugging a separate window is opened and my coding is working perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;requirement is to show a pop-up with DMS number. How to display the DMS number since its executing separately from the original t-code. Also how to clear the export database memory, because examples are for available only for free abap memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;NK&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S52"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 04:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-or-update-function-module/m-p/9544914#M1752396</guid>
      <dc:creator>former_member576008</dc:creator>
      <dc:date>2013-07-09T04:13:20Z</dc:date>
    </item>
  </channel>
</rss>

