<?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 FUNCTION in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850235#M1134293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the RANGE statement, it is just like SELECT-OPTIONS, but you do not get the screen fields.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Dec 2008 15:38:02 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2008-12-05T15:38:02Z</dc:date>
    <item>
      <title>SELECT OPTIONS IN A FUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850234#M1134292</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 need to use a select options in a Function module and then i have to send the values to a Report program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850234#M1134292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T15:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT OPTIONS IN A FUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850235#M1134293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the RANGE statement, it is just like SELECT-OPTIONS, but you do not get the screen fields.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850235#M1134293</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-12-05T15:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT OPTIONS IN A FUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850236#M1134294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So for example, here you fill the range, just like it would be for a select-option, and then you may pass this range to the select-option of the submited program, here S_DATUM is a select-option in the ZREPORT report program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ranges: r_datum for sy-datum.

r_datum-sign = 'I'.
r_datum-option = 'EQ'.
r_datum-low = sy-datum.
r_datum-high = sy-datum + 7.
append r_datum.

submit zreport 
     with s_datum in r_datum
             and return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:40:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850236#M1134294</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-12-05T15:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT OPTIONS IN A FUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850237#M1134295</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;But, I need to use the select options as import parameter in the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:40:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850237#M1134295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T15:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT OPTIONS IN A FUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850238#M1134296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Refer to this function :&lt;/P&gt;&lt;P&gt;RS_REFRESH_FROM_SELECTOPTIONS , the tables parameter SELECTION_TABLE refers to structure  RSPARAMS, you can define it in the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later you can fill the ranges in your program from this table.&lt;/P&gt;&lt;P&gt;&lt;/P&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;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850238#M1134296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T15:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT OPTIONS IN A FUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850239#M1134297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so then you need to use a table type.  What is the actual field type that you want to pass as a range, is it a date?  If not, is is a character field?  what is the length?  You may be able to use an existing table table.  Otherwise, you will need to create your own "Z" table type, which will use a custom structure as well.  The structure should include the four fields.&lt;/P&gt;&lt;P&gt;&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 should be a char 1 field,  and the OPTION field should be character 2, the LOW and HIGH fields depends on what you are trying to pass.  Create this "Z" structure, then create the table type using this "Z" structure.  Then use this table type as an IMPORTING parameter of your function module(you could also use the TABLES parameter, and simply use the structure instead, but it is better to use a table type and the IMPORTING parameter).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850239#M1134297</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-12-05T15:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT OPTIONS IN A FUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850240#M1134298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is how I have done in past... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a type-group define types like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES : zmb52_tr_matnr TYPE RANGE OF mara-matnr ,
        zmb52_tr_werks TYPE RANGE OF marc-werks ,
        zmb52_tr_lgort TYPE RANGE OF mard-lgort ,
        zmb52_tr_charg TYPE RANGE OF mchb-charg ,
        zmb52_tr_mtart TYPE RANGE OF mara-mtart ,
        zmb52_tr_matkl TYPE RANGE OF mara-matkl ,
        zmb52_tr_ekgrp TYPE RANGE OF marc-ekgrp ,
        zmb52_tr_sobkz TYPE RANGE OF mkol-sobkz ,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use it in FM like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION zgetstock.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(I_SPMON) TYPE  SPMON
*"     VALUE(I_MATNR) TYPE  ZMB52_TR_MATNR OPTIONAL
*"     VALUE(I_WERKS) TYPE  ZMB52_TR_WERKS OPTIONAL
*"     VALUE(I_LGORT) TYPE  ZMB52_TR_LGORT OPTIONAL
*"     VALUE(I_CHARG) TYPE  ZMB52_TR_CHARG OPTIONAL
*"     VALUE(I_MTART) TYPE  ZMB52_TR_MTART OPTIONAL
*"     VALUE(I_MATKL) TYPE  ZMB52_TR_MATKL OPTIONAL
*"     VALUE(I_EKGRP) TYPE  ZMB52_TR_CHARG OPTIONAL
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:51:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-a-function/m-p/4850240#M1134298</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2008-12-05T15:51:34Z</dc:date>
    </item>
  </channel>
</rss>

