Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Processing with Asynchronous RFC PROBLEM

omar_elkassi2
Explorer
0 Kudos
298

Hi Expert,

i've an Issue will using a parallel processing, i've a specific program wich includes 17 steps of traitement, 6 of theses steps are prallelized (step 2/8/10/14/17). the call of step 10 raise a "communication_problem" exception, i've checked all point of RFC custumizing and developpement part that I know, without result (i've no idea about source problem). all other parallelized steps (before and after this one) are excecuted correctly. before every parallelize call i check available dialog work process in the systeme, in the step with problem i've 22 availabe WP. bellow some technical details related to my implementation :

1- the function used is marked as externally callable.

2- function call is executed via "CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP ".

3- RZ12 display 3 serever applications related to the used group wich is "parallel_generators".

4- all other steps in the program (wich use the same calling syntaxe) are correctly executed.

Any idea about this problem ?

thanks a lot in advance,

Omar

4 REPLIES 4

former_member186741
Active Contributor
0 Kudos
102

I think code snippets would be useful. If the program is big please try to put in the relevant sections....eg SPBT_INITIALIZE call, SPBT_GET_CURR_RESOURCE_INFO call, your exact call to the rfc, the feedback form code...anything else you can think of

0 Kudos
102

Hi Nei,

bellow some part of the used code :

*/ step 8 et 9 : (this step is executed correctly)

LOOP AT settlunits INTO settlunit.

*available system Work process

g_task = sy-tabix.

WHILE g_free_process IS INITIAL.

CALL FUNCTION 'RFC_GET_SYSTEM_INFO'

EXPORTING

destination = ''

IMPORTING

current_resources = g_free_process .

IF g_free_process IS INITIAL.

WAIT UP TO 3 SECONDS.

ENDIF.

ENDWHILE.

CLEAR g_free_process.

*the parameter P_GROUP = 'parallel_generators'

*configured via RZ12 and linked to 3 servers applications

CALL FUNCTION 'ZALSP023'

STARTING NEW TASK g_task

DESTINATION IN GROUP p_group

PERFORMING eot1 ON END OF TASK

EXPORTING

settldoc = settldoc

settlrun = settlrun

su = settlunit

steplev = g_steplev

improfiles = impprofiles5 " Résultat de ZCNTREEL

EXCEPTIONS

communication_failure = 1

system_failure = 2

RESOURCE_FAILURE = 3.

ENDLOOP.

**/ step 10 / 11 : (the call with error)

    • all calls for in this part have a sy-subrc = 1

    • => communication_failure

LOOP AT settlunits INTO settlunit.

*available system Work process

g_task = sy-tabix.

WHILE g_free_process IS INITIAL.

CALL FUNCTION 'RFC_GET_SYSTEM_INFO'

EXPORTING

destination = ''

IMPORTING

current_resources = g_free_process .

IF g_free_process IS INITIAL.

WAIT UP TO 3 SECONDS.

ENDIF.

ENDWHILE.

CLEAR g_free_process.

  • before this call all WP in the system are free (22)

CALL FUNCTION 'ZALSP024'

STARTING NEW TASK g_task

DESTINATION IN GROUP p_group

PERFORMING eot2 ON END OF TASK

EXPORTING

settldoc = settldoc

settlrun = settlrun

su = settlunit

steplev = g_steplev

improfiles = impprofiles5 " Résultat de ZCNTREEL

EXCEPTIONS

communication_failure = 1

system_failure = 2

RESOURCE_FAILURE = 3.

ENDLOOP.

            • last part of program which have other parallel call executed without errors***************************

Thanks a lot for responce,

Omar

0 Kudos
102

code not formatted. g_free_process not set. [How to post code in SCN, and some things NOT to do...|;

Regards,

Clemens

Edited by: Clemens Li on Jul 27, 2011 12:57 PM

0 Kudos
102

Use the 'message' clause after the exceptions as per this example from the help...it may give you a clue.....

DATA: MSG_TEXT(80) TYPE C. "Message text

...

  • Asynchronous call to Transaction SM59 -->

  • Create a new session

CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'

DESTINATION 'NONE'

EXPORTING

TCODE = 'SM59'

EXCEPTIONS

COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT

SYSTEM_FAILURE = 2 MESSAGE MSG_TEXT.