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

Similar Messages

  • RFC: What Ports are used

    We are trying to establishing a connection from ECC6.0 to a cFolders System. The Systems are in different LANs but are able to reach each other. For security reasons we have to open ports that are used by RFC. Can anyone tell me what ports are used by RFC?
    Thanks!

    hi
    you need to use FILE Port.
    Regards,
    Hakim

  • What is the use of t-rfc in ALE? compared to t-rfc, Qrfc is better and effi

    what is the use of t-rfc in ALE? compared to t-rfc, Qrfc is better and efficient?

    Hi Sunil,
    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.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Whatis use of rfc

    1.what is use of rfc in sap.
    2.can u tell about asap phases in sap hr for implementation

    RFC: In all SAP systems, CALL FUNCTION represents an integral part of the ABAP language. This statement executes a function (a function module) in the same system.
    REMOTE FUNCTION CALL (RFC) is an extension of CALL FUNCTION in a distributed environment. Existing function modules can be executed using an RFC from a remote system. This is done by adding a DESTINATION clause to the CALL FUNCTION statement. The destination parameter displays an entry in the RFCDES table (which is defined with transaction SM59). This entry contains all necessary parameters to connect to and log in the destination system. 
    You can use RFC between two SAP systems.

  • Getting metadata for RFCs using RFC SDK (with position of parameters)

    Hi!
    I'm currently using the RFC SDK Function "RfcGetFunctionInfoAsTable" to retrieve metadata for RFCs from SAP. What i see is that the "Position" field in the RFC_FIELDS_U structure contains arbitrary values, and so I am not able to determine what is the actual ordering of the parameters.
    What can I do to determine the exact ordering of the parameters of an RFC? (ordering as in - I want to obtain the parameters in the same order as they appear in SAP GUI).
    Thanks,
    Mustansir

    Hi,
    I think you can use the code similar to the one below...
    some of the things not covered in this are
    1. all types for which   CALL FUNCTION 'RFC_GET_NAMETAB' is not returning result, you can call CALL FUNCTION 'RFC_GET_STRUCTURE_DEFINITION' directly. I have not covered that in this code. Hope this is helps in resolving your issue.
    Also, the code is not optimized. So there is some scope for optimization of this code.
    REPORT  ZTEST_GET_SREUCTURE.
    DATA : PARAMS     type table of     RFC_FUNINT,
          ls_params like line of params.
    data: NAMETAB     type table of     X031L,
          ls_NAMETAB like line of NAMETAB.
    data: FIELDS  type table of RFC_FIELDS,
          ls_fields like line of fields.
    CALL FUNCTION 'RFC_GET_FUNCTION_INTERFACE'
      EXPORTING
        FUNCNAME                      = 'fm_test_fm'
      TABLES
        PARAMS                        = PARAMS
    IF SY-SUBRC <> 0.
    ENDIF.
    loop at params into ls_params.
      CALL FUNCTION 'RFC_GET_NAMETAB'
        EXPORTING
          TABNAME                     = LS_PARAMS-TABNAME
        TABLES
          NAMETAB                     = NAMETAB
      IF SY-SUBRC <> 0.
      ENDIF.
      loop at NAMETAB into ls_NAMETAB.
        CALL FUNCTION 'RFC_GET_STRUCTURE_DEFINITION'
      EXPORTING
        TABNAME                     = LS_NAMETAB-ROLLNAME
      TABLES
        FIELDS                      = FIELDS
        loop at fields into ls_fields.
          write: ls_fields-FIELDNAME.
        endloop.
      endloop.
      endloop.

  • XI scenarios using Sender RFC Adapter

    Hi Forum,
    I am eager to know what kind of XI scenarios use sender RFC Adapter, can u give an example,
    does this mean........executing a RFC in a R/3 system and the result of the execution goes to XI.....or,
    does this means, like a sender JDBC Adpter, from XI, triggering execution of a RFC on a R/3, and getting back the result into XI............
    can i have a step by step blog to create such a scenario....
    thanks and regards

    Hi Sudeep,
    Sorry for late reply.
    Yes the 2nd reply was for receiver RFC.
    1. As i mentioned To configure Sender RFC you need TCP\IP connection. in that connection you will use the option registered server program and will mention a program ID there.
    2. Sudeep just remember, please configure RFC sender on XI side first and give a Program ID there, gateway service, host and login of your R3 system. Program id can be any string your name also. and please dont forget to activate the channel before going to R3 side.
    3. Then configure RFC in R3 side, and mention that same program id. mention your gateway host as R3 name or IP and you can get the gateway service from Tcode smgw. it must be something like smgw<xx>.
    and for ur information the program id is nothing but an identity on which basis the R3 system will search that which server object is active using that program id.
    4. when you will write a report to execute that RFC in background,  use Commit work as last statement.
    Please let me know if you want any further information.
    Rewrds if found helpful,
    Regrds,
    Alok

  • 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

  • How to use the RFC SDK as part of a QTP test script

    Hi there,
    after having recorded some business transactions, I want to insert some checks into the QTP test script: an easy example would be an existence check in a database table. Instead of recording a SE16 or SE16N, I would find the approach much more elegant and much more efficient to use a (VB-)programmed RFC call for this purpose.
    Unfortunately, I didn't find a way to address an RFC using the actual connection that QTP is working on. Creating a new connection would probably be possible but is not what I want.
    Any idea how I could proceed? Does anybody else have experiences in this area?
    I think this issue is not restricted to QTP but shared by any tool working on top of the SAP GUI Scripting API.
    Thanks and regards
    - Rüdiger
    Edited by: Rüdiger Plantiko on Nov 21, 2008 4:24 PM

    bigbrain28 wrote:
    > Thank You, cfsearching! I don't quite understand 100%
    how it works
    As all three of us indicated you use array notation for this
    type of
    requirement. In ColdFusion you can use array notation or dot
    notation
    to access structure data. Almost all data in ColdFusion is
    now some
    type of structure.
    I.E. #Form['myField']# is the same as #Form.myField#.
    The advantage is that with array notation you can do things
    you can not
    do with dot notation. You can reference elements that have
    keys that
    are illegal variable names such as one with a space.
    I.E. #url['my field'] is allowed, #url.my field# would fail
    or course.
    And you can concatenate the key string as we did with your
    example.
    I.E. #Form['aString' & aVariable]#
    There are many powerful things one can do with this
    knowledge. One can
    access record sets with array notations. This can allow for
    very
    sophisticated parsing of a record set.
    I.E. #myQuery['column'][row]#
    You can dynamical call a variable. Thus creating dynamic code
    that does
    not even need to know what variables exist until run time.
    I.E. #variables[anyName]#
    This just scratches the surface.

  • Inconsistency of results using adaptive RFC

    I'm calling a function from a R/3 System using Adaptive RFC and i'm having different results from my webdynpro application that the ones that i'm having in the R/3.
    If someone could tell me why this happen I will appreciate.
    Thanks.

    Hi Frank,
    Iin another opportunity I had tried to do the same procedure you are trying and not getting hit. I ended up using the parameter "sap-wd-client = WmlClient" in the url of the application ... What makes this return in xml format and can be accessed like a Web Service. It really is not a proper use for a Web Dynpro application, but with some customization finally meet demand.
    Regards,
    Angelo

  • Can we use custom RFC in creating models in Visual composer??

    Dear Experts,
    Can we use custom RFC in creating models in Visual composer??
    If yes, kindly provide some documents or links which would guide me how to achieve it.
    Warm Regards
    Upendra Agrawal

    Hi,
    Yes,you can do it.
    Configure the rfc and use like others Standard BAPI procedure.
    [https://www.sdn.sap.com/irj/scn/wiki?path=/display/vc/connectivity]
    Regards,
    Govindu

  • How to use two RFC models in one Data Source for a Interactive Form UI Elem

    Hi
    I want to use two RFC models (two Function Modules from a SAP Backend system) in one context node of a View Controller in order to pass it as the data source to a Interactive Form UI element. Can I use the data binding mechanism directly or have I to copy the data into a Value Node within the view controller.
    Thanks for helping
    René Morel
    SAP (Schweiz) AG

    Rene,
    You can create a local context node in component controller and copy the data from both the RFC's to this node, then bind it to the view controller. Then you can make this view context node as the datasource of the interactive form.
    Regards,
    Anand

  • How to call RFC using EJB module.

    hi,
        I want to call the RFC using EJB module in java. how to do it.
        if someone having the code plz post it.
    regards,
    Shanthakumar.

    /***Start of JRA specific code***//
    // Retrive connection factory                
    InitialContext initialcontext = new InitialContext();
    connectionfactory = (ConnectionFactory) initialcontext.lookup("java:comp/env/ConnFactory");
    //Request a connection handle:
    connection = connectionfactory.getConnection();
    //Create a RecordFactory object to get a metadata description
    // of the RFC SALERT_CREATE
    RecordFactory recordFactory = connectionfactory.getRecordFactory();
    // Create Record objects containing all
    // necessary information about the RFM.
    MappedRecord input = recordFactory.createMappedRecord("SALERT_CREATE");
    //Fill in the import parameters and the import table structure data here
    input.put("IP_CAT", "ALRT_CAT"); // alert category
    // Refer to the SW_CONT structure of the table of RFC SALERT_CREATE
    ResultSet inputITContainer = (ResultSet) input.get("IT_CONTAINER");
    int tabIndex = 0;
    inputITContainer.moveToInsertRow();
    inputITContainer.updateString("ELEMENT", "CONT_1");
    inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
    inputITContainer.updateString("ELEMLENGTH", "250");
    inputITContainer.updateString("TYPE", "C");
    inputITContainer.updateString("VALUE","Container_1 value");
    inputITContainer.insertRow();
    inputITContainer.moveToInsertRow();
    inputITContainer.updateString("ELEMENT", "CONT_N");
    inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
    inputITContainer.updateString("ELEMLENGTH", "250");
    inputITContainer.updateString("TYPE", "C");
    inputITContainer.updateString("VALUE","Container_N value");
    inputITContainer.insertRow();
    interaction = connection.createInteraction();
    // execute the call with the input parameters.
    interaction.execute(null, input);
    }catch(Exception e){
         // Error handling code goes here
    }finally{
         try {
                    if (interaction != null)
                   interaction.close();
              if (connection != null)
                   connection.close();
         } catch (Exception ignored) {
              // Do nothing
    // Pass on module data to the next module in chain, unaltered
    return moduleData;

  • Parallelization is not happening using asychnronous RFC in a function module

    A BW data source ZTEST
    has been created based on a function module ZTEST_FM to pull the
    data into BW system from R/3.
    (Have checked the parellel jobs running in SM66 transaction).
    Inside the function module, an RFC function
    module ZTEST_RFC1 has been called asynchronously to implement the parallelization
    to improve the data extraction time into BW system.
    Note: In this scenario asynchronous
    RFC is used to implement the parallel processing.
    The logic in the function module is as follows.
    Function module ZTEST_FM Logic:
    Fetch data from HRP1000 table into an internal table IT_HRP1000 for
    OTYPE = ‘TN’.
    Loop at IT_HRP1000 into work area (WA).
    Call the RFC asynchronously by passing OBJID,OTYPE and ENDDA,
    Calculate SOBID which is the required output field from the RFC
    function module.
    Populate the results into final internal table E_T_DATA.
    The output structure contains the following fields.
    OBJID
    BEGDA
    ENDDA
    SOBID
    Could you please give us some suggestions, to implement the parellel processing using asychronous RFC in this scenario.
    Would appreciate your help.

    Your RFC call looks correct. For collecting the result you will need to code the callback routine Write_E_T_data. Inside the callback you can use the statement
    RECEIVE RESULTS FROM FUNCTION ZFHLS_EX_TNM_ACADEMY_RFC1 IMPORTING <parameter list>
    to retrieve the calculated result. For the declaration of the callback routine I recommend
    FORM Write_E_T_data USING iv_name TYPE c.
    The parameter iv_name containing the name of the RFC task turned out to be mandatory in my tests.

  • Problem in displaying a field in webdynpro using Adaptive RFC model

    HI,
    I created a webdynpro application using adaptive RFC model and i have a problem in displaying one of the output fields.
    When i execute the function module it is giving the exact value for my output field in this case telephone number (of type STEXT which is char with length 40).But when i am trying to display that telephone number in webdynpro application it is taking only first 4 digits.
    i deleted the model and recreated it still it doesnot work.
    please let me know how to resolve it.
    points will be awarded for sure
    Bala

    Hi Bala,
    Whenever you reimport the model server restart is necessary otherwise the changes will not get reflected. You will get an error when you deploy the application.There is no go around except restarting the server as the meta data gets cached in the server as long as the server is runnig.So, Once you restart the server the cache will be cleared.
    Check once again whether you are fetching data from correct BAPI field. Still problem persist try debugging.
    Regards, Suresh KB

  • How to set the tables parameter to a BAPI using adaptive RFC model

    Hi,
    I have a BAPI ZBAPI that has a tables parameter ZPernr of type ZTable with two elements pernr and name.
    I used adaptive RFC model and created model classes for the BAPI.
    My question how do i set list of pernr and name to the tables parameter in the webdynpro for java.
    I have the following methods available
    ZBAPI input = new ZBAPI();
    1.ZTable table = new ZTable();
    table.setPernr(pernr);
    table.setname(name);
    input.addZPernr(table);
    how do i set the table parameter for multiple pernr and name
    2.
    add all the pernr and name to list and set that list to input in the following way
    input.setZPernr(list) and list of typecom.sap.aii.proxy.framework.core. AbstractList
    out of two methods mentioned which one is correct.
    Please let me know the solution
    Thanks
    Bala Duvvuri

    Hi Bala,
                In your code:
    List pernrList = new ArrayList();
    pernrList  should be declared as the  type of class HROBJECT   ( The structure name in the model  e.g. the node PERFWARN type is Zhrecmfm_002_Perfrat_Warning_Input )
    Try this:
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr);
    input.setPernr_List(pernrList);
    // call BAPI execute method
    If you want to pass list of pernrs, you can pass in alternate way
    IPrivate<viewname>.I<nodeame>Node prNode = wdContext.node<node>();
    IPrivate<viewname>.I<nodeame>Element prEle;
    for (int i = 0; i < table.size(); i++) {
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr); // Set the pernr from current record
    prEle = prNode.create<nodeame>Element(pernrList);
    prNode.addElement(prEle);     
    // call BAPI execute method
    Once I execute the BAPI how do i iterate thru second table parameter PERNR_PERFRAT to get pernr and performance rating text
    Say your node name is  PERNR_PERFRAT
    for (int i = 0; i < wdContext.nodePERNR_PERFRAT().size(); i++) {
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPernr();
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPerfrat();
    Regards,
    Siva

Maybe you are looking for

  • What is the actual size of an (empty) varray in a record?

    what is the actual size occupied by an (empty) varray in a record? For example, if I create my table defined as: create or replace type XXX as object ( myRefs VARRAY(10) of REF(yyy) create table YYY as XXX; what is the actual size of the record of ty

  • Reports available in the Business Package for MSS and ESS

    Hi, I have searched sdn.sap.com throughout looking for a comprehensive list of reports available in the business packages for both MSS and ESS, i got a little bit of joy and found some of the MSS reports but not all on sdn.sap.com, can anyone please

  • Can Mac OS X Lion Server Installed on Non-Mac machines

    Hello, I have a server with Windows 2008 standard. I want to format the machine and install Mac OS X Lion. Will the Lion server work on the hardware whcih is a pentium 4 Processor? Do I need to change the clients to Mac OS or let it remain as windows

  • Loading a KM document in a customized iView

    Hi there, I have a customized iView made out of Abstract portal component. What I need is within this abstract portal component how I can read and display a html file which is stored in KM. Your help is highly appreciated. Regards, Ponraj M

  • Sparc Station 10 external SCSI Problems

    Hi folks, i have installed Solaris 8 (10/01) on a Sparc Station 10. All worked fine, except, that only 2 drives from the external SCSI-Array (4 drives ) are recognized by the system. The format-command hangs for more than 5 Minutes after starting it