RFC Notes

HI experts
first i want to know about the RFC. can anybody give me RFC tutorials with examples? and i want to connect sql server to sap? and let me know the procedure. and i have to take some table data to server from sap tables? how can i do?
pls help me.

Go through the following Example & Document
Re: SM59
Sending system side(SEND--800)
Create function module by using Tcode SE37 or SE80
goto attributes select remote function
activate
Receiving system side(RECE--000)
goto Tcode SM59
here select the R/3 Connections-->click on Create Button
give RFC Desstination : TESTRFC
Connection Type : 3 for Connecting two systems
Description : Some meaningful Description
Press enter
give Target system Name : SEND
Language : EN
Client : 800
user Name : sapuser
Password : xxxxxx
save this connections & click on test connections(f8)
& Remote logon(f7)---> it will open a session
with client 800 that is your sending system
then only your RFC is correct
create a report in SE38 Tcode
data : c1 type i.
data : itab like mara occurs 0 with header line.
call function 'ZRFCFM' destination 'TESTRFC' --->Function Module 'ZRFCFM' your just create at Sending system
exporting
importing
exceptions.
Here are the steps.
SM59 Transaction is used for Connection Establishment with Destination.
When you establish a connection to a client through a destination, the HTTP connection must first be entered in transaction SM59.
There are two types of HTTP connection in transaction SM59: Call transaction SM59 to display the different RFC destinations.
The HTTP connection to the external server (connection type G) and the HTTP connection to the R/3 system (connection type H) are different only in their logon procedures. Their technical settings are the same. To display the technical settings, double-click a connection.
You can choose from three tabs. Under Technical Settings, you can specify the following:
E Target Host: The host to which you want to connect.
Note that if you are using HTTPS as a protocol, you have to specify the full host name (with domain).
E Service No.: Here, you specify the port. The destination host must of course be configured in such a way that the specified port gunderstandsh the corresponding protocol (HTTP or HTTPS). See Parameterizing the ICM and the ICM Server Cache.
E Path Prefix: At the time when the connection to this destination is initiated, the system inserts this sub-path before ~request_uri.
E HTTP Proxy Options: Here, you can configure a proxy for HTTP connections: You can determine the proxy host and service, as well as users and passwords for the HTTP connection.
The tab page Logon/Security will be different depending on whether you have selected a HTTP connection to an external server (connection type G) or a HTTP connection to an R/3 system (connection type H).
HTTP Connection to an External Server (Connection Type G)
Choose the connection you want to use. You can choose from the following logon procedures:
E No Logon: The server program does not request a user or password.
E Basic Authentication: The server program requests a user and password. Basic Authentication is a standard HTTP method for authenticating users. When a user logs on to the target system, he or she provides a user ID and password as authentication. This information is then sent in a header variable as a Base 64-encoded string to the server, through the HTTP connection.
E SSL Client Certificate: If you use client certificates for authentication, the client authentication is performed through the Secure Sockets Layer (SSL) protocol. In this case, you must also select the SSL Client PSE of the SAP Web AS that contains the relevant certificate for the authentication. The target system must handle the issuer of the SAP Web AS client certificate as a trusted system.
Under Logon/Security, you can also activate SSL to ensure that HTTPS is the protocol used (if you select SSL, make sure that the correct port is entered under Technical Settings). In the security transaction STRUST you can determine which type of SSL client is used. (Getting Started with the Trust Manager, Trust Manager).
The field Authorization for Destination has been implemented as an additional level of protection. We recommend that you specify a user and password for the RFC destination.
HTTP Connection to an R/3 System (Connection Type H)
Here, you can specify more settings for authentication in the target system.
The settings under Technical Settings and Special Options are the same as for connection type G. Under Logon/Security, the connection type H has additional logon procedures. As with external servers, you can activate and deactivate SSL and specify an authorization.
Because the target system is an SAP system, you can set the client and language for the logon as well as the user name and password. If you check Current User, you have to specify the password.
The following authentication procedures are available: Basic Authentication, SAP Standard, and SAP Trusted System, and SSL Client Certificate.
E HTTP Basic Authentication: Logon with user and password
E SAP Standard: This procedure uses an RFC logon procedure. The RFC Single Sign-On (SSO) procedure is valid within the one system. The same SAP user (client, language, and user name) is used for logon.
E SAP Trusted System: Trusted RFC logon to a different SAP system (see Trusted System: Maintaining Trust Relationships Between SAP Systems)).
E SSL Client Certificate: The SSL protocol enables you to use client certificates for the logon.
Type G/H (SM59)
Timeout:
When sending a HTTP request, you can use this parameter to specify the maximum response time for the connection.
HTTP Setting:
You can use the HTTP version to specify the protocol version of the HTTP request (HTTP 1.0 or 1.1).
Compression:
You can use this option to activate the gzip compression for the request body. This can only be activated in HTTP Version 1.1.
Compressed Response:
In the standard setting, the SAP Web Application Server sends the Accept Encoding field as a header field with the value gzip, if the application server can handle this compression. This notifies the partner that the caller can handle gzip decompression, and that the partner can send compressed data. If you want to prevent a compressed response being sent, choose the option No.
HTTP Cookie:
You can use this option to control the way received cookies are handled.
You can specify the following for cookies:
E Accept them automatically
E Reject them automatically
E Accept or reject them in a prompt
E Use a handler for the event IF_HTTP_CLIENT~EVENTKIND_HANDLE_COOKIE to process the cookies in the program.
E In the next section, you can read about the parallelization of requests.
Check this thread
Re: SM59
RFC:RFCs are requests that an SAP component sends to invoke functions on remote systems, or calls that remote systems initiate to invoke functions on an SAP component.A process that can accept RFCs from SAP components. This allows SAP components to access functions in external systems. In SAP BC terminology, the process is called a Listener. Listeners are one or more threads on SAP Business Connector that wait for incoming requests from SAP components. Listeners are named and register with an SAP gateway to indicate that they are ready to accept requests. Listeners can accept RFC or tRFC requests.
TRFC:Protocol for ensuring that an RFC is executed successfully and executed only once on the target system. SAP Business Connector can handle both inbound and outbound tRFCs.Communications method that an SAP component uses to asynchronously invoke a function on a remote system and that a remote system uses to asynchronously invoke a function on an SAP component. The tRFC protocol ensures that an RFC is executed successfully and only once.
Detailed Description **********
Transactional RFC(tRFC):-Transactional RFC uses resource checking only. It does not use parallel RFCs.
The required ABAP language element is:
CALL FUNCTION remote function DESTINATION destination IN BACKGROUND TASK
This ABAP command flags the function module remote function for asynchronous processing. The module is not executed immediately. The data transferred with EXPORTING or TABLES is placed in a database table. A COMMIT WORK then triggers the function module. There are various cases:
E The data is updated. In this case the function module is executed within the update following the V1 phase, usually even on a different server.
E The data is not updated. In this case the function module is executed in the same work process.
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.
RFC:-
Communication between an MTS component and the R/3 System uses Remote Function Call (RFC). Since there is considerable overhead involved in establishing these connections, the MTS does not release a connection as soon as an object has finished with it. Instead, it keeps it in a connection pool. From here, it can be reused by another object. If after a certain period the object has still not been used, the system will release it.
Each RFC connection is characterized by the following properties:
Target system
Client
User name
Password
Language
A pooled resource can only be reused by an object with the same properties. Thus resource pooling is of considerable importance in Web scenarios, where several users share a single R/3 user, because there will be many requests using the same connection parameters. If the MTS can allocate an existing connection to these requests, the performance of the application will be improved, because you no longer have the overhead associated with creating new RFC connections.
for more info: http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5b6a85b11d6b28500508b5d5211/content.htm

Similar Messages

  • Exception class: RFC not found

    Hi,
    Do you know whether there is an exception class in web dynpro java that i can catch in case the RFC is not found in the backend system?
    Thanks and regards,
    Nada

    Thank you!
    Are the mentioned exceptions general exceptions if something is going wrong with the execute() method or they are specific for the problem 'RFC not found in the backend).
    So I need this specfic information that the RFC is not found in the backend.

  • RFC not created in receiver system

    Hi,
    FIile-rfc received in receiver system until yesterday.now the RFC not reaching to receiver system.They are no changes and no change in RFC structure.
    all the ques are clear and RFC connectin to the receiver system is alo fine and CC monitoring is also green and in the audit log everything is sucessful.sxmb?moni messages are sucessful.
    please let me know where i can check ...
    Regards,
    hyma

    Did you see any logs in receiver RFC channel?
    Check the receiver service for interface in moni- SOAP header-Main document.
    Also check if any conditions are specified in receiver determination.

  • RFCs not working after Refresh, is this SecureStore issue?

    In our landscape we do frequent system refreshes (DB copy). we use to take out RFC table export and then import them back after refresh. every thing was fine till we upgraded to Netweaver 6.0. Now after refresh most of rfc donesn't work (one which have user ID/ Password in them).
    Here is my findings till now:
    When we goto SM59 and RFC maintenance screen it give below message:
    bold "User Password invalid for identifier /RFC/CCMS (see Long text)"
    ============================
    This is what long message is"
    Message no. SR128
    Diagnosis
    Changes to the global key or system data have invalidated the passwords in secure storage.
    Procedure
    Enter the user password again.
    Procedure for System Administration
    You can find detailed error messages for the specified ID in transaction SECSTORE.
    ======================================
    In secstore transaction I found this message for entry:
    "System-dependent data for entry /RFC/CCMS changed: TRS / WTH"
    Long text for this is:
    System-dependent data for entry /RFC/CCMS changed: TRS / WTH
    Message no. SECSTORE031
    Diagnosis
    When accessing the secure storage, the system detected that system-dependent data (installation number or system ID) had been changed.
    Entry data: TRS
    Current system data: WTH
    If you receive this message during a migration process, the "Current system data" field contains the old specified system data instead of the current system data.
    The content of both fields can also be empty, if the system cannot determine the data in the current context.
    System Response
    It is no longer possible to access entries that were created with the previous data.
    Procedure
    Contact your system administrator.
    Procedure for System Administration
    For more information, see SAP Note 816861.
    ========================================================
    When I check the note it talk about the system copy and migration key, release key. I don't think this is valid in our case.
    Now I tried to find out the tables where secstore stores its data:
    RSECACHK    Table for Controlling ABAP Programs
    RSECACTB     Table for ABAP Access Authorization for Secure Memory
    RSECTAB       Secure Memory: Memory for Encrypted Data
    At present we backup following tables:
    rfcattrib
    rfcdes
    rfcdoc
    rfcsysacl
    Please advise if anybody faces the same issue? does anybody have any solution any notes?
    Edited by: Madhusudan Bansal on Oct 22, 2008 9:46 AM
    Edited by: Juan Reyes on Oct 22, 2008 1:24 PM

    I checked all the notes and tables. every thing is correct.
    What I think wrong is when we do refresh at that time. SS (secure store) tables from source system come here! we just export and import RFCs but not SS.
    All I wanted to know is If we export and import SS tables will this resolve our issue?
    can you tell me have you ever did refresh for netweaver? did you face this issue?
    appreciate your help

  • RFC Lookup with RFC - not BAPI

    Hi all,
    Is it possible to make an RFC lookup to a Function Module remote enabled that not is properly a BAPI? I'm trying using Michael RFC lookup sample, but in the sample he uses BAPI_PO_GETDETAIL (it's working fine to me). When I call a Function Module (import it to XI, make all the steps as in the sample), it returns an error "parameter with name RETURN not found".
    I have tried to put this parameter exactly as it is on BAPI_PO_GETDETAIL, but still didn't work. Some tip?
    thanks!!!
    roberti

    roberti,
    Is it possible to make an RFC lookup to a Function Module remote enabled that not is properly a BAPI?
    >> yes you can do it .
    in rfc function module do you have import and export parameters right. check whether Retrun is passed or not. if you dont structure to accept RETURN as input then dont passit RFC function module
    Regards
    sreeram.g.reddy

  • RFC not getting data from XI

    hi,
    in my scenario, XI is passing the data back to RFC, but in my program where i call the RFC, the data is not received. what could be the issue.
    CALL FUNCTION 'ZFFF' DESTINATION 'XI'
    TABLES
           INP   = aaa
           OUT1 = bbb
           OUT2  = ccc.
    COMMIT WORK.
    it was working fine before when i had only OUT1. Later I added OUT2 and then onwards I am not getting data for any of the tables. I have checked in XI, data is being passed out of XI to RFC. No issues in that.
    something seems to have gone wrong in the RFC modfication or the RFC call. can anyone please help.
    thks

    Hi,
    Check the export import parameter declarations & data types in both RFC & XI.
    Put a break point in RFC & check whether it is getting triggered.
    Best regards,
    Prashant

  • IGS rfc not working  BI 7.0

    Hi All,
    We have upgraded our BWD system from 3.5 to 7.0, in smicm restart j2ee server option is disabled only Icm  restart option is enabled.  I have checked the services  both the SMTP and HTTP are active and  HTTP is activated as External also.
      I have checked the Http server ->display data: it's showing that ABAP and J2EE configured true but J2ee server operational = false.
    If  j2ee server is not working plz suggest me how to start the j2ee server.
    If  j2ee server is not working does IGS RFC work ?  presently we are facing the problem with IGS rfc   we have given the paramters according to note 844669 in instance profile still no luck .... please suggest..
    Thanks,
    Subhash.G
    Message was edited by:
            subhash gadde

    Hi Markus,
    We have fixed the IGS problem the RFC IGS pointing is wrong destination.
    We have given the program  IGS.Pjazzsap6 in the RFC destination.
    I do not have any information about Pjazzsap6 exactly what does it mean?
    our EP dev server  which is connecting to BWD is pointing to Pjazzsap6 in IGS destination . Is Pjazzsap6 is kind of program file ? please suggest...
    Thanks,
    Subhash.G

  • Changed structuere of RFC not found after Re-import

    hi guyz
    The RFC i am using has changed and one new input field was added to RFC. Now i have reimported the RFC, the model is showing the changed field as well. But the problem is that while deploying it throws follwing Exception.
       com.sap.tc.webdynpro.progmodel.context.ContextConfigurationException: DataNodeInfo  (SalesOfficerComp.Zpdp_Cust_Salesgrp_Input.SaleGrpOutput.Out_Table):     structure field Mkt_Type not found
       The changed field is of type Mkt_Type.
        I am not getting any clues regarding this.
       Please help me to sort out this problem.
                         Thanks.
                             Deeps

    Hi Deepak,
    Follow the steps.
    Step 1:  Remove the model from the used models.
    Step 2:  Re import the Model using the changed RFC.
    Step 3:  Rebuild Project
    Step 4:  Use the new model in used models.
    Step 5:  Go to the Diagram view and do the mapping once again between
    i>     Used Models and Component Controller
    ii>     Component Controller and View.
    Step 6: Build and Deploy.
    Regards,
    Mithu

  • RFC not shown in source systems

    Hi All;
    I create an RFC from BW  to ERP 2004
    now this rfc is being shown in transaction SM59 but when i run
    transaction rsa1 and go to source systems there is no source system for the RFC that i created
    Please help
    Thanks and regards
    Tushar

    Tushar, it is not enough to just create an RFC connection in SM59.  You also need to create a Source System connection in RSA1 that uses the RFC connection from SM59.  Goto RSA1 and click on Source Systems.  Right-click on Source Systems and <b>Create</b>.  A window will appear prompting for the Source System type, use SAP System from Release 3.0E.  It will then prompt you for Available Destination where you put in your RFC connection (it is a drop-down list).  Type in your user-id and passwords to connect the two systems together and you are all set.
    Your Source System will be set up.  You can right-click on your Source System and select <b>Check</b> to verify the connections and the passwords.
    Hope this helps.

  • RFC not getting executed

    Hii,
    I am executing an RFC which is to fetch some values.There are some conditions for which value is not fetched.Then
    ResultNode.size() becomes 0. But after this situation arises, second time i call the 'fetch' method in my view, RFC is not executed.
    Any clues why it is happening so ?
    ResultNode : Model node containing the fetched values after RFC execution

    Parama,
    It seems your ResultNode is not getting refreshed after RFC call. Please try following approach to determine what is wrong.
    1. Try running RFC in ABAP side with Transaction SE37 providing values that are not getting any results from Java side. If it works there, try following approach.
    2. Invalidate the Resultnode after executing BAPI with following code.
    wdContext.ResultNode().invalidate();
    If these approaches do not work, please post your code here.
    Vishwas.

  • Changes in RFC not reflecting in WebService

    Hi everyone,
    I´ve made a simple WebService using SAP-PI, that is sync. It received a request, uses a RFC to check data in SAP and then gives the response. It's working just fine.
    Now, the RFC has change - some business rule - and for some reason, it's not reflecting on my WebService. (I can see that because the response should have 3 itens but I have 4).
    I mean: if I run the RFC in the SAP R3, it returns one thing (3 itens), if I run my WebService, that calls this RFC, it's returning 'the same old data' (4 itens).
    I think I should not change anything in my SAP-PI since the input and output are the SAME. Only the RFC ABAP rule changed.
    What should I do?
    I did all sort of 'cache cleanig' already.
    I did re-import the RFC already.
    I did re-generate the WSDL already.
    Nothing... still not able to see the change in the RFC business rule.
    What should I do?
    Regards!

    Hi,
      For this need to clear matadata loaded ...
    RFC Changes not working in XI
    Check the above thread for doing the same..i.e activate the RFC channel by modifying something
    HTH
    Rajesh

  • Idocs and rfcs not found!!

    Hi,
    Check whether you can find these Idocs in the R/3 System if you goto the tcode we05/we07 and try to check whether this idoc has already been executed, and also try to import those idocs in the SWCV.
    I could not find the RFC name which u have mentioned, let me know more details about that RFC.
    Regards,
    Nithiyanandam

    Manas,
                I have done that long ago, if required I can send u the screen shot of the IR. It's not there!!
    Arnab

  • Principal Propagation SOAP-PI-RFC not working

    Hi experts,
    I have designed on PI 7.0 SP16 a SOAP->PI->RFC scenario enabling the call of
    RFC_READ_TABLE (from ECC) through a webservice. For tests purpose, I have deployed WSDL file on IIS server and I call it from SAP Web Services Navigator. Tests are OK if we do not activate principal propagation on sender and receiver agreements.
    But we need to activate it in order to manage authorizations for people calling the webservice.
    So, I have followed all the required steps described in OSS note 974873.
    In addition, on PI Java Visual Administrator, I added CreateAssertionTicketLoginModule to com.sap.aii.af.soapadapter*XISOAPAdapter (Service u2018Security Provideru2019 -> runtime -> policy configurations ) in order to create an assertion ticket when SOAP adapter is called.
    When calling the webservice, the response contains : "Received HTTP response code 401 : Unauthorized".  In RWB I can see that the communication channel is in error, not even displaying the content of the message.
    The security.log file contains : u201CAttempting to create outgoing ssl connection without trusted certificatesu201D
    My test user (and PIAFUSER) has SAP_XI_APPL_SERV_USER role, are not locked and PI Caches have been cleared.
    In addition, I have not set SSO in PI, thinking it is not a prerequisite to principal propagation.
    Does anyone could help me ?
    Thanks for your help,
    Philippe
    Edited by: IBM France CONSEIL on Feb 19, 2010 9:48 AM

    Stefan,
    what I understand from the comments is that I have to use SAML, but this is coming with PI 7.1 and I am working on PI 7.0.
    However, when I read the beginning of this thread [Principal Propagation - PIAFUSER in Assertion Ticket] it proves it can work without SAML, isn't it ?

  • RFC Not found for connecting To bw via proxy

    Hello SDN,
             I am doing a R3XI Proxy (BW) scenario, i am following the how to gyide " push data into BW" The guide tells about an RFC-enabled function module which will be used to
    perform the inbound processing of data like --Name: /BI0/QI6ASENDXMLDATATOBW_RFC
    What i beleive is that i need to create a data source as per my data structure and reflect in RSA7, but i am not able to get this RFC, where can i get the RFC which is send to send data To BW.
    Anyone who has send proxies to BW please throw some light on this.
    Regards,
    Anirban.

    Hi,
      This rfc gets self generated once you create a new Data source.
    Hence closing the thread as of now,
    Anirban.

  • RFC not found error

    Hi people,
    I have developed a Z RFC in R/3 system and the same is activated and used there. But when I try to use the same RFC in BW system through 'Pattern' function, it gives me as error that the Function Module not found.
    Do I need to create the same RFC in both systems?. If not, what could be the solution. Also, if possible please provide me example of RFC Destination code to be used while calling RFC.
    Thanks in Advance.
    Nitin

    Hi,
    please check out the link below it might help you
    its not required to use RFCs on both side but you can also use BAPI instead of RFCs
    http://help.sap.com/saphelp_nw04/helpdata/en/22/042537488911d189490000e829fbbd/content.htm
    ***************please reward points if the information is helpful to you***************

  • RFC Not found from the Third party system

    Dear Friends,
    I have customized a RFC, All components are active.
    When I am searching the RFC from third party system this RFC is not able to find, others are showing.
    What could be the reason..../
    Thanks & Regards

    Hi Sachin,
    Just to be sure, could you please check whether the RFC radio button is selected in ATTRIBUTES Tab of SE37 for your RFC. Also check if the RFC is active.
    Best regards,
    Prashant

Maybe you are looking for

  • Report Version 4 since Leopard Update...I can not use Ichat anymore

    Hi, It seems that there is many pb with Ichat since Leopard, does anybody know what is wrong, I think I tried everything - turn off sharing internet - change the ports - change the bandwith - add Ichat into the security etc... Any help will be apprec

  • Mapping the IDOC fields for Inbound PO

    Hi, I am trying to map the fields for PO for IDOC type ORDER05, but unable to do so for the following IDOC fields in segments. Document Date Vendor Account Assignment Category Delivery Date Requirement No. Requisitioner Purchase Requisition Preq Item

  • IAS Dynamic Reloading doesn't reload related classes!

    Hi, I am trying to configure dynamic reloading on the development machine [on Solaris 5.8] in order to get servlets and classes invoked by those servlets updated dynamically without having to restart the process. What I'd done was setting the SYSTEM_

  • Database tab is disable in Web As ABAP technical system

    Hi All, When i am creating abap technical system in portal, 'database' tab is disable. Anyone can suggest ? How to push system information from back end using SLD? Thanks & Regards, Vijay

  • Search  Music Store-to no avail!

    The search facility has to be the worst I've ever encountered and unless the song/album I want is very famous or by a big name, it seldom finds it. For example I put in the title 'Angel is a Centrefold' and it found nothing. So I Googled it, founs ou