<?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 Passing Parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807769#M656237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me to work with &amp;lt;b&amp;gt;Perform on Commit&amp;lt;/b&amp;gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Imtiaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Sep 2007 14:07:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-24T14:07:19Z</dc:date>
    <item>
      <title>Passing Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807769#M656237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me to work with &amp;lt;b&amp;gt;Perform on Commit&amp;lt;/b&amp;gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Imtiaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 14:07:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807769#M656237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T14:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807770#M656238</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;This is used to commit the changes to the database &lt;/P&gt;&lt;P&gt;when you write some code in the PERFORM ..ON COMMIT&lt;/P&gt;&lt;P&gt;subroutine, all the statements reagrding database update are committed only when you write explicit COMMIT WORK and for Roll back ROLLBACK has to be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 14:09:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807770#M656238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T14:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807771#M656239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the below link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/commit.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/commit.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM ON COMMIT routines are not executed in the dialog module.&lt;/P&gt;&lt;P&gt;You must ensure that any subroutines called using ON COMMIT can be delayed until the next COMMIT WORK in the calling program. Remember that the global data of the dialog module is destroyed along with the internal session when control returns to the calling program. Consequently, subroutines called using PERFORM ON COMMIT must not use this global data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement PERFORM ON COMMIT calls a subroutine in the dialog work process. However, it is not executed until the system reaches the next COMMIT WORK statement. Here, as well, the ABAP statement COMMIT WORK defines the end of the SAP LUW, since all statements in a subroutine called with PERFORM ON COMMIT that make database changes are executed in the&lt;/P&gt;&lt;P&gt;database LUW of the corresponding dialog step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The advantage of this bundling technique against CALL FUNCTION... IN UPDATE TASK is better performance, since the update data does not have to be written into an extra table. The disadvantage, however, is that you cannot pass parameters in a PERFORM... ON COMMIT statement. Data is passed using global variables and ABAP memory. There is a considerable danger of data inconsistency when you use this method to pass data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also put the CALL FUNCTION IN UPDATE TASK into a subroutine and call the subroutine with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM SUBROUT ON COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you choose this method, the subroutine is executed at the commit. Thus the request to run the function in the update task is also logged during commit processing. As a result, the parameter values logged with the request are those current at the time of the commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;a = 1.&lt;/P&gt;&lt;P&gt;PERFORM F ON COMMIT.&lt;/P&gt;&lt;P&gt;a = 2.&lt;/P&gt;&lt;P&gt;PERFORM F ON COMMIT.&lt;/P&gt;&lt;P&gt;a = 3.&lt;/P&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;FORM f.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the function module UPD_FM is carried out with the value 3 in PAR. The update task executes the function module only once, despite the two PERFORM ON COMMIT statements. This is because a given function module, logged with the same parameter values, can never be executed more than once in the update task. The subroutine itself, containing the function module call, may not have parameters.&lt;/P&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt;perform update_zproc_files .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form update_zproc_files .&lt;/P&gt;&lt;P&gt;wa_zproc_files-mandt = sy-mandt.&lt;/P&gt;&lt;P&gt;wa_zproc_files-batch = v_batch. &lt;/P&gt;&lt;P&gt;wa_zproc_files-rcvdt = v_rcvdt. &lt;/P&gt;&lt;P&gt;wa_zproc_files-totdoc = v_totdoc. &lt;/P&gt;&lt;P&gt;wa_zproc_files-totamt = v_totamt. &lt;/P&gt;&lt;P&gt;wa_zproc_files-processdate = sy-datum. &lt;/P&gt;&lt;P&gt;wa_zproc_files-processtime = sy-uzeit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_zproc_files to i_zproc_files.&lt;/P&gt;&lt;P&gt;clear wa_zproc_files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert zproc_files from table i_zproc_files.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;refresh i_zproc_files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " update_zproc_files&lt;/P&gt;&lt;P&gt;*********************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 14:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807771#M656239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T14:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807772#M656240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Perform on Commit&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;This statement registers the subroutine directly specified using subroutine in the same program. The subroutine is not executed immediately, but a flag is set for execution when one of the statements COMMIT WORK or ROLLBACK WORK (since Release 6.10) is reached. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The registered subroutines are executed if the statement COMMIT WORK or ROLLBACK WORK is executed in their work process and before update function modules registered using CALL FUNCTION ... IN UPDATE TASK. Subroutines that are registered during execution of an update function module for COMMIT are executed at the end of the update in the update work process i.e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a = 1. &lt;/P&gt;&lt;P&gt;PERFORM F ON COMMIT. &lt;/P&gt;&lt;P&gt;a = 2. &lt;/P&gt;&lt;P&gt;PERFORM F ON COMMIT. &lt;/P&gt;&lt;P&gt;a = 3. &lt;/P&gt;&lt;P&gt;COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f. &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 14:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-parameter/m-p/2807772#M656240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T14:20:02Z</dc:date>
    </item>
  </channel>
</rss>

