RFC basics?

Hello All,
I know the basic differences between tRFC and qRFC. I know how to create RFC's using SE37. But how do I create and use tRFC and qRFC? The RFC we usually create is a tRFC or qRFC? How do I recognize?
Thanks in advance,
Chandni

Hi Chandni,
tRFC is used mainly to transfer ALE Intermediate Documents (IDocs).
Transactional RFC (tRFC):
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.
Queued RFC (qRFC):
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.
Please check this links for more information.
http://johnv.sapgenie.com/docs/RFC.pdf
http://zerone.samcheok.ac.kr/Asp_pr/Language/.%5Cuploadfile%5CJCo%20Tutorial-1.pdf
http://www.sapgenie.com/sapgenie/docs/SAP%20Connectors.doc
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.

Similar Messages

  • Creating a simple RFC - basic help guidance required

    Hi,
    this is going to be a simple answer and I am sure there are lots of links out there but I cant find them.
    I have been asked to create an RFC that takes in data runs a query and then returns the records. In this example I have been asked to pass in a WERKS(Plant) field and then return all the associated LGORT(Stor Loc).
    I have done some resaech and found that the table I need is T001L but I am having trouble getting the RFC to work correctly.
    I have created an import field of WERKS and created a RETURN_VALUES (new structure). I have attached the simple code below.
    However when I run this code only the last record is returned in the results. When I debug this it adds all the records to the structure but seems to be overwriting the value each time. Sure this is something to do with loops. Maybe I shouldn't be using a structure - perhaps an internal table?
    One more note is that this will be executed from a remote system.
    FUNCTION Z_MDM_LU_STOR_LOCS.
    *"*"Local interface:
    *"  IMPORTING
    *"     VALUE(PLANT) TYPE  WERKS
    *"  EXPORTING
    *"     VALUE(RETURN_VALUES) LIKE  ZMDM_STORLOC STRUCTURE  ZMDM_STORLOC
    SELECT LGORT FROM T001L
             INTO RETURN_VALUES-LGORT
             WHERE WERKS LIKE PLANT.
    ENDSELECT.
    ENDFUNCTION.

    >
    Paul Clavering wrote:
    >
    > FUNCTION Z_MDM_LU_STOR_LOCS.
    > *"----------------------------------------------------------------------
    > *"*"Local interface:
    > *"  IMPORTING
    > *"     VALUE(PLANT) TYPE  WERKS
    > *"  EXPORTING
    > *"     VALUE(RETURN_VALUES) LIKE  ZMDM_STORLOC STRUCTURE  ZMDM_STORLOC
    > *"----------------------------------------------------------------------
    >
    > SELECT LGORT FROM T001L
    >          INTO RETURN_VALUES-LGORT
    >          WHERE WERKS LIKE PLANT.
    > ENDSELECT.
    >
    > ENDFUNCTION.
    >
    Not an RFC problem; an ABAP understanding problem.
    SELECT... ENDSELECT is a loop.  So first time through the loop, return_values-lgort will be given the first value from the db.  Second time through, that's be overwritten by the second value retrieved from the db.
    As you've defined the exporting parameter "return_values" it is a structure, not a table.  So it will, and can, only have one value.
    You want SELECT INTO TABLE.  And, IIRC, for an RFC fm, you need to use the TABLES FM parameter.  Read the ABAP help for these for more details.
    matt

  • RFC,TRFC

    hi all,
    what are the different types of RFCs and difference between them(RFC,TRFC etc)
    Regards
    raj

    Dear Raj,
    what are the different types of RFCs and difference between them(RFC,TRFC etc)
    RFC Basics
    This section gives a brief overview of the Remote Function Call (RFC) within an SAP System, that is
    · How the RFC Interface works
    · The functionality that is provided by the RFC and
    · It explains the technical requirements for RFC on R/2, R/3 and external systems on all currently supported platforms.
    The following background topics are available:
    1. The RFC Interface
    2. RFC in SAP Systems
    The RFC Interface
    A remote function call is a call to a function module running in a system different from the caller's. The remote function can also be called from within the same system (as a remote call), but usually caller and callee will be in different systems. In the SAP System, the ability to call remote functions is provided by the Remote Function Call interface system . RFC allows for remote calls between two SAP Systems (R/3 or R/2), or between an SAP System and a non-SAP System.
    RFC consists of the following interfaces:
    · A calling interface for ABAP programs
    Any ABAP program can call a remote function using the CALL FUNCTION...DESTINATION statement. The DESTINATION parameter tells the SAP System that the called function runs in a system other than the caller's. RFC communication with the remote system happens as part of the CALL FUNCTION statement. RFC functions running in an SAP System must be actual function modules, and must be registered in the SAP System as "remote”. When both caller and called program are ABAP programs, the RFC interface provides both partners to the communication. The caller may be any ABAP program, while the called program must be a function module registered as remote.
    o The topic Calling Remote Function Modules in ABAP provides details on calling function modules registered as remote.
    o The topic Writing Remote Function Modules in ABAP provides information on writing function modules that you want to call remotely.
    · Calling interfaces for non-SAP programs
    When either the caller or the called partner is a non-ABAP program, it must be programmed to play the other partner in an RFC communication. To help implement RFC partner programs in non-SAP Systems, SAP provides
    External Interfaces
    External programs to call function modules in SAP R/2 or R/3 systems and execute them in these systems can use rFC-based and GUI-based interfaces. Vice versa, ABAP programs in R/2 or R/3 can use the functions provided by external programs via these interfaces.
    RFC in SAP Systems RFC is an extension of CALL FUNCTION in a distributed environment. Existing function modules can be executed from within a remote system (R/2 or R/3) via an RFC call. Adding a DESTINATION clause to the CALL FUNCTION statement does this:
    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. The RFC API on OS/2, Windows, Windows NT and all R/3-based UNIX platforms makes it possible to use the RFC functionality between an SAP System (R/3 from Release 2.1 and R/2 from Release 5.0D onwards) and a C program on the above platforms. It is of no significance to the caller whether the remote function is provided in an SAP System or in a C program. RFC frees the ABAP programmer from having to program his own communications routines. When you make an RFC call, the RFC interface takes care of:
    ·     Converting all parameter data to the representation needed in the remote system. This includes character string conversions, and any hardware-dependent conversions needed (for example, integer, floating point). All ABAP data types are supported.
    ·     There is no support for Dictionary structures.
    ·     Calling the communication routines needed to talk to the remote system.
    ·     Handling communications errors, and notifying the caller, if desired. (The caller requests notification using the EXCEPTIONS parameter of the CALL FUNCTION statement.)
    The RFC interface is effectively invisible to the ABAP programmer. Processing for calling remote programs is built into the CALL FUNCTION statement. Processing for being called is generated automatically (in the form of an RFC stub) for every function module registered as remote. This stub serves as an interface between the calling program and the function module.
    A distinction is made between an RFC client and RFC server. RFC client is the instance that calls up the Remote Function Call to execute the function that is provided by an RFC server. In the following, the functions that can be executed remotely will be called RFC functions and the functions provided via RFC API will be called RFC calls.
    All RFC functions available in a remote RFC server system, which are called by an RFC client, are processed transactionally. This means that after execution of the first RFC function in the RFC server system the complete context (all globally defined variables in the RFC server program or in the main program of a function module) is available for further RFC functions. The RFC connection is closed only
    ·     When the context of the calling ABAP program has ended or
    ·     Explicitly by RfcAbort or RfcClose in the external program.
    Until Release 3.0 the connection to an R/3 System must be established to a previously defined application server. From Release 3.0 onwards, it is also possible to have an application server assigned by the message server on the basis of a load balancing procedure. This applies both for RFC between R/3 systems and between external systems and R/3 systems.
    To make the execution of RFC functions reliable, safe and independent from the availability of the RFC server or RFC server system, the transactional RFC (tRFC) was introduced for R/3 systems from Release 3.0 onwards. This ensures that the called function module is executed only once in the RFC server system. In transactional RFC calls, the data that belongs to an RFC function must first be stored temporarily on the SAP database in the RFC client system. When processing is completed, this must be reported back to the calling ABAP program. Everything else is handled by the tRFC component in the R/3 System. Since a database is not always available on external systems, the link to the tRFC interfaces is implemented such that the client or server programs based on RFC API must take on some administrative functions to ensure that the respective function module is executed "only once".
    Best Regards,
    Srikanth
    Reward the useful answers and you will get one point yourself<a href="/people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourselfyourself

  • Regarding ale & ioc

    hi gurus ,
        how can i communicate with SAP to Non SAP using ALE and IDOCS.
    with regards
      aru.

    Hi
    SAP Integration using ALE
    (Application Linking and Enabling)
    - Introduction -
    Page 1 of 7
    1.0 Introduction
    Enterprises are increasingly looking to deliver real business benefits by integrating their systems and processes both within their organizations and between organizations. ng processes in this way, which requires tight integration, frequent communication and data exchange.
    Highly integrated and inter-dependent SAP and non-SAP systems require frequent communication, tight integration and (usually) high levels of data exchange. In order to achieve this interoperability, SAP has come up with the concept of ALE (Application Linking and Enabling).
    The idea behind ALE is to provide a more rigid integration service while allowing a high degree of independence to the individual SAP com
    ge of business information across SAP and non-SAP systems. Applications are integrated by using synchronous and asynchronous communication without implementing a central database.
    In this 7 article tutorial we will cover subjects such as:
    Data Distribution Model
    ALE process
    IDOCS
    Converters
    Configuring ALE
    Other concepts
    RFC
    Purpose
    Communication between applications of different systems in the SAP environment includes connections between SAP systems as well as between SAP systems and non-SAP systems. Remote Function Call (RFC) is the standard SAP interface for communication between SAP systems. The RFC calls a function to be executed in a remote system.
    Synchronous RFC
    The first version of RFC is synchronous RFC (sRFC). This type of RFC executes the function call based on synchronous communication, which means that the systems involved must both be available at the time the call is made.
    Transactional RFC (tRFC)
    Transactional RFC (tRFC, also originally known as asynchronous RFC) is an asynchronous communication method that executes the called function module in the RFC server only once. The remote system need not be available at the time when the RFC client program is executing a tRFC. The tRFC component stores the called RFC function, together with the corresponding data, in the SAP database under a unique transaction ID (TID).
    If a call is sent, and the receiving system is down, the call remains in the local queue until a later time. The calling dialog program can proceed without waiting to see whether or not the remote call was successful. If the receiving system does not become active within a certain amount of time, the call is scheduled to run in batch.
    tRFC is always used if a function is executed as a Logical Unit of Work (LUW). Within a LUW, all calls are
    · executed in the order in which they are called
    · executed in the same program context in the target system
    · 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.
    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 (qRFC)
    To guarantee that multiple LUWs are processed in the order specified by the application, tRFC can be serialized using queues (inbound and outbound queues). This type of RFC is called queued RFC (qRFC).
    qRFC is therefore an extension of tRFC. It transfers an LUW (transaction) only if it has no predecessors (in reference to the sequence defined in different application programs) in the participating queues.
    Implementation of qRFC is recommended if you want to guarantee that several transactions are processed in a predefined order.
    RFC: Data Transfer
    All RFC types are transferred by means of CPI-C or TCP/IP. They constitute a form of gateway communication.
    Additional Information
    · RFC Basics (BC-MID-RFC)
    · The RFC API
    · RFC Programming in ABAP
    · Queued Remote Function Call (qRFC)
    · SAP Gateway
    IDoc (for intermediate document) is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. IDocs are used for asynchronous transactions: each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database. Another SAP mechanism, the Business Application Programming Interface (BAPI) is used for synchronous transactions.
    A large enterprise's networked computing environment is likely to connect many geographically distributed computers to the main database. These computers are likely to use different hardware and/or operating system platforms. An IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another.
    IDoc types define different categories of data, such as purchase orders or invoices, which may then be broken down into more specific categories called message types. Greater specificity means that an IDoc type is capable of storing only the data required for a particular transaction, which increases efficiency and decreases resource demands.
    An IDoc can be generated at any point in a transaction process. For example, during a shipping transaction process, an IDoc may be generated that includes the data fields required to print a shipping manifest. After a user performs an SAP transaction, one or more IDocs are generated in the sending database and passed to the ALE communication layer. The communication layer performs a Remote Function Call (RFC), using the port definition and RFC destination specified by the customer model. The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system.
    is a set of interfaces to object-oriented programming methods that enable a programmer to integrate third-party software into the proprietary R/3 product from SAP. For specific business tasks such as uploading transactional data, BAPIs are implemented and stored in the R/3 system as remote function call (RFC) modules.
    A good place to get started is this Introduction to BAPIs presented by sappoint.com.
    SAP also provides this in-depth BAPI User Guide to help you master the basics. Terminology, rules for usage and prerequisites are included.
    Also, SAP provides this BAPI Programming Guide
    For ALE
    http://www.thespot4sap.com/Articles/SAP_ALE_Introduction.asp
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    For RFC
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5b6a85b11d6b28500508b5d5211/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/22/042518488911d189490000e829fbbd/content.htm
    http://www.planetsap.com/RFC.htm
    IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    FOr testing you can use WE19.
    How to create idoc?
    *WE30 - you can create a IDOC type
    For more information in details on the same along with the examples can be viewed on:
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappoint.com/presentation.html
    http://www.allsaplinks.com/idoc_search.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.erpgenie.com/sapedi/idoc_abap.htm
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30 )
    Create Message Type ( WE81 )
    Assign Idoc Type to Message Type ( WE82 )
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    Check these out..
    Check below link. It will give the step by step procedure for IDOC creation.
    http://www.supinfo-projects.com/cn/2005/idocs_en/2/
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
    go trough these links.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
    1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
    2.IDOCs are independent of the sending and receiving systems.
    3.IDOCs are independent of the direction of data exchange.
    The two available process for IDOCs are
    Outbound Process
    Inbound Process
    AND There are basically two types of IDOCs.
    Basic IDOCs
    Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
    Extended IDOCs
    Extending the functionality by adding more segments to existing Basic IDOCs.
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30)
    Create Message Type ( WE81)
    Assign Idoc Type to Message Type ( WE82)
    imp links
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    www.sappoint.com
    --here u can find the ppts and basic seetings for ALE
    http://sappoint.com/presentation.html
    www.sapgenie.com
    http://www.sapgenie.com/ale/index.htm
    Check these links.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
    Please check this PDF documents for ALE and IDoc.
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    Check below link. It will give the step by step procedure for IDOC creation.
    http://www.supinfo-projects.com/cn/2005/idocs_en/2/
    Creation of Custom IDOc type and message Type
    First Create Partner Profile(WE20 Tcode) and Port Definition in WE19 Tcodes.
    take the Basis help to create them.
    1.First create segments in WE31 Tcode with the required dataelements
    2.Create the Basic Idoc Type in WE30
    release the Segments and IDOC type.
    3.Create Message type in We81
    4.Assign the message type to IDOC type in WE82 T code
    5.Create the process code in We41 (for Outbound) WE42 (for Inbound)
    6.Create A fun module in SE37 starting with ZIDOC_OUTPUT_.. by copying some Inbound (for Inbound) Outbound Fun module
    7.Create Workflow setting if needed ..
    8. Assign the fun module to Idoc Type, Message Type and WF object (if it is there0
    9.Define setting for fun module in BD51
    10.In BD51 Define the settings for Fun module..
    10.Assign the Processs Code to Fun mod`ule
    Reward all helpfull answers
    Regards
    Pavan

  • RFC calls with SAP JCO and IBM resource adapter for SAP - basic tuning

    Hi experts,
    we are working on a java portal connected to a backend system SAP by calling RFCs.
    On our first integration tests, it appears to be quite slow fetching data from SAP by calling the remote functions from the custom portal. We are using SAP JCo 3.0.6 and IBM resource adapter for SAP 7.0.0.3 to integrate SAP with our portal.
    Is there any basic tuning to achieve to improve performances or any hint of where to tune in SAP ?
    Any help would be greatly appreciated.
    Thanks a lot,
    Jamal

    Hi Jamal,
    I understand you have already checked performance issues in the SAP Server. We had some problems with certain RFC calls and it turned out to be a badly developed ABAP sentence.
    I'd recommend you to use httpwatch or another tool to check the response times from the browser, so you can point accurately where the is.
    Regards
    Francisco

  • Visual Basic RFC SAP no-unicode. Latin2 Caracteres are converted in '#'

    Hi,
    I are inserting data in Z SAP tables  from a Visual Basic Script.
    I are doing a RFC call.
    The problem is that the data type text aren´t iserting correct when its are Latin2 caracteres.
    Example:
    Text in Visual Basic: "Prevozni strou0161ki-železniu0161ki"
    But when theRFC function inserts the data in SAP, SAP  shows "Prevozni stro#ki-#elezni#ki".
    Could somebody help me??
    thanks in adavanced,
    Javi

    Thanks for your answer.
    But i din´t solve the problem.
    I changed the encoding to UTF-16 and ISO-8859-5 but the caracteres are inserting bad yet :(.
    I'm debugging the visual basic code and I can see that the text is correct in Visual Basic, but after it is incorrect in SAP.
    Too, I'm inserting  the value directly in visual basic sourcecode:
    T_BAPI_P.Value(index, "TXZ01") = "Prevozni strou0161ki-železniu0161ki NOVO"
    But the result is the same.
    SAP shows "Prevozni stro#ki-#elezni#ki NOVO".
    I have seen that in the transaction SM59 you can specify if the RFC conexion will be UNICODE.
    The SAP system that i am working isn´t unicode, then it can not the tag to especificate this in SM59.
    Could it be the problem that the SAP system isn´t unicode??
    sorry, for my English's low level.
    Thanks in advanaced for all yousr answer!
    Javi

  • RFC LookUps Basics

    Dear ALL,
    I need some basics on why we need RFC LookUps..
    where it is used in real time projects with an example..
    and different types of RFC lookUps..with some good example
    Regards
    Shakif

    Hi sakhif,
        SAP provides an API( Application Interface ) for performing lookup or ( data Access) during runtime to enchance mapping by accessing the relevantdata that is useful in validations and  present that accessed data that is relevant for the receiver end .It plays very important role in B2B kind of scenarios where in we need to refer the data that is not a part of pay load but still need it to process the payload.
    (Ex: During the B2B scenario ,when a purchase order id being sent from source to target ,you see a field called purchase order type and the values in the sencer side contains only (OR or ZZ). but the receiver wants the definition of the particular (OR or ZZ).In this case You apply the look up , get the definitions and make them appear in the receiver data.
    so after applying look up the data transforms like this.
    SENDER Side       RECEIVER Side
    OR       -
    > Original (original order)
    ZZ        -
    > Mutually Defined .
    Lookup API for data enrichement in mapping programs.
    With the Lookup API you can call remote application systems via adapters during the execution of a mapping program. You can use the Lookup API to read data from the application system or to execute an existing mapping on the application system. The call to the application system is synchronous. Lookups are possible via the central adapter engine. The Lookup API supports the RFC, JDBC, and SOAP adapter.
    If you want to use an adapter of a third party vender, then the adapter must fulfil the following preconditions:
    The adapter must support synchronous calls.
    The adapter must not use information of a Receiver Agreement.
    The following link will help you out in understanding more on RFC look up.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439.
    Thanks,
    Ram.

  • Getting Return values from RFC function call with visual basic

    Hi,
    I am creating a sample app to connect to a SAP system which call its RFC functions created with ABAP. It was known that the function will return more than 1 return values.
       SAP Function name ==> "ZFMTP_RFC_GET_RESULT"
            Export parameters (to SAP):
                    - Student Name [char 10]         ==> "STUNAME"
                    - Student ID         [char 20]        ==> "STUID"
           Return values (From SAP):
                    - Results [char 10]        ==> "RESULT"
                    - Remarks [char 200]        ==> "REMARKS"
    i have managed to get sample codes for connecting and call a RFC function with vb but they only get a return value. How do i retrieve multiple return values like the above function "RESULT" and "REMARKS"?
    Here's my vb code to accessing the function
            Dim R3 As Object
            Dim FBFunc As Object
            Dim returnFunc As Boolean
            Dim connected As Boolean
            R3 = CreateObject("SAP.Functions")
            R3.Connection.Client = "000"
            R3.Connection.User = "BCUSER"
            R3.Connection.Password = "minisap"
            R3.Connection.Language = "DE"
            R3.Connection.System = "dtsystem"
            R3.Connection.Applicationserver = "xxx.xxx.xxx.xxx" 
            connected = R3.Connection.Logon(0, True)
            If connected <> True Then
                MsgBox("Unable to connect to SAP")
            End If
            FBFunc = R3.add("ZFMTP_RFC_GET_RESULT")
            FBFunc.exports("STUNAME") = "Jonny"
            FBFunc.exports("STUID") = "12345"
            returnFunc = FBFunc.Call() <<== How do i get the return value? or RESULT and REMARKS of the RFC Function?
    thanks alot.
    Edited by: Eugene Tan on Mar 4, 2008 7:17 AM

    Hi Gregor,
    Thanks for the link....i am having some doubts with the codes, hope you can clarify them for me if you know the codes..
    Below is the code snippet.
    Set impReturn = CHPASS_FN.Imports("RETURN")  <<=== is RETURN the standard keyword to get a                                                                                return object?
      expPassword.Value = currpass
      expNewPass.Value = newpass
      expFillRet.Value = "1"
    ''' Call change password function
      If CHPASS_FN.Call = True Then
        outFile.Write (", Called Function")
        Message = impReturn("MESSAGE") <<==== So if i have 3 return values..i just replace with the return                                                               value variable names?
        outFile.WriteLine " : " & Message
      Else
        outFile.Write (", Call to function failed")
      End If
    thanks alot...all your help is very appreciated.

  • Call BAPI_USER_CHANGE from RFC in a visual basic application

    Hi all,
    we are developing a tool in order to update users info (SU01).
    The BAPI involved is BAPI_USER_CHANGE.
    We have a table which contains a set of actions. Each action change one field at time. So, if I nedd to change the first name and last name, I call the BAPI two times.
    More or less it works but, some time, it seems that a buffer (some where) is not cleared and one user is filled with the data of the previous user in the table of actions.
    To specify the USER ID we use:
                Set paramUserName = rfcFunction.Exports("USERNAME")           
                paramUserName.VALUE = USER_ID
    To specify one filed value we use the structures (ADDRESS, LOGONDATA, DEFAULTS, ecc):
             Set paramFieldName = rfcFunction.Exports("ADDRESS")
             paramFieldName("FIRSTNAME") = "Wallace"
    Of course we set the corresponding X in the fileld name involved of the structure ADDRESSX.
    We have used other BAPI (eg. PRGN_RFC_DEL_AGRS_IN_COLL_AGR) which invold tables.
    In such case we use the freetable statement to clear the table.
    Is the a correspoind statement to clear a structure (like ADDRESS in BAPI_USER_CHANGE) ?
    Where I can find a detailed documentation of SAP DLL used to make RFC calls ?
    Thanks in advance.
    Andrea

    Do I need to call BAPI_TRANSACTION_COMMIT for each call of BAPI_USER_CHANGE of only once at the end.
    In other words:
    Case 1:
    while not .eof actions
       BAPI_USER_CHANGE
       BAPI_TRANSACTION_COMMIT
    wend
    Case 2
    while not .eof actions
       BAPI_USER_CHANGE
    wend
    BAPI_TRANSACTION_COMMIT

  • Basic doubts Regarding the RFC to File scenario.

    Hi All,
    I'm doing a RFC to File scenario, so before starting the development i went through many blogs and sites to know more the about scenario. I'm confused in the step where we have to create a RFC (type TCP/IP) in sm59.
    I have the following doubts :
    1)whether  to create the RFC in sender (which will be ECC system) or XI.
    i.e., RFC in sender (ECC) pointing to xi system in sm59 of Sender(ECC)
    or
    in XI pointing to sender (ECC) system.
    2) the program id maintained in RFC.
    the program id is any name or the FM which is being imported in XI system.
    Thanks in Advance,
    Kind Regards,
    Lalitkumar.

    Hi Lalitkumar,
    1)whether to create the RFC in sender (which will be ECC system) or XI.
    i.e., RFC in sender (ECC) pointing to xi system in sm59 of Sender(ECC)
    or
    in XI pointing to sender (ECC) system.
      It should be in sender ECC.
    2) the program id maintained in RFC.
    the program id is any name or the FM which is being imported in XI system.
    It can be any name but should be same in RFC destination and RFC adapter.
      As stefen mentioned use ABAP proxy inspite of RFC as its better performance wise.
    Regds,
    Pinangshuk.

  • Creation of Production order in Past dates using RFC

    Hi all,
    I am using RFC to Create a production order based on the datas available from MES systems.Here the process flow is From MES system datas are passed to interface in file format then from interface will calll the RFC so that the RFC will do the function of Creating the Production order & release in SAP.
    Here i face an issue that i have 3 shifts at the end of every shift i have to tranfer the datas from MES to SAP .Which means i have to create 3 Production orders for a day.My issue here is the third shift datas will be availble for me in the next day morning after that only i am able to transfer theses datas to SAP.In this case i want the SAP to create th Production order  for third shift in the Previous day time.
    Ashift - 7AM t0 3PM
    BShift-3PM to 11PM
    CShift-11 PM to Next day morning 7 AM
    I need SAP to create Production order for Shift C on 11 PM of the Previous day when i transfer it on next day morning 7AM.
    Is this possible.
    Thanks in Advance,
    MBN

    Hi,
    I mean the Production Created date as the basic date only.
    My requirement is for the C shift i will get the output from the MES on the next day morning.After that i wwill transfer the production datas to SAP throgh Interface at that time i need the basic start date & time  of the production order to be the C shift starting time that is previous day night 11.00 PM.
    Eg.
    C shift  date 12.04.2010 night 11PM to 7AM
    i transfer the c shift production datas from MES to SAP on 13/04/2010 Morning 7AM.But i want these datas to create basic start date & time of the production order on 12/04/2010  11PM.
    What should be done to get these.
    Thanks in advance,
    MBN

  • Creation of Trusted RFC fails

    Hello
    I am trying to connect my ERP and BW systems to Solution Manager but I can't make Trusted RFC connections.
    When I checked SM59 on three systems I see `You are not authorized to logon to the target system (error code 1)
    I did successfully installed Solution Manager, did initial and basic settings. I created SOLMAN_ADMIN user every system assigned it SAP_ALL, SAP_NEW and created a role with S_RFCACL authorization object, (I assigned full authorization on all objects on that role).  I did add IP numbers and hostnames to hosts file but still same. When I test connection I get success but authorization check always fails.
    I both tried from SOLMAN_SETUP > Managed Systems and also after clearing all RFCs and trusted system entries from SMT1 and SMT2, I added RFCs from SMSY but I get same results.
    Side note, all servers are in the same subnet but Solution Manager server belongs to different domain.
    My main reason to implement trusted rfc is I need to implement ServiceDesk and I have to test it before going live, so all data on Solution Manager is expendable.
    My systems are
    ERP: Windows 2003 R2 x64, SQL 2005 SP3, ERP EHP4 SP5
    BW: Windows 2003 R2 x64, SQL 2008 SP1, NW 7.0 EHP2 SP6
    Solman: Windows 2003 R2, SQL 2008 SP1, EHP1 SP7
    What am I doing wrong there?

    Hello,
    Are you letting the wizard create the RFC's for you?
    On the Client tab in SMSY?
    Also you assigned S_RFCACL  what about S_RFC?
    I would ask you to check the logon tab and make sure Current user is not checked.
    Also, please review this Note 128447 - Trusted/trusting systems
    This should help resolve.
    Regards,
    Paul

  • Step by Step Guide Details for RFC to File and File to RFC scenario

    Hi Guru's
    Good day to you. I am tyring to develop some scenarios based on RFC adaptor. so i want to start up with basic scenarios like RFC to File  scenario(Here i just want to pull some data from SAP using RFC and put it in destination folder as an text file) and FILE to RFC scenario (Here i just want to take some data from the file and update into SAP).
    For doing these scenarios i would like to request you people to send me the step by step guide which explains me about the complete steps of configurations required to do the RFC to FILE scenario and FILE to RFC scenario.
    I found some scenarios and i am in confused state. so i request you to please put your experience to help me out.
    thanks in advance.
    Regards
    Raj

    Hi Aaron,
    I don't know your scenario and your ECC and PI versions but I learned how to use ABAP Proxy more than 1 year ago with the following tutorial:
    Edit--> The forum doesn't allow me to post external link, just search "ABAP Proxy Communication Scenario" in google and visit the 1st result
    The way to develop ABAP Proxys has changed a little if your PI is 7.1. In the ECC side, the transaction SPROXY looks much better too if you have a recent version of the ECC.
    Edited by: Marshal on Oct 8, 2009 5:08 PM
    I've found that SDN Document. Maybe the scenario is not the most simple to start with ABAP Proxy but is very well documented and is for PI 7.1. The document also handles the inbound and outbound proxys
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c00ca32e-f991-2b10-f5be-97114bd2b08f&overridelayout=true]
    Edited by: Marshal on Oct 8, 2009 5:22 PM

  • RFC connection Error While run BEx Report

    Hi All
    I got BI 7.0 and create new user with roles only access: TR: RRMX to see only BEx Reporting... I create basically new customize role and put only one transcation code RRMX and assigned to user...
    When goto BEx designer I got that error
    rfc error received user has no rfc authorization for function group syst.
    I am not sure what kind of authrouzation user need to only view BEx Reporting...
    But when I put SAP_ALL in that profile same user, thats works fine, but I don't want to give SAP_ALL to user...
    2nd question same look like BEx Analyzer the side bar when I click open nothing happend and it writedown like German language..
    Please advised

    Hi Alls
    I am Angeline again, I resolved that problem and want to shair with you guys....
    1.     Tr: PFCG and click on Maintain roles
    2.     Role Name: Z_RUN_QUERIES
    3.     Click on Authorization Tab Saved Entry
    4.     In Edit mode Select the template: S_RS_RREPU and adopt reference (Business Content)
    5.     Expand u2018Business Explorer u2013 Componentsu2019
    6.     Selected: u201CType of a reporting component Calculated key figure, query restricted
    7.     key figure u2013 template structure and click on Edit
    8.     Un-Check REP Query
    9.     Generate the Profile
    10.     Create Transport number
    11.     click on user TAB and define user name in it
    12.     click User compare and complete compare and saved the entry
    13.     TR: SU01 in User click on Roles and define Z_RUN_QUERIES and profile
    Thanks

  • Source system error - RFC connection failed

    Hi Gurus,
                  I have installed ECC6 on my PC but not when i am trying to created the DS its not allowing me its saying appl comp hierarchy for source susyem "T90*" doesnt not exist.
    so tried going to source system -> done a check for my source system then i got the following errors
    Source system "T90*" is inactive
    Entry in outbound table not found
    Entry in inbound  table not found
    Basic type does not exist
    Check failed for RFC connection T90CLNT090 ; check destination
    can any one tell me how to fix this issue?
    Regards,
    Ravi

    Hi Ravi,
                Did you run appication component hierarchy in source system(TX-RSA9)
    then activate your data source
    then replicate in BW system.
    Check here for BW connectivity with source system.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bi/stepbyStepBusinessIntelligence
    Thanks,
    Vijay.

Maybe you are looking for

  • File not found in \sapmnt\trans\tmp

    Hi All, Some of my transports are failing with return code = 12 with logs similar to the following: 1 ETP199X###################################### 1 ETP162 EXECUTION OF REPORTS AFTER PUT 1 ETP101 transport order     : "<transport request #>" 1 ETP10

  • Selective Printing i.e. I have to print a field leaving the first page

    Hi All, I have a requirement to print a field on every page excluding the first page. If anybody has worked on that please help me out. Thanks in advance. Regards, Raman

  • Gluing the black plastic

    dropped my iphone on a rocky area and a little tiny piece of the corner above the stainless band of the black plastic sort of smushed up. i pushed it back down but I'd like to put a drop of super glue here to makes sure it doesn't come loose. is this

  • I subscribed to Premium but I only have one month free.

    I bought a $10 Spotify giftcard and on the front it says 'Spotify Premium - 1 Month', but on the Spotify app it said I could pay $0.99 for three months free. Why is it only one now?

  • Database udl

    Hello, I have created a vi for accessing a udl file and put the data from the file to a table in front panel. but unfortunately when i run it its giving an error. Error: NI_Database_API.lvlibB Tools Open Connec (String).vi->NI_Database_API.lvlibB Too