<?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: problem with deleteing a record froma database table. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106136#M1184699</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;try use the &lt;/P&gt;&lt;P&gt;  delete from &amp;lt;table &amp;gt; where  condition.&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;Bharani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2009 13:33:53 GMT</pubDate>
    <dc:creator>BH2408</dc:creator>
    <dc:date>2009-02-09T13:33:53Z</dc:date>
    <item>
      <title>problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106132#M1184695</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;iam facing a proble with the delete statement.&lt;/P&gt;&lt;P&gt;iam getting sy-subrc value  = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_tab INTO w_tab.&lt;/P&gt;&lt;P&gt;    IF w_tab-check = 'X' AND&lt;/P&gt;&lt;P&gt;       w_tab-flag = 'X'.&lt;/P&gt;&lt;P&gt;    DELETE t_tab .                                   " deleting the value in the internal table&lt;/P&gt;&lt;P&gt;move-corresponding w_tab to ztest_tab.&lt;/P&gt;&lt;P&gt;delete ztest_tab.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ztest_tab is the database table name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;priyanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106132#M1184695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106133#M1184696</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;If u want to delete the same row from database table use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE &amp;lt;dbtable&amp;gt; from &amp;lt;workarea&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:31:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106133#M1184696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106134#M1184697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;iam getting sy-subrc value = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where ur checking sy-subrc value .&lt;/P&gt;&lt;P&gt;In which statement ur geting that value...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:31:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106134#M1184697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106135#M1184698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you declared "ztest_tab" using the tables declaration? If not try doing that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:&lt;/P&gt;&lt;P&gt;ZTEST_TAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:33:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106135#M1184698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106136#M1184699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;try use the &lt;/P&gt;&lt;P&gt;  delete from &amp;lt;table &amp;gt; where  condition.&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;Bharani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106136#M1184699</guid>
      <dc:creator>BH2408</dc:creator>
      <dc:date>2009-02-09T13:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106137#M1184700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;  You need to use delete t_tab from w_tab ( or use refresh or FREE statement to delete internal table )&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Viquar Iqbal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:35:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106137#M1184700</guid>
      <dc:creator>viquar_iqbal</dc:creator>
      <dc:date>2009-02-09T13:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106138#M1184701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Can you be more specific about the deletion you are  trying to do ?&lt;/P&gt;&lt;P&gt;Moreover&lt;/P&gt;&lt;P&gt;move-corresponding w_tab to ztest_tab.&lt;/P&gt;&lt;P&gt;This statement has no effect on the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106138#M1184701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106139#M1184702</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;For Deleteing record from Database specify the where condtion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE FROM  ztest_tab&lt;/P&gt;&lt;P&gt;                         WHERE field1 = w_tab-field1 AND &lt;/P&gt;&lt;P&gt;                                      field2 = w_tab-field2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To delete multiple records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ztest_tab FROM TABLE t_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To delete single record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ztest_tab FROM w_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106139#M1184702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106140#M1184703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have declared the tables satatement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables :&lt;/P&gt;&lt;P&gt; ztest_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the delete statement is executed the operation is being failed.&lt;/P&gt;&lt;P&gt;ie :  iam getting the sy-subrc value = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:40:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106140#M1184703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106141#M1184704</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;Use Commit statment after delete command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:49:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106141#M1184704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106142#M1184705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priyanka,&lt;/P&gt;&lt;P&gt;Do like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT t_tab INTO w_tab.
IF w_tab-check = 'X' AND
w_tab-flag = 'X'.
"DELETE t_tab .  deleting the value in the internal table  Dont use this
move-corresponding w_tab to ztest_tab. " no need for this
delete ztest_tab FORM w_tab.
ENDIF.
ENDLOOP.
DELETE t_tab WHERE check = 'X' and flag = 'X'. "if u need to delete such records
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:50:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106142#M1184705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106143#M1184706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the data type and length of fields declared in program and &lt;/P&gt;&lt;P&gt;fields in database table(ztest_tab) are same.&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>Mon, 09 Feb 2009 13:50:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106143#M1184706</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-02-09T13:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106144#M1184707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Declare another internal table of structure similar to the earlier one.&lt;/P&gt;&lt;P&gt;Append the records to this 2nd table which satisfy the IF condition you have mentioned inside the loop.&lt;/P&gt;&lt;P&gt;loop at itab1 into w_itab1.&lt;/P&gt;&lt;P&gt;if------&lt;/P&gt;&lt;P&gt;ie. append ztest_tab to itab2.&lt;/P&gt;&lt;P&gt;endif.-----&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;Use Delete DBTAB from table itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you can achieve your required functionality, its working as per requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106144#M1184707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: problem with deleteing a record froma database table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106145#M1184708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;PS. Never perform any database operations such as select, delete..etc inside loops (DO, loop...etc).&lt;/P&gt;&lt;P&gt;This kind of coding creates a severe performance overhead on your system.&lt;/P&gt;&lt;P&gt;Better assemble records of your choice for deletion into a internal table and delete using the table as a reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2009 13:54:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-deleteing-a-record-froma-database-table/m-p/5106145#M1184708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-09T13:54:42Z</dc:date>
    </item>
  </channel>
</rss>

