<?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 Batch Job: Export, Import &amp; Free Shared Buffer by Batch in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-export-import-free-shared-buffer-by-batch/m-p/427555#M11994</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried processing more than 80,000 records through a background job, which threw a time-out dump. I tried to split up the records and create batches of background jobs using Function Modules 'JOB_OPEN' &amp;amp; 'JOB_CLOSE'. My program looks something like below.&lt;/P&gt;&lt;P&gt;My problem is, I'm unable to process the data batch by batch as I'm supposed to. The data keeps on getting added to the shared buffer (like APPEND). If I try to free the shared buffer after each submit, when the job runs and 'IMPORT FROM SHARED BUFFER' is executed, no data exists in the shared buffer.&lt;/P&gt;&lt;P&gt;If I try to get the status of the job using 'GET_JOB_STATUS' and only if it is finished, then if I clear the shared buffer, will the process run as a whole? Will there be any time-out dumps again due to job queues?&lt;/P&gt;&lt;P&gt;Or is there any other optimized way to get this requirement done?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop itab.
*Consolidate Data
*When 2000 records processed
*------------------------------------------------------------*
CALL FUNCTION 'JOB_OPEN'.

EXPORT it_headdata TO SHARED BUFFER indx(st) ID 'HEADDATA'.

*------------------------------------------------------------*
SUBMIT zco_auto USER sy-uname
                VIA JOB lv_jobname
                NUMBER  lv_jobcount
                AND RETURN.

*------------------------------------------------------------*
*Inside SUBMIT zco_auto*
IMPORT it_headdata FROM SHARED BUFFER indx(st) ID 'HEADDATA'.
*BAPI Call*
*------------------------------------------------------------*
-------&amp;gt; *DELETE FROM SHARED BUFFER...*
*------------------------------------------------------------*
CALL FUNCTION 'JOB_CLOSE'.
*------------------------------------------------------------*
Endloop.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Mar 2017 10:11:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-03-20T10:11:51Z</dc:date>
    <item>
      <title>Batch Job: Export, Import &amp; Free Shared Buffer by Batch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-export-import-free-shared-buffer-by-batch/m-p/427555#M11994</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried processing more than 80,000 records through a background job, which threw a time-out dump. I tried to split up the records and create batches of background jobs using Function Modules 'JOB_OPEN' &amp;amp; 'JOB_CLOSE'. My program looks something like below.&lt;/P&gt;&lt;P&gt;My problem is, I'm unable to process the data batch by batch as I'm supposed to. The data keeps on getting added to the shared buffer (like APPEND). If I try to free the shared buffer after each submit, when the job runs and 'IMPORT FROM SHARED BUFFER' is executed, no data exists in the shared buffer.&lt;/P&gt;&lt;P&gt;If I try to get the status of the job using 'GET_JOB_STATUS' and only if it is finished, then if I clear the shared buffer, will the process run as a whole? Will there be any time-out dumps again due to job queues?&lt;/P&gt;&lt;P&gt;Or is there any other optimized way to get this requirement done?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop itab.
*Consolidate Data
*When 2000 records processed
*------------------------------------------------------------*
CALL FUNCTION 'JOB_OPEN'.

EXPORT it_headdata TO SHARED BUFFER indx(st) ID 'HEADDATA'.

*------------------------------------------------------------*
SUBMIT zco_auto USER sy-uname
                VIA JOB lv_jobname
                NUMBER  lv_jobcount
                AND RETURN.

*------------------------------------------------------------*
*Inside SUBMIT zco_auto*
IMPORT it_headdata FROM SHARED BUFFER indx(st) ID 'HEADDATA'.
*BAPI Call*
*------------------------------------------------------------*
-------&amp;gt; *DELETE FROM SHARED BUFFER...*
*------------------------------------------------------------*
CALL FUNCTION 'JOB_CLOSE'.
*------------------------------------------------------------*
Endloop.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Mar 2017 10:11:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-export-import-free-shared-buffer-by-batch/m-p/427555#M11994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-20T10:11:51Z</dc:date>
    </item>
  </channel>
</rss>

