‎2011 Jun 09 10:31 AM
hi!
Is it possible to paralyze processing in a class instance?
Processflow something like:
constructor prepares general data
two methods collect data in parallel
once both methods finished, a 4th method uses data prepared by the other 3 methods (constructor and the two data collector classes)
There is something for "CALL FUNCTION .. IN NEW TASK", but is there a similar way like "call method ... in new task", maybe raising an event in my last method to start processing there?
Thanks a lot!
Roland
‎2011 Jun 09 2:44 PM
STARTING NEW TASK can be only achieved on Remote Enabled Modules. Since Methods can't be Remote enabled, we can use this addition in the CALL METHOD. As Kiran has suggested, you need to wrap your logic in the RFC FM and call the FM in the method.
To get the data back, you can use the Method: CALLING method AT END OF TASK. See this [CALL FUNCTION - STARTING NEW TASK|http://help.sap.com/saphelp_nw04/helpdata/en/3d/a846df17c1014e928626637ab06838/frameset.htm]
Regards,
Naimesh Patel
‎2011 Jun 09 10:46 AM
Hi.,
I think OO method cal doest not support this.. To Do this in OO Context Call Function Module Starting New Task With in your Methods., i.e Wrap the FMs in your Method.,
Thanks & Regards,
Kiran
‎2019 May 14 11:11 AM
I guess OP was aware of the fact that you can call function modules from within class methods. However, by using function modules at all you do lose most of the advantages OOP provides by design. So yes: Calling differenc async function modules inside a single method is in fact a solution. But no, it's not elegant because you're restricted to call all the async FMs you'd like to process in parallel inside a single method that cannot be processed asynchronously itself.
‎2011 Jun 09 10:50 AM
> There is something for "CALL FUNCTION .. IN NEW TASK", but is there a similar way like "call method ... in new task", maybe raising an event in my last method to start processing there?
No, there isn't any addition with CALL METHOD which facilitates parallel processing!
Processflow something like:
1. constructor prepares general data
2. two methods collect data in parallel
3. once both methods finished, a 4th method uses data prepared by the other 3 methods (constructor and the two data collector classes)
I'm not sure if you can achieve step 2. Let's see what the OO gurus have to add.
BR,
Suhas
‎2011 Jun 09 2:44 PM
STARTING NEW TASK can be only achieved on Remote Enabled Modules. Since Methods can't be Remote enabled, we can use this addition in the CALL METHOD. As Kiran has suggested, you need to wrap your logic in the RFC FM and call the FM in the method.
To get the data back, you can use the Method: CALLING method AT END OF TASK. See this [CALL FUNCTION - STARTING NEW TASK|http://help.sap.com/saphelp_nw04/helpdata/en/3d/a846df17c1014e928626637ab06838/frameset.htm]
Regards,
Naimesh Patel