<?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: Final internal table fetching in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421169#M1050083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting matnr matkl from mara in where condition is s_matnr and P_matkl.&lt;/P&gt;&lt;P&gt;  Now Matkl, werks, customer region from ztable   in where condition I have selct option s_werks and s_customer_region .&lt;/P&gt;&lt;P&gt;I dont have field matnr on ztable.&lt;/P&gt;&lt;P&gt;Now i need matnr, werks and customer region in one internal table.&lt;/P&gt;&lt;P&gt;Hope u got it..&lt;/P&gt;&lt;P&gt;Please tell me how to do.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;kumar n&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2008 10:42:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-17T10:42:12Z</dc:date>
    <item>
      <title>Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421163#M1050077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my report.&lt;/P&gt;&lt;P&gt;I have select-option : for Material, Plant and Customer Region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my Ztable I have material group, Plant and Customer Region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to fill my internal table as&lt;/P&gt;&lt;P&gt;Material&lt;/P&gt;&lt;P&gt;Plant&lt;/P&gt;&lt;P&gt;Customer Region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How Can I do it, I am not getting the logic due to all in are in select-options.&lt;/P&gt;&lt;P&gt;Can anybody suggent me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;kumar n&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 09:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421163#M1050077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T09:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421164#M1050078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The variables you are using for select option, the same you can assign to an internal table.&lt;/P&gt;&lt;P&gt;If upper limit and lower limit are there, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets say select option variable is var1&lt;/P&gt;&lt;P&gt;then give itab-var1 = var1-lower&lt;/P&gt;&lt;P&gt; itab-var1 = var1-upper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 09:05:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421164#M1050078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T09:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421165#M1050079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u please explain more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from where u want to get data from selction-option or u r ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Sanket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 09:07:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421165#M1050079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T09:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421166#M1050080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; what is the problem in logic? I think you are trying = in WHERE clause. If the field is SELECT-OPTION then you must use IN .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g SELECT material plant &lt;/P&gt;&lt;P&gt;          FROM ztable&lt;/P&gt;&lt;P&gt;          INTO   itab&lt;/P&gt;&lt;P&gt;          WHERE MATNR &lt;STRONG&gt;IN&lt;/STRONG&gt; S_MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kothand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 09:07:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421166#M1050080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T09:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421167#M1050081</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;data : itab type table of ztable,
            wa type ztable.
  select-options : s_matnr for ztable-matnr,
                         s_werks for ztable-werks,
                         s_custom for ztable-cutomer region.

  select matnr
            werks
            customer region
            from ztable into table itab
            where matnr in s_matnr
            and werks in s_werks
            and customer region in s_custom.

loop at itab into wa.
---
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 09:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421167#M1050081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T09:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421168#M1050082</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 way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &lt;/P&gt;&lt;P&gt;f1 f2 f3 &lt;/P&gt;&lt;P&gt;from &amp;lt;table name&amp;gt;&lt;/P&gt;&lt;P&gt;into corressponding fields of table itab&lt;/P&gt;&lt;P&gt;where matnr in s_matnr&lt;/P&gt;&lt;P&gt;and mattype in s_matkl&lt;/P&gt;&lt;P&gt;and matgroup in s_matgrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab&lt;/P&gt;&lt;P&gt;write satatements..&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if u r fetching data from more than one table u can use inner join    or for all entries &lt;/P&gt;&lt;P&gt;and if u r using more than one table then use READ TABLE &lt;/P&gt;&lt;P&gt;statement ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;sachhidananda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 09:10:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421168#M1050082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T09:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421169#M1050083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting matnr matkl from mara in where condition is s_matnr and P_matkl.&lt;/P&gt;&lt;P&gt;  Now Matkl, werks, customer region from ztable   in where condition I have selct option s_werks and s_customer_region .&lt;/P&gt;&lt;P&gt;I dont have field matnr on ztable.&lt;/P&gt;&lt;P&gt;Now i need matnr, werks and customer region in one internal table.&lt;/P&gt;&lt;P&gt;Hope u got it..&lt;/P&gt;&lt;P&gt;Please tell me how to do.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;kumar n&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 10:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421169#M1050083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T10:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421170#M1050084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Heres the rough logic that can be helpful to solve your problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * 
FROM ZTABLE
INTO IT_ZTAB
FOR ALL ENTRIES IN IT_MARA
WHERE MAKTL = IT_MARA-MAKTL AND
             WERKS = S_WERKS         AND 
             REGIO   = S_CUSTOMER_REGION.

LOOP AT IT_MARA INTO WA_MARA.

  LOOP AT IT_ZTAB INTO WA_ZTAB WHERE MAKTL = WA_MARA-MAKTL.

**Logic to append all the entries into a single internal table.
    MOVE-CORRESPONDING WA_MARA TO WA_FINAL_TAB.
    MOVE-CORRESPONDING WA_ZTAB  TO WA_FINAL_TAB.

APPEND WA_FINAL_TAB TO IT_FINAL_TAB.

  ENDLOOP.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here IT_FINAL_TAB contains all the fields required by you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kunjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 10:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421170#M1050084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T10:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Final internal table fetching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421171#M1050085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 12:21:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/final-internal-table-fetching/m-p/4421171#M1050085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T12:21:36Z</dc:date>
    </item>
  </channel>
</rss>

