on 12-30-2009 8:17 PM
Hi everyone, i want to execute an RFC and not wait for the response, i don´t care, so, is there a way to achieve this ? thanks
Hello Isaac,
If you are calling the RFC from WebDynpro then you have to wait for the RFC response. However, there is a way that you can get early response from a RFC.
Suppose you are using RFC1 in your program and it contains business logic. Now, don't directly call the RFC1, instead, write another RFC2 which calls RFC1 asyncronously. This way, when you call RFC2 it automatically call RFC1 and does not wait for any response for RFC1
You can call RFC1 from RFC2 asynchronously:
CALL FUNCTION RFC1 STARTING NEW TASK taskName
Your WD application will immediately get a response from RFC2 while RFC1 still executing.
To know more about asynchronous RFC refer [Parallel Processing with Asynchronous RFC |http://help.sap.com/saphelp_nwpi71/helpdata/en/22/0425c6488911d189490000e829fbbd/content.htm]
Hope this helps
Abhinav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhinav thanks a lot for your response , so if I understand, when my WD app execute the model (RFC1), the Bapi i called needs to have the CALL FUNCTION RFC2 STARTING NEW TASK taskName instruction, and the RFC1 response while the bapi really is executing rfc2..... its like the concept of creating a child thread ?
thanks
Hi Isaac,
Please see my comments for your queries:
The Bapi i called needs to have the CALL FUNCTION RFC2 STARTING NEW TASK taskName instruction
--- Yes, this BAPI should call RFC2 which you were calling directly from your WD application before.
RFC1 response while the bapi really is executing rfc2
--- Yes, as RFC2 starts executing independently of RFC1. RFC1 will not wait for the response from RFC2 and can be executed to completion
its like the concept of creating a child thread ?
--- Not exactly as child thread can not be in execution if parent threads terminated. It is the comcept of parallel processing where you are calling RFC2 asycnhronously. RFC1 will be executed irrespective of the outcome of RFC2. So you should take care of error/exception handling.
Hope this answer your queries.
Abhinav
Thanks you a lot, now i get it .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.