<?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: Dynamic delete stmt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694675#M623614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop thru it_final_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_set into wa_set with key cond1&lt;/P&gt;&lt;P&gt;                                       cond2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete it_final_data where field1 = wa_set-field1.&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;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2007 20:01:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-23T20:01:43Z</dc:date>
    <item>
      <title>Dynamic delete stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694671#M623610</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;How  can i write dynamic delete stmt. please give example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have internale   table contains the  4 fields IT_SET. depends on IT_SET i want to delete the data from IT_FINAL_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOw can i write the delete stmt dynamically.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 18:57:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694671#M623610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T18:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic delete stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694672#M623611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would say Loop thru ur it_final_data and within the loop read ur it_Set table and if the condition satisfies delete the entry from it_final_data. I don't understand what you mean by dynamic delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 19:30:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694672#M623611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T19:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic delete stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694673#M623612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want wriite delete stmt dynamically on the IT_FINAL_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Aj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 19:38:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694673#M623612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T19:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic delete stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694674#M623613</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 this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at IT_SET.&lt;/P&gt;&lt;P&gt;if it_set-field1 = 'X' and it_set-field3 = 'Y' .   "(for example)&lt;/P&gt;&lt;P&gt;delete IT_FINAL_DATA where f1 = 'Z' and f2 = 'W'.  &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;(suppose field1 and field3 are fields of it_set and f1 and f2 are fields of it+final_data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 19:54:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694674#M623613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T19:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic delete stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694675#M623614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop thru it_final_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_set into wa_set with key cond1&lt;/P&gt;&lt;P&gt;                                       cond2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete it_final_data where field1 = wa_set-field1.&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;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 20:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694675#M623614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T20:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic delete stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694676#M623615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: WHERE_STRING TYPE STRING.

WHERE_STRING = 'FIELD1 NE SPACE AND FIELD2 EQ ''2'''.

DELETE MYTABLE WHERE (WHERE_STRING).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 22:22:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694676#M623615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T22:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic delete stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694677#M623616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can use a (where_cond) for deleting from an internal table, only from a DB table.&lt;/P&gt;&lt;P&gt;Another solution is using field symbols:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_final_data into final_data.&lt;/P&gt;&lt;P&gt;  loop at it_set into set.&lt;/P&gt;&lt;P&gt;    assign component set-fieldname of structure final_data to &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;    if set-value ne &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;      delete it_final_data.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2007 05:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-delete-stmt/m-p/2694677#M623616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-24T05:32:06Z</dc:date>
    </item>
  </channel>
</rss>

