<?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 function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573796#M259064</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;You can define your TABLE parameter WERK without reference and define a range in your fm:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_PROVA_PROVA.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interfaccia locale:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(MATNR) TYPE  MATNR&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      SEL_WERKS&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  RANGES R_WERKS FOR MARD-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  R_WERKS[] = SEL_WERKS[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF IMARD1 OCCURS 0,&lt;/P&gt;&lt;P&gt;           LGORT LIKE MARD-LGORT,&lt;/P&gt;&lt;P&gt;           LABST LIKE MARD-LABST,&lt;/P&gt;&lt;P&gt;        END   OF IMARD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT LGORT LABST FROM MARD  INTO TABLE IMARD1&lt;/P&gt;&lt;P&gt;  WHERE WERKS IN R_WERKS&lt;/P&gt;&lt;P&gt;  AND MATNR = MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2006 06:58:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-26T06:58:34Z</dc:date>
    <item>
      <title>select options in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573790#M259058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends, pls help me reg my query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have wERKS select-options&lt;/P&gt;&lt;P&gt;on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This same thing, i want to pass in FM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. So in FM, I have used the&lt;/P&gt;&lt;P&gt;TABLES parameter (Not import, nor export)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. And the type given is&lt;/P&gt;&lt;P&gt;WERKS_RANG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i defined it like&lt;/P&gt;&lt;P&gt;plant type WERKS_RANG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This WERKS_RANG has 4 fields,&lt;/P&gt;&lt;P&gt;just like a select option&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;&lt;/P&gt;&lt;P&gt;4. Then inside fm,&lt;/P&gt;&lt;P&gt;i used SELECT Query,&lt;/P&gt;&lt;P&gt;and use IN WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is my code in FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lgort labst&lt;/P&gt;&lt;P&gt;from mard&lt;/P&gt;&lt;P&gt;into table imard1&lt;/P&gt;&lt;P&gt;where PLANT in werks&lt;/P&gt;&lt;P&gt;and material1 = matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i am getting an error "field plant is unknown". i have defined it under tables parameter..pls help&lt;/P&gt;&lt;P&gt;how shud i get the values i enter in select option for main program in se38 to function module field 'plant'...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 04:51:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573790#M259058</guid>
      <dc:creator>abdulazeez12</dc:creator>
      <dc:date>2006-09-26T04:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: select options in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573791#M259059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the FM declare a tables parameter of the type SELOPT.This is the generic select option SAP structure.Just fill this tables from your se38 program and you will have the plant values in your FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 04:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573791#M259059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T04:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: select options in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573792#M259060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in ur select statement plant is referring to table mard , so does plant exists in mard table , it should be werks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select lgort labst
from mard
into table imard1
where &amp;lt;b&amp;gt;WERKS&amp;lt;/b&amp;gt; in werks
and material1 = matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 04:57:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573792#M259060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T04:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: select options in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573793#M259061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Other option is like the way SAP implemented in Function Module RV_DISPATCH_DUE_DATE_SEL_RANGE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hope this helps..&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Murali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 05:06:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573793#M259061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T05:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: select options in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573794#M259062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;do one thing,&lt;/P&gt;&lt;P&gt;the type you declared in the tables is the wrong one.&lt;/P&gt;&lt;P&gt;it need to be changed to selopt and then in debuggin see whether the data is conming into the werks.&lt;/P&gt;&lt;P&gt;and see that tables declaration is done in your report.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 05:11:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573794#M259062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T05:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: select options in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573795#M259063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can any one send me code for this, i have been trying but it is not working...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 06:52:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573795#M259063</guid>
      <dc:creator>abdulazeez12</dc:creator>
      <dc:date>2006-09-26T06:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: select options in function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573796#M259064</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;You can define your TABLE parameter WERK without reference and define a range in your fm:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_PROVA_PROVA.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interfaccia locale:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(MATNR) TYPE  MATNR&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      SEL_WERKS&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  RANGES R_WERKS FOR MARD-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  R_WERKS[] = SEL_WERKS[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF IMARD1 OCCURS 0,&lt;/P&gt;&lt;P&gt;           LGORT LIKE MARD-LGORT,&lt;/P&gt;&lt;P&gt;           LABST LIKE MARD-LABST,&lt;/P&gt;&lt;P&gt;        END   OF IMARD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT LGORT LABST FROM MARD  INTO TABLE IMARD1&lt;/P&gt;&lt;P&gt;  WHERE WERKS IN R_WERKS&lt;/P&gt;&lt;P&gt;  AND MATNR = MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 06:58:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-in-function-module/m-p/1573796#M259064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T06:58:34Z</dc:date>
    </item>
  </channel>
</rss>

