<?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 PTRA_WEB_EXPENSE_REPORT_GET_2 not working when used in loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ptra-web-expense-report-get-2-not-working-when-used-in-loop/m-p/7833215#M1590170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Archana, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be we can try several ways... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) can you try calling function module &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;BUFFER_REFRESH_ALL &lt;/SPAN&gt;?? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; after each call...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) May be u can call Function module "&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;PTRA_WEB_EXPENSE_REPORT_GET_2 &lt;/SPAN&gt;" in background task or seperate task , it will load the function group everytime when u call it in loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***DO let us know if it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;~Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2012 07:10:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-09-07T07:10:39Z</dc:date>
    <item>
      <title>Function module PTRA_WEB_EXPENSE_REPORT_GET_2 not working when used in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ptra-web-expense-report-get-2-not-working-when-used-in-loop/m-p/7833214#M1590169</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;I have used a function module PTRA_WEB_EXPENSE_REPORT_GET_2  in a custom fumction module which i am developing fetch the travel expense data . The function module PTRA_WEB_EXPENSE_REPORT_GET_2  returns the travel expense data based on the employee and the trip number. I want to fetch the travel expense data for a given set of employees and trip number and hence i have used this function module inside a loop statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module returns the travel expense data for the employee and trip in the first loop pass. From the second loop passs it doesn't return the value. I have also checked this in se37 and the same thing happens. Value is returned for the fist employee but for the next employee we have to go to initial screen of se37 and execute the Func. module again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I debugged this function module and found that the value of the employee and the trip number is stored in the global variable. The value passed for the employee and trip is compared with the correspomding value in the global variable and if they are not same an error message is returned. Since we are using in a loop , each time a different value is passed for the employee and trip and the check fails .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to clear the value in the global parameters or is there any other function module which can be used to clear the values of the global variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manipal Parkala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2011 12:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ptra-web-expense-report-get-2-not-working-when-used-in-loop/m-p/7833214#M1590169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-17T12:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Function module PTRA_WEB_EXPENSE_REPORT_GET_2 not working when used in loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ptra-web-expense-report-get-2-not-working-when-used-in-loop/m-p/7833215#M1590170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Archana, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be we can try several ways... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) can you try calling function module &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;BUFFER_REFRESH_ALL &lt;/SPAN&gt;?? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; after each call...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) May be u can call Function module "&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;PTRA_WEB_EXPENSE_REPORT_GET_2 &lt;/SPAN&gt;" in background task or seperate task , it will load the function group everytime when u call it in loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***DO let us know if it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;~Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 07:10:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ptra-web-expense-report-get-2-not-working-when-used-in-loop/m-p/7833215#M1590170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-07T07:10:39Z</dc:date>
    </item>
  </channel>
</rss>

