<?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: Transaction Lock in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475735#M1555603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a Z table and everytime a user enters in the Z program, the table is updated. If the entry is found in the Z table, user can't open the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a big search and a debug in CO02, I found the functions ENQUEUE_ESORDER and the DEQUEUE_ESORDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adelmo Silva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Adelmo Silva on Nov 27, 2010 1:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Nov 2010 12:26:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-27T12:26:56Z</dc:date>
    <item>
      <title>Transaction Lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475731#M1555599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello dear SAP Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Z program with a Z transaction that is used by two users, USER01 and USER02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are make confirmations of productions orders, using the bapi for confirmations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I lock the USER01 and the USER02 to open two sessions of the same Z transaction without blocking each other?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adelmo Silva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Nov 26, 2010 2:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 19:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475731#M1555599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-26T19:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction Lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475732#M1555600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you can upload a flag to shared memory so when the second user try to execute the transaction, the program checks if the flag exists in memory, if its so, then interrumpt the process, otherwise continues executing the program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 21:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475732#M1555600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-26T21:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction Lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475733#M1555601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adelmo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you haven't implemented any lock mechanism in your program yet, the users wont be lock each other. &lt;/P&gt;&lt;P&gt;But for consistency, you need to make sure that they are not trying to confirm the same orders at the same time.&lt;/P&gt;&lt;P&gt;Find out the standard lock module (its name starts with ENQUEUE_) used to lock orders and call this FM in your Z-programm.&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;Ozcan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Nov 2010 09:42:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475733#M1555601</guid>
      <dc:creator>former_member848108</dc:creator>
      <dc:date>2010-11-27T09:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction Lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475734#M1555602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can lock your Z program from execution using this pair of FMs: ENQUEUE_ESFUNCTION / DEQUEUE_ESFUNCTION.&lt;/P&gt;&lt;P&gt;In the beginning of program, call ENQUEUE_ESFUNCTION like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_ESFUNCTION'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    funcname     = 'Z_PROGRAM' " name of your program&lt;/P&gt;&lt;P&gt;    mode_tfdir   = 'X'&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    foreign_lock = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of program, call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DEQUEUE_ESFUNCTION'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    funcname = 'Z_PROGRAM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P. S. In case if you will use shared memory, this should be SAP memory IMHO (SET/GET).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Nov 2010 10:01:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475734#M1555602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-27T10:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction Lock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475735#M1555603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a Z table and everytime a user enters in the Z program, the table is updated. If the entry is found in the Z table, user can't open the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a big search and a debug in CO02, I found the functions ENQUEUE_ESORDER and the DEQUEUE_ESORDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adelmo Silva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Adelmo Silva on Nov 27, 2010 1:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Nov 2010 12:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transaction-lock/m-p/7475735#M1555603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-27T12:26:56Z</dc:date>
    </item>
  </channel>
</rss>

