<?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: select options in a method as parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965258#M1603269</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 your Method parameters declare only parameter of that type instead of range parameters ., and in method source code you append it to range. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date type  ISH_ANFDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in source code:&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;RT_RANGES_FDT TYPE RANGE OF ISH_ANFDT,&lt;/P&gt;&lt;P&gt;RS_RANGES_FDT LIKE LINE OF RT_RANGES_FDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if date is not initial.&lt;/P&gt;&lt;P&gt;    RS_RANGES_FDT-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;    RS_RANGES_FDT-LOW    = date.&lt;/P&gt;&lt;P&gt;    RS_RANGES_FDT-SIGN   = 'I'.&lt;/P&gt;&lt;P&gt;    APPEND RS_RANGES_FDT TO RT_RANGES_FDT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps u.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jul 2011 07:41:52 GMT</pubDate>
    <dc:creator>Kiran_Valluru</dc:creator>
    <dc:date>2011-07-05T07:41:52Z</dc:date>
    <item>
      <title>select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965255#M1603266</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;how do i specify a table defined in a select option as a range table as input parameter for a method? I can use any table, but thats something i dont want to do in this case.,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 07:30:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965255#M1603266</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2011-07-05T07:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965256#M1603267</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 am little confused with the question &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the select option content hold the table name ? Possibilities of multiple entries in select option ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please make it clear:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 07:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965256#M1603267</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-07-05T07:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965257#M1603268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;select-options selcrit for....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this creates an internal table selcrit with header line as a global range table . I would lioke to handle that table selcrit in a method, but i dont know how to specify it as an input parameter. Which type do i have to enter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 07:39:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965257#M1603268</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2011-07-05T07:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965258#M1603269</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 your Method parameters declare only parameter of that type instead of range parameters ., and in method source code you append it to range. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date type  ISH_ANFDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in source code:&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;RT_RANGES_FDT TYPE RANGE OF ISH_ANFDT,&lt;/P&gt;&lt;P&gt;RS_RANGES_FDT LIKE LINE OF RT_RANGES_FDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if date is not initial.&lt;/P&gt;&lt;P&gt;    RS_RANGES_FDT-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;    RS_RANGES_FDT-LOW    = date.&lt;/P&gt;&lt;P&gt;    RS_RANGES_FDT-SIGN   = 'I'.&lt;/P&gt;&lt;P&gt;    APPEND RS_RANGES_FDT TO RT_RANGES_FDT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps u.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 07:41:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965258#M1603269</guid>
      <dc:creator>Kiran_Valluru</dc:creator>
      <dc:date>2011-07-05T07:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965259#M1603270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to hand ove the &lt;STRONG&gt;complete selcrit table&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 08:01:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965259#M1603270</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2011-07-05T08:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965260#M1603271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rainer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First-of-all i'm lil' bit surprised that y.o.u are asking this qn &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway back to your qn:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select-options s_bukrs for t001-bukrs&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your class define a pvt. type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES grt_burks TYPE RANGE OF bukrs&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; and use define your i/p param as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IP_BUKRS TYPE grt_bukrs&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your method call you can pass the select-option as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IP_BUKRS = S_BUKRS[] "Remeber the square brackets&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 08:02:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965260#M1603271</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-07-05T08:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965261#M1603272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rainer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is an example of what you are trying to achieve, update the post if you have any specific question after going through the below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*----------------------------------------------------------------------*
*       CLASS lcl_some_class DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*

CLASS lcl_some_class DEFINITION.
  PUBLIC SECTION.
    METHODS some_method IMPORTING lt_tab TYPE STANDARD TABLE.
ENDCLASS. "lcl_some_class DEFINITION

*----------------------------------------------------------------------*
*       CLASS lcl_some_class IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_some_class IMPLEMENTATION.

  METHOD some_method.

    IF sy-subrc EQ 0.

    ENDIF.
  ENDMETHOD. "some_method

ENDCLASS. "lcl_some_class IMPLEMENTATION


data: l_data TYPE TABNAME30,
      lt_tab1 TYPE STANDARD TABLE OF selopttab.

SELECT-OPTIONS l_tab FOR l_data.

START-OF-SELECTION.

  DATA: lcl_class TYPE REF TO lcl_some_class.

  CREATE OBJECT lcl_class.

  LOOP AT l_tab.
    APPEND l_tab to lt_tab1.
  ENDLOOP.

  CALL METHOD lcl_class-&amp;gt;some_method EXPORTING lt_tab = lt_tab1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 08:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965261#M1603272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-05T08:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965262#M1603273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I implemented following solution when I used Local class within an ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call the function module RS_REFRESH_FROM_SELECTOPTIONS in the constructor method of the class.  Whenever the instance of class is created the above function module will return the selection screen components (including the values in select-options).  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the wiki post [ABAP Objects - Accessing selection screen components in Local Class|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=235963596] for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 08:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965262#M1603273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-05T08:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965263#M1603274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good idea &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suhas I thought that OP wanted to pass multiple select options ( dynamically ) with one parameter in the method. You solution will work for only one. Vinod's idea sounds good . Not sure !! Is it not possible by passing the reference and dereferencing it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Didn't look at the editor for last 2 months &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;  ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 08:30:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965263#M1603274</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-07-05T08:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965264#M1603275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Suhas I thought that OP wanted to pass multiple select-option ( dynamically ) with one parameter in the method&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case create a data reference parameter &amp;amp; pass the select-option reference to the param:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ip_selcrit TYPE REF TO data&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the calling program get the reference of select-option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gd_selcrit TYPE REF TO data.
GET REFERENCE OF selcrit INTO gd_selcrit&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &amp;amp; in the method call pass the data ref. &lt;EM&gt;gd_selcrit&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 08:45:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965264#M1603275</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-07-05T08:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965265#M1603276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes !! This is what i meant &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keshav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 08:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965265#M1603276</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-07-05T08:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: select options in a method as parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965266#M1603277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thks guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried now with type standard table and got a type mismatch error. I forgot that select-options tables do have a header line and selcrit only passes the header line which is of course incompatible with tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a while i recognized that i had to use selcrit[]. Grmpf. I hate tables with header lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the method i'm now checking if it is a table, has 4 columns, every column has the correct values and if the test passes with ok, i have a correct range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did i mention already that i really hate header lines?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that i'm creating a dynamic field structure, assigning that to a field_symbol (did i mention that i hate header lines) and looping thru the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, thanks everybody for giving me hints on how to solve that. It wasnt just that easy as in my first thoughts (comparing to a simple perform its a lot more coding). I hate performs as well as header lines. Guess i mentioned that already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was a nice practise dealing with dynamic data structures.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 10:05:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-method-as-parameter/m-p/7965266#M1603277</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2011-07-05T10:05:42Z</dc:date>
    </item>
  </channel>
</rss>

