<?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 Lock a program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133698#M988516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my case, i've a main program(Prog AAA) and subprogram(Prog BBB). Where user will execute prog AAA, in turn it will schedule prog BBB to run in background by using FM BP_EVENT_RAISE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the prob is happen on prog BBB, where it does perform BDC transaction update. And i want to place a lock on prog AAA to &lt;STRONG&gt;block&lt;/STRONG&gt; someone to execute prog AAA at the same time. And i will release the lock in prog BBB to reach a consistence stage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what i plan to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prog AAA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;EM&gt;Place lock by passing in &lt;STRONG&gt;program name AAA&lt;/STRONG&gt; as lock argument.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prog BBB:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...BDC code for transaction update&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...Release lock with argument &lt;STRONG&gt;program name AAA&lt;/STRONG&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically i did tried to place the lock in prog AAA by using FM ENQUEUE_E_TABLE, 'AAA' as lock argument. But too bad because the lock will be released by system once prog AAA finish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i would like to check with you if there any FM or tools that can be used to retain the lock till i explicitly dequeue it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jul 2008 06:44:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-04T06:44:20Z</dc:date>
    <item>
      <title>Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133698#M988516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my case, i've a main program(Prog AAA) and subprogram(Prog BBB). Where user will execute prog AAA, in turn it will schedule prog BBB to run in background by using FM BP_EVENT_RAISE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the prob is happen on prog BBB, where it does perform BDC transaction update. And i want to place a lock on prog AAA to &lt;STRONG&gt;block&lt;/STRONG&gt; someone to execute prog AAA at the same time. And i will release the lock in prog BBB to reach a consistence stage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what i plan to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prog AAA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;EM&gt;Place lock by passing in &lt;STRONG&gt;program name AAA&lt;/STRONG&gt; as lock argument.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prog BBB:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...BDC code for transaction update&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...Release lock with argument &lt;STRONG&gt;program name AAA&lt;/STRONG&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically i did tried to place the lock in prog AAA by using FM ENQUEUE_E_TABLE, 'AAA' as lock argument. But too bad because the lock will be released by system once prog AAA finish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i would like to check with you if there any FM or tools that can be used to retain the lock till i explicitly dequeue it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 06:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133698#M988516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T06:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133699#M988517</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;If I understand correctly, you are scheduling and running program BBB as a backgroud job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could read at the beginning of program AAA whether the job is still active and in that case block further processing of program AAA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at Function group BTCH for FM's on batch jobs.&lt;/P&gt;&lt;P&gt;For example FM 'BP_JOB_CHECKSTATE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 06:59:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133699#M988517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T06:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133700#M988518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abc efc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use ENQUEUE_ESFUNCTION function module to lock program and DEQUEUE_ESFUNCTION function module to unlock it.&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;Anup.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 07:10:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133700#M988518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T07:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133701#M988519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did tried on both FM ENQUEUE_E_TABLE and ENQUEUE_ESFUNCTION, it doesn't work. I have tried to used locking scope 1/2/3/, no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to place a lock at the begining execution of prog AAA by using lock argument "AAA", where the unlock will be placed at last stage of prog BBB. Purpose is to ensure a consistent stage of update at prog BBB, because prog AAA can be executed more than 1 time within the single minute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prog AAA is to call the event(as i mentioned in my first post) to schedule prog BBB run in background, then prog AAA will finish its own part and then transaction end. Since the dialog step end, regardless of what scope value i used (either 1/2/3) system will release the lock automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my case, i want the lock retain and it will be release by prog BBB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please comment..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jul 2008 03:17:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133701#M988519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-05T03:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133702#M988520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Plase try the T-Code &lt;STRONG&gt;SU21&lt;/STRONG&gt; for creating authorisation object and class. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------" /&gt;&lt;P&gt;Shiny S Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jul 2008 04:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133702#M988520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-05T04:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133703#M988521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May i know how does authorization object relate to my case here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jul 2008 04:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133703#M988521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-05T04:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133704#M988522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1. Create an authorisation class eg: ZCLAS&lt;/P&gt;&lt;P&gt;2. Create an authorisation object for class eg: ZOBJ. In the&lt;/P&gt;&lt;P&gt;    authorisation object creation give the transaction code&lt;/P&gt;&lt;P&gt;    for which the lock is required and give the activity code.&lt;/P&gt;&lt;P&gt;3. During the role assignment of the user in SPRO, give the   &lt;/P&gt;&lt;P&gt;   authorisation object.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shiny S Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2008 03:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133704#M988522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-07T03:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133705#M988523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks fot your reply, however i think you misunderstood my problems and questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gentleman, do you have any idea? Please comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 13:00:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133705#M988523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T13:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133706#M988524</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;Maybe I was not clear in my first answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When running Prog AAA check whether Prog BBB (or the job where BBB is triggered) is already running.&lt;/P&gt;&lt;P&gt;If BBB is active then just give a message to the user that prog BBB is active and prevent further processing of prog AAA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 14:38:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-a-program/m-p/4133706#M988524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T14:38:33Z</dc:date>
    </item>
  </channel>
</rss>

