<?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: Convert Internal table to range table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829476#M1316362</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 agree on your point..&lt;/P&gt;&lt;P&gt;But there seems no other option available to move the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative is to use the same internal table for selecting further data using &lt;STRONG&gt;FOR ALL ENTRIES&lt;/STRONG&gt; on the sales order field.&lt;/P&gt;&lt;P&gt;But make sure that you dont have duplicate sales order in the internal table.&lt;/P&gt;&lt;P&gt;Also this option wil eliminate, getting a dump if the range table has more than 20-25 entries (i guess) and you use that range table in where clause to fetch the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So its better that either you take another internal table with only one field (VBELN).&lt;/P&gt;&lt;P&gt;Now you can move only the sales order from your internal table into this new internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then use this new ITAB as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2009 10:46:40 GMT</pubDate>
    <dc:creator>I355602</dc:creator>
    <dc:date>2009-06-18T10:46:40Z</dc:date>
    <item>
      <title>Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829468#M1316354</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 a scenario like this. I have sales orders in one internal table. I have to move all these sales orders to a range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, as you know range table has 4 fields (SIGN, OPTION, LOW and HIGH).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want my sales orders to be moved to LOW field of the range table. Is there any single line statement to achieve this ? I dont want to loop on the internal table to move it to the range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help on this would be highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Babu Kilari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829468#M1316354</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T10:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829469#M1316355</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 dont think that there may be a solution to move records in one go, as the structures for the tables will be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather you wil have to use a loop statement and then assign it to range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829469#M1316355</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-06-18T10:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829470#M1316356</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;Why cant you use that internal table as For all Entries in a select query to restrict the order numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:25:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829470#M1316356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T10:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829471#M1316357</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;define one range like s_range1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;range1-sign = 'I'&lt;/P&gt;&lt;P&gt;range1-option = 'EQ'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab &lt;/P&gt;&lt;P&gt;rangel-low = itab-field1&lt;/P&gt;&lt;P&gt;append range1&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select .......field1 in range1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sneha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:33:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829471#M1316357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T10:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829472#M1316358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi babu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare a range, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGES  : R_vbeln FOR vbak-VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at &amp;lt;tab&amp;gt;.&lt;/P&gt;&lt;P&gt;r_vbeln-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;r_vbeln -OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;r_vbeln-LOW = tab-vbeln.&lt;/P&gt;&lt;P&gt;append r_vbeln. &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;Regards,&lt;/P&gt;&lt;P&gt;Murugesh R&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Murugesh Kumar Ramasamy on Jun 18, 2009 4:05 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Murugesh Kumar Ramasamy on Jun 18, 2009 4:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829472#M1316358</guid>
      <dc:creator>murugeshkumar_ramasamy</dc:creator>
      <dc:date>2009-06-18T10:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829473#M1316359</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 do not think that it would possible from by a single statement without loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But once I faced similar type of  problem and I used the &lt;STRONG&gt;FOR  ALL ENTRIES of&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;instead of using the Select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:37:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829473#M1316359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T10:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829474#M1316360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tarun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. Yes, I can be able to do that with the help of loop statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was searching for a single line statement because this entire operation would be in a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do it with loop-endloop it would be like loop inside a loop which is a performance overheard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you got my point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Babu Kilari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829474#M1316360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T10:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829475#M1316361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pinak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I know how did u move the entries to a particular field in the target internal table using FOR ALL ENTRIES? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Babu Kilari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:40:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829475#M1316361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T10:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829476#M1316362</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 agree on your point..&lt;/P&gt;&lt;P&gt;But there seems no other option available to move the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative is to use the same internal table for selecting further data using &lt;STRONG&gt;FOR ALL ENTRIES&lt;/STRONG&gt; on the sales order field.&lt;/P&gt;&lt;P&gt;But make sure that you dont have duplicate sales order in the internal table.&lt;/P&gt;&lt;P&gt;Also this option wil eliminate, getting a dump if the range table has more than 20-25 entries (i guess) and you use that range table in where clause to fetch the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So its better that either you take another internal table with only one field (VBELN).&lt;/P&gt;&lt;P&gt;Now you can move only the sales order from your internal table into this new internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then use this new ITAB as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:46:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829476#M1316362</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-06-18T10:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829477#M1316363</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;In continuation to the above reply...&lt;/P&gt;&lt;P&gt;Refer this code, it wil solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : itab TYPE STANDARD TABLE OF vbap,
       wa TYPE vbap.

TYPES : BEGIN OF tab1,
          vbeln TYPE vbeln_va,
        END OF tab1.

DATA : itab1 TYPE STANDARD TABLE OF tab1,
       wa1 TYPE tab1.

START-OF-SELECTION.

  SELECT * FROM vbap
  UP TO 100 ROWS
  INTO TABLE itab.

  IF sy-subrc = 0.
    APPEND LINES OF itab TO itab1.  "&amp;lt;--transfer all data in one go
  ENDIF.

  SORT itab1[] BY vbeln.

  DELETE ADJACENT DUPLICATES FROM itab1 COMPARING vbeln.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use &lt;STRONG&gt;itab1&lt;/STRONG&gt; to fetch the further data using &lt;STRONG&gt;FOR ALL ENTRIES&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:58:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829477#M1316363</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-06-18T10:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829478#M1316364</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;First of all I am sorry ....&lt;/P&gt;&lt;P&gt;I might have missunderstood your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thats why I told you insted of using select-option we can use the table value in select ,Like -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES : spfli.
DATA : BEGIN OF fs,
  carrid TYPE spfli-carrid,
  END OF fs.
DATA : t_itab LIKE TABLE OF fs,
       t_sbook like table of sbook.
fs-carrid = 'AA'.
append fs to t_itab.

fs-carrid = 'UA'.
append fs to t_itab.

select * from sbook into table t_sbook for all entries in t_itab
  where carrid = t_itab-carrid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 10:58:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829478#M1316364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T10:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829479#M1316365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: it_scarr TYPE TABLE OF scarr.&lt;BR /&gt;&lt;BR /&gt;"fill your internal table
SELECT * FROM scarr INTO TABLE it_scarr.

DATA: gr_carr TYPE RANGE OF scarr-carrid.

"write the column carrid of your internal table in your range&lt;BR /&gt;gr_carr = VALUE #( FOR &amp;lt;fs_scarr&amp;gt; IN it_scarr
                    (
                      sign = 'I'
                      option = 'EQ'
                      low = &amp;lt;fs_scarr&amp;gt;-carrid
                      high = ''
                     ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;regards&lt;BR /&gt;CC&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 06:50:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829479#M1316365</guid>
      <dc:creator>custandcode</dc:creator>
      <dc:date>2021-09-16T06:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Internal table to range table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829480#M1316366</link>
      <description>&lt;P&gt;Thanks for coming to SAP
Community for answers. Please post your question as a new question &lt;A href="https://answers.sap.com/questions/ask.html"&gt;here&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;Since you're
new in asking questions here, check out &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;our &lt;/A&gt;&lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;tutorial
about asking and answering questions &lt;/A&gt;(if you haven't already), as it
provides tips for preparing questions more effectively, that draw responses
from our members. &lt;/P&gt;&lt;P&gt;Please note,
that your post here won't be answered.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 06:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-internal-table-to-range-table/m-p/5829480#M1316366</guid>
      <dc:creator>former_member763929</dc:creator>
      <dc:date>2021-09-16T06:51:17Z</dc:date>
    </item>
  </channel>
</rss>

