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?
Holger Pakirnus replied
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.