<?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 Delete entries inside a loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782813#M1879035</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;&lt;/P&gt;&lt;P&gt;In my requirement i need to delete the entries when values is equal to DELE and to run the loop with trade number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT Y_VVT INTO YS_VVT WHERE ITEM_STAT NE 'DELE'.&lt;/P&gt;&lt;P&gt;READ TABLE Y_VVT INTO YS_VVT WITH KEY TRADE_NUM = '0000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is&amp;nbsp; my coding is correct. Since i dont have the test case to test , i am searching for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2014 06:25:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-11-25T06:25:40Z</dc:date>
    <item>
      <title>Delete entries inside a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782813#M1879035</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;&lt;/P&gt;&lt;P&gt;In my requirement i need to delete the entries when values is equal to DELE and to run the loop with trade number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT Y_VVT INTO YS_VVT WHERE ITEM_STAT NE 'DELE'.&lt;/P&gt;&lt;P&gt;READ TABLE Y_VVT INTO YS_VVT WITH KEY TRADE_NUM = '0000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is&amp;nbsp; my coding is correct. Since i dont have the test case to test , i am searching for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 06:25:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782813#M1879035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-25T06:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete entries inside a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782814#M1879036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi bharani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what actually you wish to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you wish to delete entries having TRADE_NUM = '0000' then use DELETE statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 06:35:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782814#M1879036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-25T06:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delete entries inside a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782815#M1879037</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;Before starting the processing of loop, use DELETE statement. This can be done if you don't want the deleted entries further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE&amp;nbsp; Y_VVT WHERE ITEM_STAT EQ 'DELE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then if you want to execute the loop with TRADE_NUM = '0000' , specify that in the loop.&lt;BR /&gt;LOOP AT Y_VVT INTO YS_VVT where trade_num = '0000'.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 06:39:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782815#M1879037</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2014-11-25T06:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delete entries inside a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782816#M1879038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;Bharani G wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;In my requirement i need to delete the entries when values is equal to DELE and to run the loop with trade number.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOOP AT Y_VVT INTO YS_VVT WHERE ITEM_STAT NE 'DELE'.&lt;/P&gt;
&lt;P&gt;READ TABLE Y_VVT INTO YS_VVT WITH KEY TRADE_NUM = '0000'.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Is&amp;nbsp; my coding is correct. Since i dont have the test case to test , i am searching for help.&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;According to your code, the program will consider only the records having ITEM_STAT NE 'DELE' within your LOOP, thereby ignoring the records with ITEM_STAT EQ 'DELE' in your process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wanna delete the entries equal to DELE, then u can directly do it using the DELETE statement. i.e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE Y_VVT WHERE ITEM_STAT = 'DELE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above statement delete all the records with ITEM_STAT = 'DELE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayur Priyan. S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 06:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782816#M1879038</guid>
      <dc:creator>mayur_priyan</dc:creator>
      <dc:date>2014-11-25T06:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delete entries inside a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782817#M1879039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any one tell me how to declare a constant for 'DELE' and '00000'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 07:45:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782817#M1879039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-25T07:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delete entries inside a loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782818#M1879040</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 declaring constants, it is best practise to refer their datatype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants c_dele type dbtablename followed by ITEM_STAT will help&lt;/P&gt;&lt;P&gt;similarly if you can check the data type for ITEM_STAT field,&lt;/P&gt;&lt;P&gt;you can also declare&lt;/P&gt;&lt;P&gt;constants c_dele type &amp;lt;datatype directly here&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same is true for '0000' as well, you need to refer trade_num field in the database table.&lt;/P&gt;&lt;P&gt;For simple ABAP help, you can do F1 on keyword which will show F1 Help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 07:56:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-inside-a-loop/m-p/10782818#M1879040</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2014-11-25T07:56:12Z</dc:date>
    </item>
  </channel>
</rss>

