<?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: Ranges in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045920#M87888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand the question, you are having trouble passing a range table into a form routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First off, a range is a table just like any other table it has a defined structure.  When you pass a table or structure into a form SAP sees is as just a long string of characters unless you tell it what fields it contains and where are their offsets.  You do this by typing the table when you pass it in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example.&lt;/P&gt;&lt;P&gt;ranges: r_order for vbak-vbeln.&lt;/P&gt;&lt;P&gt;This statement creates a range table that will contain 4 &lt;/P&gt;&lt;P&gt;sign&lt;/P&gt;&lt;P&gt;option&lt;/P&gt;&lt;P&gt;low&lt;/P&gt;&lt;P&gt;high&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sign and option contain the relationship of the values in Low and High. For example you want all records between the low and high values ( sign will be "I" and option will be "BT" (between)&lt;/P&gt;&lt;P&gt;Low and high will be of type vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to use this in a perform you must tell the perform about how your range table is structured in the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;perform some_stuff tables i_order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form some_stuff tables p_order_range structure i_order.&lt;/P&gt;&lt;P&gt;  select (some fields) from vbak into table (some table)&lt;/P&gt;&lt;P&gt;   where vbeln in p_order_range.&lt;/P&gt;&lt;P&gt;endform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2005 18:20:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-14T18:20:28Z</dc:date>
    <item>
      <title>Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045916#M87884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am trying to build either a range or an internal table for cost center and profit centers from thier groups. I have used a couple of function modules to get the setid and setvalues. I need to build the either ranges or internal tables from it. The problem is i have 4 ranges to build and i am using perform using changing. How do i pass ranges to the forms?? as setvalue-from setvalue-option setvalue-to have to be populated and i dont understand how to pass the ranges in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM BUILD_RANGE USING SETVALUES(which is a table with form to) CHANGING RANGES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BUILD_RANGE USING CHANGING ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appreciate any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 12:28:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045916#M87884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T12:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045917#M87885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. try using this simple funda :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;ranges a for pa0001-bukrs.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------" /&gt;&lt;P&gt;form abc using p like  a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In the above way, u can pass the required &lt;/P&gt;&lt;P&gt;   range in a form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&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;Amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 12:36:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045917#M87885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T12:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045918#M87886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What exactly is your question? Are you asking what will you refer the parameters of the form to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 12:41:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045918#M87886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T12:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045919#M87887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ranges range1 for pa0001-bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform build_ranges using range1[] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_ranges using p_selection type table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs&amp;gt;, &amp;lt;fs_sign&amp;gt;, &amp;lt;fs_option&amp;gt;, &amp;lt;fs_low&amp;gt;, &amp;lt;fs_high&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DO.&lt;/P&gt;&lt;P&gt;    READ TABLE p_selection INDEX sy-index ASSIGNING &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT 'SIGN' OF STRUCTURE &amp;lt;fs&amp;gt; TO &amp;lt;fs_sign&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT 'OPTION' OF STRUCTURE &amp;lt;fs&amp;gt; TO &amp;lt;fs_option&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT 'LOW' OF STRUCTURE &amp;lt;fs&amp;gt; TO &amp;lt;fs_low&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT 'HIGH' OF STRUCTURE &amp;lt;fs&amp;gt; TO &amp;lt;fs_high&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexandre Nogueira&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 12:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045919#M87887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T12:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045920#M87888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand the question, you are having trouble passing a range table into a form routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First off, a range is a table just like any other table it has a defined structure.  When you pass a table or structure into a form SAP sees is as just a long string of characters unless you tell it what fields it contains and where are their offsets.  You do this by typing the table when you pass it in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example.&lt;/P&gt;&lt;P&gt;ranges: r_order for vbak-vbeln.&lt;/P&gt;&lt;P&gt;This statement creates a range table that will contain 4 &lt;/P&gt;&lt;P&gt;sign&lt;/P&gt;&lt;P&gt;option&lt;/P&gt;&lt;P&gt;low&lt;/P&gt;&lt;P&gt;high&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sign and option contain the relationship of the values in Low and High. For example you want all records between the low and high values ( sign will be "I" and option will be "BT" (between)&lt;/P&gt;&lt;P&gt;Low and high will be of type vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to use this in a perform you must tell the perform about how your range table is structured in the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;perform some_stuff tables i_order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form some_stuff tables p_order_range structure i_order.&lt;/P&gt;&lt;P&gt;  select (some fields) from vbak into table (some table)&lt;/P&gt;&lt;P&gt;   where vbeln in p_order_range.&lt;/P&gt;&lt;P&gt;endform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 18:20:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045920#M87888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T18:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045921#M87889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry DP, I think I had a typo there  instead of passing in i_order to the perform that should have been the original range table r_order.  I hope that didnt' confuse you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 18:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045921#M87889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T18:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045922#M87890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can have 2 options in this.&lt;/P&gt;&lt;P&gt;you can use the macros and the other one as follows.&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="911938"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;FORM fill_range USING i_parameter TYPE any&lt;/P&gt;&lt;P&gt;CHANGING et_range TYPE table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS:&lt;/P&gt;&lt;P&gt;lc_sign TYPE bapisign VALUE 'I',&lt;/P&gt;&lt;P&gt;lc_option TYPE bapioption VALUE 'EQ'.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;&amp;lt;sign&amp;gt; TYPE bapisign,&lt;/P&gt;&lt;P&gt;&amp;lt;option&amp;gt; TYPE bapioption,&lt;/P&gt;&lt;P&gt;&amp;lt;low&amp;gt; TYPE ANY,&lt;/P&gt;&lt;P&gt;&amp;lt;ls_range&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;lr_range TYPE REF TO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You may want to catch exceptions starting from here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE DATA lr_range LIKE LINE OF et_range.&lt;/P&gt;&lt;P&gt;ASSIGN lr_range-&amp;gt;* TO &amp;lt;ls_range&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'SIGN' OF STRUCTURE &amp;lt;ls_range&amp;gt; TO &amp;lt;sign&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'OPTION' OF STRUCTURE &amp;lt;ls_range&amp;gt; TO &amp;lt;option&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'LOW' OF STRUCTURE &amp;lt;ls_range&amp;gt; TO &amp;lt;low&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;sign&amp;gt; = lc_sign.&lt;/P&gt;&lt;P&gt;&amp;lt;option&amp;gt; = lc_option.&lt;/P&gt;&lt;P&gt;&amp;lt;low&amp;gt; = i_parameter.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDCATCH.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND &amp;lt;ls_range&amp;gt; TO et_range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " fill_range&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming that your parameter is called p_matnr, and the range you want to fill is lr_matnr, you would call this routine as follows:&lt;/P&gt;&lt;P&gt;PERFORM fill_range&lt;/P&gt;&lt;P&gt;USING&lt;/P&gt;&lt;P&gt;p_matnr&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;lr_matnr[].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 18:24:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges/m-p/1045922#M87890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T18:24:57Z</dc:date>
    </item>
  </channel>
</rss>

