Available Dialog Work Process in system

Many a times in development, need to implement asynchronous parallel processing to speed up the execution but unfortunately we can not spread as many number of parallel threads in the program as we have a limited number of dialog work processes. So maximum parallel threads we can create that depends on the currently free/available work processes. So we can use the FM to get the free dialog work process at the run time.


DATA lv_max_dwp TYPE i,
lv_free_dwp type i.

CALL FUNCTION ‘SPBT_INITIALIZE’
* EXPORTING
*   GROUP_NAME                           = ‘ ‘
IMPORTING
max_pbt_wps                          =  lv_max_dwp
free_pbt_wps                         =  lv_free_dwp
EXCEPTIONS
invalid_group_name                        1
internal_error                                 2
pbt_env_already_initialized            3
currently_no_resources_avail         4
no_pbt_resources_found                 5
cant_init_different_pbt_groups       6
OTHERS                                            7.

WRITE :‘Maximum Dialog Work Processes available in the server:’lv_max_dwp.
WRITE :‘Free Dialog Work Processs available in the server:’lv_free_dwp.



 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s