<?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 Function Module - return a list of values? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726316#M316585</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 have a requirement and I am not sure If I can do this using a function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll import a single value and do a lookup on a table for all the records that match this. Then I'll need to export this list of values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be done? thanks a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can send me an example, I'll appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Nov 2006 16:41:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-15T16:41:01Z</dc:date>
    <item>
      <title>Function Module - return a list of values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726316#M316585</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 have a requirement and I am not sure If I can do this using a function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll import a single value and do a lookup on a table for all the records that match this. Then I'll need to export this list of values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be done? thanks a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can send me an example, I'll appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 16:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726316#M316585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T16:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module - return a list of values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726317#M316586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course you can do that.&lt;/P&gt;&lt;P&gt;Have a IMPORT variable and have internal table in the TABLES parameter that would refer to one of the data dictionary strucutres.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM TAB INTO ITAB WHERE COLUMN = IMPORTED VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the simplest way of doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note  Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 16:44:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726317#M316586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T16:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module - return a list of values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726318#M316587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Gova,&lt;/P&gt;&lt;P&gt; First check for the values whether there exists any match in the database at at selection screen event.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
at selection-screen.
select * from Table where &amp;lt;Conditions&amp;gt;.
if sy-subrc &amp;lt;&amp;gt; 0.
  message e000 with 'No records Found'.
endif.
 

Start-of-selection.

perform get_data.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 16:58:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726318#M316587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T16:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module - return a list of values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726319#M316588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks. But how do I export that Internal table? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have to do that, my export parameter should be of type table. how do I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 16:59:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726319#M316588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T16:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module - return a list of values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726320#M316589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are working with the latest version then TABLES parameter is obsolete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that create a TABLE TYPE and use that to refer for the parameter in the EXPORT section of the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its custom structure, then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a structure in SE11,&lt;/P&gt;&lt;P&gt;2. Create a table type referrting to strcture above, in SE11&lt;/P&gt;&lt;P&gt;3. Use the table type to refer in the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a table type using DATA TYPE option of SE11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note - Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 17:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-return-a-list-of-values/m-p/1726320#M316589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T17:02:22Z</dc:date>
    </item>
  </channel>
</rss>

