<?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: How to delete data from dynamic internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345414#M1231038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; say I have so_vbeln and so_erdat as select options,&lt;/P&gt;&lt;P&gt;&amp;gt; and I have to filter the data from &amp;lt;lt_data&amp;gt; for so_vbeln and so_erdat.&lt;/P&gt;&lt;P&gt;&amp;gt; then How to do that?&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you can do this when selecting data from the database itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Select * from vbak into table gt_vbak where vbeln in so_vbeln and erdat in so_erdat.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Mar 11, 2009 10:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Mar 2009 09:54:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-11T09:54:21Z</dc:date>
    <item>
      <title>How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345410#M1231034</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;I have dynamic internal table and I have some slection screen fields , using these selection screen fields&lt;/P&gt;&lt;P&gt;(select -options), I have to filter the data? assigning will work with READ , but I have select options not the parametre, &lt;/P&gt;&lt;P&gt;and also delete will not work for dynamic table..&lt;/P&gt;&lt;P&gt;as we cannot use assigning with delete.. &lt;/P&gt;&lt;P&gt;So how to do this?&lt;/P&gt;&lt;P&gt;and one more thing is , I cannot filter the data while selection( in select, I cannot filter the data-&amp;gt; as it's not coming directly from table, it's coming from buffer),&lt;/P&gt;&lt;P&gt;so now after selection of data, I need to filter the data from dynamic table.&lt;/P&gt;&lt;P&gt;Is there any way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mrunal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 06:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345410#M1231034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T06:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345411#M1231035</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;DELETE &amp;lt;fs_table_jgm&amp;gt; INDEX g_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this link..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2444228"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Avinash Kodarapu on Mar 11, 2009 12:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 07:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345411#M1231035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T07:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345412#M1231036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the info.&lt;/P&gt;&lt;P&gt;But say ,  I have data in table &amp;lt;lt_data&amp;gt;, and now I have to delete the data according to my selection screen fields, say I have so_vbeln and so_erdat as select options,&lt;/P&gt;&lt;P&gt;and I have to filter the data from &amp;lt;lt_data&amp;gt; for so_vbeln and so_erdat.&lt;/P&gt;&lt;P&gt;then How to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below statement won't work for dynamic internal table.&lt;/P&gt;&lt;P&gt;delete &amp;lt;lt_data&amp;gt; where vbeln not in so_vbeln and erdat not in so_erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then How we will use delete  for dynamic table? please guide.&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;Mrunal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 09:42:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345412#M1231036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T09:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345413#M1231037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT &amp;lt;lt_data&amp;gt; ASSIGNING &amp;lt;ls_data&amp;gt;.
  ASSIGN COMPONENT 'VBELN' OF STRUCTURE &amp;lt;ls_data&amp;gt; TO &amp;lt;l_vbeln&amp;gt;.
  IF &amp;lt;l_vbeln&amp;gt; NOT IN so_vbeln.
    DELETE &amp;lt;lt_data&amp;gt;.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 09:45:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345413#M1231037</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-11T09:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345414#M1231038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; say I have so_vbeln and so_erdat as select options,&lt;/P&gt;&lt;P&gt;&amp;gt; and I have to filter the data from &amp;lt;lt_data&amp;gt; for so_vbeln and so_erdat.&lt;/P&gt;&lt;P&gt;&amp;gt; then How to do that?&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you can do this when selecting data from the database itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Select * from vbak into table gt_vbak where vbeln in so_vbeln and erdat in so_erdat.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Mar 11, 2009 10:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 09:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345414#M1231038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T09:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345415#M1231039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Use &lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;it_data&amp;gt; INTO ls_data WHERE (Give you condition here).&lt;/P&gt;&lt;P&gt;DELETE &amp;lt;it_data&amp;gt; index sy-tabix. "This will delete the record that matches the condition&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 09:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345415#M1231039</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2009-03-11T09:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345416#M1231040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; say I have so_vbeln and so_erdat as select options,&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; and I have to filter the data from &amp;lt;lt_data&amp;gt; for so_vbeln and so_erdat.&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; then How to do that?&lt;/P&gt;&lt;P&gt;&amp;gt; &amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Perhaps you can do this when selecting data from the database itself.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Edited by: Advait Gode on Mar 11, 2009 10:54 AM&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original poster said:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and one more thing is , I cannot filter the data while selection( in select, I cannot filter the data-&amp;gt; as it's not coming directly from table, it's coming from buffer),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 09:57:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345416#M1231040</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-11T09:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345417#M1231041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with below code as  you said. But I am getting dump. can you help?&lt;/P&gt;&lt;P&gt;here is my piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;LS_DATA&amp;gt; type any,&lt;/P&gt;&lt;P&gt;                           &amp;lt;LT_DATA&amp;gt; TYPE table,&lt;/P&gt;&lt;P&gt;                            &amp;lt;L_FIELD&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ASSIGN &amp;lt;l_buffer_entry&amp;gt;-dataptr-&amp;gt;* TO &amp;lt;LS_DATA&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN &amp;lt;l_buffer_entry&amp;gt;-dataptr-&amp;gt;* TO &amp;lt;LT_DATA&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;LT_DATA&amp;gt; ASSIGNING &amp;lt;LS_DATA&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'BUKRS' OF STRUCTURE &amp;lt;LS_DATA&amp;gt; TO &amp;lt;L_FIELD&amp;gt;.&lt;/P&gt;&lt;P&gt;IF &amp;lt;L_FIELD&amp;gt; NOT IN SO_BUKRS.&lt;/P&gt;&lt;P&gt;DELETE &amp;lt;LT_DATA&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;UNASSIGN &amp;lt;L_FIELD&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'BELNR' OF STRUCTURE &amp;lt;LS_DATA&amp;gt; TO &amp;lt;L_FIELD&amp;gt;.&lt;/P&gt;&lt;P&gt;IF &amp;lt;L_FIELD&amp;gt; NOT IN SO_BELNR.&lt;/P&gt;&lt;P&gt;DELETE &amp;lt;LT_DATA&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;UNASSIGN &amp;lt;L_FIELD&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and here is the description of my dump:-&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;You attempted to access an unassigned field symbol&lt;/P&gt;&lt;P&gt;(data segment 32772).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This error may occur for any of the following reasons:&lt;/P&gt;&lt;P&gt;- You address a typed field symbol before it is set using ASSIGN&lt;/P&gt;&lt;P&gt;- You address a field symbol that points to a line in an internal table&lt;/P&gt;&lt;P&gt;  that has been deleted&lt;/P&gt;&lt;P&gt;- You address a field symbol that had previously been reset using&lt;/P&gt;&lt;P&gt;  UNASSIGN, or that pointed to a local field that no longer exists&lt;/P&gt;&lt;P&gt;- You address a global function interface parameter, even&lt;/P&gt;&lt;P&gt;  though the relevant function module is not active,&lt;/P&gt;&lt;P&gt;  that is it is not in the list of active calls. You can get the list&lt;/P&gt;&lt;P&gt;  of active calls from the this short dump.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 06:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345417#M1231041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T06:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345418#M1231042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mrunal &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like that your dynamic itab does not contain either of the fields BUKRS or BELNR.&lt;/P&gt;&lt;P&gt;In order to avoid dumps due to unassigned field-symbols add the following checks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT &amp;lt;LT_DATA&amp;gt; ASSIGNING &amp;lt;LS_DATA&amp;gt;.
  ASSIGN COMPONENT 'BUKRS' OF STRUCTURE &amp;lt;LS_DATA&amp;gt; TO &amp;lt;L_FIELD&amp;gt;.

  IF ( &amp;lt;l_field&amp;gt; IS ASSIGNED ).
  IF &amp;lt;L_FIELD&amp;gt; NOT IN SO_BUKRS.
    DELETE &amp;lt;LT_DATA&amp;gt;.
  ENDIF.
  ENDIF.
  UNASSIGN &amp;lt;L_FIELD&amp;gt;.

  ASSIGN COMPONENT 'BELNR' OF STRUCTURE &amp;lt;LS_DATA&amp;gt; TO &amp;lt;L_FIELD&amp;gt;.
  IF ( &amp;lt;l_field&amp;gt; IS ASSIGNED ).
  IF &amp;lt;L_FIELD&amp;gt; NOT IN SO_BELNR.
    DELETE &amp;lt;LT_DATA&amp;gt;. 
  ENDIF.
  ENDIF.
  UNASSIGN &amp;lt;L_FIELD&amp;gt;.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if neither BUKRS nor BELNR is within your data record (ASSIGN failed) then you probably should delete this record because it has no meaning for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;   Uwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;   Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 06:28:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345418#M1231042</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-03-12T06:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete data from dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345419#M1231043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;closed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2009 05:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-data-from-dynamic-internal-table/m-p/5345419#M1231043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-10T05:38:17Z</dc:date>
    </item>
  </channel>
</rss>

