<?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 option in function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110927#M1185656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, Ali.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just Copy and Past all your Program. With Out Selection Screen Components like Parameters and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; Select-options in the Source Code Tab of FM window.&lt;/P&gt;&lt;P&gt;--&amp;gt; Than copy past all the name of you select option in the u201CTablesu201D tab in Parameter Name Colum &lt;/P&gt;&lt;P&gt;--&amp;gt; And Past all the Parameters in the Import Tab.&lt;/P&gt;&lt;P&gt;--&amp;gt; At last you have to Create a Structure and Table Type if you want to get an internal Table from your FM.&lt;/P&gt;&lt;P&gt;--&amp;gt; For Structure and Table Type Creation you can use SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do this and tell me where you are facing problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wating for you Reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Feb 2009 11:16:48 GMT</pubDate>
    <dc:creator>faisalatsap</dc:creator>
    <dc:date>2009-02-02T11:16:48Z</dc:date>
    <item>
      <title>select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110917#M1185646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;select-options: s_date for oijne-astdtt. in my screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to put my code in a function module, but as known that the s_date structure is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_date-low &lt;/P&gt;&lt;P&gt;s_date-high&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also in select statment,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select nomtk into table int_fnomtk from oijne where astdtf in s_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to pass the s_date value to the where condition in the select statment.&lt;/P&gt;&lt;P&gt;how i can u solve this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:04:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110917#M1185646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T07:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110918#M1185647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this structure as your import parameter:&lt;/P&gt;&lt;P&gt;RSDSSELOPT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110918#M1185647</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-02-02T07:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110919#M1185648</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 Tables Tab define s_date with out giving any Typeing or Associated Type and while calling function pass Select-Option ore Range and you can also use this u2018S_dateu201D just like you did in excitable Program using IN .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope will solve out your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:16:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110919#M1185648</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-02-02T07:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110920#M1185649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wat u can do is to create a structure for the range or use existing strucrure....&lt;/P&gt;&lt;P&gt;refer structure: VDDATE_RANGE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:16:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110920#M1185649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T07:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110921#M1185650</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;Say if you have two import parameters in your FM for 'date_low' and 'date_high', then this code works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF ITAB OCCURS 0.
       INCLUDE STRUCTURE MARA.
 DATA: END OF ITAB.       
  
  RANGES: ERSDA1 FOR MARA-ERSDA.

  ERSDA1-LOW = ERSDA_LOW.
  ERSDA1-HIGH = ERSDA_HIGH.
  ERSDA1-SIGN = 'I'.
  ERSDA1-OPTION = 'BT'.
  APPEND ERSDA1.
 
  SELECT * FROM MARA
             INTO TABLE ITAB
             WHERE MATNR IN MATNR1.

LOOP AT ITAB.
WRITE:/ ITAB-MATNR, ITAB-ERSDA.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:20:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110921#M1185650</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-02-02T07:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110922#M1185651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Ali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use these Structures as given by Micky and TT RSDSSELOPT , VDDATE_RANGE,&lt;/P&gt;&lt;P&gt;But in Future if you need to use u201CFOR ALL ENTRIES INu201D than you again have to change this with no Structure type Because in this way you can send any type of Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Guide us in this way, Micky and TT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110922#M1185651</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-02-02T07:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110923#M1185652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Check this table type: PLMT_AUDIT_RANGES_FOR_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select-options: s_date for oijne-astdtt. in my screen.

data:  wa_data type PLMT_AUDIT_RANGES_FOR_DATE_WA.

wa_data-sign = ' I '. " (I or E based on req.)
wa_data-option = 'EQ'. (EQ or BT or Gt or GE or LE  etc. based on the req.)
wa_data-low = s_date-low .
wa_data-high = s_date-high.

Now you can pass the value wa_data as the function module input parameter.
Inside Function Module:
data: x_date type PLMT_AUDIT_RANGES_FOR_DATE.

append wa_data to x_date.

select nomtk into table int_fnomtk from oijne where astdtf in x_date.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this wil help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swarna Munukoti.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110923#M1185652</guid>
      <dc:creator>former_member217544</dc:creator>
      <dc:date>2009-02-02T07:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110924#M1185653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use ranges,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly go through the sample code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGES : r_afaber FOR anlp-afaber, " for depreciation area&lt;/P&gt;&lt;P&gt;         r_peraf FOR anlp-peraf.   " for depreciation period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         INITIALIZATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         TO INITIALIZE ALL THE VARIABLES TO BE USED&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         IN THE PROGRAM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;  r_afaber-sign = 'I'.        " for inclusive&lt;/P&gt;&lt;P&gt;  r_afaber-option = 'EQ'.     " for equal operator&lt;/P&gt;&lt;P&gt;  r_afaber-low = c_afaber_01. " depreciation area(low value)&lt;/P&gt;&lt;P&gt;  APPEND r_afaber.            " append values for depreciation area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  r_afaber-sign = 'I'.        " for inclusive&lt;/P&gt;&lt;P&gt;  r_afaber-option = 'EQ'.     " for equal operator&lt;/P&gt;&lt;P&gt;  r_afaber-low = c_afaber_07. " depreciation area(low value)&lt;/P&gt;&lt;P&gt;  APPEND r_afaber.            " append values for depreciation area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  r_peraf-sign = 'I'.         " for inclusive&lt;/P&gt;&lt;P&gt;  r_peraf-option = 'BT'.      " for between operator&lt;/P&gt;&lt;P&gt;  r_peraf-low = c_peraf_001.  " depreciation period(low value)&lt;/P&gt;&lt;P&gt;  r_peraf-high = c_peraf_012. " depreciation period(high value)&lt;/P&gt;&lt;P&gt;  APPEND r_peraf.             " append values for depreciation period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 07:39:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110924#M1185653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T07:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110925#M1185654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to explain my Case to be clear for every body,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now i have selection screen and complete code that generate a report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new idea is to run the report logic inside FM and remove selection-option not needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not like to change the logic too much, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let say i have this selection screen &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: s_date for oijne-astdtt,&lt;/P&gt;&lt;P&gt;                      s_soldto for oijnomi-soldto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I have this Query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM OIJNE WHERE DATE IN  S_DATE and old in s_soldto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q1. How I can define imports parameter for S_DATE, and used them in Query instead of S_DATE.&lt;/P&gt;&lt;P&gt;Q2. In case of remove the selection option s_soldto, what i should put instead of .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 10:54:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110925#M1185654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T10:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110926#M1185655</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;You can define a range table as an import parameter for this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
I_R_DATE TYPE ACC_T_RA_DATE
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACC_T_RA_DATE --&amp;gt; Ranges Table for Date&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;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 11:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110926#M1185655</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-02-02T11:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110927#M1185656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, Ali.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just Copy and Past all your Program. With Out Selection Screen Components like Parameters and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; Select-options in the Source Code Tab of FM window.&lt;/P&gt;&lt;P&gt;--&amp;gt; Than copy past all the name of you select option in the u201CTablesu201D tab in Parameter Name Colum &lt;/P&gt;&lt;P&gt;--&amp;gt; And Past all the Parameters in the Import Tab.&lt;/P&gt;&lt;P&gt;--&amp;gt; At last you have to Create a Structure and Table Type if you want to get an internal Table from your FM.&lt;/P&gt;&lt;P&gt;--&amp;gt; For Structure and Table Type Creation you can use SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do this and tell me where you are facing problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wating for you Reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 11:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110927#M1185656</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-02-02T11:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110928#M1185657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi  Suhas Saha    	 ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u please be more clear about your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still i can not get u.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 11:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110928#M1185657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T11:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110929#M1185658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can do like this also&lt;/P&gt;&lt;P&gt;declare s_date as from_date and to_date in import parameter of FM&lt;/P&gt;&lt;P&gt;and use like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from onije where assdt  between from_date and to_date.&lt;/P&gt;&lt;P&gt;it wil work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Azhar on Feb 2, 2009 5:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 11:43:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110929#M1185658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T11:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110930#M1185659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;gt; The new idea is to run the report logic inside FM and remove selection-option not needed.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I do not like to change the logic too much, &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Let say i have this selection screen &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; select-options: s_date for oijne-astdtt,&lt;/P&gt;&lt;P&gt;&amp;gt;                       s_soldto for oijnomi-soldto&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Also I have this Query.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; SELECT * FROM OIJNE WHERE DATE IN  S_DATE and old in s_soldto.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Q1. How I can define imports parameter for S_DATE, and used them in Query instead of S_DATE.&lt;/P&gt;&lt;P&gt;&amp;gt; Q2. In case of remove the selection option s_soldto, what i should put instead of .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you have to use the SELECT-OPTIONS of the report in the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i suggested was create an import param to the FM as a date range, so that you can have this as your input &amp;amp; use for the select as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if i am wrong in understanding your requirement !!! &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>Mon, 02 Feb 2009 11:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110930#M1185659</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-02-02T11:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110931#M1185660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ali.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use the structure for the Range, here is piece of example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION Z_DATE.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(DATE) LIKE  ACC_S_RA_DATE STRUCTURE  ACC_S_RA_DATE
*"  TABLES
*"      RESULT STRUCTURE  MARA
*"----------------------------------------------------------------------

DATA: BEGIN OF ITAB OCCURS 0.
        INCLUDE STRUCTURE MARA.
DATA:  END OF ITAB.

 RANGES: ERSDA1 FOR MARA-ERSDA.

  ERSDA1-LOW = date-LOW.
  ERSDA1-HIGH = date-HIGH.
  ERSDA1-SIGN = date-SIGN.
  ERSDA1-OPTION = date-OPTION.
  APPEND ERSDA1.

  SELECT * FROM MARA
             INTO TABLE ITAB
             WHERE ERSDA IN ERSDA1.

LOOP AT ITAB.
MOVE ITAB TO RESULT.
APPEND RESULT.
ENDLOOP.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the values for date-low and date-high in 'Char' format.&lt;/P&gt;&lt;P&gt;Check if it works for ur case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks\&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 11:51:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110931#M1185660</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-02-02T11:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110932#M1185661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Ali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the Calling Program whic call a FM and Pass a Select-Option and Get a Internal Table from the Funtion with the name of the EMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling Program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT test_fm.
TABLES: pa0001.

DATA: it_pa0001 TYPE zfsl_test_tt WITH HEADER LINE.

SELECT-OPTIONS sopernr FOR pa0001-pernr.

CALL FUNCTION 'ZFSL_TEST'
  TABLES
    pernr_range = sopernr
  CHANGING
    itab        = it_pa0001[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION zfsl_test.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      PERNR_RANGE
*"  CHANGING
*"     REFERENCE(ITAB) TYPE  ZFSL_TEST_TT
*"----------------------------------------------------------------------

DATA: it_pa0001 TYPE zfsl_test_tt WITH HEADER LINE.

SELECT pernr ename FROM pa0001
  INTO CORRESPONDING FIELDS OF TABLE it_pa0001
  WHERE endda = '99991231'
    AND pernr IN pernr_range.

itab = it_pa0001[].

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope above will solve out your problem,&lt;/P&gt;&lt;P&gt;Please Reply if any Issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 12:09:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110932#M1185661</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-02-02T12:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110933#M1185662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Faisal Altaf  ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your solution more suitable for my case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my old report i used subroutines, Where i should write those in FM, and where i should call them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 12:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110933#M1185662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T12:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110934#M1185663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you said that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;--&amp;gt; Select-options in the Source Code Tab of FM window.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain more about this step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard,&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 04:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110934#M1185663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T04:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110935#M1185664</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;PRE&gt;&lt;CODE&gt;*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES                                  ' Here in the Tables' Tab you can give the name of your select Option and use it in you code area as IN.
*"      PERNR_RANGE
*"  CHANGING
*"     REFERENCE(ITAB) TYPE  ZFSL_TEST_TT
*"----------------------------------------------------------------------&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply if not clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 04:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110935#M1185664</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-02-03T04:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: select option in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110936#M1185665</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 think what i had suggested yesterday fits your requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: bkpf.

DATA: it_bkpf TYPE STANDARD TABLE OF bkpf.

SELECT-OPTIONS:
s_bukrs FOR bkpf-bukrs,
s_budat FOR bkpf-budat.

START-OF-SELECTION.

* Get BKPF data
  CALL FUNCTION 'Z_GET_BKPF'
    EXPORTING
      i_r_bukrs     = s_bukrs
      i_r_date      = s_bukrs
    TABLES
      e_tab         = it_bkpf
    EXCEPTIONS
      no_data_found = 1
      OTHERS        = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code for the FM 'Z_GET_BKPF' is as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION Z_GET_BKPF .
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(I_R_BUKRS) TYPE  FAGL_RANGE_T_BUKRS
*"     REFERENCE(I_R_DATE) TYPE  ACC_T_RA_DATE
*"  TABLES
*"      E_TAB STRUCTURE  BKPF
*"  EXCEPTIONS
*"      NO_DATA_FOUND
*"----------------------------------------------------------------------

  SELECT *
  FROM bkpf
  INTO TABLE e_tab
  WHERE bukrs IN i_r_bukrs
  AND   budat IN i_r_date.

  IF sy-subrc NE 0.
    RAISE no_data_found.
  ENDIF.


ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will be of some help.&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, 03 Feb 2009 05:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-function-module/m-p/5110936#M1185665</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-02-03T05:09:12Z</dc:date>
    </item>
  </channel>
</rss>

