<?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: Parallel processing u0096 starting new task in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851060#M46232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a weblog that I have written on Parallel Processing sometime back. You might want to take a look at that as well. Here's the link - /people/sap.user72/blog/2005/04/22/parallel-processing--an-introduction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 05 Jun 2005 08:53:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-06-05T08:53:09Z</dc:date>
    <item>
      <title>Parallel processing u0096 starting new task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851056#M46228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to understand how to process mass data in parallel.  I was successfully able to call a function module in a new task (actually in my case I have 4 tasks).  The program runs and executes entirely, but I can&amp;#146;t get any results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the call back form I have inserted a RECEIVE RESULTS statement, but maybe I don&amp;#146;t have the syntax correct, I just can&amp;#146;t get the results.  Maybe in the RECEIVE RESULTS statement I&amp;#146;m not putting the task name...  Your help would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DESCRIBE TABLE izusername LINES recordcount.
time = sy-uzeit.
batchsize = recordcount / cpus. "CPUS = # of WPs

LOOP AT izusername.
  MOVE-CORRESPONDING izusername TO izusername1.
  APPEND izusername1.
  IF sy-tabix = batchsize.
    task_count = task_count + 1.
    CONCATENATE time task_count INTO task_name.
    CALL FUNCTION 'Z_GET_USER_NAME'
      STARTING NEW TASK task_name DESTINATION IN GROUP DEFAULT
      PERFORMING return_info ON END OF TASK
      TABLES
        izusername       = izusername1.
    REFRESH izusername1.
    CLEAR izusername1.
  ENDIF.

ENDLOOP.

LOOP AT izusername3.
  WRITE:/ izusername3.
ENDLOOP.

FORM return_info USING task_name.
  receive results from function 'Z_GET_USER_NAME'
    tables
        izusername       = izusername2.
  APPEND LINES OF izusername2 TO izusername3.
  refresh izusername2.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;ss&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 19:10:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851056#M46228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T19:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing u0096 starting new task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851057#M46229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SS!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're missing a wait statement. The receiver-routine can only be triggered, if execution of your calling program is in  a wait status - otherwise it would corrupt the sequentiell program execution to much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at FM WBB_CHANGE_ARTICLE_FIND, e.g. routine bdcp2_analysis to see a working parall execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;        
do.
"table filling
      curr_proc_nr = send - receive.
"max process handling
WAIT UNTIL receive &amp;gt;= send.
        curr_proc_nr = send - receive.

CALL

if sy-subrc = 0.
send = send + 1.
endif.

exit when all packs are sent.

enddo.
    WAIT UNTIL receive &amp;gt;= send .

...
form receiver.
receive = receive + 1.
endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2005 05:46:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851057#M46229</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2005-06-03T05:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing u0096 starting new task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851058#M46230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Christian!  That did the trick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2005 17:14:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851058#M46230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-03T17:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing u0096 starting new task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851059#M46231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another question I wanted to ask, can I submit the FM in parallel and perform wait at 2 (or more) different times in the same program?  What I mean is, there are two parts of the program that take the longest time.  I want to process both parts in parallel processing, separately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to:&lt;/P&gt;&lt;P&gt;1) Create separate FMs of those two parts and submit the first part in parallel processing.&lt;/P&gt;&lt;P&gt;2) Receive all information from 1st part, do some processing and/or data manipulation on it.&lt;/P&gt;&lt;P&gt;3) Then submit the 2nd part in parallel processing also.  This would be dependent on data received from 1st part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can that be done?  I'm assuming as long as the task names are different, this should be possible.  The only concern that I have is, that I don't want the 2nd part to be processed before I get the results from the 1st part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;ss&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jun 2005 17:02:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851059#M46231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-04T17:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing u0096 starting new task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851060#M46232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a weblog that I have written on Parallel Processing sometime back. You might want to take a look at that as well. Here's the link - /people/sap.user72/blog/2005/04/22/parallel-processing--an-introduction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jun 2005 08:53:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851060#M46232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-05T08:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing u0096 starting new task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851061#M46233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you use 'WAIT UNTIL receive &amp;gt;= send.' in step 2), you will receive all FMs of first processing. Be sure, your wait is placed &amp;lt;i&amp;gt;after&amp;lt;/i&amp;gt; loop for sending your FMs in step 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then no general problem should occur, this scenario is a quite common one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2005 05:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851061#M46233</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2005-06-06T05:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing u0096 starting new task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851062#M46234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Anand.  That was a informative intorduction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It (actually Hint #3) talks about executing in background.  Is that possible in 4.7 (6.20) or even 4.6 (4.6D)?  I'm trying to figure out if there is a way to use the background work processes instead of dialog work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;ss&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2005 19:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-u0096-starting-new-task/m-p/851062#M46234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-17T19:38:02Z</dc:date>
    </item>
  </channel>
</rss>

