<?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: ENQUEUE_EPROG  and  BAPI_TRANSACTION_COMMIT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126105#M1618883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to Chen, with the SCOPE = '1 ' works fine.&lt;/P&gt;&lt;P&gt;Please, one more question: where can I find documentation for ENQUEUE_EPROG and DEQUEUE_EPROG  to understand the possible values ​​for all parameters?&lt;/P&gt;&lt;P&gt;Serena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Sep 2011 10:18:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-06T10:18:29Z</dc:date>
    <item>
      <title>ENQUEUE_EPROG  and  BAPI_TRANSACTION_COMMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126103#M1618881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the beginning of a Z program, I use locking object ENQUEUE_EPROG, to prevent the execution in parallel of the program. Before the termination of the program, do I unlock with DEQUEUE_EPROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that, after the call BAPI_TRANSACTION_COMMIT, the lock on the program disappears (I control with SM12). This is not good,  because I need the lock until the end of the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The questions:&lt;/P&gt;&lt;P&gt;1. And 'possible to solve this problem by using ENQUEUE / DEQUEUE?&lt;/P&gt;&lt;P&gt;2. If it is not possible with ENQUEUE / DEQUEUE, in what other ways can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
program = sy-repid.
CALL FUNCTION 'ENQUEUE_EPROG'
		  EXPORTING
			mode_trdir           = 'E'
	  	        programm             = program
*  	               X_PROGRAMM      = ' '
*  	             _SCOPE                  = '2'
*  	             _WAIT                    = ' '
* 	             _COLLECT             = ' '
		  EXCEPTIONS
			 foreign_lock        = 1
			 system_failure    = 2
			 OTHERS              = 3.


program = sy-repid.
CALL FUNCTION 'DEQUEUE_EPROG'
		EXPORTING
  		      programm = sy-repid
		EXCEPTIONS
		   OTHERS       = 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ciao,&lt;/P&gt;&lt;P&gt;Serena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 09:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126103#M1618881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-06T09:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE_EPROG  and  BAPI_TRANSACTION_COMMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126104#M1618882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Serena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you need to change the parameter "_SCOPE " to "1" instead of the default "2".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation says,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition of the lock duration with respect to an SAP LUW. Possible entry values include "1" for handling the lock in the same program, "2" for transferring the lock to the update, and "3" for handling the lock in the program and in the update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change the code as shown below,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
program = sy-repid.
CALL FUNCTION 'ENQUEUE_EPROG'
		  EXPORTING
			mode_trdir           = 'E'
	  	        programm             = program
*  	               X_PROGRAMM      = ' '
   	             _SCOPE                  = '1' "Change the default value to "1"
*  	             _WAIT                    = ' '
* 	             _COLLECT             = ' '
		  EXCEPTIONS
			 foreign_lock        = 1
			 system_failure    = 2
			 OTHERS              = 3.
 
 
program = sy-repid.
CALL FUNCTION 'DEQUEUE_EPROG'
		EXPORTING
  		      programm = sy-repid
		EXCEPTIONS
		   OTHERS       = 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 10:04:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126104#M1618882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-06T10:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE_EPROG  and  BAPI_TRANSACTION_COMMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126105#M1618883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to Chen, with the SCOPE = '1 ' works fine.&lt;/P&gt;&lt;P&gt;Please, one more question: where can I find documentation for ENQUEUE_EPROG and DEQUEUE_EPROG  to understand the possible values ​​for all parameters?&lt;/P&gt;&lt;P&gt;Serena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 10:18:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126105#M1618883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-06T10:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE_EPROG  and  BAPI_TRANSACTION_COMMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126106#M1618884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Serena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good to hear that the issue is resolved, there is no documentation for that FM, but you could always look at the documentation available at the Data Element level(If the import/export....parameter are referring to a data element/structure/table type etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case as there is no reference to a DDIC element, you will have to read the documentation on COMMIT WORK, as COMMIT WORK not only does commit but also releases the locks(there are other things too) ...to know more do a F1 on COMMIT WORK &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;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 10:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126106#M1618884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-06T10:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE_EPROG  and  BAPI_TRANSACTION_COMMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126107#M1618885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chen ... Something new to me &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; ...&lt;/P&gt;&lt;P&gt;What about Lock functions which are not remotely enabled. I think the parameter &lt;STRONG&gt;Scope&lt;/STRONG&gt; only appeares when we mark the check box "Allow RFC" while creating a lock object. I dont have sap connectivity now...Will check it later &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 10:27:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126107#M1618885</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-09-06T10:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE_EPROG  and  BAPI_TRANSACTION_COMMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126108#M1618886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Serena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Please, one more question: where can I find documentation for ENQUEUE_EPROG and DEQUEUE_EPROG to understand the possible values ​​for all parameters?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Had you asked this question 13yrs ago(when Google was not there), i would not have been amused. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's 2011 &amp;amp; you've Google at your disposal. So google it out &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Keshav: [_SCOPE|http://help.sap.com/saphelp_nw2004s/helpdata/en/48/e98137dae2424be10000009b38f8cf/frameset.htm] controls who owns the lock. SAP documentation on LUWs &amp;amp; Locking mechanism is very exhaustive. Read them in your leisure, they make a good read &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Comments are made in good spirit. Please don't take it otherwise!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Sep 6, 2011 4:01 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 10:30:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-eprog-and-bapi-transaction-commit/m-p/8126108#M1618886</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-09-06T10:30:42Z</dc:date>
    </item>
  </channel>
</rss>

