Using Synchronous and Asynchronous Tasks

Dart, Jocelyn jocelyn.dart at sap.com
Thu Apr 11 21:57:34 EDT 2002


Hi Denis,
There is a good section on this in the SAP Library help - suggest
you read it.
 
Basically, a sychnronous task calls a synchronous method which executes
its code and then returns results to the task as one complete contiguous
action.
So when the method finishes the work has to absolutely be completed at that
point.
You usually use this for e.g. displaying stuff, direct dialog updates.
 
Asynchronous tasks and methods are used when at the end of executing the
code in the
method the work may not yet be completed, and you can only be sure the work
is completed
when the terminating event confirming that the work really is done is
received.
You usually use this for changing stuff when you are calling transactions or
BAPIs or function modules
etc. that use the UPDATE TASK for updating stuff in the database - i.e. the
dialog
and update sections of the transaction or whatever are separate.
 
This is not the whole story - e.g. you might use an asynchronous task for a
dialog update
if raising a terminating event is the only way you can check the user has
changed the
certain fields.
 
Read the SAP Library help please.
 
Regards,
        Jocelyn Dart
Consultant (EBP, BBP, Ecommerce, Internet Transaction Server, Workflow)
SAP Australia
Email jocelyn.dart at sap.com <mailto:jocelyn.dart at sap.com>
Tel: +61 412 390 267
Fax: +61 2 9935 4880
 
 
-----Original Message-----
From: Denis Crouzet [mailto:denis.crouzet at arinso.com]
Sent: Thursday, 11 April 2002 1:26 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Using Synchronous and Asynchronous Tasks
 
 
Hello experts,
 
I know exactly what are the differences betweeen Synchronous and
Asynchronous Tasks :
In theory, Tasks using Asynchronous Methods :
- can not have export parameters
- can not have result parameter
- can not have exceptions
- MUST be terminated by a Terminating Event (published by the application)
 
In practice, I think you can replace an Asynchronous Method by a Synchronous
one (when creating new methods).
Look at ABAP code in method Delete of the Objet Type FORMABSENC (SAP
Workflow Demo) : the publication of the Event is done there!
I think it is better to work with Exceptions.
 
Tell me when you are absolutly certain to use Asynchrone mode. What are you
check list?
Any comments welcome.
 
Denis
SAP HR and Workflow Consultant
Arinso France
Paris
 


More information about the SAP-WUG mailing list