<?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 execute a function after event in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512644#M1655022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to execute a function after a event. I give you an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zprogram1call function zfct1.&lt;/P&gt;&lt;P&gt;While execution of function zfct1is running, zprogram2 call function same function zfct1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it's possible that function execution  from zprogram2 to run only after function execution from zprogram1 is finished? I mean , function execution from zprogram2 to sart delayed...only when zfct1 is available,when it's not running in other process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jan 2012 08:44:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-26T08:44:55Z</dc:date>
    <item>
      <title>execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512644#M1655022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to execute a function after a event. I give you an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zprogram1call function zfct1.&lt;/P&gt;&lt;P&gt;While execution of function zfct1is running, zprogram2 call function same function zfct1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it's possible that function execution  from zprogram2 to run only after function execution from zprogram1 is finished? I mean , function execution from zprogram2 to sart delayed...only when zfct1 is available,when it's not running in other process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 08:44:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512644#M1655022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T08:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512645#M1655023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't find any after event program execution in requirement / post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Manu S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 08:52:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512645#M1655023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T08:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512646#M1655024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;event is when zfct2 is available, when it's not running (executed from another program)...did you get it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 08:55:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512646#M1655024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T08:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512647#M1655025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For better understanding, what is it that zfct1 does that requires such an exclusive mode?&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 09:16:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512647#M1655025</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2012-01-26T09:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512648#M1655026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ZFCT1 do some selects and updates in db tables and return a value...so, after updates are not complete, i don't want to execute this function, because this will lead to false result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 09:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512648#M1655026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T09:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512649#M1655027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; To control this behavior you can use EXCEPTIONS when defining the function module, then when calling this from a Program it can be handled via SY-SUBRC return code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 13:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512649#M1655027</guid>
      <dc:creator>former_member214857</dc:creator>
      <dc:date>2012-01-26T13:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512650#M1655028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can go for &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION func STARTING NEW TASK task&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the task id pass the same task name(any char variable of length max 8 chars).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, what happens here is : &lt;/P&gt;&lt;P&gt;prog1 calls fct1 with task T1. (keeps running)&lt;/P&gt;&lt;P&gt;prog2 calls fct1 with task T1.(same T1, so the second call can also access the global variables from first call). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hence, you can have a global variable set to X in the fct1 before the update lines... and at the beginning of fct1 you can check that this global variable NE X. then only continue. else &lt;STRONG&gt;wait until&lt;/STRONG&gt; that becomes blank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have never tried this, but giving you a theory. try implementing it..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 14:23:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512650#M1655028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T14:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512651#M1655029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When zfct1 is executing from zprogram1, lock the DB tables it is accessing using ENQUEUE_XXXXX function module.&lt;/P&gt;&lt;P&gt;So the table is locked exclusively for the current instance and the zprogram2 cannot access the same DB table till you unlock it.&lt;/P&gt;&lt;P&gt;After DB table update, dont forget to unlock the same using DEQUEUE_XXXXX function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope the above will suffice your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Raja.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 14:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512651#M1655029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T14:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512652#M1655030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it's not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gobal parameter...did you mean to declare a variable in main program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Feb 2012 15:23:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512652#M1655030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-04T15:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: execute a function after event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512653#M1655031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it works with lock objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Feb 2012 15:24:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-function-after-event/m-p/8512653#M1655031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-04T15:24:43Z</dc:date>
    </item>
  </channel>
</rss>

