<?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: Lock on inserting the data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570229#M1270652</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;try to use the tcode SM31 or SM01 and check about the functionality of it satisfying the requierments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ricx .s on May 2, 2009 1:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 May 2009 11:57:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-02T11:57:46Z</dc:date>
    <item>
      <title>Lock on inserting the data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570227#M1270650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to keep a lock on inserting the data while the other user is editing the same data so that false data is not entered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 11:15:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570227#M1270650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-02T11:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lock on inserting the data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570228#M1270651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sami ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a lock object for that table .&lt;/P&gt;&lt;P&gt;Go to SE11 transaction and create a lock object for the table .Custom lock object&lt;/P&gt;&lt;P&gt;name should be start with &lt;STRONG&gt;EY or EZ&lt;/STRONG&gt;. After activating lock object  Function Module will be &lt;/P&gt;&lt;P&gt;generated automatically.Function Modules name will be like---&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENQUEUE_&amp;lt;LOCK_OBJECT_NAME&amp;gt;&lt;/STRONG&gt; and &lt;STRONG&gt;DEQUEUE_&amp;lt;LOCK_OBJECT_NAME&amp;gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;First call the ENQUEUE function module  to set the lock for your table.&lt;/P&gt;&lt;P&gt;Then Update the table as per your requirement.&lt;/P&gt;&lt;P&gt;After that unlock the table calling the DEQUEUE function Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example you have created a lock object EZSFLIGHT for the SFLIGHT table .&lt;/P&gt;&lt;P&gt;So first lock the table , then update then release the lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code ---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : t_itab like table of SFLIGHT,
           fs_itab like SFLIGHT.

fs_itab-carrid = 'AA'.
fs_itab-connid = '0017'.
.
.
.
APPEND fs_itab TO t_itab.
.
.
.
CALL FUNCTION 'ENQUE_EZSFLIGHT'  " SET lock to the table
              EXPORTING
               CARRID = ....
               CONNID = ....
               . 
               .
IF sy-subrc eq 0.
INSERT sflight from table t_itab.   " Update the DB table
ENDIF.

CALL FUNCTION 'ENQUE_EZSFLIGHT'  " Unlock the table
              EXPORTING
               CARRID = ....
               CONNID = ....
               .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;               &lt;/P&gt;&lt;P&gt; .&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 11:54:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570228#M1270651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-02T11:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Lock on inserting the data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570229#M1270652</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;try to use the tcode SM31 or SM01 and check about the functionality of it satisfying the requierments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ricx .s on May 2, 2009 1:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 11:57:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570229#M1270652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-02T11:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lock on inserting the data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570230#M1270653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you doing it with the help of program??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, then use the following function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENQUEUE_E_TABLE&lt;/P&gt;&lt;P&gt;DEQUEUE_E_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Babu Kilari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 12:14:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570230#M1270653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-02T12:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lock on inserting the data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570231#M1270654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an employee id which should be unique. Employee id is auto genereated. So it will find the max employee id and then add one to it to generate the new employee id. Now if two person open that form at same time then both person will see the same number. So I want to lock generating the employee id when one user has already filling data under that employee id.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 12:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-on-inserting-the-data/m-p/5570231#M1270654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-02T12:51:49Z</dc:date>
    </item>
  </channel>
</rss>

