<?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 - Exception condition &amp;quot;COMMUNICATION_FAILURE&amp;quot; raised. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040545#M719581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Obviously my question was a bit too special. I remember I wrote a blog or wiki on that together with the working solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the search function(s) do not help me (now) to find it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2008 09:03:32 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2008-07-24T09:03:32Z</dc:date>
    <item>
      <title>parallel processing - Exception condition "COMMUNICATION_FAILURE" raised.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040544#M719580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a question for people who worked with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION ...STARTING NEW TASK ...DESTINATION IN GROUP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just made my first try for this: The test program tries to get user details using a BAPI which is called as often as a process is available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately it dumps with the first call with "COMMUNICATION_FAILURE" .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is an elemetry error. Further I like to know how I can determine the number of available processes dynamically just before calling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  gv_taskname                             TYPE char08,"scma_tpi_id,
  gt_bapiaddr3                            TYPE bapiaddr3t.
START-OF-SELECTION.
    PERFORM paralleltest.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  paralleltest
*&amp;amp;---------------------------------------------------------------------*
FORM paralleltest.

  DATA:
    ls_bapiaddr3                          TYPE bapiaddr3,
    lv_group                              TYPE rzllitab-classname,
    lv_max                                TYPE i,
    lv_inc                                TYPE i,
    lv_free                               TYPE i,
    lv_nproc                              TYPE i,
    lv_bsize                              TYPE i,
    lv_grid_title                         TYPE  lvc_title,
    lt_bname                              TYPE TABLE OF usr03-bname,
    lt_bname2do                           TYPE TABLE OF usr03-bname.
  FIELD-SYMBOLS:
    &amp;lt;bname&amp;gt;                               TYPE usr03-bname.

  SELECT bname INTO TABLE lt_bname FROM usr01.

  SELECT classname
    INTO lv_group
    FROM rzllitab UP TO 1 ROWS
    WHERE grouptype                       = 'S'.
  ENDSELECT.

  CALL FUNCTION 'SPBT_INITIALIZE'
       EXPORTING
            group_name                    = lv_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.
  gv_taskname                             = 'A0000000'.
  lv_nproc                                = lv_free - 2.
  CHECK lv_nproc                          &amp;gt; 1.
  DESCRIBE TABLE lt_bname.
  lv_bsize                                = 
    sy-tfill DIV ( lv_nproc - 1 ).
  LOOP AT lt_bname ASSIGNING &amp;lt;bname&amp;gt;.
    ADD 1 TO lv_inc.


    CALL FUNCTION 'BAPI_USER_GET_DETAIL'
       STARTING NEW TASK gv_taskname
       DESTINATION                        IN GROUP lv_group
       PERFORMING bapi_receive ON END OF TASK
     EXPORTING
          username                        = &amp;lt;bname&amp;gt;.
    CHECK lv_inc &amp;gt;= lv_nproc.
    CLEAR lv_inc.
    WAIT UNTIL gv_taskname IS INITIAL.

  ENDLOOP.
  WAIT UNTIL gv_taskname IS INITIAL.

  lv_grid_title                           = gv_taskname.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            i_structure_name              = 'BAPIADDR3'
            i_grid_title                  = lv_grid_title
       TABLES
            t_outtab                      = gt_bapiaddr3.


ENDFORM.                    " paralleltest
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  bapi_receive
*&amp;amp;---------------------------------------------------------------------*
FORM bapi_receive USING pv_taskname .
  DATA:
    ls_bapiaddr3                          TYPE bapiaddr3,
    lv_msg                                TYPE text80,
    lt_mbew                               TYPE TABLE OF mbew.
  RECEIVE RESULTS FROM FUNCTION 'MBEW_EXTEND'
      IMPORTING
         address                          = ls_bapiaddr3
      EXCEPTIONS
         communication_failure            = 1 MESSAGE lv_msg
         system_failure                   = 2 MESSAGE lv_msg .
  CASE sy-subrc.
    WHEN 0.
      APPEND ls_bapiaddr3 TO gt_bapiaddr3.
    WHEN 1.
      WRITE: 'communication_failure for task', pv_taskname, lv_msg.
    WHEN 2.
      WRITE: 'system_failure', pv_taskname, lv_msg.
  ENDCASE.
  CHECK pv_taskname                       = gv_taskname.
  CLEAR: gv_taskname.
ENDFORM.                    " bapi_receive

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 11:53:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040544#M719580</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-11-15T11:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: parallel processing - Exception condition "COMMUNICATION_FAILURE" raised.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040545#M719581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Obviously my question was a bit too special. I remember I wrote a blog or wiki on that together with the working solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the search function(s) do not help me (now) to find it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 09:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040545#M719581</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2008-07-24T09:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: parallel processing - Exception condition "COMMUNICATION_FAILURE" raised.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040546#M719582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the link for your blog or the solution to this problem?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sanyam Kataria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 07:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040546#M719582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-22T07:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: parallel processing - Exception condition "COMMUNICATION_FAILURE" raised.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040547#M719583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the link (though it's rather old):&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.scn.sap.com/wiki/display/Snippets/Easily+implement+parallel+processing+in+online+and+batch+processing" title="http://wiki.scn.sap.com/wiki/display/Snippets/Easily+implement+parallel+processing+in+online+and+batch+processing"&gt;Easily implement parallel processing in online and batch processing - Code Gallery - SCN Wiki&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/776/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I don't remember what the Communication Failure was about - actually an exception for the BAPi called with addition of MESSAGE &amp;lt;mess&amp;gt; may have shown me the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 19:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040547#M719583</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2014-05-22T19:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: parallel processing - Exception condition "COMMUNICATION_FAILURE" raised.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040548#M719584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot that was helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 07:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-processing-exception-condition-quot-communication-failure-quot/m-p/3040548#M719584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T07:51:54Z</dc:date>
    </item>
  </channel>
</rss>

