<?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 select different fields into same internal table from  two different db tab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791079#M651165</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'm selecting 3 fields from a DB table to an internal table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  there after i have to select one more field from another DB tables into same internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  But the second select is overwriting 1st record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I want both to sustain as a single record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  How to do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Sep 2007 13:05:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-10T13:05:58Z</dc:date>
    <item>
      <title>select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791079#M651165</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'm selecting 3 fields from a DB table to an internal table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  there after i have to select one more field from another DB tables into same internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  But the second select is overwriting 1st record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I want both to sustain as a single record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  How to do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 13:05:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791079#M651165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T13:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791080#M651166</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;use modify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at &amp;lt;internal table&amp;gt; into &amp;lt;work area&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ur fields in work area.&lt;/P&gt;&lt;P&gt;modify &amp;lt;internal table&amp;gt; from &amp;lt;work area&amp;gt; transporting &amp;lt;that fields&amp;gt;&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;&lt;/P&gt;&lt;P&gt;I think it can solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Dhwani shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 13:07:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791080#M651166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T13:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791081#M651167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to do a select....appending table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot modify the single record. You would need to select into another table and then modify the first table based on the data of the second.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 13:08:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791081#M651167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T13:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791082#M651168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Define itab1with 3 fields.&lt;/P&gt;&lt;P&gt;Define itab2 with 2 fields. &amp;lt;One field for connecting itab1 and itab2&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the details from table1 into itab1. &lt;/P&gt;&lt;P&gt;Get the details from table2 into itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab1.&lt;/P&gt;&lt;P&gt;l_index = sy-tabix.&lt;/P&gt;&lt;P&gt;read table itab2 with key &amp;lt;Condition&amp;gt;.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move the value from itab2 to itab1. &lt;/P&gt;&lt;P&gt;modify itab1 with index l_index.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 13:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791082#M651168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T13:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791083#M651169</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;refer to my code as under:&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;    read table itab1 with key mblnr = itab-mblnr&lt;/P&gt;&lt;P&gt;                              mjahr = itab-mjahr binary search.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      move-corresponding itab1 to itab.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    read table itab2 with key mblnr = itab-mblnr&lt;/P&gt;&lt;P&gt;                              mjahr = itab-mjahr binary search.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      move-corresponding itab2 to itab.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    modify itab transporting WERKS LGORT BUDAT OIB_BLTIME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear: itab, itab1, itab2.&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;Hope this helps.&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sipra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 13:13:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791083#M651169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T13:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791084#M651170</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;while declaring a final table.&lt;/P&gt;&lt;P&gt;data : begin of itab_mara occurs 0,&lt;/P&gt;&lt;P&gt;         matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;         ernam like mara-ernam,&lt;/P&gt;&lt;P&gt;          end of itab_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab_marc occurs 0,&lt;/P&gt;&lt;P&gt;        matnr like marc-matnr,&lt;/P&gt;&lt;P&gt;        werks like marc-werks,&lt;/P&gt;&lt;P&gt;        end of itab_marc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab_final occurs 0,&lt;/P&gt;&lt;P&gt;         matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;         ernam like mara-ernam,&lt;/P&gt;&lt;P&gt;         matnr1 like marc-matnr,         " declaration of matnr in final table&lt;/P&gt;&lt;P&gt;         werks like marc-werks,&lt;/P&gt;&lt;P&gt;         end of itab_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 13:28:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791084#M651170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T13:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791085#M651171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any reason you can't use a join?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2007 13:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791085#M651171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-11T13:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: select different fields into same internal table from  two different db tab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791086#M651172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : begin of itab_final occurs 0,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;ernam like mara-ernam,&lt;/P&gt;&lt;P&gt;matnr1 like marc-matnr, " declaration of matnr in final table&lt;/P&gt;&lt;P&gt;werks like marc-werks,&lt;/P&gt;&lt;P&gt;end of itab_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen.  "using selection -screen is a good way of writing code, even if    it  is not necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;select mara~matnr&lt;/P&gt;&lt;P&gt;         mara~ernam &lt;/P&gt;&lt;P&gt;         marc~werks&lt;/P&gt;&lt;P&gt;         marc~matnr&lt;/P&gt;&lt;P&gt;         from mara as mara&lt;/P&gt;&lt;P&gt;         inner join marc as marc on &lt;/P&gt;&lt;P&gt;        mara&lt;SUB&gt;matnr eq marc&lt;/SUB&gt;matnr into table itab_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_final.&lt;/P&gt;&lt;P&gt;write:/ itab_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points, if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2007 12:33:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-different-fields-into-same-internal-table-from-two-different-db-tab/m-p/2791086#M651172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-15T12:33:02Z</dc:date>
    </item>
  </channel>
</rss>

