<?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 selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-selection/m-p/3294009#M788254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are going to want to use a field symbol here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: HSL_Field(20) type c.
field-symbols: &amp;lt;fs&amp;gt;.

loop at itab1 into wa_itab1.    "&amp;lt;--- Change this to WA_ITAB1

read table itab2 into wa_itab2 with key bukrs = wa_itab1-bukrs
kostl = wa_itab1-kostl
gjahr = wa_itab1-gjahr

* Here we are assuming the MONAT has values like 01,02,03,04,....12
concatenate 'WA_ITAB2-HSL' wa_itab1-monat into hsl_field.  
condense hsl_field no-gaps.   

* Assign to the field symbol
assign (hsl_field) to &amp;lt;fs&amp;gt;.

wa_itab1-amount2 = &amp;lt;fs&amp;gt;.
modify itab1 from wa_itab1 index sy-tabix.

endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2008 15:24:50 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2008-01-16T15:24:50Z</dc:date>
    <item>
      <title>Internal table selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-selection/m-p/3294008#M788253</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;I have the following situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1:  bukrs kostl  gjahr monat amount1 amount2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2: bukrs kostl gjahr hsl01 hsl02.......hsl12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get the amount2 of itab1 from itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;monat is the period in itab1 but in itab2 hsl01 is the amount for period 01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code that i have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab2 into wa_itab2 with key bukrs = wa_itab1-bukrs&lt;/P&gt;&lt;P&gt;                                                         kostl = wa_itab1-kostl&lt;/P&gt;&lt;P&gt;                                                         gjahr = wa_itab1-gjahr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate 'wa_itab2-hsl' monat into l_amnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab1-amount2 = ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i get the value of l_amnt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;MJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 15:17:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-selection/m-p/3294008#M788253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-16T15:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-selection/m-p/3294009#M788254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are going to want to use a field symbol here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: HSL_Field(20) type c.
field-symbols: &amp;lt;fs&amp;gt;.

loop at itab1 into wa_itab1.    "&amp;lt;--- Change this to WA_ITAB1

read table itab2 into wa_itab2 with key bukrs = wa_itab1-bukrs
kostl = wa_itab1-kostl
gjahr = wa_itab1-gjahr

* Here we are assuming the MONAT has values like 01,02,03,04,....12
concatenate 'WA_ITAB2-HSL' wa_itab1-monat into hsl_field.  
condense hsl_field no-gaps.   

* Assign to the field symbol
assign (hsl_field) to &amp;lt;fs&amp;gt;.

wa_itab1-amount2 = &amp;lt;fs&amp;gt;.
modify itab1 from wa_itab1 index sy-tabix.

endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 15:24:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-selection/m-p/3294009#M788254</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-01-16T15:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-selection/m-p/3294010#M788255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 15:29:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-selection/m-p/3294010#M788255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-16T15:29:33Z</dc:date>
    </item>
  </channel>
</rss>

