‎2014 Apr 22 12:26 AM
Hi all,
In all documentation about parallel processing in ABAP, one of the prerequisites is the following. However I cannot find further explanation what that is the case.
– The calling program should not change to a new internal session after making an asynchronous RFC call. That is, you should not use SUBMIT or CALL TRANSACTION in such a report after using CALL FUNCTION STARTING NEW TASK.
Link to the help page
Implementing Parallel Processing - Background Processing - SAP Library
I'm just wondering whether it's related to maximum number of sessions a user can have in SAP (I think the default is 6). If a new session is started, this will reduce the number of session available for parallel processing.
If anyone can clarify, it'd be great.
Regards,
Stevanic
‎2014 Apr 22 5:34 PM
Well I havn't written the documentation cited above. In my documentation I don't have such a general restriction.
The special restriction I have in my documentation is written beneath the definition of the call back routine with CALLING|PERFORMING:
A prerequisite for the execution of the callback routine is that the calling program still exists in its internal session when the remote function is terminated. It is then executed at the next change of the work process. If the program was terminated or is located on the stack as part of a call sequence, the callback routine is not executed.
I suspect that the SAP Library documentation cited above got that mixed up and generalized a bit too much..Feel free to open a ticket ....
‎2014 Apr 22 4:50 AM
‎2014 Apr 22 5:47 PM
Seems to me, that you mix up internal and external sessions
see Memory Organization ...
‎2014 Apr 22 4:42 PM
‎2014 Apr 22 5:34 PM
Well I havn't written the documentation cited above. In my documentation I don't have such a general restriction.
The special restriction I have in my documentation is written beneath the definition of the call back routine with CALLING|PERFORMING:
A prerequisite for the execution of the callback routine is that the calling program still exists in its internal session when the remote function is terminated. It is then executed at the next change of the work process. If the program was terminated or is located on the stack as part of a call sequence, the callback routine is not executed.
I suspect that the SAP Library documentation cited above got that mixed up and generalized a bit too much..Feel free to open a ticket ....
‎2014 May 16 3:34 AM
I have tested the parallel processing with CALL TRANSACTION and it seems that SAP allows to switch to internal session.
REPORT Z_ASYNC_TEST.
...
CALL FUNCTION 'Z_STEV_ASYNC_TEST'
STARTING NEW TASK l_task_name
DESTINATION IN GROUP DEFAULT
PERFORMING end_task ON END OF TASK.
FUNCTION Z_STEV_ASYNC_TEST.
....
CALL TRANSACTION 'SE38' USING it_bdcdata
MODE 'N'
UPDATE 's'.
ENDFUNCTION.
However, I found a problem if the current user is a dialog user. There cannot be more than 6 RFC running at the same time because that's the maximum number of dialog sessions a user can get. I got an error saying that "Maximum number of sessions reached".
The problem does not occur if the current user is a system user.
‎2014 May 16 7:33 AM
Hello,
I think things are mixed up a bit here. Therefore again the facts.
First you must distinguish between internal and external sessions:
These facts also hold for parallel processing with CALL FUNCTION STARTING NEW TASK.
Here you must distinguish between called program and calling program:
These facts should be enough to explain the observed behavior.