<?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 while MODIFYING existing rows in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527704#M1934981</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table with material, plant, PSS status and some other fields that is already full of data. I want to select the material description from MAKT using the entries in this table and modifying this table at the same time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT maktx FROM makt INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN itab&lt;/P&gt;&lt;P&gt;WHERE matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this deletes the current entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried to use SELECT .... APPENDING INTO CORRESPONDING FIELDS OF TABLE &lt;/P&gt;&lt;P&gt;but am unsure if I am doing it correctly or if there is a different way to do it because the way I have written it, it adds additional rows to my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am aware I can create a separate internal table and then loop through it to modify itab but was trying to see if there is a more efficient way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Feb 2016 18:24:42 GMT</pubDate>
    <dc:creator>former_member447950</dc:creator>
    <dc:date>2016-02-11T18:24:42Z</dc:date>
    <item>
      <title>SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527704#M1934981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table with material, plant, PSS status and some other fields that is already full of data. I want to select the material description from MAKT using the entries in this table and modifying this table at the same time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT maktx FROM makt INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN itab&lt;/P&gt;&lt;P&gt;WHERE matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this deletes the current entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried to use SELECT .... APPENDING INTO CORRESPONDING FIELDS OF TABLE &lt;/P&gt;&lt;P&gt;but am unsure if I am doing it correctly or if there is a different way to do it because the way I have written it, it adds additional rows to my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am aware I can create a separate internal table and then loop through it to modify itab but was trying to see if there is a more efficient way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 18:24:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527704#M1934981</guid>
      <dc:creator>former_member447950</dc:creator>
      <dc:date>2016-02-11T18:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527705#M1934982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think with the newer versions (7.40) there is an option to get a column data with out deleting current internal table data but with older versions you really don't have an option (as you mentioned, need to get material text data into a new internal table and then update the original internal table). Sorry... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 19:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527705#M1934982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-11T19:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527706#M1934983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not sure if this is possible. But, if your concern with the performance, you can use Loop assigning field symbol instead of Loop-Modify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 02:36:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527706#M1934983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-12T02:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527707#M1934984</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;&lt;SPAN style="text-align: left; color: #333333; text-indent: 0px;"&gt;INTO CORRESPONDING FIELDS OF &amp;lt;workarea&amp;gt;, ... INTO CORRESPONDING FIELDS OF TABLE &amp;lt;itab&amp;gt; and ... APPENDING CORRESPONDING FIELDS OF TABLE &amp;lt;IT_TAB&amp;gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left; color: #333333; text-indent: 0px;"&gt;r&lt;/SPAN&gt;&lt;SPAN style="text-align: left; color: #333333; text-indent: 0px;"&gt;equire a slightly increased runtime and degrade the performance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left; color: #333333; text-indent: 0px;"&gt;so it will be a better to fetch all the data new internal table and make use of field symbols to modify your main internal table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left; color: #333333; text-indent: 0px;"&gt;thanks!!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 04:11:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527707#M1934984</guid>
      <dc:creator>Chintu6august</dc:creator>
      <dc:date>2016-02-12T04:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527708#M1934985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best solution is to populate it all in one go by using a JOIN on MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's not possible, select into a hashed internal table of MATNR and MAKTX (using FOR ALL ENTRIES to limit the scope). Then loop through "itab" assigning to a field symbol, read your hashed table, and populate the description field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 06:01:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527708#M1934985</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-02-12T06:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527709#M1934986</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 can use make use of field symbols for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;* Make sure there are no duplicate materials in the ITAB, else make a read table statement before select query.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab ASSIGNING &amp;lt;fs_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;SELECT SINGLE maktx&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM makt&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO &amp;lt;fs_wa&amp;gt;-maktx " Your field for material description&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE matnr = &lt;SPAN style="color: #333333; font-size: 12px;"&gt;&amp;lt;fs_wa&amp;gt;&lt;/SPAN&gt;-matnr.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;ENDLOOP.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Regards, &lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 06:08:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527709#M1934986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-12T06:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527710#M1934987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not the most efficient way - having a select inside a loop. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 07:02:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527710#M1934987</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-02-12T07:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527711#M1934988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct, this is not the most efficient way,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, either it can be done as.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;" Check for iTAB non-initial.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;SELECT matnr maktx &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM makt &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO TABLE itab_temp&amp;nbsp; " Temp table with Matnr and Maktx.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;FOR ALL ENTRIES IN itab&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;WHERE matnr = itab-matnr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;SORT itab_temp BY matnr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;LOOP AT itab ASSIGNING &amp;lt;fs_wa&amp;gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;READ TABLE itab_temp INTO ls_itab_temp WITH KEY matnr = &amp;lt;fs_wa&amp;gt;-matnr BINARY SEARCH.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;IF&amp;nbsp;&amp;nbsp;&amp;nbsp; sy-subrc IS INITIAL.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fs_wa&amp;gt;-maktx = ls_itab_temp-maktx.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;P.S. : I din't considered the performance factor before. &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/74/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 07:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527711#M1934988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-12T07:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527712#M1934989</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;As you said&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #333333; font-size: 12px;"&gt;I am aware I can create a separate internal table and then loop through it to modify itab but was trying to see if there is a more efficient way to do this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;to increase performance pls move the records to final IT table (avoid modify).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;please go through below. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********data declaration&lt;/P&gt;&lt;P&gt;create itabs gt_mara&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gt_makt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gt_final&lt;/P&gt;&lt;P&gt;********start-of-selection&lt;/P&gt;&lt;P&gt;select &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt; ... from mara into table gt_mara&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where mara in so_matnr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;select &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt;.. from&amp;nbsp; makt into table gt_makt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for all entries in gt_mara&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where matnr = gt_mara-matnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and spras = 'EN'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********process&lt;/P&gt;&lt;P&gt;sort : gt_mara by matnr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gt_makt by matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at gt_mara into gs_mara.&lt;/P&gt;&lt;P&gt;gs_final-&amp;lt;f1&amp;gt; = gs_mara-&amp;lt;f1&amp;gt;.&lt;/P&gt;&lt;P&gt;read table gt_makt into gs_makt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; binarysearch.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;gs_final-&amp;lt;fn&amp;gt; = gs_makt-&amp;lt;fn&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append gs_final to gt_final&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: gs_final,gs_mara, gs_makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 07:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527712#M1934989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-12T07:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT while MODIFYING existing rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527713#M1934990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;anusha pasula wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;select &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt; ... from mara into table gt_mara&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where mara in so_matnr.&lt;/P&gt;
&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;
&lt;P&gt;select &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt;.. from&amp;nbsp; makt into table gt_makt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for all entries in gt_mara&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where matnr = gt_mara-matnr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and spras = 'EN'.&lt;/P&gt;
&lt;P&gt;endif.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitely &lt;STRONG&gt;not&lt;/STRONG&gt; an efficient way. Don't use FOR ALL ENTRIES. Use a LEFT OUTER JOIN with MARA and MAKT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 10:17:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-while-modifying-existing-rows/m-p/11527713#M1934990</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-02-12T10:17:44Z</dc:date>
    </item>
  </channel>
</rss>

