‎2014 Jan 14 2:19 PM
Hi all, I have to elaborate more than 2 millions of record, I have divided these record making a small packages and running my function "in update task" with all my different packages of data.
Now I'm having a problem with the available channels because for example I must launch 10 parallel procedures but I have only 9 available channels, if I start with these 9 channels it seems it will be busy until the end of the 10th package.
Why the 9 channels wait for the end of 10th? If the execution of their program finish I expect that the 9 channel return to be available. I should close the channel and set it as available after the end of any single function execution.
How can I solve my problem?
Thank you
For example:
do n times
call function 'FUNCTION'
starting new task lv_name
destination in group 'parallel_generators'
performing f_return_info on end of task
enddo
‎2014 Jan 14 2:53 PM
Did you first call SPBT_INITIALIZE to get number of free processes. Then every time you successfully create a task increment a counter of current running tasks. Decrement the counter in the end of task method/form. Check maximum number of running tasks reached before creating a new task, if reached use a WAIT UNTIL one process ends and decrements current number of running tasks to less than maximum number.
More information at help.sap.com : Implementing Parallel Processing
Regards,
Raymond
‎2014 Jan 14 2:53 PM
Did you first call SPBT_INITIALIZE to get number of free processes. Then every time you successfully create a task increment a counter of current running tasks. Decrement the counter in the end of task method/form. Check maximum number of running tasks reached before creating a new task, if reached use a WAIT UNTIL one process ends and decrements current number of running tasks to less than maximum number.
More information at help.sap.com : Implementing Parallel Processing
Regards,
Raymond
‎2014 Jan 14 3:31 PM
Yes,
There is a procedure with SPBT_INITIALIZE to calculate how many processes I can run but I want to keep some available channels; so for example I have 10 free channel but I want divide my session in 8 + 2 to keep 2 channels free for other different processes.
‎2014 Jan 14 3:46 PM
‎2014 Jan 14 4:51 PM
Thank you Raymond but It's not what I need anyway I think these information will be very usefull for me; I need to close a task when its program end the execution getting available its channel for another task