<?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 problem with select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select/m-p/3764812#M905820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the below code all the selects and locking are happening on the same table xxxxx.&lt;/P&gt;&lt;P&gt;  SELECT * FROM xxxxx&lt;/P&gt;&lt;P&gt;    INTO TABLE i_vbeln&lt;/P&gt;&lt;P&gt;    WHERE vbeln IN s_vbeln&lt;/P&gt;&lt;P&gt;      AND bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;      AND vkorg IN s_vkorg&lt;/P&gt;&lt;P&gt;      AND vkbur IN s_vkbur&lt;/P&gt;&lt;P&gt;      AND vkgrp IN s_vkgrp&lt;/P&gt;&lt;P&gt;      AND auart IN s_auart.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;LOOP AT i_vbeln.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_EXXXXX'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_zse32     = 'X'&lt;/P&gt;&lt;P&gt;                mandt          = sy-mandt&lt;/P&gt;&lt;P&gt;                vbeln          = i_vbeln-vbeln&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                foreign_lock   = 1&lt;/P&gt;&lt;P&gt;                system_failure = 2&lt;/P&gt;&lt;P&gt;                OTHERS         = 3.&lt;/P&gt;&lt;P&gt; IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        *SELECT SINGLE FOR UPDATE **&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;FROM xxxxx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;INTO i_vbeln&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;WHERE vbeln EQ i_vbeln-vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_EXXXXX'&lt;/P&gt;&lt;P&gt;               EXPORTING&lt;/P&gt;&lt;P&gt;                    mode_zse32 = 'X'&lt;/P&gt;&lt;P&gt;                    mandt      = sy-mandt&lt;/P&gt;&lt;P&gt;                    vbeln      = i_vbeln-vbeln.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my question is..&lt;/P&gt;&lt;P&gt;is it mandatory to have the the below select for updating the table xxxxx&lt;/P&gt;&lt;P&gt;        *SELECT SINGLE FOR UPDATE **&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;FROM xxxxx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;INTO i_vbeln&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;WHERE vbeln EQ i_vbeln-vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or can i go directly with enque and deque without the above select before updating the table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 May 2008 10:49:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-05T10:49:26Z</dc:date>
    <item>
      <title>problem with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select/m-p/3764812#M905820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the below code all the selects and locking are happening on the same table xxxxx.&lt;/P&gt;&lt;P&gt;  SELECT * FROM xxxxx&lt;/P&gt;&lt;P&gt;    INTO TABLE i_vbeln&lt;/P&gt;&lt;P&gt;    WHERE vbeln IN s_vbeln&lt;/P&gt;&lt;P&gt;      AND bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;      AND vkorg IN s_vkorg&lt;/P&gt;&lt;P&gt;      AND vkbur IN s_vkbur&lt;/P&gt;&lt;P&gt;      AND vkgrp IN s_vkgrp&lt;/P&gt;&lt;P&gt;      AND auart IN s_auart.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;LOOP AT i_vbeln.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_EXXXXX'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_zse32     = 'X'&lt;/P&gt;&lt;P&gt;                mandt          = sy-mandt&lt;/P&gt;&lt;P&gt;                vbeln          = i_vbeln-vbeln&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                foreign_lock   = 1&lt;/P&gt;&lt;P&gt;                system_failure = 2&lt;/P&gt;&lt;P&gt;                OTHERS         = 3.&lt;/P&gt;&lt;P&gt; IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        *SELECT SINGLE FOR UPDATE **&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;FROM xxxxx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;INTO i_vbeln&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;WHERE vbeln EQ i_vbeln-vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;xxxxxxxxxxxxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_EXXXXX'&lt;/P&gt;&lt;P&gt;               EXPORTING&lt;/P&gt;&lt;P&gt;                    mode_zse32 = 'X'&lt;/P&gt;&lt;P&gt;                    mandt      = sy-mandt&lt;/P&gt;&lt;P&gt;                    vbeln      = i_vbeln-vbeln.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my question is..&lt;/P&gt;&lt;P&gt;is it mandatory to have the the below select for updating the table xxxxx&lt;/P&gt;&lt;P&gt;        *SELECT SINGLE FOR UPDATE **&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;FROM xxxxx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;INTO i_vbeln&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;WHERE vbeln EQ i_vbeln-vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or can i go directly with enque and deque without the above select before updating the table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:49:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select/m-p/3764812#M905820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select/m-p/3764813#M905821</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; You can just call FM ENQUEUE_E_XXXX and DEQUEUE_E_XXXX for locking and unlocking the tables with out any select statements ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:51:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select/m-p/3764813#M905821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: problem with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select/m-p/3764814#M905822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;enque BEFORE you do your select thats essential.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select/m-p/3764814#M905822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:54:05Z</dc:date>
    </item>
  </channel>
</rss>

