<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533500#M850059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;in that query &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.based on start date , end date and sales order, it is working fine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.when i given start date and enddate , its working fine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. but when i given only sales order number with out giving start date and end date, its not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls can you help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;mars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2008 09:02:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-13T09:02:06Z</dc:date>
    <item>
      <title>function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533495#M850054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls can you help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have writen one fuction module &lt;/P&gt;&lt;P&gt;the import parameters are&lt;/P&gt;&lt;P&gt;p_stdate &lt;/P&gt;&lt;P&gt;p_eddate&lt;/P&gt;&lt;P&gt;p_vbeln&lt;/P&gt;&lt;P&gt;all are optionals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the select query is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select a~vbeln&lt;/P&gt;&lt;P&gt;         a~erdat&lt;/P&gt;&lt;P&gt;         a~auart&lt;/P&gt;&lt;P&gt;         a~vkorg&lt;/P&gt;&lt;P&gt;         a~vtweg&lt;/P&gt;&lt;P&gt;         a~spart&lt;/P&gt;&lt;P&gt;         a~kunnr&lt;/P&gt;&lt;P&gt;         b~posnr&lt;/P&gt;&lt;P&gt;         b~matnr&lt;/P&gt;&lt;P&gt;         b~werks&lt;/P&gt;&lt;P&gt;         b~lgort&lt;/P&gt;&lt;P&gt;         b~kwmeng&lt;/P&gt;&lt;P&gt;         INTO CORRESPONDING FIELDS OF TABLE it_inquiry&lt;/P&gt;&lt;P&gt;         FROM  vbak AS a inner join vbap as b on b~vbeln = vbeln&lt;/P&gt;&lt;P&gt;         where a&lt;SUB&gt;erdat BETWEEN p_stdate AND  p_eddate     and   A&lt;/SUB&gt;AUART = 'AF'  OR a~vbeln = P_vbeln .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. in output i have given start date and enddate &lt;/P&gt;&lt;P&gt;it is working fine , it geting all the salesorder numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.when i have given only salesorder number&lt;/P&gt;&lt;P&gt;it is working fine,  its geting all the details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.but when i was entering  like startdate,enddate and salesorder&lt;/P&gt;&lt;P&gt; number ,it should display the salesorder which i have given , but iam geting all the sales orders which was created on dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533495#M850054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533496#M850055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for that you hav to repalce the OR statement from where condition to AND&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:18:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533496#M850055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533497#M850056</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;Change ur query....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a~vbeln&lt;/P&gt;&lt;P&gt;a~erdat&lt;/P&gt;&lt;P&gt;a~auart&lt;/P&gt;&lt;P&gt;a~vkorg&lt;/P&gt;&lt;P&gt;a~vtweg&lt;/P&gt;&lt;P&gt;a~spart&lt;/P&gt;&lt;P&gt;a~kunnr&lt;/P&gt;&lt;P&gt;b~posnr&lt;/P&gt;&lt;P&gt;b~matnr&lt;/P&gt;&lt;P&gt;b~werks&lt;/P&gt;&lt;P&gt;b~lgort&lt;/P&gt;&lt;P&gt;b~kwmeng&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_inquiry&lt;/P&gt;&lt;P&gt;FROM vbak AS a inner join vbap as b on a&lt;SUB&gt;vbeln = b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;where a&lt;SUB&gt;erdat BETWEEN p_stdate AND p_eddate and A&lt;/SUB&gt;AUART = 'AF' OR a~vbeln = P_vbeln .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:19:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533497#M850056</guid>
      <dc:creator>ak_upadhyay</dc:creator>
      <dc:date>2008-03-13T07:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533498#M850057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put AND and IN  in where condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a~vbeln&lt;/P&gt;&lt;P&gt;a~erdat&lt;/P&gt;&lt;P&gt;a~auart&lt;/P&gt;&lt;P&gt;a~vkorg&lt;/P&gt;&lt;P&gt;a~vtweg&lt;/P&gt;&lt;P&gt;a~spart&lt;/P&gt;&lt;P&gt;a~kunnr&lt;/P&gt;&lt;P&gt;b~posnr&lt;/P&gt;&lt;P&gt;b~matnr&lt;/P&gt;&lt;P&gt;b~werks&lt;/P&gt;&lt;P&gt;b~lgort&lt;/P&gt;&lt;P&gt;b~kwmeng&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_inquiry&lt;/P&gt;&lt;P&gt;FROM vbak AS a inner join vbap as b on b~vbeln = vbeln&lt;/P&gt;&lt;P&gt;where a&lt;SUB&gt;erdat BETWEEN p_stdate AND p_eddate and A&lt;/SUB&gt;AUART = 'AF' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND a~vbeln IN P_vbeln .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:21:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533498#M850057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533499#M850058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;This error appear because you use "&lt;STRONG&gt;OR&lt;/STRONG&gt; a~vbeln = P_vbeln". Instead of using &lt;STRONG&gt;OR&lt;/STRONG&gt;, you can use &lt;STRONG&gt;IN&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;DATA lr_vbeln TYPE RANGE OF vbak-vbeln.&lt;/P&gt;&lt;P&gt;DATA l_rvbeln LIKE LINE OF lr_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF P_vbeln IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;  l_rvbeln-sign = 'I'.&lt;/P&gt;&lt;P&gt;  l_rvbeln-option = 'EQ'.&lt;/P&gt;&lt;P&gt;  l_rvbeln-low = p_vbeln.&lt;/P&gt;&lt;P&gt;  APPEND l_rvbeln TO lr_vbeln.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;elect a~vbeln&lt;/P&gt;&lt;P&gt;a~erdat&lt;/P&gt;&lt;P&gt;a~auart&lt;/P&gt;&lt;P&gt;a~vkorg&lt;/P&gt;&lt;P&gt;a~vtweg&lt;/P&gt;&lt;P&gt;a~spart&lt;/P&gt;&lt;P&gt;a~kunnr&lt;/P&gt;&lt;P&gt;b~posnr&lt;/P&gt;&lt;P&gt;b~matnr&lt;/P&gt;&lt;P&gt;b~werks&lt;/P&gt;&lt;P&gt;b~lgort&lt;/P&gt;&lt;P&gt;b~kwmeng&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_inquiry&lt;/P&gt;&lt;P&gt;FROM vbak AS a inner join vbap as b on b~vbeln = vbeln&lt;/P&gt;&lt;P&gt;where a&lt;SUB&gt;erdat BETWEEN p_stdate AND p_eddate and A&lt;/SUB&gt;AUART = 'AF' AND a~vbeln &lt;STRONG&gt;IN&lt;/STRONG&gt; lr_vbeln .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Pavel Martinov on Mar 13, 2008 10:26 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533499#M850058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533500#M850059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;in that query &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.based on start date , end date and sales order, it is working fine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.when i given start date and enddate , its working fine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. but when i given only sales order number with out giving start date and end date, its not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls can you help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;mars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 09:02:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3533500#M850059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T09:02:06Z</dc:date>
    </item>
  </channel>
</rss>

