<?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: Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065188#M726339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If both the itab are of same structure then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inew[] = it_vbak[].&lt;/P&gt;&lt;P&gt;or you can use&lt;/P&gt;&lt;P&gt;append lines of it_vbak to inew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is not of same structutre &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;loop at it_vbak.&lt;/P&gt;&lt;P&gt;move-corresponding it_vbak to inew.&lt;/P&gt;&lt;P&gt;append inew.&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;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Nov 2007 03:42:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-16T03:42:23Z</dc:date>
    <item>
      <title>Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065187#M726338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a internal table (t_vbak) and filled with some records. Now I want to move those records to one more internal table based on some conditions. What is the best way to move those to other internal table when u consider performance wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me some examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shreekant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:38:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065187#M726338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065188#M726339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If both the itab are of same structure then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inew[] = it_vbak[].&lt;/P&gt;&lt;P&gt;or you can use&lt;/P&gt;&lt;P&gt;append lines of it_vbak to inew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is not of same structutre &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;loop at it_vbak.&lt;/P&gt;&lt;P&gt;move-corresponding it_vbak to inew.&lt;/P&gt;&lt;P&gt;append inew.&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;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:42:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065188#M726339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065189#M726340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shreekant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can give the complete reuiqrement and the table types then I can tell you the best way as it depends on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065189#M726340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065190#M726341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Atish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_non_hbpv.&lt;/P&gt;&lt;P&gt;        include structure vbak.&lt;/P&gt;&lt;P&gt;types: end of ty_non_hbpv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_vbak.&lt;/P&gt;&lt;P&gt;        include structure vbak.&lt;/P&gt;&lt;P&gt;types: end of ty_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_non_hbpv type standard table of ty_non_hbpv,&lt;/P&gt;&lt;P&gt;      w_non_hbpv type ty_non_hbpv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_vbak type standard table of ty_vbak,&lt;/P&gt;&lt;P&gt;      w_vbak type ty_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I retrived some records into t_vbak using select statement, now I want to move those records to t_non_hbpv internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shreekant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:52:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065190#M726341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065191#M726342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shreekanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to move records based on some conditions, then u have to loop at the internal table t_vbak, if condition satisfies move the contents field by field if the internal tables have different structure else move the entire content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg : &lt;/P&gt;&lt;P&gt;  Case 1: If both the tables are having same structure.&lt;/P&gt;&lt;P&gt;loop at t_vbak .&lt;/P&gt;&lt;P&gt; if condition.&lt;/P&gt;&lt;P&gt;   t_new = t_vbak.&lt;/P&gt;&lt;P&gt;   append t_new.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case 2: Both the tables are having differnt structure.&lt;/P&gt;&lt;P&gt;loop at t_vbak .&lt;/P&gt;&lt;P&gt; if condition.&lt;/P&gt;&lt;P&gt;   t_new-filed1 = t_vbak-field1.&lt;/P&gt;&lt;P&gt;   t_new-filed2 = t_vbak-field2.&lt;/P&gt;&lt;P&gt;   t_new-filed3 = t_vbak-field3.&lt;/P&gt;&lt;P&gt;   append t_new.&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;Thanks,&lt;/P&gt;&lt;P&gt;Vidyashree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065191#M726342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065192#M726343</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;PRE&gt;&lt;CODE&gt;types: begin of ty_non_hbpv.
include structure vbak.
types: end of ty_non_hbpv.

types: begin of ty_vbak.
include structure vbak.
types: end of ty_vbak.

data: t_non_hbpv type standard table of ty_non_hbpv,
w_non_hbpv type ty_non_hbpv.

data: t_vbak type standard table of ty_vbak,
w_vbak type ty_vbak.

loop at t_vbak into w_vbak where &amp;lt;Condition&amp;gt;.
w_non_hbpv = w_vbak.
append w_non_hbpv to t_non_hbpv.
clear : w_non_hbpv,
          w_vbak.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065192#M726343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065193#M726344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shreekant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just some correction in your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_non_hbpv.&lt;/P&gt;&lt;P&gt;include structure vbak.&lt;/P&gt;&lt;P&gt;types: end of ty_non_hbpv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_vbak.&lt;/P&gt;&lt;P&gt;include structure vbak.&lt;/P&gt;&lt;P&gt;types: end of ty_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't require these types.&lt;/P&gt;&lt;P&gt;Just use below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_non_hbpv type standard table of vbak,&lt;/P&gt;&lt;P&gt;w_non_hbpv type vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_vbak type standard table of vbak,&lt;/P&gt;&lt;P&gt;w_vbak type vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_non_hbpv[] = t_vbak[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE t_non_hbpv WHERE &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will be fastest way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:57:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065193#M726344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065194#M726345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since they have the same structure, you can:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT t_vbak into w_vbak
  WHERE (your condition).
  APPEND w_vbal to t_non_hbpv.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065194#M726345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065195#M726346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try  this code for ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_vbak into wa_vbak where conditions.&lt;/P&gt;&lt;P&gt;wa_vbak_new = wa_vbak.&lt;/P&gt;&lt;P&gt;append wa_vabak_new into t_vbak_new.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shibin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:59:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3065195#M726346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:59:56Z</dc:date>
    </item>
  </channel>
</rss>

