<?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: Table Updation. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560769#M1754164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suganth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not the case for you where you can relate your question.&lt;/P&gt;&lt;P&gt;You can update or Insert the DB Table as you wish. I Mean you can Either ENQUEUE the Table before Inserting the Records or you Can just use INSERT Statement. &lt;/P&gt;&lt;P&gt;The Only thing that depends here is the Primary Key. If your record only will have a new Primary key everytime when you INSERT records into your DB Table then you dont need to Lock the Table to Update(ENQUEUE is not needed). If you dont have full key then Lock is Mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for a good practice we generally enqueue before DB Updates as Kaushalya perera Said. &lt;/P&gt;&lt;P&gt;Anyhow it doesnt impact anyway on your performance yo call the ENQUEUE and DEQUEUE FMs before you update &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1495/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jun 2013 08:36:58 GMT</pubDate>
    <dc:creator>Venkat_Sesha</dc:creator>
    <dc:date>2013-06-05T08:36:58Z</dc:date>
    <item>
      <title>Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560767#M1754162</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;In a program I am pulling out data from 3 tables and creating an Internal table.In this internal table I have a field trans.date which is nothing but the current date. So with this internal table I will create entries in&amp;nbsp; custom created database table .So daily it will create entries with transfer date as sy-datum for different plan.location say PL1 ,PL2 like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So while updating the database table I am always creating a new entry in tables based on daily data available.I am not modifying any entry in the table.&lt;/P&gt;&lt;P&gt;My question here is do i have to enqueue and dequeue the table before updating it or not needed in this case&amp;nbsp; because I am not modifying any entries .I am always creating a new entry for different Planning locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What will happen say for location PL1 and PL2 I am running this program in background parallely .Both will try creating entries in the table X will they lock each other ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advise.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 07:26:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560767#M1754162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-05T07:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560768#M1754163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suganth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whether you are inserting or updating &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;database table it's a good practice to use l&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ock objects to avoid the &lt;/SPAN&gt;inconsistencies&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 08:26:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560768#M1754163</guid>
      <dc:creator>kaushalya</dc:creator>
      <dc:date>2013-06-05T08:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560769#M1754164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suganth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not the case for you where you can relate your question.&lt;/P&gt;&lt;P&gt;You can update or Insert the DB Table as you wish. I Mean you can Either ENQUEUE the Table before Inserting the Records or you Can just use INSERT Statement. &lt;/P&gt;&lt;P&gt;The Only thing that depends here is the Primary Key. If your record only will have a new Primary key everytime when you INSERT records into your DB Table then you dont need to Lock the Table to Update(ENQUEUE is not needed). If you dont have full key then Lock is Mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for a good practice we generally enqueue before DB Updates as Kaushalya perera Said. &lt;/P&gt;&lt;P&gt;Anyhow it doesnt impact anyway on your performance yo call the ENQUEUE and DEQUEUE FMs before you update &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1495/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 08:36:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560769#M1754164</guid>
      <dc:creator>Venkat_Sesha</dc:creator>
      <dc:date>2013-06-05T08:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560770#M1754165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suganth,&lt;/P&gt;&lt;P&gt;Since you are only inserting entries into this table, no write lock is required.&lt;/P&gt;&lt;P&gt;But if do not want some other program to read this table while you are updating it, you can impose a read lock. If you ask me, I would say that its not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreekanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 08:37:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560770#M1754165</guid>
      <dc:creator>SreekanthKrishn</dc:creator>
      <dc:date>2013-06-05T08:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560771#M1754166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserting a new record in table is also kind of modification in table. It is safe and best practice to take a lock before modifying table.&lt;/P&gt;&lt;P&gt;I would suggest you to use ENQUEUE and DEQUEUE rather than directly inserting record in table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 08:37:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560771#M1754166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-05T08:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560772#M1754167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Anyways its a background job.&lt;/P&gt;&lt;P&gt;if you are running in non working hours then no need of applying any lock.&lt;/P&gt;&lt;P&gt;you can schedule your job before and after working hours.&lt;/P&gt;&lt;P&gt;so you will not come across accessing table at the same time.&lt;/P&gt;&lt;P&gt;I have did this for my client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tejas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 08:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560772#M1754167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-05T08:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560773#M1754168</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;As told above best practice is to create Z Function Modules for Enqueue and Dequeue via T-code SE11 for your Custom Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now whether you are Updating or Creating if two programs are run at the same time and they try to access the Z table simultaneously a deadlock will occur and it will error out saying entries are locked by other program or may be userid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go for Locks, see this for help &lt;A href="https://scn.sap.com/thread/846741"&gt;https://scn.sap.com/thread/846741 &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Ankit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 10:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560773#M1754168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-05T10:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Table Updation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560774#M1754169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Locking in not required if you are inserting records in a table with unique primary key.. if the same entry will come again it will be ignored..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;locking is required when the same entry can be modified by multiple persons at the same time..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it solves your query&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 12:01:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-updation/m-p/9560774#M1754169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-05T12:01:09Z</dc:date>
    </item>
  </channel>
</rss>

