<?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 tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009798#M957964</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;You can go ahead with both of them,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, as &lt;STRONG&gt;Like&lt;/STRONG&gt;:Creates the field f with the same field attributes as the data object (already defined) f1. You can use this technique for any data type (fields, parameters, structures) as long as the data object is fully typed. &lt;/P&gt;&lt;P&gt;f1 can be any ABAP Dictionary reference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The catch here is  if you check the F1 help,you will find this,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No LIKE reference to Dictionary types &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In classes only the TYPE reference can be used to refer to data types in the ABAP Dictionary. The LIKE reference is allowed to local data objects only. In local classes this includes the attributes of the class and the data objects of the main program. In global classes only the class attributes can be referenced. This applies both to data declarations and to type assignments of interface parameters and field symbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error message in ABAP Objects if the following syntax is used: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA f LIKE dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct syntax: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA f TYPE dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reason: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TYPE addition is designed to be the only construct that enables references to data types, whereas the LIKE addition is used only for data objects. The repository objects in the ABAP Dictionary are data types but not data objects. Outside of ABAP Objects the LIKE reference to database tables and flat structures in the ABAP Dictionary is still allowed for reasons of compatibility with previous releases. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe we now usually prefer being nearer to OOPs. So better to use &lt;STRONG&gt;type.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Mohinder Singh Chauhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2008 05:35:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-23T05:35:36Z</dc:date>
    <item>
      <title>internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009795#M957961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can i fill ftab from 2 difff tables out which one have structure with types and other one have like if yes then how.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wit8h regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 05:21:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009795#M957961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T05:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009796#M957962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes its possible .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suppose u have 2 ztables...ztable1 and ztable2...suppose zkey is the common field from both the tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab is the table u wanna fill from the two table.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First select into reqd fiels from ztable1 into itab.&lt;/P&gt;&lt;P&gt;Suppose the field   wf_fieldx of itab is to be filled from ztable2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then select all  in to another table from ztable2 to itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2.&lt;/P&gt;&lt;P&gt;wa_itab1-wf_fieldx = itab2-wf_fieldx.&lt;/P&gt;&lt;P&gt;wa_itab1-zkey= itab2-zkey.&lt;/P&gt;&lt;P&gt;modify itab1 from wa_itab transporting zkey wf_fieldx.                                                          &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 05:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009796#M957962</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-06-23T05:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009797#M957963</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;Your question is not completely clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can fill the itab with data from two diffrent tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just make sure it has all the fields. and there should be alteast one key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;explain in detail what exactly you looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nikhil A Chitre on Jun 23, 2008 3:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 05:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009797#M957963</guid>
      <dc:creator>nikhil_chitre</dc:creator>
      <dc:date>2008-06-23T05:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009798#M957964</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;You can go ahead with both of them,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, as &lt;STRONG&gt;Like&lt;/STRONG&gt;:Creates the field f with the same field attributes as the data object (already defined) f1. You can use this technique for any data type (fields, parameters, structures) as long as the data object is fully typed. &lt;/P&gt;&lt;P&gt;f1 can be any ABAP Dictionary reference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The catch here is  if you check the F1 help,you will find this,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No LIKE reference to Dictionary types &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In classes only the TYPE reference can be used to refer to data types in the ABAP Dictionary. The LIKE reference is allowed to local data objects only. In local classes this includes the attributes of the class and the data objects of the main program. In global classes only the class attributes can be referenced. This applies both to data declarations and to type assignments of interface parameters and field symbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error message in ABAP Objects if the following syntax is used: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA f LIKE dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct syntax: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA f TYPE dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reason: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TYPE addition is designed to be the only construct that enables references to data types, whereas the LIKE addition is used only for data objects. The repository objects in the ABAP Dictionary are data types but not data objects. Outside of ABAP Objects the LIKE reference to database tables and flat structures in the ABAP Dictionary is still allowed for reasons of compatibility with previous releases. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe we now usually prefer being nearer to OOPs. So better to use &lt;STRONG&gt;type.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Mohinder Singh Chauhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 05:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4009798#M957964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T05:35:36Z</dc:date>
    </item>
  </channel>
</rss>

