Asynchronous RFC vs synchronous RFC

Hi Experts,
Can you give me what are the differences between asynchronous RFC and synchronous RFC?
thanks.
Moderator message : Not enough re-search before posting. Thread locked.
Edited by: Vinod Kumar on Jul 4, 2011 4:45 PM

Gabriel,
<b>synchronous</b>
the sender sends a request message to the receiver and waits for a response message.
for eg. consider a scenario.. where u have a customer no. and u need customer details.which is stored in R/3...so u can configure a HTTP to R/3 synchronous scenario... a http request will be sent to R/3 having a CUSTOMER NO....and in response u will get details of customer like...cust name,address, etc...
<b>asynchronous</b>
sender send a request message but doesn't wait for response.
for eg consider a file to file scenario .where u need to pick a file from a source location to a destinartion location....so...it will asynchronous interface
hope u r lil bit clear!!.
Regards
Biplab

Similar Messages

  • What is RFC , use of RFC

    plz send me reply

    Hi Rajyalakshmi,
    Check this info.
    These are the types of RFC
    Asynchronous RFC (aRFC)
    Synchronous RFC (sRFC)
    Transactional RFC (tRFC)
    Queued RFC (qRFC)
    Parallel RFC (pRFC)
    Asynchronous RFC :
    This is used when you need to increase the performance of ABAP program by having system call more than one function module in parallel than forcing the program to wait for results .
    Transactional RFC
    This let you group one or more function module call together o tRFC LUW and ensure that fucnction module within LUW is called once . In contrast to aRFC and sRFC the tRFC belonging to tRFC LUW are executed in order .
    tRFC is always used if a function is executed as a Logical Unit of Work (LUW). Within a LUW, all calls are
    1.Executed in the order in which they are called
    2.Executed in the same program context in the target system
    3.Run as a single transaction: they are either committed or rolled back as a unit.
    Implementation of tRFC is recommended if you want to guarantee that the transactional order of the calls is preserved
    Asynchronous remote function calls (aRFCs) are similar to transactional RFCs, in that the user does not have to wait for their completion before continuing the calling dialog. There are three characteristics, however, that distinguish asynchronous RFCs from transactional RFCs:
    • When the caller starts an asynchronous RFC, the called server must be available to accept the request.
    The parameters of asynchronous RFCs are not logged to the database, but sent directly to the server.
    • Asynchronous RFCs allow the user to carry on an interactive dialog with the remote system.
    • The calling program can receive results from the asynchronous RFC.
    You can use asynchronous remote function calls whenever you need to establish communication with a remote system, but do not want to wait for the function’s result before continuing processing. Asynchronous RFCs can also be sent to the same system. In this case, the system opens a new session (or window). You can then switch back and for between the calling dialog and the called session
    RECEIVE RESULTS FROM FUNCTION Remotefunction is used within a FORM routine to receive the results of an asynchronous remote function call. The following receiving parameters are available:
    IMPORTING
    TABLES
    EXCEPTIONS
    The addition KEEPING TASK prevents an asynchronous connection from being closed after receiving the results of the processing. The relevant remote context (roll area) is kept for re-use until the caller terminates the connection.
    Transactional RFC (tRFC) and Queued RFC (qRFC).
    tRFC is used mainly to transfer ALE Intermediate Documents (IDocs).
    Transactional RFC:
    If an error occurs during a synchronous remote function call, the system cannot tell at what point the error occurred (most crucially, whether the function module was actually processed in R/3 before the operation failed). Restarting a failed call is therefore a dangerous thing to do, since you risk duplicating a completed function call.
    To alleviate this problem, you can use transactional RFC, which guarantees that each function call you issue will only be executed once, even if you submit it repeatedly to the R/3 System. The system implements this safeguard by assigning a unique transaction ID (TID) to each transaction that you submit. When you attempt to process the transaction, the system checks whether that TID has already been processed. If it has, the transaction is ignored.
    Disadvantages of tRFC
    - tRFC processes all LUWs independent of one another. Due to the amount of activated tRFC processes, this procedure can reduce performance significantly in both the send and the target systems.
    - In addition, the sequence of LUWs defined in the application cannot be kept. Therefore, there is no guarantee that the transactions are executed in the sequence dictated by the application. The only guarantee is that all LUWs are transferred sooner or later.
    Queued RFC:
    When you use transactional RFC, you cannot guarantee the order in which the function calls will be processed in the system (it is quite possible that one call might overtake another). For cases where you need to specify a particular processing order, you can use queued RFC, which is an extension of transactional RFC. In qRFC, you place each function call in a logical queue. A function call cannot be executed until all of its predecessors in the queue have been processed. Queued RFC calls are processed asynchronously
    Therefore, Queued RFC is better than Transactional RFC.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Calling Synchronous RFC Function Module in Background

    Hi all,
    Currently we are working on some requirement where in we have to retrieve data from one system(CRM) and update the same into another system(ECC). We have developed a RFC Function in CRM system and it is being called from ECC system as in synchronous mode via a batch program.
    Now since all sychronous call to a RFC function will be dialog there is a constraint on the runtime which is being set by maximum run time for each dialog work process. So my question is there an option to call an RFC function synchronously in background (background task) so there is no runtime performance.
    The standard TRFC, QRFC calls in background runs asynchronously and so I am trying to check with the SDN world as whether has anyone tried  SRFC(Synchronous) call in background?
    Thanks in advance,
    Jagath

    So my question is there an option to call an RFC function synchronously in background (background task) so there is no runtime performance.
    One solution would be to increase the value of the "time out" parameter defined the CRM system. This i feel is not a fool-proof solution as the run-times cannot be predicted. Check this thread: Re: RFC timeout profile parameter
    For me a better solution would be to implement tRFC call instead of a synchronous call. Any reasons why you don't want to implement a tRFC ?
    BR,
    Suhas
    Edited by: Suhas Saha on Jun 26, 2010 8:52 AM

  • Synchronous RFC functions from XI

    Please confirm my observations. 
    I wanted to call a synchronously RFC Function i.e. Importing some data and Exporting some reply. 
    The XI message monitor shows that the RFC adapter handles this call asynchronously i.e. QOS of EO and not BE as I would have expected.
    Is this behaviour I observe correct and does this then imply that there is no way of calling RFC enabled Functions on SAP expecting anything back
    Thanks
    Andre

    Hi Vijaya,
    Here is the message seq from the monitor for a call to a synchronous Function module :
    Status     Successful
    Repeatable     No
    Cancelable     No
    Error Category     
    Error Code     
    Start     29.03.2006 11:51:47
    End     29.03.2006 11:51:47
    Sender Party     
    Sender Service     DXI_Client_400
    Receiver Party     
    Receiver Service     DR3_Client_100
    Interface     
    XML_Interface_With_RFC
    <b>Quality of Service     Exactly Once</b>
    Message     a2f1d6e0-bf09-11da-8b8a-000d6098578c
    Reference     
    Conversation ID     
    Direction     INBOUND
    Message Type     Recv
    Profile     XI
    Connection     AFW
    Transport     HTTP
    End Point     http://ntcdxi01:50100/MessagingSystem/receive/AFW/XI
    Authorization     
    Sequential Number     0
    Number of Retries     3
    Failed     0
    Retries     300000
    Valid to     
    Persist Until     28.04.2006 11:51:47
    Schedule Time     29.03.2006 11:51:47
    The Audit log also shows that the call was handled asynchronously -
    2006-03-29 11:51:47     Success     SOAP: request message entering the adapter
    2006-03-29 11:51:47     Success     SOAP: completed the processing
    2006-03-29 11:51:47     Success     The message was successfully received by the messaging system. Profile: XI URL: http://ntcdxi01:50100/MessagingSystem/receive/AFW/XI
    2006-03-29 11:51:47     Success     Using connection AFW. Trying to put the message into the receive queue.
    2006-03-29 11:51:47     Success     Message successfully put into the queue.
    2006-03-29 11:51:47     Success     The message was successfully retrieved from the receive queue.
    2006-03-29 11:51:47     Success     The message status set to DLNG.
    2006-03-29 11:51:47     Success     Delivering to channel: RFC_MethodCaller
    <b>2006-03-29 11:51:47     Success     RFC adapter received an asynchronous message. Attempting to send tRFC for Z_THE_METHOD with TID XIel7MuBy94TgBYW0DO9XNZ0</b>
    2006-03-29 11:51:47     Success     The message status set to DLVD.
    Any iead what I'm missing ?

  • How to Use synchronous RFC calls during test run for remote accesses

    there is a Setting for the usage of RFC accesses from a tested system
    using eCATT.
    'X' - Use asynchronous RFC calls during test run for remote accesses
    ' ' - Use synchronous RFC calls during test run for remote accesses
    I developed an eCATT as following :
      SAPGUI ( SAPGUI_1 , Target_system_1 ).
      SAPGUI ( SAPGUI_2 , Target_system_2 ).
    My question is how to run the eCATT in a synchronous RFC calls
    PS: I do not want to change the Target_system to the same one in the
    above script of ecatt.Because I need to run it in 2 different Target
    systems sometime.
    for example, I give a Target_system_3 when run this eCATT
    I want the SAPGUI_1 and SAPGUI_2 run the Target_system_3 but not the
    Target_system_1 or Target_system_2 .
    Could you please tell me how to make it without the changes in script?
    Edited by: Weitong Liu on Mar 24, 2011 9:44 AM

    Hi Liu,
    Weitong Liu wrote:
    > ' ' - Use synchronous RFC calls during test run for remote accesses
    This is the standard option value. Asynchronous are not the standard way and used only for very special purposes.
    Weitong Liu wrote:
    > I developed an eCATT as following :
    >   SAPGUI ( SAPGUI_1 , Target_system_1 ).
    >   SAPGUI ( SAPGUI_2 , Target_system_2 ).
    > My question is how to run the eCATT in a synchronous RFC calls
    The commands will be executed in sequence. So each call will be synchronously replayed against TS1 and TS2.
    What is you issue with this standard procedure?
    Kind regards,
    Christoph

  • Synchronous RFC -- SOAP Scenario: problem with SOAP Response/Fault Mapping

    Hi,
    I've a synchronous RFC --> PI --> SOAP Scenario. The problem is that the message structure of the sending RFC doesn't match the Webservice Structure.
    The (SAP standard) RFC has just a Request / Response message structure. Part of the Response Message structure is a exception structure.
    The Webservice has a Request / Response message structure and in case of an error I get a SOAP:Fault.
    Problem now is that I cannot configure that scenario without usage of BPM as I will have to map SOAP:Response or SOAP:Fault to the RFC Response structure.
    Has anybody another idea to do that synchronous scenario (with usage of message mapping) without BPM?
    BR
    Holger

    1)
    you maus define 3 mapping.
    1)request
    2)response
    3)Fault
    in Interface mapping define at response boths (2-3) mapping. its clear??
    2)
    otherwise sometjhing is not clear, why do you want fault?? why dont you  get only response message. we implement this kind of response:
    <response_MT>
    <ID> (error ID)
    <system> (target system) 
    <error> (Error Description)
    </response>
    by this way fault message is not needed. but if you must have it just follow the top of message else, propose second.
    Thanks
    Rodrigo
    Thanks
    Rodrigo
    Edited by: Rodrigo Pertierra on Feb 25, 2008 11:52 AM

  • Help Need on SOAP (Sender) to RFC Scenario(Synchronous Communication)

    Hi All
    I have a requirement of <b>SOAP(Sender) to RFC</b> scenario(Syncronous Communication).  The scenaio goes like this........
    I have a web service through which I have to create a SAP Notification in SAP system and the Notification ID created and other details have to be returned back to the webservice from the BAPI.  I have identified the relevant BAPI for the scenario.
    I have a wsdl file which I have uploaded it.  What are the next steps to be done?
    Please let me know what all(e.g., Data types, Message Types, Message Interface)  I have to create in Integration Repository and what all configurations I have to make in Integraion Directory.
    FYI, I have a gone through a list of Blogs, but didn't get enough info.
    Please help me out in providing your valuable answers.
    Thanks,
    Vijay
    P.S. Rewards points are sure .....

    Hi Vijay,
       If at all you have uploded wsdl file for the webservice you no need to create data types for the same even for the same as RFC also.
         Create message mapping and drag the wsdl file which you have imported as External Definiations and there you will be having request and response parameters..Do the mapping accordingly(according to your requirement).
    Mapping like:
        Wsdl(Request)---->RFC (Input parametrs)
        RFC (out parameters)------>wsdl(Response)
    Create message interface with Synchronous for outbound
        No need of DT,MT if at all if you import the wsdl file.
       Hope i am clear.
      Please let me know if you have any queries..!
      Thanks and Regards,
      Chandu.
    null
    null

  • ERROR During call of SOAP with a SOAP- RFC- SOAP Synchronous scenario

    Hello Experts,
    I've recently created a SOAP->RFC->SOAP synchronous scenario but every time I'm invoking the SOAP via XMLSpy then i will hang and send a timeout error. Also a log in XI was generated as shown below.
    I hope you could help me on this one.
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    Exception              CX_SY_OPEN_SQL_DB
    Date and Time          28.09.2010 09:31:23
    Short text
         SQL error in the database when accessing a table.
    What happened?
         The database system detected a deadlock and avoided it by rolling back
         your transaction.
    What can you do?
         If possible (and necessary), repeat the last database transaction in the
          hope that locking the object will not result in another deadlock.
         Note which actions and input led to the error.
         For further help in handling the problem, contact your SAP administrator
         You can use the ABAP dump analysis transaction ST22 to view and manage
         termination messages, in particular for long term reference.
         Note which actions and input led to the error.
         For further help in handling the problem, contact your SAP administrator
         You can use the ABAP dump analysis transaction ST22 to view and manage
         termination messages, in particular for long term reference.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
          in
         procedure "DELETE_LUW_PACKET" "(FORM)", nor was it propagated by a RAISING
          clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         The database system recognized that your last operation on the database
         would have led to a deadlock.
         Therefore, your transaction was rolled back
         to avoid this.
         ORACLE always terminates any transaction that would result in deadlock.
         The other transactions involved in this potential deadlock
         are not affected by the termination.
    Regards,
    Alfred

    Normally such an error comes when the DB of SAP PI is full.
    Contact your BASIS or ADMIN team and ask them to free the DB space.
    Regards,
    Abhishek.

  • An exception handler is obligatory for synchronous RFC communication

    I am getting the error "An exception handler is obligatory for synchronous RFC communication" when I try to activate an Integration Process. Under a synchronous Send step, under Exceptions, I have System Error and the RFC.Exception Application Error to be handled. For both I have given the same Exception handler block. Is this not allowed? Why am I not able to go to same Exception handler block in case of both System Error as well as Application Error?
    Thanks

    you are right, it was erroring out due to the next step. Now if there is system error or exception, it will go to the exception branch. Here I need to have the ability to restart the process from this point after being alerted and having fixed the issue. So I am thinking of doing the send step again in the exception branch. But since the application error initially will exist soon after the alert is issued, this step will complete as I cannot handle application error a second time (this is where it was giving that error that exception handler was mandatory).
    Is there a way in which I can stop/fail the process after the exception branch gives the alert so that I can restart the failed branch again?

  • XI Scenario synchronous RFC (ABAP program) over XI to C program Receiver

    Hi experts,
    I have a synchronous RFC-Call between an SAP System (Sender) and an C-programm (Receiver). But now XI should become a part of this scenario. 
    Regarding this I have a few problems to include XI.
    1. SENDER:
    I have an abap application which calls a function module and send the data over synchronous RFC to XI. 
    e. g. call function 'FM_XYZ'  DESTINATION 'RFC_SENDER'
            exporting PARAMETERS
            importing PARAMETERS
            changing TABLES.
    Whis this part I have had no problems. But I have problems on my receiver side.
    2. RECEIVER:
    As receiver I have a server, where only a C-program starts a process and register the RFC Program on server side. The program is now waiting for requests. How can be called this C-Program on XI side.
    So could anybody help me. Thank you.
    Regards
    Mario

    Hi Ravi,
    thanks for your fast reply.
    In our current RFC Szenario (without XI)
    1. In SAP side we have configured a TCP/IP connection
    2. On C program side we start the C-program as follows:
    We start a File which contains  the name of c-program.exe RFC-Program-ID gateway. Then the RFC destination is registered on external Server side.
    By using the Testing connection feature on SAP RFC (SM59) the RFC-connection works fine.
    3. But now this scenario should be displaced by the XI scenario. Is it possible to use on receiver side a RFC-ADAPTER which calls an external RFC server.
    Regards
    Mario
    Message was edited by:
            Mario Bauer

  • BPM synchronous RFC calls

    I have two messages, one coming from SOAP and second one from JDBC adapter. I want to map this two messages to Single BAPI call. How do I go about doing this using BPM.

    SSG,
    1. You will have a fork with 2 branches with 2 receiver steps. One for the SOAP request and the other the JDBC sender adapter.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/24/e2283f2bbad036e10000000a114084/content.htm">Step Type - FORK</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cb/15163ff8519a06e10000000a114084/content.htm">Multiple Start Process Receiver Steps</a>
    2. Transformation Step -- N:1 mapping where the 2 source messages are mapped to the Single BAPI message.
    3. Send Synchronous Step -- You will be sending the BAPI request message and getting the Response message.
    You can use the <a href="/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC">File - RFC  - File</a> blog as a template to see how synchronous RFC calls are made and then , you can get the RFC response and do the needful as per requirements.
    Regards,
    Bhavesh

  • JDBC to RFC.request and RFC.response to JDBC

    Hi all,
    I have the need of create this scenario: JDBC will pick some records from DB and send them to SAP into a RFC.request, after that, SAP will generate a response that will be sent to XI (via the RFC. response), these data has to be sent back to the DB.
    So I am clear in the first part: JDBC sender and sRFC receiver, so that, the response will be sent back to XI, BUT, is there a way to map these response data into a DT_Receiver_JDBC without using BPM????  If so, how?
    And, what about the initial loads of data???  Customer wants this kind of scenario to be used then. What do you think about that?
    I know XI is not the best approach for this purpose but...  And i think i would have to take into account the response time of SAP in synchronous RFC...
    Hope you guys may help me on this.
    Thanks in advance and best regards,
    David

    is there a way to map these response data into a DT_Receiver_JDBC without using BPM?
    No. U will have to use BPM.
    I have not used it personally with JDBC adapter but u may try this to avoid BPM. Hope it works
    http://help.sap.com/saphelp_nw04/helpdata/en/45/20c210c20a0732e10000000a155369/frameset.htm
    I know XI is not the best approach for this purpose but... And i think i would have to take into account the response time of SAP in synchronous RFC...
    For sync scenario, the response time should always be considered. However, using XI won't be that much of pain. It will surely relieve you when it comes to monitoring.
    Regards,
    Prateek

  • RFC Sender configuration : RFC - XI - FILE

    Hi All,
    I read the post at RFC Sender Configuration in Asynchronous Mode and I have the same problem for the configuration.
    I want to do a simple asynchronous RFC scenario ( RFC -> XI -> FILE) but I keep getting errors. Do I need to create a BPM to make it work? I'm using XI 3.0
    Thanks

    Hi,
    For RFC to File Scenario, if you will be calling the RFC from any ABAP report then the import parameters will be passed to File.
    Here you can use the Concept of Dummy RFC as below.
    Lets say RFC1 --> Original RFC
    RFC2 ---> Dummy RFC
    1. Create one Function Module (RFC 2) in which take the import parameters similar to the  RFC -1 Output parameters.
    2. Now in ABAP report call the RFC-1 and get the Output in export parameters and pass it to RFC-2 as import parameters.
    3. In XI import RFC-2 and map the import parameters to the Receiver File.
    SO your purpose to pass the Output of RFC-1 to file in async way will be resolved .
    Thanks
    Swarup

  • Need to make RFC Sync  to RFC Async

    Hello All,
    I have RFC Sender and RFC Receiver Sync
    I want to make RFC Sender and RFC Receiver Async
    I have removed the export parameters of both the RFCs
    In interface mapping I used the request message mapping. and kept the response mapping part blank.
    Now when I run this scenario it works fine but also
    in sxmb_moni I see two messages.
    One for my request mapping. -- ok .
    Second empty message for response mapping.
    I do not want this second message in my sxmb_moni.
    Can this be handled.?
    Regards

    Hi Rick,
    RFC is by default synchornous communication, so even if you tried to supress it and trat as asynchornous call, the second message will not be supressed.
    When you create the Interface Mapping, by default it will ask for response mapping also, even if export parameters are not avaialble.
    Thus you can't avoid it. if there is requirment of Response in interface mapping then it will add the second message in SXMB_MONI.
    refer below link may be this will help you
    Send RFC to SAP XI – Asynchronous
    /people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous
    Thanks
    Swarup

  • Monitoring of remote system's Transactional RFC and Queued RFC

    Hello,
    In our production system, in rz20- CCMS monitor templates- Communication-Transactional RFC and Queued RFc- outbound queues- Queues otherwise not monitored we can see blocked queues for each client.
    System is connected to solution manager and we wish the central auto reaction is implemented in solution manager
    However i am unable to find Transactional RFC and Queued RFC for the remote system, they exist only for solution manager itself
    Tell me how can i do the central monitoring

    Hello,
    First you need to check with your Landscape in solman in order to monitor any kind of activities to do so pls follow these steps.
    Go to SMSY in solman under Landscape components>Product systemsselect you satellite system example SAP ECC.
    On the main screen you will find client for which you have generated RFC connection. Please check though connection are working fine, Go to edit mode and try to click on generate button there will be a pop-up, which gives a clear picture of RFC connection which already exists, and you can also re-generate this RFC connection by clean it up when you re-generate pls select under Actions after generation assign RFC dest for system monitoring.
    But make sure there is no project impact on this RFC, like they are not using any logical components and already have some projects running on this RFC connection.
    I would advise you to first you the option of assign and check RFC button which is next to generate icon.
    Regards
    JUDE

Maybe you are looking for