<?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: Time Out error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/6977699#M1492222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason why you are using BAPI_SALESORDER_SIMULATE? You can directly call BAPI_MATERIAL_AVAILABILITY to get availability dates ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, if your runtime is very long, then split the number of lines in your ZPROGRAM into sets of 10 line items each and call BAPI_SALESORDER_SIMULATE  for each set using parallel processing. When the data returns just merge the results from these sets and pass it back to the Web client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample pseudo code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: count type sy-dbcnt.&lt;/P&gt;&lt;P&gt;data: bapi_call_count type i,&lt;/P&gt;&lt;P&gt;         receive_result_count type i.&lt;/P&gt;&lt;P&gt;Loop at line items.&lt;/P&gt;&lt;P&gt;add 1 to count.&lt;/P&gt;&lt;P&gt;  if count ge 10.&lt;/P&gt;&lt;P&gt;    clear count.&lt;/P&gt;&lt;P&gt;    call function 'BAPI_SALESORDER_SIMULATE' starting new task &lt;/P&gt;&lt;P&gt;performing get_results on end of task&lt;/P&gt;&lt;P&gt;exporting ...&lt;/P&gt;&lt;P&gt;tables .... (exclude RETURN and other tables exported by the FM)&lt;/P&gt;&lt;P&gt;exceptions ....&lt;/P&gt;&lt;P&gt;if sy-subrc = 0. &lt;/P&gt;&lt;P&gt;add 1 to bapi_call_count.&lt;/P&gt;&lt;P&gt;endf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;     build BAPI structures.&lt;/P&gt;&lt;P&gt;    continue.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;wait until bapi_call_count = receive_result_count.&lt;/P&gt;&lt;P&gt;.... at this point you'll have results from all BAPIs merged from multiple calls.&lt;/P&gt;&lt;P&gt;Return data back to your web service.&lt;/P&gt;&lt;P&gt;perform GET_RESULTS.&lt;/P&gt;&lt;P&gt;receive results from 'BAPI_SALESORDER_SIMULATE'&lt;/P&gt;&lt;P&gt;importing ...&lt;/P&gt;&lt;P&gt;tables .... (only include tables that are being returnd by this FM, don't include anything that you passed in the first call)&lt;/P&gt;&lt;P&gt;exceptions ...&lt;/P&gt;&lt;P&gt;append whatever data you want to global internal tables.&lt;/P&gt;&lt;P&gt;Add 1 to RECEIVE_RESULTS_COUNT.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Raj on Jun 21, 2010 6:30 AM&lt;/P&gt;&lt;P&gt;Note: In SM51 tcode, you'll see how many dialog processes are available. If the number of parallel processes exceeds the number of PIDs then you'll receive empty tables in FORM GET_RESULTS. Therefore, you may want to add a FM to check the number of PIDs available before calling BAPI starting new task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jun 2010 04:30:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-21T04:30:05Z</dc:date>
    <item>
      <title>Time Out error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/6977698#M1492221</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 a issue related to SAP Web related client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the front end web client - enduser tries to enter the sales order contents to check the material avalibilty with dates by clicking button CHECK AVAILABILTY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when the user tries to enter line items more than 50 - the screen we could see error message like " GATEWAY TIMEOUT ERROR " . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Java consultant increased Apache server time from 3 min's to 9 min's in production system. &lt;/P&gt;&lt;P&gt;So, now we are not getting any time out error in production. But I checked in sandbox and quality systems with 50 entries,the bapi executing time with in 2 min's. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and internally my zbapi calling stanadard bapi BAPI_SALESORDER_SIMULATE Funtion module 2 times &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the concern is if we increase the time to 9 minutes from  JAVA end u2013 itu2019s not a proper solution as the end user will not wait for the 9 minutes of the transaction to happen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From SAP end u2013 I tried to check by simulating BAPI u2013 with 50 lineitems and its not taking more than 2minutes u2013 is there any other way to solve the  " GATEWAY TIMEOUT ERROR " .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;varma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jun 2010 12:18:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/6977698#M1492221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-08T12:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Time Out error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/6977699#M1492222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason why you are using BAPI_SALESORDER_SIMULATE? You can directly call BAPI_MATERIAL_AVAILABILITY to get availability dates ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, if your runtime is very long, then split the number of lines in your ZPROGRAM into sets of 10 line items each and call BAPI_SALESORDER_SIMULATE  for each set using parallel processing. When the data returns just merge the results from these sets and pass it back to the Web client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample pseudo code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: count type sy-dbcnt.&lt;/P&gt;&lt;P&gt;data: bapi_call_count type i,&lt;/P&gt;&lt;P&gt;         receive_result_count type i.&lt;/P&gt;&lt;P&gt;Loop at line items.&lt;/P&gt;&lt;P&gt;add 1 to count.&lt;/P&gt;&lt;P&gt;  if count ge 10.&lt;/P&gt;&lt;P&gt;    clear count.&lt;/P&gt;&lt;P&gt;    call function 'BAPI_SALESORDER_SIMULATE' starting new task &lt;/P&gt;&lt;P&gt;performing get_results on end of task&lt;/P&gt;&lt;P&gt;exporting ...&lt;/P&gt;&lt;P&gt;tables .... (exclude RETURN and other tables exported by the FM)&lt;/P&gt;&lt;P&gt;exceptions ....&lt;/P&gt;&lt;P&gt;if sy-subrc = 0. &lt;/P&gt;&lt;P&gt;add 1 to bapi_call_count.&lt;/P&gt;&lt;P&gt;endf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;     build BAPI structures.&lt;/P&gt;&lt;P&gt;    continue.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;wait until bapi_call_count = receive_result_count.&lt;/P&gt;&lt;P&gt;.... at this point you'll have results from all BAPIs merged from multiple calls.&lt;/P&gt;&lt;P&gt;Return data back to your web service.&lt;/P&gt;&lt;P&gt;perform GET_RESULTS.&lt;/P&gt;&lt;P&gt;receive results from 'BAPI_SALESORDER_SIMULATE'&lt;/P&gt;&lt;P&gt;importing ...&lt;/P&gt;&lt;P&gt;tables .... (only include tables that are being returnd by this FM, don't include anything that you passed in the first call)&lt;/P&gt;&lt;P&gt;exceptions ...&lt;/P&gt;&lt;P&gt;append whatever data you want to global internal tables.&lt;/P&gt;&lt;P&gt;Add 1 to RECEIVE_RESULTS_COUNT.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Raj on Jun 21, 2010 6:30 AM&lt;/P&gt;&lt;P&gt;Note: In SM51 tcode, you'll see how many dialog processes are available. If the number of parallel processes exceeds the number of PIDs then you'll receive empty tables in FORM GET_RESULTS. Therefore, you may want to add a FM to check the number of PIDs available before calling BAPI starting new task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 04:30:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/6977699#M1492222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T04:30:05Z</dc:date>
    </item>
  </channel>
</rss>

