<?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: function module urgent in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537292#M851070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi abhishek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i agree with your second solution but for the first one . If the user selects low and high values in the selection screen but also chooses to exclude some value in that interval (using the exclude thing in select option only ) .. then in that case there would be a problem in the first solution as the range created in the fn module will have that excluded number also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second solution is better and easy one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Mar 2008 05:12:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-06T05:12:51Z</dc:date>
    <item>
      <title>function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537288#M851066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hav to make a fuction module .&lt;/P&gt;&lt;P&gt;the function module takes personnnel numbers as and give out recors of the personnel number,.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is if i have only one personnel number then i can use import parameter,&lt;/P&gt;&lt;P&gt;but here i have table for personnel number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;means i am taking the value of personnel number from selectio screen which look like this .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;personnel from  _______ to ________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my selection would be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select*...&lt;/P&gt;&lt;P&gt; where pernr in personnel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;not pernr = personnel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how can i make this function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks regrads&lt;/P&gt;&lt;P&gt;point ll be surely rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anuj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 04:46:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537288#M851066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T04:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537289#M851067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First option, you can have two personal_no in import parameter of the FM : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Personal_no_high&lt;/P&gt;&lt;P&gt;2. Personal_no_low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( when calling this FM you need to passthe high value of personal no to Personal_no_high &amp;amp; low value to Personal_no_low) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the source code of the FM, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a range from those high and low value ,And use that range in the select query. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create a range : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

ranges: r_pernr for pernr.

r_pernr-sign = 'I'.
r_pernr-option = 'EQ'.
r_pernr-high = Personal_no_high.
r_pernr-low = Personal_no_low.

append r_pernr to r_pernr. 

select * from database_table
            into table itab
            where pernr in r_pernr. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second option, Instead of Import parameter take a table for personal no and pass it through table parameter of the FM you are trying to create. And in select query use that table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( Here from calling program fetch all the personal no from the personal no base table and populated Personal_no_tab table and pass that table to your FM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Personal_no_tab[] is not initial.&lt;/P&gt;&lt;P&gt;Select * from database_table&lt;/P&gt;&lt;P&gt;                    into table itab&lt;/P&gt;&lt;P&gt;                    for all entries in  Personal_no_tab&lt;/P&gt;&lt;P&gt;                    where personal_no EG Personal_no_tab-personal_no. &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to have a table parameter which will contain personal no, you have to create a dictionary structure for the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 04:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537289#M851067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T04:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537290#M851068</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 import parameters you can use two variables,one the low value and the other for the high value of the personal number.These values can be fetched from selection screen,using select-options low and high.&lt;/P&gt;&lt;P&gt;In select statement,you can use where condition between these two values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shibin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 04:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537290#M851068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T04:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537291#M851069</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;If you want to use a table in import parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use define the structure Z_STRUCT with type declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA: itab TYPE TABLE OF Z_STRUCT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Then you can use it as TABLE TYPE for import parameter.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In source code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should start with following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF NOT itab[] is initial.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Select query from desired database table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sy-subrc check.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please reward points if its helpful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 05:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537291#M851069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T05:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537292#M851070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi abhishek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i agree with your second solution but for the first one . If the user selects low and high values in the selection screen but also chooses to exclude some value in that interval (using the exclude thing in select option only ) .. then in that case there would be a problem in the first solution as the range created in the fn module will have that excluded number also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second solution is better and easy one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 05:12:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537292#M851070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T05:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537293#M851071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi thanks for ur reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how i can use the value of a selection screen to my  function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anuj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 08:06:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537293#M851071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T08:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537294#M851072</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;When personnel number has been used as selection options then ranges declaration is not needed, instead you can pass as a TABLES in FM parameters. If a user enters any number without sequence then also it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will clear your issue for point one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 08:16:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537294#M851072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T08:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537295#M851073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since select-option is can not be a element of functional modules, in that case you also have to pass the exclude elements seperately,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
In such case you can add two parameters in FM like,

3. person_no_exclude_high
4. person_no_exclude_low

and add another row for the exclude personal no like follows: 

ranges: r_pernr for pernr.
 
r_pernr-sign = 'I'.
r_pernr-option = 'EQ'.
r_pernr-high = Personal_no_high.
r_pernr-low = Personal_no_low.
 
append r_pernr to r_pernr. 

r_pernr-sign = 'E'.
r_pernr-option = 'EQ'.
r_pernr-high = person_no_exclude_high.
r_pernr-low = person_no_exclude_low.

append r_pernr to r_pernr. 
 
select * from database_table
            into table itab
            where pernr in r_pernr. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 10:03:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537295#M851073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T10:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: function module urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537296#M851074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See you can not have a selection option or ramge in a import parameter of a function module. What you can do is to pass each element of the select option seperately and in FM you can create a range using those values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only single value, structure and tables are possible to pass to FM. Now you can also create a range table and add it to table parameter of the FM and pass the select-option through the table parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 10:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3537296#M851074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T10:07:41Z</dc:date>
    </item>
  </channel>
</rss>

