<?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: select (join) into internal table with nested structures in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877525#M1594418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: BEGIN OF ty_zollp,&lt;/P&gt;&lt;P&gt;  belnr     TYPE  zollp-belnr,&lt;/P&gt;&lt;P&gt;  werks     TYPE  zollp-werks,&lt;/P&gt;&lt;P&gt;  gebnr     TYPE  zollp-gebnr,&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;       END OF ty_zollp.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ty_zolls,&lt;/P&gt;&lt;P&gt;  grnum     type  zolls-grnum,&lt;/P&gt;&lt;P&gt;  werks     type  zolls-werks,&lt;/P&gt;&lt;P&gt;  name1     TYPE  zolls-name1,&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;       END OF ty_zolls.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa_zoll.&lt;/P&gt;&lt;P&gt;Include structure ty_zollp.&lt;/P&gt;&lt;P&gt;Include structure ty_zolls.&lt;/P&gt;&lt;P&gt;DATA: END OF wa_zoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above declaration had worked. Please try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish Kanteti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Apr 2011 10:00:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-29T10:00:20Z</dc:date>
    <item>
      <title>select (join) into internal table with nested structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877523#M1594416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wonder about the correct notation of a select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table it_zoll including  two structures as defined below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The select is a join on the two tables zollp and zolls. As coded below the select is syntactically correct, but the fields&lt;/P&gt;&lt;P&gt;in the nested structures are not filled ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to write the select statement ? (The internal table it_zoll must have the nested structures for other reasons ..) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Declaration:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF ty_zollp,
  belnr     TYPE  zollp-belnr,
  werks     TYPE  zollp-werks,
  gebnr     TYPE  zollp-gebnr,
  ...
  ...
       END OF ty_zollp.

TYPES: BEGIN OF ty_zolls,
  grnum     type  zolls-grnum,
  werks     type  zolls-werks,
  name1     TYPE  zolls-name1,
  ...
  ...
       END OF ty_zolls.


DATA: BEGIN OF wa_zoll.
DATA: zollp type ty_zollp.
DATA: zolls type ty_zolls.
DATA: END OF wa_zoll.
DATA: it_zoll LIKE TABLE OF wa_zoll.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Select:&lt;/U&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SELECT
    zollp~belnr   zollp~werks  zollp~gebnr
    zolls~grnum zolls~werks  zolls~name1

      FROM zollp
      JOIN zolls ON   zolls~werks = zollp~werks
                 AND  zolls~grnum = zollp~grnum

      INTO CORRESPONDING FIELDS OF TABLE it_zoll
      WHERE zollp~werks = werks
      AND   zollp~gebnr IN s-gebnr
      AND ...
      .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 09:22:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877523#M1594416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-29T09:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: select (join) into internal table with nested structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877524#M1594417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried it without TYPES?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and : i nclude structure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;grx&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 09:41:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877524#M1594417</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2011-04-29T09:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: select (join) into internal table with nested structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877525#M1594418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: BEGIN OF ty_zollp,&lt;/P&gt;&lt;P&gt;  belnr     TYPE  zollp-belnr,&lt;/P&gt;&lt;P&gt;  werks     TYPE  zollp-werks,&lt;/P&gt;&lt;P&gt;  gebnr     TYPE  zollp-gebnr,&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;       END OF ty_zollp.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ty_zolls,&lt;/P&gt;&lt;P&gt;  grnum     type  zolls-grnum,&lt;/P&gt;&lt;P&gt;  werks     type  zolls-werks,&lt;/P&gt;&lt;P&gt;  name1     TYPE  zolls-name1,&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;  ...&lt;/P&gt;&lt;P&gt;       END OF ty_zolls.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa_zoll.&lt;/P&gt;&lt;P&gt;Include structure ty_zollp.&lt;/P&gt;&lt;P&gt;Include structure ty_zolls.&lt;/P&gt;&lt;P&gt;DATA: END OF wa_zoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above declaration had worked. Please try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish Kanteti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 10:00:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877525#M1594418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-29T10:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: select (join) into internal table with nested structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877526#M1594419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No data is copied cause there are no corresponding fields. Actually there are only two fields in the internal table, they are ZOLLP and ZOLLS &lt;SPAN __jive_emoticon_name="alert"&gt;&lt;/SPAN&gt;, SELECT wont care of sub-fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to remove the CORRESPONDING FIELDS OF option in your SELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 10:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877526#M1594419</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-04-29T10:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: select (join) into internal table with nested structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877527#M1594420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the "include structure"-proposal won't work for me. I need to address the content of table it_zoll (respectivly structure wa_zoll) lateron by using e.g. following syntax  "wa_zoll-zollp-werks" or  "wa_zoll-zolls-werks" and not e.g.  "wa_zoll-werks".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any more ideas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;! removal of "into corresponding fields of" works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Andreas Milbredt on Apr 29, 2011 1:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 11:13:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877527#M1594420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-29T11:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: select (join) into internal table with nested structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877528#M1594421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My solution works if the list of fields selected map the structure definition, so don't forget to adapt the sequence of fields selected to any change of the structure definition to respect sequence and mapping rules. ([Work Areas in Open SQL Statements |http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 11:43:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877528#M1594421</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-04-29T11:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: select (join) into internal table with nested structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877529#M1594422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it really is a bit unflexible, because when changing the underlying structures also the select statements have to be changed. And even the sequence of the selected fields has to match exactly the definition of the structures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an alternative i could define the structures like the (huge) database tables and use select *, that would be more flexible but not have the best performance effect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 12:22:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-join-into-internal-table-with-nested-structures/m-p/7877529#M1594422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-29T12:22:41Z</dc:date>
    </item>
  </channel>
</rss>

