<?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: Delete record from Internal Table based on parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108988#M1706724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First thing, declare your own structure of int_tab.( not of type A) &lt;/P&gt;&lt;P&gt;begin of struct,&lt;/P&gt;&lt;P&gt; field1 type tabA-field1,&lt;/P&gt;&lt;P&gt; field2 type tabB-field2,&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;flag type c, "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put this flag to 'X' when record is selected from tab with P1 ( put code in sy-subrc EQ 0) &lt;/P&gt;&lt;P&gt;del type c.&lt;/P&gt;&lt;P&gt;end of struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now declare inat and work area...&lt;/P&gt;&lt;P&gt;now set the flag to X after select query with parameter P1..&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; work_area-del = 'X'.&amp;nbsp; " you can use flag also... its upto you...&lt;/P&gt;&lt;P&gt;&amp;nbsp; modify intab based on record..&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear wa..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2012 05:31:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-12-14T05:31:18Z</dc:date>
    <item>
      <title>Delete record from Internal Table based on parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108983#M1706719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Case Situation: Data of 7 fields are fetched in an internal table, based on 7 parameters. 2 parameters refers type to different table. I have to narrow down my internal table based on the rest 5 parameters. Out of them only 1 parameter is mandatory. I don't want to delete any record which satisfies one parameter and accidentally gets deleted if I want to delete record with null parameters. &lt;/P&gt;&lt;P&gt;Example: Based on date(mandatory), category, territory, I fetch data in Internal Table. The parameter field description is empty. I don't want to delete data from the internal table whose description field is empty, but was fetched based on other parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is it possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 11:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108983#M1706719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-13T11:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete record from Internal Table based on parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108984#M1706720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Soumen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Could you pls elaborate your requirement as i am not getting what exactly you want. It would be nice if paste your piece of code here for better understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Deepti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 11:53:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108984#M1706720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-13T11:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delete record from Internal Table based on parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108985#M1706721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Soumen,&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 intab into wa&lt;/P&gt;&lt;P&gt;&amp;nbsp; if wa-para_desc is not empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; wa-del = 'X'.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " add del as type c in your intab declaration part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; modify intab from wa transporting del&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" now add your other delete logic over here if you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;delete intab where del = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 12:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108985#M1706721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-13T12:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delete record from Internal Table based on parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108986#M1706722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The pasted code was dumped&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 12:18:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108986#M1706722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-13T12:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete record from Internal Table based on parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108987#M1706723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The case situation elaboration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 7 parameters, 4 parameters are type of&amp;nbsp; 4 fields from TableA, and&amp;nbsp; 3 parameters are type of&amp;nbsp; 3 fields from TableB. I have extracted necessary fields to an Internal table of type TableA based on a mandatory input parameter. Now I want to narrow down the records of the internal table of Type TableA. Suppose a record was fetched that based on parameter P1 type Field1 of TableA, which has no value for the Field2. This is a valid record. Now if a value was not passed in parameter P2. It will fetch all data with null values in Field2. And when deleting the record of Internal Table with Null Values, the particular record that was fetched based on P1 will also get deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to prevent this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 12:34:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108987#M1706723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-13T12:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Delete record from Internal Table based on parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108988#M1706724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First thing, declare your own structure of int_tab.( not of type A) &lt;/P&gt;&lt;P&gt;begin of struct,&lt;/P&gt;&lt;P&gt; field1 type tabA-field1,&lt;/P&gt;&lt;P&gt; field2 type tabB-field2,&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;flag type c, "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put this flag to 'X' when record is selected from tab with P1 ( put code in sy-subrc EQ 0) &lt;/P&gt;&lt;P&gt;del type c.&lt;/P&gt;&lt;P&gt;end of struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now declare inat and work area...&lt;/P&gt;&lt;P&gt;now set the flag to X after select query with parameter P1..&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; work_area-del = 'X'.&amp;nbsp; " you can use flag also... its upto you...&lt;/P&gt;&lt;P&gt;&amp;nbsp; modify intab based on record..&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear wa..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 05:31:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-record-from-internal-table-based-on-parameters/m-p/9108988#M1706724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-14T05:31:18Z</dc:date>
    </item>
  </channel>
</rss>

