<?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 with function modules. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163002#M1516102</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;P&gt;ACC_T_RA_DATE --&amp;gt; Ranges Table for Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use structure  VDDATE_RANGE/PLMT_AUDIT_RANGES_FOR_DATE for date range . &lt;/P&gt;&lt;P&gt;For output list of material create a Structure and Table Type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details rfer to&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6955675"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Aug 2010 10:16:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-16T10:16:53Z</dc:date>
    <item>
      <title>Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163000#M1516100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello People,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found few threads on this topic already, I tried solving with the help of those clues but in vain.&lt;/P&gt;&lt;P&gt;I want to create a function module which accepts a date range like in ACC_T_RA_DATE, and output a list of materials.&lt;/P&gt;&lt;P&gt;The list of materials correspond to the purchase orders that were created in the given date range. &lt;/P&gt;&lt;P&gt;Please kindly observe, I am not using a program to pass any value - I will be using only the function module throughout the process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice me on this.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Disha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 09:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163000#M1516100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T09:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163001#M1516101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi what is there so difficult in it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACC_T_RA_DATE is a table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare a import parameter in your fm refereing to ACC_T_RA_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:i_tab type ACC_T_RA_DATE,&lt;/P&gt;&lt;P&gt;        la_date type ACC_S_RA_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;la_date-sign = 'I'.&lt;/P&gt;&lt;P&gt;la_date-option = 'BT'  "or EQ,LE etc.&lt;/P&gt;&lt;P&gt;la_date-low = '__/__/____'/&lt;/P&gt;&lt;P&gt;la_date-high = '__/__/____/.&lt;/P&gt;&lt;P&gt;append la_date to i_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now just pass i_tab to your importng parameter of the fm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 10:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163001#M1516101</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-16T10:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163002#M1516102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;P&gt;ACC_T_RA_DATE --&amp;gt; Ranges Table for Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use structure  VDDATE_RANGE/PLMT_AUDIT_RANGES_FOR_DATE for date range . &lt;/P&gt;&lt;P&gt;For output list of material create a Structure and Table Type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details rfer to&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6955675"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 10:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163002#M1516102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T10:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163003#M1516103</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;P&gt;Thanks for the quick reply. As I have already mentioned in my post, I am not using any program to export values into Function module. The entire thing should happen with the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Disha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 10:39:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163003#M1516103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T10:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163004#M1516104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply, I did the same thing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One import variable of type ACC_T_RA_DATE. And an other table which accepts the materials into it (of type ekpo) for output. I did an inner join on ekko and ekpo and in the where condition I have aedat from the date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I wonder if I am missing  out something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Disha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 10:53:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163004#M1516104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T10:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163005#M1516105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your exact requirement, FM should look like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION z_mm_xxx.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     REFERENCE(RANGE_DATE) TYPE  ACC_T_RA_DATE
*"  EXPORTING
*"     REFERENCE(MATERIAL_LIST) TYPE  /SAPXCQM/EKPO_TAB
*"  EXCEPTIONS
*"      INVALID_DATE_RANGE
*"      NO_PURCHASE_ORDER
*"      NO_ITEM_FOUND
*"----------------------------------------------------------------------

  DATA: lv_ebeln LIKE ekko-ebeln,                           "#EC NEEDED
        lv_datum LIKE syst-datum.
  FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE acc_s_ra_date.
* Init
  REFRESH material_list.
* Check date range
  LOOP AT range_date ASSIGNING &amp;lt;fs&amp;gt;.
    lv_datum = &amp;lt;fs&amp;gt;-low.
    CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
         EXPORTING
              date                      = lv_datum
         EXCEPTIONS
              plausibility_check_failed = 1.
    IF sy-subrc NE 0.
      RAISE invalid_date_range.
    ENDIF.
    IF &amp;lt;fs&amp;gt;-option EQ 'BT'
    OR &amp;lt;fs&amp;gt;-option EQ 'NB'.
      IF &amp;lt;fs&amp;gt;-high LT &amp;lt;fs&amp;gt;-low.                           "#EC PORTABLE
        RAISE invalid_date_range.
      ENDIF.
      lv_datum = &amp;lt;fs&amp;gt;-high.
      CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
           EXPORTING
                date                      = lv_datum
           EXCEPTIONS
                plausibility_check_failed = 1.
      IF sy-subrc NE 0.
        RAISE invalid_date_range.
      ENDIF.
    ENDIF.
  ENDLOOP.
* Check existence of PO
  SELECT SINGLE ebeln INTO lv_ebeln
    FROM ekko
    WHERE aedat IN range_date.
  IF sy-subrc NE 0.
    RAISE no_purchase_order.
  ENDIF.
* Read item
  SELECT * INTO CORRESPONDING FIELDS OF TABLE material_list
    FROM ekpo
    JOIN ekko ON ekko~ebeln EQ ekpo~ebeln
    WHERE ekko~aedat IN range_date.
  IF sy-subrc NE 0.
    RAISE no_item_found.
  ENDIF.
ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 10:58:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163005#M1516105</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-08-16T10:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163006#M1516106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Disha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try with two import parameters instead one like start_date and end_date. In the select statement you can use between.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 11:59:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163006#M1516106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T11:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163007#M1516107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply create to import parameters i.e. a from and to date, plus the output table for your materials.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 12:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163007#M1516107</guid>
      <dc:creator>former_member201275</dc:creator>
      <dc:date>2010-08-16T12:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163008#M1516108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dishaa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think as per your requirement.. I have the same thinking that you create a fm with two import parameters which contains dates, i.e. From and To. and one export parameter as table from which you can get the list of materials you want from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kunal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 13:01:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163008#M1516108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-16T13:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163009#M1516109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the post and the clues. It works.&lt;/P&gt;&lt;P&gt;I created a structure type zlinetype for my output table. And yup, its all fine - I dont understand why I faced a problem earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ZMAT2.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(START) TYPE  EKKO-AEDAT&lt;/P&gt;&lt;P&gt;*"     REFERENCE(END) TYPE  EKKO-AEDAT&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      T_MAT STRUCTURE  ZLINETYPE&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT P~MATNR&lt;/P&gt;&lt;P&gt;       K~AEDAT&lt;/P&gt;&lt;P&gt;       INTO TABLE T_MAT&lt;/P&gt;&lt;P&gt;       FROM EKPO AS P&lt;/P&gt;&lt;P&gt;       INNER JOIN&lt;/P&gt;&lt;P&gt;       EKKO AS K&lt;/P&gt;&lt;P&gt;       ON P&lt;SUB&gt;EBELN = K&lt;/SUB&gt;EBELN&lt;/P&gt;&lt;P&gt;       WHERE&lt;/P&gt;&lt;P&gt;       K~AEDAT GT START&lt;/P&gt;&lt;P&gt;       AND&lt;/P&gt;&lt;P&gt;       K~AEDAT LT END.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_MAT.&lt;/P&gt;&lt;P&gt;WRITE : / T_MAT-MATNR,&lt;/P&gt;&lt;P&gt;        / T_MAT-AEDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an other doubt. Is there way a way I can get an input help for my date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Disha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 14:15:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163009#M1516109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-17T14:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163010#M1516110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WHY would you need input help on an FM parameter?  Are you trying to use a function module as a report tool?  Makes no sense...we call function modules from inside other programs!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need help on a date field, why not create a report with a selection screen and declare your input range with the appropriate DDIC reference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 17:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163010#M1516110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-17T17:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select options with function modules.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163011#M1516111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Makes sense. Was just wondering why can we not ? Anyways Thanks people for your valuable suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 17:45:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-with-function-modules/m-p/7163011#M1516111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-17T17:45:11Z</dc:date>
    </item>
  </channel>
</rss>

