Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Parallel Processing - Rechecking number of available resources.

Hi SAP Gurus,

Anyone got an idea on how to determine the number of available resources when using parallel processing / multithreading approach to optimize a program? I was able to determine number of free resources by calling fm SPBT_INITIALIZE but wasn't able to perform another similar call to this fm (exception PBT_ENV_ALREADY_INITIALIZED is being triggered) for the purpose of rechecking the current available resources that I may use from time to time. Any idea?

Thanks,

Allex

replied

Hi,

insert after INITIALIZE:

case sy-subrc.
    when 0. "ok
    when 3.
      call function 'SPBT_GET_CURR_RESOURCE_INFO'
       importing
*   MAX_PBT_WPS                       =
         free_pbt_wps                      = gv_maxno_pbt_available
 exceptions
         internal_error                    = 1
         pbt_env_not_initialized_yet       = 2
         others                            = 3.

  when others.
   "...
  endcase.

kind regards,

hp

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question