‎2007 Nov 15 12:20 PM
Hi All,
I am calling a Function Module in new task using STARTING NEW TASK.
If the resources are not available for the Dialog Process to start, for how long will SAP keep on trying to acquire the resources and in case if it fails to acquire resource, then what will happen
Regards,
Abhishek
‎2007 Nov 15 1:39 PM
Hi,
From memory (as it is a long time since I've done this) you can call another function module or SAP command that will tell you how many work processes are currently available before you actually then start the new task. This can help you to avoid this issue and also stop you from eating up all available work processes on a system which will annoy all other users!
I think this is the FM
CALL FUNCTION 'SPBT_INITIALIZE'
EXPORTING
group_name = 'parallel_generators'
IMPORTING
free_pbt_wps = w_free_processes
EXCEPTIONS
OTHERS = 1.
Gareth.
‎2007 Nov 15 1:39 PM
Hi,
From memory (as it is a long time since I've done this) you can call another function module or SAP command that will tell you how many work processes are currently available before you actually then start the new task. This can help you to avoid this issue and also stop you from eating up all available work processes on a system which will annoy all other users!
I think this is the FM
CALL FUNCTION 'SPBT_INITIALIZE'
EXPORTING
group_name = 'parallel_generators'
IMPORTING
free_pbt_wps = w_free_processes
EXCEPTIONS
OTHERS = 1.
Gareth.
‎2007 Nov 15 2:46 PM
Hi,
I want to know "how long will SAP keep on trying to acquire the resources and in case if it fails to acquire resource, then what will happen".
I have to call the FM and its not optional (even if there are no resources available).
Regards,
Aj
‎2007 Nov 15 3:37 PM
Does it sit in a loop trying to get the resource? Because if not, there is no point calling it if there are no resources available.
Would it not be better to put your code into a loop so that it keeps checking to see if resources are available and when they, are grabs them, else loops again and checks for resource etc... At least that way you have some control and can also help to not use up all available work processes which, as I suggested, will only annoy other users of the system.
Gareth.
‎2007 Nov 17 4:36 PM