<?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: Modify Database records and performance tuning in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906175#M1145557</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 dont need to explicitly mention commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for locking tables use these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = 'ZTEST'      &amp;lt;----- Your table name
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.

Unlock: 
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
tabname = 'ZTEST'.    &amp;lt;------ Your table name
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2008 05:19:00 GMT</pubDate>
    <dc:creator>GauthamV</dc:creator>
    <dc:date>2008-12-17T05:19:00Z</dc:date>
    <item>
      <title>Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906173#M1145555</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 have developed a report which modifies the data base records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify yikostk from table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Is it mandatory to use commit work ? with out commit work, the database records can not be modified?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)when i remove the commit work and rollback statement my report performance is good, if i use commit work the batabase utilisation is more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one please explain what is the exact use of the commit work and rollback statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;onemore doubt is while modifying the database recors we have to lock the database and unlock the same .&lt;/P&gt;&lt;P&gt;are there any function modules for locking and unlocking?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906173#M1145555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906174#M1145556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I hope the below links will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Commit Work:&lt;/P&gt;&lt;P&gt;&lt;A href="http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.sqls.doc/sqls154.htm" target="test_blank"&gt;http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.sqls.doc/sqls154.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For Roll Back:&lt;/P&gt;&lt;P&gt;&lt;A href="http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sqls.doc/sqls643.htm" target="test_blank"&gt;http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sqls.doc/sqls643.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Khushboo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906174#M1145556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906175#M1145557</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 dont need to explicitly mention commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for locking tables use these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = 'ZTEST'      &amp;lt;----- Your table name
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.

Unlock: 
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
tabname = 'ZTEST'.    &amp;lt;------ Your table name
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906175#M1145557</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-12-17T05:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906176#M1145558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:26:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906176#M1145558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906177#M1145559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so u want to say there is no need of commit statement !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so Modify satement directly modifies the entries of the database ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if so what is the exact use of commit and when it should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me by clearing this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:32:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906177#M1145559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906178#M1145560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906178#M1145560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906179#M1145561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You do not need to explicitly commit changes to the database.   An implicit commit will be executed&lt;/P&gt;&lt;P&gt;at the end of a logical unit of work(LUW) which will happen at the end of your transaction.  At this time&lt;/P&gt;&lt;P&gt;all requested/queued changes to the db (your modify for example) will be executed and if successful, commited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to, you can explicity commit or rollback changes in your program, for example if you want to &lt;/P&gt;&lt;P&gt;update your changes in groups of a 100 or so.  Then you must decide what happens if you have a modify that fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg Kern&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 16:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906179#M1145561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Database records and performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906180#M1145562</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 have written the following code in my development system to change the records of my database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM zyikostl INTO TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT itab INTO wtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE itab INTO ktab WITH KEY kostl_alt = wtab-kostl_neu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        wtab-kostl_neu = ktab-kostl_neu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        MODIFY itab FROM wtab INDEX tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CONTINUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODIFY zyikostl FROM TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the development system i have only few records its working fine,but when it is been moved to test system there are 2500 records in the database so the report is taking much time(more than 5 hours ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i sthere any solution for this ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;vaasu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2008 06:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-database-records-and-performance-tuning/m-p/4906180#M1145562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-23T06:19:57Z</dc:date>
    </item>
  </channel>
</rss>

