<?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>Question Re: ABAP report calls in parallel Processing in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264862#M4594036</link>
    <description>&lt;P&gt;Why don't you first try with just 2 parallel tasks? (when you learn something, do things simple first)&lt;/P&gt;&lt;P&gt;WAIT (FOR ASYNCHRONOUS TASKS) must be placed after you have launched the 2 tasks.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2020 21:55:21 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-11-03T21:55:21Z</dc:date>
    <item>
      <title>ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaq-p/12264858</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;Can we call Report program in parallel Processing?&lt;/P&gt;
  &lt;P&gt;if anyone has solution , please share.&lt;/P&gt;
  &lt;P&gt;i have to call zwf_workprocess_test report in parallel processing, right now called inside loop. &lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Vikash&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;REPORT zwf_parallel_test.


Do 10 Times.
  SUBMIT zwf_workprocess_test WITH p_text = lv_string AND RETURN.

ENDDO.
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Nov 2020 08:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaq-p/12264858</guid>
      <dc:creator>vikash_pathak</dc:creator>
      <dc:date>2020-11-02T08:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264859#M4594033</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;vikash.pathak&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Sure you can. One way is to wrap it in an RFC function module and call this module in parallel. There are example on the web.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/4d/909309eba36e73e10000000a15822b/content.htm?no_cache=true" target="test_blank"&gt;https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/4d/909309eba36e73e10000000a15822b/content.htm?no_cache=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2012/08/20/parallel-processing-example-code/" target="test_blank"&gt;https://blogs.sap.com/2012/08/20/parallel-processing-example-code/&lt;/A&gt;&lt;/P&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Mon, 02 Nov 2020 08:25:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264859#M4594033</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-11-02T08:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264860#M4594034</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;mateuszadamus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion, i created a RFC and submit report statement i have written inside FM ( SUBMIT zwf_workprocess_test WITH p_text = im_run AND RETURN. ) &lt;/P&gt;&lt;P&gt;and below code i have written in my ABAP report program, but the DO  ENDO  is being called around 50 times which is taking long time in execution and as many time  DO will iterate That many time FM will be called , my requirement is that FM should be called only 10 times ,&lt;/P&gt;&lt;P&gt;like Do should be called 1 or 2 time and FM should be called in different work processes  , if DO execute 2 time so FM should be split in 5 work process in each iteration .  which is not happening for now.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'SPBT_INITIALIZE'
  EXPORTING
    group_name                     = gv_group
  IMPORTING
    max_pbt_wps                    = lv_max
    free_pbt_wps                   = lv_free
  EXCEPTIONS
    invalid_group_name             = 1
    internal_error                 = 2
    pbt_env_already_initialized    = 3
    currently_no_resources_avail   = 4
    no_pbt_resources_found         = 5
    cant_init_different_pbt_groups = 6
    OTHERS                         = 7.
IF sy-subrc                           &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid                   TYPE sy-msgty NUMBER sy-msgno
                             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF sy-subrc = 0.
* Split the data to be processed into no of work processes.
  lv_occupied = lv_max - lv_free.
* Calculate the difference in percentage
  lv_diff = ( lv_free * 100 ) / lv_max.
* Based on the available no of workprocess split the data
  IF lv_diff &amp;lt;= 25.
    lv_split = lv_free DIV 2.
  ELSEIF lv_diff BETWEEN 25 AND 50.
    lv_split = lv_free * 2 DIV 3.
  ELSEIF lv_diff &amp;gt;= 50.
    lv_split = lv_free * 3 DIV 4.
  ENDIF.
ENDIF.


lv_lines = 5000.


lv_lines_tab = lv_lines / lv_split.


DO 10 TIMES.   "lv_split TIMES.


  lv_index = sy-index.


  CONCATENATE 'task' lv_index INTO lv_task.


  lv_start = lv_start + lv_lines_tab.
  lv_end   = lv_lines_tab + 1.


  IF lv_index = 1.
    lv_start = 0.
  ENDIF.


  IF lv_split = lv_index.
    lv_end = 0.
  ENDIF.

*  DO 10 TIMES.
    lv_count = lv_count + 1.
    lv_string =  |Run| &amp;amp;&amp;amp; lv_count &amp;amp;&amp;amp; || .


    CALL FUNCTION 'ZWF_PARALLEL_CALL'
      STARTING NEW TASK lv_task
      DESTINATION IN GROUP gv_group
      PERFORMING f_callback ON END OF TASK
      EXPORTING
        im_run = lv_string
      .
    IF sy-subrc = 0.
      lv_sent = lv_sent + 1.
    ENDIF.
    WAIT UNTIL lv_comp &amp;gt;= lv_sent.


    WRITE : / 'The no of packets sent' , lv_sent,
              'The no of packets completed', lv_comp.
  ENDDO.
*ENDDO.


FORM f_callback USING lv_task .
  DATA lv_done TYPE flag.
  lv_comp = lv_comp + 1.


  RECEIVE RESULTS FROM FUNCTION 'ZWF_PARALLEL_CALL'
  IMPORTING
      ex_done       = lv_done.


  IF lv_done EQ abap_true.
    lv_result_string = 'Success'.
  ELSE.
    lv_result_string = 'Failure'.
  ENDIF.

  CONCATENATE 'The data passed via task' lv_task 'updation is' lv_result_string INTO lv_result_string SEPARATED BY space.

  WRITE : / lv_result_string.
ENDFORM.
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Nov 2020 09:12:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264860#M4594034</guid>
      <dc:creator>vikash_pathak</dc:creator>
      <dc:date>2020-11-03T09:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264861#M4594035</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;vikash.pathak&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You should not hardcode the number of DO loops. It should be dynamic based on the number of records for processing divided by records per package (per execution). Sometimes, if job fails, you might want to have more DO loops, to re-run the job.&lt;/P&gt;&lt;P&gt;Where is this DO ENDDO? Where is it called from?&lt;/P&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Tue, 03 Nov 2020 09:36:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264861#M4594035</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-11-03T09:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264862#M4594036</link>
      <description>&lt;P&gt;Why don't you first try with just 2 parallel tasks? (when you learn something, do things simple first)&lt;/P&gt;&lt;P&gt;WAIT (FOR ASYNCHRONOUS TASKS) must be placed after you have launched the 2 tasks.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 21:55:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264862#M4594036</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-11-03T21:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264863#M4594037</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/233743/mateuszadamus.html"&gt;Mateusz Adamus&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;i am not processing any records , i just have to call ABAP report program from another report program which should be called inside loop which iterate 10 times, but it was taking very long for execution thats why placing this in Parallel processing to reduce the time .&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 04:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264863#M4594037</guid>
      <dc:creator>vikash_pathak</dc:creator>
      <dc:date>2020-11-04T04:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264864#M4594038</link>
      <description>&lt;P&gt;I suggest you get the administration of parallel processing out of your specific logic. Here's a way of making it easier (in my view - it's my blog!). &lt;A href="https://blogs.sap.com/2019/03/19/parallel-processing-made-easy/" target="test_blank"&gt;https://blogs.sap.com/2019/03/19/parallel-processing-made-easy/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 09:33:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264864#M4594038</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-11-04T09:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264865#M4594039</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; 's comment is definitely the next (target) step in the process. Separate the business logic whenever possible.&lt;/P&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Wed, 04 Nov 2020 09:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264865#M4594039</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-11-04T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP report calls in parallel Processing</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264866#M4594040</link>
      <description>&lt;P&gt;Look at FM /AIF/SUBMIT_FUNCTION.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 15:01:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-report-calls-in-parallel-processing/qaa-p/12264866#M4594040</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-11-10T15:01:33Z</dc:date>
    </item>
  </channel>
</rss>

