<?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/3065945#M726520</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.But what is the reason for this.Because if i run a report with the same statement it works.But why is not working in a fm.If I am not entereing any value for Plant,Alt or date why it is not getting the data where it is supposed to get the entire data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2007 16:22:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-28T16:22:37Z</dc:date>
    <item>
      <title>Function module - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065941#M726516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a statement as below in one function module :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT a~matnr&lt;/P&gt;&lt;P&gt;        INTO TABLE t_mast&lt;/P&gt;&lt;P&gt;        FROM mast AS a&lt;/P&gt;&lt;P&gt;       INNER JOIN stko AS k&lt;/P&gt;&lt;P&gt;          ON a&lt;SUB&gt;stlnr EQ k&lt;/SUB&gt;stlnr&lt;/P&gt;&lt;P&gt;         AND a&lt;SUB&gt;stlal EQ k&lt;/SUB&gt;stlal&lt;/P&gt;&lt;P&gt;       WHERE a~werks eq plant&lt;/P&gt;&lt;P&gt;         AND a~stlal eq alt&lt;/P&gt;&lt;P&gt;         AND k~datuv EQ date .&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;Import parameters are : Plant , Alt and Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the problem is while I am executing the f/m it is giving the correct values only if input all the input parameters Plant,Alt and Date.If I give Plant and Alt as blank then it is not giving any values from the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please telme the resolution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:09:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065941#M726516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:09:25Z</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/3065942#M726517</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;Check before the select if plant or alt or date is initial and then put in where clause only the informed parameters.&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;Mireia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065942#M726517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:13:35Z</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/3065943#M726518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can overcome from this problem by using the RANGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ranges: r_alt for mast-stlal,
        r_date for stko-datuv,
        r_plant for mast-werks.
        
if not alt is initial.        
r_alt-sign = 'I'.
r_alt-option = 'EQ'.
r_alt-low = alt.
append r_alt.        
endif.

if not date is initial.        
r_date-sign = 'I'.
r_date-option = 'EQ'.
r_date-low = date.
append r_date.        
endif.

if not plant is initial.        
r_plant-sign = 'I'.
r_plant-option = 'EQ'.
r_plant-low = plant.
append r_plant.
endif.

SELECT a~matnr
INTO TABLE t_mast
FROM mast AS a
INNER JOIN stko AS k
ON a~stlnr EQ k~stlnr
AND a~stlal EQ k~stlal
WHERE a~werks in r_plant
AND a~stlal in r_alt
AND k~datuv in r_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065943#M726518</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-28T16:14:42Z</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/3065944#M726519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change your code to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT a~matnr
INTO TABLE t_mast
FROM mast AS a
INNER JOIN stko AS k
ON a~stlnr EQ k~stlnr
AND a~stlal EQ k~stlal
WHERE a~werks IN plant     "Here
AND a~stlal IN alt     "Here
AND k~datuv IN date .     "Here
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aneesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:15:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065944#M726519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:15:53Z</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/3065945#M726520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.But what is the reason for this.Because if i run a report with the same statement it works.But why is not working in a fm.If I am not entereing any value for Plant,Alt or date why it is not getting the data where it is supposed to get the entire data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:22:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065945#M726520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:22:37Z</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/3065946#M726521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aneesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My input values Plant,Alt and Date are single values not range of values.Is it possible to give range of values in import parameters.If so please explain me how to declare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishnu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065946#M726521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:25:04Z</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/3065947#M726522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure that in the fm the parameters don't have any value? I mean any space or something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the select in the report works, it should also work in the fm....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mireia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:27:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065947#M726522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:27:46Z</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/3065948#M726523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you don't have any entry with the BLANK plant, alt and date. When you exectue this query without entring any data in these fields system tries to find out the data as BLANK and it could not find it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System tries to select the data with the BLANK becasuse you have used the EQ operator in the where clause. IF you use the IN caluse than it will work and you can use the IN caluse only with the ranges or select options. So, If you change as per my directions you will get the data even if you don't put any thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:30:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065948#M726523</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-28T16:30:11Z</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/3065949#M726524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is working Naimesh .But when we use parameters in a report and if we give eq operator it works rite?Also is it the only way to get the data by using ranges in case of function modules or is there any other way? I mean is it the general way to do..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:35:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065949#M726524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:35:50Z</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/3065950#M726525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is working in the report because we put OBLIGATORY which forces use to put the values on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use some predefined ranges table types in the FM's Import parameter.&lt;/P&gt;&lt;P&gt;Like for &lt;/P&gt;&lt;P&gt;PLNAT you can use RANGE_T_WERKS_D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it not avalible you can create on your own by SE11. Take the reference as RANGE_T_WERKS_D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:48:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-urgent/m-p/3065950#M726525</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-28T16:48:42Z</dc:date>
    </item>
  </channel>
</rss>

