<?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: Abap Method declare importing parameter TYPE RANGE OF in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252853#M1986384</link>
    <description>&lt;P&gt;As proposed by the author of the question + embedding the code in the one proposed by Jörg Krause:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class app definition.
  public section.
    TYPES T_SO_KUNNR TYPE RANGE OF KNA1-KUNNR.
    methods main
      importing customer_range type T_SO_KUNN.
endclass.

class app implementation.
  method main.
    select * from kna1 
      where kunnr in @customer_range
      into table @data(result).
  endmethod.
endclass.

select-options s_kunnr for kna1-kunnr.
start-of-selection.
  new app( )-&amp;gt;main( s_kunnr[] ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 06 Aug 2020 14:44:50 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-08-06T14:44:50Z</dc:date>
    <item>
      <title>Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252846#M1986377</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;
  &lt;P&gt;i want to pass a SELECT-OPTIONS to a method.&lt;/P&gt;
  &lt;P&gt;Is there a way to declare the method parameter as something like TYPE RANGE OF KNA1-KUNNR&lt;/P&gt;
  &lt;P&gt;Thanks in advance!&lt;/P&gt;
  &lt;P&gt;EDIT:&lt;BR /&gt;I found a workaround:&lt;/P&gt;
  &lt;P&gt;TYPES T_SO_KUNNR TYPE RANGE OF KNA1-KUNNR.&lt;/P&gt;
  &lt;P&gt;IMPORTING SO_KUNNR TYPE T_SO_KUNNR&lt;/P&gt;
  &lt;P&gt;Is there a more elegant solution?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 12:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252846#M1986377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-05T12:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252847#M1986378</link>
      <description>&lt;P&gt;Hello  Former Member &lt;/P&gt;&lt;P&gt;Create a range structure type, then a range table type in your class and use this type as a type of your method's parameter. For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES:
  BEGIN OF ygs_range,
    sign TYPE sign,
    option TYPE option,
    low TYPE kunnr,
    high TYPE kunnr,
  END OF ygs_range,
  ygt_range TYPE TABLE OF ygs_range.


" use YGT_RANGE in you method's parameters
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;
Kind regards,&lt;/P&gt;&lt;P&gt;Mateusz&lt;/P&gt;&lt;P&gt;Edit: or you could use a range table type defined in ABAP dictionary, if you find it.&lt;/P&gt;&lt;P&gt;Edit2: you can later provide your select-options value as shown below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lo_object-&amp;gt;my_method( it_range = sel_opt[] ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Aug 2020 12:45:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252847#M1986378</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-08-05T12:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252848#M1986379</link>
      <description>&lt;P&gt;Please move out your "workaround" (solution in fact) to an answer so that people can vote for it.&lt;/P&gt;&lt;P&gt;Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 13:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252848#M1986379</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-05T13:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252849#M1986380</link>
      <description>&lt;P&gt;Note, in my old 46C system, range type exist for customer : &lt;/P&gt;&lt;P&gt;SHP_KUNNR_RANGE_T for table and SHP_KUNNR_RANGE for line type.&lt;BR /&gt;&lt;BR /&gt;Perhaps it exist also for Kevin...&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 14:22:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252849#M1986380</guid>
      <dc:creator>stanislaslemaire</dc:creator>
      <dc:date>2020-08-05T14:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252850#M1986381</link>
      <description>&lt;P&gt;SHP_KUNNR_RANGE_T is on my 750 system as well. &lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 14:48:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252850#M1986381</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-08-05T14:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252851#M1986382</link>
      <description>&lt;P&gt;This may be a *bit* dirty, but in some cases, I find it tolerable to declare the parameter in your method as a generic standard table. As long as you use the select option for selecting (and you do not have to access the columns SIGN, OPTION, LOW, HIGH directly), this seems a simple and very slim solution to me.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select-options s_kunnr for kunnr.

class app definition.
  public section.
    methods main
      importing customer_range type standard table.
endclass.

class app implementation.
  method main.
    select * from kna1 
      where kunnr in @customer_range
      into table @data(result).
  endmethod.
endclass.

start-of-selection.
  new app( )-&amp;gt;main( s_kunnr[] ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Aug 2020 12:12:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252851#M1986382</guid>
      <dc:creator>jrgkraus</dc:creator>
      <dc:date>2020-08-06T12:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252852#M1986383</link>
      <description>&lt;P&gt;I must say that I also do this, for the sake of readability that 8-char restricted PARAMETER/SELECT-OPTIONS can't provide (as your snippet demonstrates).&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 13:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252852#M1986383</guid>
      <dc:creator>thalesvb</dc:creator>
      <dc:date>2020-08-06T13:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252853#M1986384</link>
      <description>&lt;P&gt;As proposed by the author of the question + embedding the code in the one proposed by Jörg Krause:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class app definition.
  public section.
    TYPES T_SO_KUNNR TYPE RANGE OF KNA1-KUNNR.
    methods main
      importing customer_range type T_SO_KUNN.
endclass.

class app implementation.
  method main.
    select * from kna1 
      where kunnr in @customer_range
      into table @data(result).
  endmethod.
endclass.

select-options s_kunnr for kna1-kunnr.
start-of-selection.
  new app( )-&amp;gt;main( s_kunnr[] ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Aug 2020 14:44:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252853#M1986384</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-06T14:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252854#M1986385</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;  i can't seem to edit my question anymore, i only see the options "See Revisions", "Redirect" and "Close"&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 06:38:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252854#M1986385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-07T06:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Abap Method declare importing parameter TYPE RANGE OF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252855#M1986386</link>
      <description>&lt;P&gt;You're right. It's too late to edit your question after someone has posted an answer. Anyway, you might post an answer with your solution. But in fact, I did it yesterday for you.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 07:20:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-method-declare-importing-parameter-type-range-of/m-p/12252855#M1986386</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-07T07:20:11Z</dc:date>
    </item>
  </channel>
</rss>

