Skip to Content
0
Former Member
Aug 04, 2005 at 10:28 PM

Parallel processing in foreground not possible

317 Views

I am trying to achieve a parallel processing in one of my interface.

HowEver, the interface is suppose to be executed in interactive mode.

It seems that no of tasks are restricted in foreground to six external sessions. That results in a dump CALL_FUNCTION_OPEN_ERROR.

Also refer to OSS note 710920.

Is it by any chance possible to execute a program in parallel with more than 6 tasks at a time without changing the basis settings.

I have refer to some of the SAP code for parallel processing. However they didn't seem to be doing anything different than what I have added in my code.

Please refer to part of my code:

&----


*& Form f007-create_fc_in_parallel

&----


  • Create forecast data in parallel

----


FORM f007-create_fc_in_parallel

TABLES lit_iden STRUCTURE /sie/e_pp_iden

USING lv_doc TYPE vbak-vbeln

lv_group LIKE rzllitab-classname

lv_simul TYPE c.

DATA: lw_rfcdest LIKE rfcdes-rfcdest,

lwa_iden LIKE LINE OF lit_iden.

*----


> Create task name

CONCATENATE c_taskname w_task_no INTO w_taskname.

CONDENSE w_taskname NO-GAPS.

w_order_header_inx-updateflag = 'U'.

CALL FUNCTION '/SIE/E_PP_CREATE_FC_DATA_PL_02'

STARTING NEW TASK w_taskname

  • DESTINATION IN GROUP DEFAULT

PERFORMING f008-return_info ON END OF TASK

EXPORTING

salesdocument = lv_doc

order_header_in = w_order_header_in

order_header_inx = w_order_header_inx

simulation = lv_simul

TABLES

item_in = it_item_in

item_inx = it_item_inx

schedule_in = it_schedule_in

schedule_inx = it_schedule_inx

sales_cfgs_ref = it_sales_cfgs_ref

sales_cfgs_value = it_sales_cfgs_value

iden_in = lit_iden

EXCEPTIONS

communication_failure = 1

system_failure = 2

RESOURCE_FAILURE = 3

.

CASE sy-subrc.

WHEN 0.

*----


>Job submitted successfully

w_task_no = w_task_no + 1.

w_snd_jobs = w_snd_jobs + 1.

WHEN 1 OR 2.

*----


>Communication error

*----


>Remove the server on which error occured

*----


>Get the destination name

CALL FUNCTION 'SPBT_GET_PP_DESTINATION'

IMPORTING

rfcdest = lw_rfcdest.

*----


>Remove the server from further

*----


>consideration

CALL FUNCTION 'SPBT_DO_NOT_USE_SERVER'

EXPORTING

server_name = lw_rfcdest

EXCEPTIONS

invalid_server_name = 1

no_more_resources_left = 2

pbt_env_not_initialized_yet = 3

OTHERS = 4.

IF sy-subrc <> 0.

LOOP AT lit_iden INTO lwa_iden.

add_message sy-msgty sy-msgid sy-msgno

sy-msgv1 sy-msgv2 sy-msgv3

sy-msgv4 lwa_iden-ident.

ENDLOOP.

ENDIF.

*----


>resubmit the task

PERFORM f007-create_fc_in_parallel TABLES lit_iden[]

USING lv_doc

lv_group

lv_simul.

WHEN 3.

*----


>resources not available

WAIT UNTIL w_rcv_jobs >= w_snd_jobs UP TO '1' SECONDS.

IF sy-subrc EQ 0.

*----


>resubmit the task

PERFORM f007-create_fc_in_parallel TABLES lit_iden[]

USING lv_doc

lv_group

lv_simul.

ELSE.

LOOP AT lit_iden INTO lwa_iden.

*----


>Resources not available for processing

*----


>forecast data

add_message 'E' '/SIE/E_PP_MSG' '086'

space space space space lwa_iden-ident.

ENDLOOP.

ENDIF.

ENDCASE.

ENDFORM. " f007-create_fc_in_parallel