Skip to Content
0

ABAP parallel processing : overloads of dialog process impact on performance=_=

Mar 13, 2017 at 08:32 AM

84

avatar image

Hi there,when I try to use below statements to optimize the performance, the test result showed that overloads of dialog process had been produced.

CALL FUNCTION 'BAPI_COSTESTIMATE_GETDETAIL'
STARTING NEW TASK g_taskname
DESTINATION IN GROUP g_srv_grp
PERFORMING return_get_detail ON END OF TASK
EXPORTING...

However I've already done the number control of the process accessed by my program as below.Any advice would be appreciated.

FORM get_cur_resource_info CHANGING g_free_cur.
  CALL FUNCTION 'SPBT_GET_CURR_RESOURCE_INFO'
    IMPORTING
      free_pbt_wps                = g_free_cur
    EXCEPTIONS
      internal_error              = 1
      pbt_env_not_initialized_yet = 2
      OTHERS                      = 3.

  CASE sy-subrc.
    WHEN 0.
    WHEN 1.
      MESSAGE s398(00) DISPLAY LIKE 'E' WITH 'internal error' g_srv_grp.
      EXIT.
    WHEN 2.
      MESSAGE s398(00) DISPLAY LIKE 'E' WITH 'pbt environment not initialized.'.
      EXIT.
    WHEN 3.
      MESSAGE s398(00) DISPLAY LIKE 'E' WITH'fatal error:others.'.
      EXIT.
  ENDCASE.


*& control the amount of running process
*& p_max = 4 the limit of process number used by my program
  IF g_free_cur > 0.
    IF g_running >= p_max.  
      WAIT UNTIL g_running < p_max.
    ENDIF.
  ELSE.
    WAIT UNTIL g_running < 2.
  ENDIF.
ENDFORM.
<br>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers