<?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: Does after call function 'xxx' in update task will DEQUEUE enqueued tbl? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287586#M1634430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As &lt;SPAN __jive_macro_name="user" id="3691907"&gt;&lt;/SPAN&gt; wrote (*), the ENQUEUE life is related top the _SCOPE parameter used in the CALL, The COMMIT WORK will release the locks  as a COMMIT WORK is usually the end of the transaction (update data, release locks and go back to initial screen)&lt;/P&gt;&lt;P&gt;- End of update task will dequeue their own inherited locks&lt;/P&gt;&lt;P&gt;- DEQUEUE modules can be usually replaced by COMMIT or ROLLBACK work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read some documentation like [The SAP Lock Concept (BC-CST-EQ)|http://help.sap.com/saphelp_nw04/helpdata/en/c2/2d7037ecc92a7ee10000009b38f8cf/frameset.htm] and [Updates in the SAP System (BC-CST-UP)|http://help.sap.com/saphelp_nw04/helpdata/en/5f/6f8337dd34ca76e10000009b38f8cf/frameset.htm] or [(ABAP) Update Techniques|http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4cba79e11d1950f0000e82de14a/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(*) read [Function Modules for Lock Requests|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eebf446011d189700000e8322d00/frameset.htm] and [COMMIT WORK|http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm] reference documentation (look for "locks")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2011 13:40:56 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2011-10-14T13:40:56Z</dc:date>
    <item>
      <title>Does after call function 'xxx' in update task will DEQUEUE enqueued tbl?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287584#M1634428</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;I am facing problem while using "in update task" function with my existing locking object. Hopefully somebody could enlighten my doubt.&lt;/P&gt;&lt;P&gt;I use structure table 'STRCUTUREA' to lock(enqueue) in Changes Mode for whole program. So, at the same time, nobody can do modify operation. I update some tables which is need atomic operations, then I call an update function module that will update 4 tables all at once. Let say, function "ZDO_POST" will have:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
call function 'ZUPD_TABLE1' in update task
    exporting
      upd_mode = gd_update_mode
    tables
      tab      = gt_table1.

call function 'ZUPD_TABLE2' in update task
    exporting
      upd_mode = gd_update_mode
    tables
      tab      = gt_table2.

call function 'ZUPD_TABLE3' in update task
    exporting
      upd_mode = gd_update_mode
    tables
      tab      = gt_table3.

call function 'ZUPD_TABLE4' in update task
    exporting
      upd_mode = gd_update_mode
    tables
      tab      = gt_table4.

commit work and wait.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why after do "CALL FUNCTION 'XXXX' IN UPDATE TASK", system dequeue my locking object 'STRCUTUREA'? (Check to SM12, locking object 'STRCUTUREA' is unlocked). By the way, I still in Changes mode at that moment and I never call dequeue function after saving.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does 'IN UPDATE TASK' &lt;STRONG&gt;will DEQUEUE&lt;/STRONG&gt; all existing locking object after update task is processed (VBLOG --&amp;gt; Commit work)?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My 'STRCUTUREA' (for locking) uses different structure than 4 tables above.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: &lt;EM&gt;If I come with normal function module operation (without IN UPDATE TASK parameter), my enqueued object 'STRCUTUREA' will still remain after save operation is performed. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does any body could explain to me?&lt;/P&gt;&lt;P&gt;Thanks before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Dondi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dinivian Dondi on Oct 14, 2011 2:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 12:17:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287584#M1634428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-14T12:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Does after call function 'xxx' in update task will DEQUEUE enqueued tbl?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287585#M1634429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dinivian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function module you are using for the enquee ('ENQUEUE_Exxx') you will find an optional parameter called _SCOPE (default value = 2). Use _SCOPE = 1 and try again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you go to transaction SE11 and press F1 on the Lock Object field you'll see the documentation. Click on 'Sap Lock Concept' and you will see this explanation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Duration of an SAP lock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    At the end of a transaction, this automatically releases all the SAP&lt;/P&gt;&lt;P&gt;    locks it holds. Note, however, that if an update routine is called by&lt;/P&gt;&lt;P&gt;    the transaction, locks can be transferred from the ordering transaction&lt;/P&gt;&lt;P&gt;    to the update routine. In the same way, these locks are automatically&lt;/P&gt;&lt;P&gt;    released at the end of the update routine.&lt;/P&gt;&lt;P&gt;    Via the IMPORT parameter _SCOPE of the ENQUEUE module, you can determine&lt;/P&gt;&lt;P&gt;    whether a lock should be transferred to the update routine if one is&lt;/P&gt;&lt;P&gt;    called.&lt;/P&gt;&lt;P&gt;    If _SCOPE has the value '1', the lock remains with the the ordering&lt;/P&gt;&lt;P&gt;    transaction. If _SCOPE has the value '2', the lock can pass to the&lt;/P&gt;&lt;P&gt;    update routine. Finally, if the parameter has the value '3', two locks&lt;/P&gt;&lt;P&gt;    of the same kind will be generated, one of which passes to an update&lt;/P&gt;&lt;P&gt;    routine when one is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    By calling the DEQUEUE module, a transaction can explicitly release a&lt;/P&gt;&lt;P&gt;    lock which it holds. The lock parameter and lock mode must be supplied&lt;/P&gt;&lt;P&gt;    with the same value as for calling the ENQUEUE module. If the parameter&lt;/P&gt;&lt;P&gt;    _SCOPE has the value '1', only one lock is released which cannot pass to&lt;/P&gt;&lt;P&gt;    an update routine. If the parameter has the value '2', only one lock is&lt;/P&gt;&lt;P&gt;    released which can pass to the update program. Finally, if the parameter&lt;/P&gt;&lt;P&gt;    has the value '3', both locks can be released. Note however that a&lt;/P&gt;&lt;P&gt;    transaction can release neither a lock which has already been&lt;/P&gt;&lt;P&gt;    transferred to the update program, nor a lock which is held by another&lt;/P&gt;&lt;P&gt;    transaction.&lt;/P&gt;&lt;P&gt;    Via the IMPORT parameter _SYNCHRON you can control whether the release&lt;/P&gt;&lt;P&gt;    of the lock should be synchronous or asynchronous. If this parameter has&lt;/P&gt;&lt;P&gt;    the value 'X', the module waits until the lock has really been removed&lt;/P&gt;&lt;P&gt;    from the lock table. If the parameter has the value ' ', a requst for&lt;/P&gt;&lt;P&gt;    deletion of the lock from the lock table is sent to the application&lt;/P&gt;&lt;P&gt;    server which manages the lock table, and then the execution of the&lt;/P&gt;&lt;P&gt;    program is immediately continued.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Arseni Gallardo on Oct 14, 2011 3:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 13:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287585#M1634429</guid>
      <dc:creator>arseni_gallardo</dc:creator>
      <dc:date>2011-10-14T13:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Does after call function 'xxx' in update task will DEQUEUE enqueued tbl?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287586#M1634430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As &lt;SPAN __jive_macro_name="user" id="3691907"&gt;&lt;/SPAN&gt; wrote (*), the ENQUEUE life is related top the _SCOPE parameter used in the CALL, The COMMIT WORK will release the locks  as a COMMIT WORK is usually the end of the transaction (update data, release locks and go back to initial screen)&lt;/P&gt;&lt;P&gt;- End of update task will dequeue their own inherited locks&lt;/P&gt;&lt;P&gt;- DEQUEUE modules can be usually replaced by COMMIT or ROLLBACK work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read some documentation like [The SAP Lock Concept (BC-CST-EQ)|http://help.sap.com/saphelp_nw04/helpdata/en/c2/2d7037ecc92a7ee10000009b38f8cf/frameset.htm] and [Updates in the SAP System (BC-CST-UP)|http://help.sap.com/saphelp_nw04/helpdata/en/5f/6f8337dd34ca76e10000009b38f8cf/frameset.htm] or [(ABAP) Update Techniques|http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4cba79e11d1950f0000e82de14a/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(*) read [Function Modules for Lock Requests|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eebf446011d189700000e8322d00/frameset.htm] and [COMMIT WORK|http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm] reference documentation (look for "locks")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 13:40:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287586#M1634430</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-10-14T13:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Does after call function 'xxx' in update task will DEQUEUE enqueued tbl?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287587#M1634431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arseni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your explanation. It works now!. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Yeah, I got a better comprehension then. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dondi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Oct 2011 09:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287587#M1634431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-16T09:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Does after call function 'xxx' in update task will DEQUEUE enqueued tbl?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287588#M1634432</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;Thanks for the reference. It really helpful. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dondi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Oct 2011 09:33:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-after-call-function-xxx-in-update-task-will-dequeue-enqueued-tbl/m-p/8287588#M1634432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-16T09:33:42Z</dc:date>
    </item>
  </channel>
</rss>

