<?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 Link a static internal table with a dynamic internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/link-a-static-internal-table-with-a-dynamic-internal-table/m-p/7102869#M1508732</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 static internal table which contains 20 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending upon the conditions I might have 20-30 extra columns to be added to this internal table. For this i am using a dynamic internal table. This dynamic itab would fetch the column names and their values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my query is, how to add this dynamic itab to the static itab and display the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex. &lt;/P&gt;&lt;P&gt;itab has the following fields..&lt;/P&gt;&lt;P&gt;A   B   C   D   E   F   G   H   I  J  K  L.  and rows conating the values/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dynamic i tab has following columns&lt;/P&gt;&lt;P&gt;M  N   O  P  Q  R  S  T .. and rows containing the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my query is to add this dynamic itab to the static itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sameep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jul 2010 05:27:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-09T05:27:13Z</dc:date>
    <item>
      <title>Link a static internal table with a dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/link-a-static-internal-table-with-a-dynamic-internal-table/m-p/7102869#M1508732</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 static internal table which contains 20 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending upon the conditions I might have 20-30 extra columns to be added to this internal table. For this i am using a dynamic internal table. This dynamic itab would fetch the column names and their values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my query is, how to add this dynamic itab to the static itab and display the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex. &lt;/P&gt;&lt;P&gt;itab has the following fields..&lt;/P&gt;&lt;P&gt;A   B   C   D   E   F   G   H   I  J  K  L.  and rows conating the values/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dynamic i tab has following columns&lt;/P&gt;&lt;P&gt;M  N   O  P  Q  R  S  T .. and rows containing the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my query is to add this dynamic itab to the static itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sameep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 05:27:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/link-a-static-internal-table-with-a-dynamic-internal-table/m-p/7102869#M1508732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T05:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Link a static internal table with a dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/link-a-static-internal-table-with-a-dynamic-internal-table/m-p/7102870#M1508733</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 will either have to create a third work area/table consisting of your two tables or make a deep structure, something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF concat_z,
stattab TYPE ref to data,
dyntab TYPE ref to data,
END OF concat_z.

TYPES: BEGIN OF static_z,
  a TYPE string,
  b TYPE string,
  c TYPE string,
  END OF static_z.

TYPES: BEGIN OF dynamic_z,
  d TYPE string,
  e TYPE string,
  f TYPE string,
  END OF dynamic_z.

TYPES: concat_tab TYPE table of concat_z.
TYPES: static_t TYPE table of static_z.
TYPES: dynamic_t TYPE table of dynamic_z.

DATA: c_itab TYPE concat_tab,
      s_itab TYPE static_t,
      d_itab TYPE dynamic_t.

DATA: c_wa type concat_z,
      s_wa TYPE static_z,
      d_wa TYPE dynamic_z.

s_wa-a = 'bli'.
s_wa-b = 'bla'.
s_wa-c = 'blub'.

APPEND s_wa TO s_itab.

d_wa-d = 'dum'.
d_wa-e = 'di'.
d_wa-f = 'dum'.

APPEND d_wa TO d_itab.

GET REFERENCE OF s_itab INTO c_wa-stattab.
GET REFERENCE OF d_itab INTO c_wa-dyntab.

APPEND c_wa to c_itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this helps in any way. I don't know myself if there's a way to completely 'merge' two internal tables column-wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 14:26:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/link-a-static-internal-table-with-a-dynamic-internal-table/m-p/7102870#M1508733</guid>
      <dc:creator>Lukas_Weigelt</dc:creator>
      <dc:date>2010-07-09T14:26:49Z</dc:date>
    </item>
  </channel>
</rss>

