<?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 column from an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512219#M1423671</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;modify itab. "instead of modify d.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or you can use a field symbol to clear the column in the header line and modify table in one step:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab ASSIGNING FIELD-SYMBOL(&amp;lt;fs&amp;gt;).
  CLEAR &amp;lt;fs&amp;gt;-d.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 10 Apr 2021 12:26:33 GMT</pubDate>
    <dc:creator>touzik_itc</dc:creator>
    <dc:date>2021-04-10T12:26:33Z</dc:date>
    <item>
      <title>Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512210#M1423662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a req. in which there is an internal table it_tab with 4 fields A, B, C, D.&lt;/P&gt;&lt;P&gt;After the data in the internal table is appended, I need to delete the field D from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB has following entries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A   B   C   D&lt;/P&gt;&lt;P&gt;1    2   3   4&lt;/P&gt;&lt;P&gt;5    6   7   8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to delete the D column totally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be achieved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 07:58:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512210#M1423662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T07:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512211#M1423663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about not to consider column D for further processing/Calculation/Printing and keep it Idle to avoid your next question like "How to get back column D?"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 08:02:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512211#M1423663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T08:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512212#M1423664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using this internal table in a FM, where I do need this field... The place where I am calling this FM in the main report, I don't need this field. So I need a logic to delete the field in the main report.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 08:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512212#M1423664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T08:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512213#M1423665</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;In case you want to CLEAR the contents of column D (and not delete column d), then one way is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Loop at itab.

clear itab-d.
modify d.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Mittal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 08:06:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512213#M1423665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T08:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512214#M1423666</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 dont see any possibility of deleting a column from internal table. Instead, you have to take another internal table with required fields, Loop at first table and populate the second table fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't want the data in column D, you already got the solution from our friends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be if you can go in to the details, we can think of alternative approaches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 08:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512214#M1423666</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-01-06T08:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512215#M1423667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi you can take another internal table with 3 fields A B C,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now loop the ist internal table ITAB1 and assign append values into 2nd internal table ITAB2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at itab1 into wa1
  
  WA2-A  = WA1-A
 WA2-B = WA1-B
WA2-C = WA1-C
append wa2 to itab2.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get only 3 columns in your 2nd internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need further info&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Satish Boguda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 08:13:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512215#M1423667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T08:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512216#M1423668</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; I am using this internal table in a FM, where I do need this field... The place where I am calling this FM in the main report, I don't need this field. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a result I said, just keep this field into your internal table but do not use it anywhere in report within loop and keep it Idle. Thatu2019s it &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 08:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512216#M1423668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T08:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512217#M1423669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If you need to erase column, &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;good way is using: MODIFY, statement. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Using following code you can erase a column (col1) from internal table (lt_data):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_data LIKE LINE OF lt_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_data-col1 = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;MODIFY l&lt;/SPAN&gt;t_data &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;ls_data&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;TRANSPORTING col1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;WHERE col1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;It is not difficult but it could help some beginners.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 11:33:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512217#M1423669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-09-29T11:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete column from an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512219#M1423671</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;modify itab. "instead of modify d.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or you can use a field symbol to clear the column in the header line and modify table in one step:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab ASSIGNING FIELD-SYMBOL(&amp;lt;fs&amp;gt;).
  CLEAR &amp;lt;fs&amp;gt;-d.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Apr 2021 12:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-column-from-an-internal-table/m-p/6512219#M1423671</guid>
      <dc:creator>touzik_itc</dc:creator>
      <dc:date>2021-04-10T12:26:33Z</dc:date>
    </item>
  </channel>
</rss>

