RFC Adapter as Sender

Hi Experts,
We have a business scenario wherein I have to execute the RFC function(async) from an ABAP in R/3 and update the data in DB2 tables(async).
I am using RFC as sender(async) and JDBC as receiver(async). I configured/registered the RFC connection in SM59 and used the same program id in RFC sender adapter. I tested the connection in standalone mode, it is working.
The RFC function when I imported will have a request and a response. The data that I require to send to JDBC adapter is in the response. So I tried to use RFC response and created a message interface. Then I used that in my interface mapping and in the sender & receiver agreements. In the message mapping I used response that was imported.
I get an error message saying sender agreement not found. The as per OSS note 730870 I changed the sender agreement to use RFC function as sender interface, I cannot use this function module for my mapping, as it does not contain the response.
Am I doing something wrong. Can somebody show me some direction.

Hi Srinivas ,
If you want to capture the response of an RFC execution in XI and then map this response to another structure(In ur case a JDBC structure) inside XI message mapping , then you will have to use the RFC reciever adapter of XI and NOT the RFC sender adapter.If you use the RFC sender adapter, it means that your SAP system is acting as an RFC CLIENT, what happens is the REQUEST structure in your RFC destination will be converted to RFC-XML by the RFC sender adapter of XI and is available for furthur processing.
But then, If you want to send the RESPONSE structure of an RFC to XI , one way is to execute the RFC in SAP(without passing this thru XI), now you have to pass the result of this RFC execution to XI by assigning it to a request structure of another RFC in your ABAP code and pass it to XI using RFC sender adapter.
If not , you can use a dummy RFC in SAP to send a trigger to XI , execute the actual RFC in XI using RFC reciever adapter , capture the response , map it to ur JDBC structure and you are done.
May be you can give a try on these lines. As for the error , you can chk these threads and see if it helps
com.sap.aii.af.ra.ms.api.DeliveryException
"call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryExceptio
RFC Sender Adapter error " Call to messaging failed"
Thanks
Saravana

Similar Messages

  • RFC to XML-RFC Parsing issue in RFC Adapter as Sender

    Hi all,
    I tried to use RFC adapter as a sender. The scenario I am trying to achieve is R3 -> RFC Adapter Sender --> BPM --> RFC Adapter Receiver --> SAP Auto-ID system.
    The reason to use two RFC adapter and BPM is to log the request message if the RFC call fails. Everything works as expected, except the RFC Adapter Sender.
    The RFC I am calling has an input table. The input data I use works fine if I call it via SE37 or remotely from another SAP system. However, if I call it via RFC adapter, when XI parses the data into RFC-XML format, the input data is all messed up.
    DATA: BEGIN OF ID_STR,
            ID_VERSION(8)       TYPE C,
            ID(96)              TYPE C,
            ELEMENT_NAME(50)    TYPE C,
            ELEMENT_VALUE(128)  TYPE C,
          END OF ID_STR.
    DATA: it_id LIKE TABLE OF ID_STR,
          ls_id LIKE ID_STR.
    ls_id-ID_VERSION = 'EPC_1.30'.
    ls_id-ID = '30340242206DC3C00000000A'.
    ls_id-element_name = 'BATCH_ID'.
    ls_id-element_value = 'BATCH001'.
    APPEND ls_id TO it_id.
    CALL FUNCTION '/AIN/UI_MOBILE_MSG_SEND'
      IN BACKGROUND TASK
      DESTINATION  'RFC_UPDATEAII'
      EXPORTING
        IV_BUSINESS_PROCESS       = '09'
        IV_COMMAND                = 'DO'
        IV_ACTION_TYPE            = 'APL2'
        IV_PRT_ID                 = '31140242200000000F000000'
        IV_DEVGRP_EXTID           = 'MOBILE'
      TABLES
        IT_ID                     = it_id
      commit work.
    And the parsed RFC-XML message is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <rfc:_-AIN_-UI_MOBILE_MSG_SEND
    xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    <IV_ACTION_TYPE>APL2</IV_ACTION_TYPE>
    <IV_BTD_EXTID />
    <IV_BTD_TYPE />
    <IV_BUSINESS_PROCESS>09</IV_BUSINESS_PROCESS>
    <IV_COMMAND>DO</IV_COMMAND>
    <IV_DEVGRP_EXTID>MOBILE</IV_DEVGRP_EXTID>
    <IV_LOC_EXTID />
    <IV_LOC_TYPE />
    <IV_PRT_ID>31140242200000000F000000</IV_PRT_ID>
    <IV_PRT_ID_VERSION />
    <IV_REASON_CODE />
    <IV_UNAME/>
    <ET_RETURN />
    <IT_ID>
    <item>
    <ID_VERSION>EPC_1.30</ID_VERSION>
    <ID>206DC3C00000000A BATCH_ID</ID>
    <ELEMENT_NAME />
    <ELEMENT_VALUE />
    </item>
    </IT_ID>
    </rfc:_-AIN_-UI_MOBILE_MSG_SEND>
    You can see the data in the table is all wrong, it should be:
    <IT_ID>
    <item>
    <ID_VERSION>EPC_1.30</ID_VERSION>
    <ID>30340242206DC3C00000000A</ID>
    <ELEMENT_NAME>BATCH_ID</ELEMENT_NAME>
    <ELEMENT_VALUE>BATCH001</ELEMENT_VALUE>
    </item>
    </IT_ID>
    The calling system is a 4.6C non-unicode system, and the destination system is a unicode system (this does not matter since the first part of the integration is between R3 and XI). There is no config found on R3 side to specify non-unicode because it is a rather old system. In XI RFC Adapter config, I checked non-unicode checkbox (I also tested it with this unchecked, but still the same issue).
    Have any of you seen this problem and how you resolve it?
    Thanks a lot for your help!
    Regards,
    Hart

    Hi Hart
    long time no seen - hope you remember me
    >The reason to use two RFC adapter and BPM is to log the request message if the RFC call fails
    there is an easy way (guess max 3-4 hours) to solve all of your issues
    and get rid of a BPM
    use IDOC - XI - ABAP Proxy
    then you will have IDOC and ABAP Proxy that always log the message on both ends (and you can restart ABAP proxies easily in AII - and every AII supports ABAP proxies) + you get rid of a BPM as it's not necessary as far as I understand (as it's asyn communication right?)
    maybe you can go this way and IDOCs always work...
    good luck,
    Regards,
    Michal Krawczyk
    http://mypigenie.com XI/PI FAQ

  • Why is the RFC Adapter so unstable

    Hi all,
    I have a scenario where an IDOC is sent from the sender system and an RFC enabled Function Module is called on the target system. Sometimes I get an error in the Adapter for no aparent reason. I check the RFC adapter trace file but none of the exceptions was raised and I am not able to see what was the problem.
    But, if I restart the RFC Adapter and send the IDOC again, everything's allright. Why? Is there any other trace avilable somewhere? Is there any way to restart the RFC Adapter periodically and automatically?
    Thanks and regards,
    Nuno

    This sounds like a bizarre scenario.  Why would a Idoc (asynchronous) be calling an RFC (synchronous)?
    Unless the RFC is doing update?  Then you have more problems.  You are mixing your QoS from EO to BE.  The delivery is no longer guaranteed.  The posting to the RFC could work but XI may not get the acknowledgement - RFC adapter does not do commit so you must have a commit in the remote function.  If no acknowledgement is received, do you resend and risk duplicate updates?  How do you guarantee EO delivery?  The sender system is right in expecting EO for it's outbound Idoc.
    In all the training material RFC is intended for data retrieval, not data posting.  This is consistently done with Idoc (EO, or EOIO).
    I would consider changing the scenario to Idoc->xi->Idoc.

  • Problems in RFC Adapter

    Hi All,
    I'm using RFC adapter to send messages to XI. The import parameter of the RFC is a very complex structure. One of the embedded strcuture contains a table. During runtime, if I use "APPEND line TO tale" statement to fill that table in the client of RFC Adapter, the program dumps. The short text is "After a value an end tag must follow. That did not happen in". This short text is obviously incomplete. My questions are:
    1. How can I view the complete short text of this dump?
    2. Is there any restriction on the RFC adapter parameter? I only use "import" and "export" parameters. I'll not use "table" parameters. Could I use a very complex structure which contains embedded structures and tables as import parameters?

    HI Jerome,
    >>>1. How can I view the complete short text of this dump?
    have you tried TCODE - ST22 ?
    >>>2. Is there any restriction on the RFC adapter parameter? I only use "import" and "export" parameters. I'll not use "table" parameters.
    please use the table - this is the parameter for storing many values (lines) of a structure
    Regards,
    michal

  • Regarding RFC adapter

    Hi
        when we r using RFC adapter on sender side it asks fgor 'RFC  Program id' what we have to mention in it.
       Regards
      maheswararao

    Hi
    While creating the Communication channel using RFC adapter, you need to specify a Program ID , it can be any value. The same program ID u have to use when u are creating a RFC destination from your sender system to XI.
    With Regards
    K.Varadharajan
    Award points if it solves your problem

  • Restrict messages in RFC adapter or in source/sending (SAP R/3) system

    Hi All,
    I have SAP R/3 to web service scenario via XI (RFC to SOAP). In that scenario RFC caries the attachments, some time the attachments size is more than 5mb. Due to that java stack of XI becomes unresponsive. Due to that SMQ2 gets filled up with the entries and other scenarios are also severely effecting.
    Is there any way to restrict the message, if itu2019s size is more than 5mb in RFC adapter of XI or can we stop the processing/sending of such a messages in source system itself (SAP R/3).
    I welcome all your suggestions.
    Thanks & Regards,
    Venu V

    Hi Praveen,
    The attachments to the tickets in source system. The RFC caries that data, once that data size is more than 5mb then it affecting the server.
    I am getting following errors
    u201Ccom.sap.aii.af.ra.ms.api.DeliveryException: Could not create Message from TransportMessage. Reason: com.sap.aii.af.ra.ms.api.MessagingException: com.sap.aii.af.ra.ms.api.MessagingException: Could not parse XMBMessage due to Read timeout. The client has disconnected or a synchronization error has occurred. Read [45434] bytes. Expected [101981].u201D
    u201CJCO_COMMUNICATION_FAILURE
    Error opening an RFC connection
    &quot;COMMUNICATION FAILURE&quot; during JCo call. Error opening an RFC connectionu201D
    Thanks & Regards,
    Venu V

  • Sender RFC Adapter , Sender File Adapter  - Payload Compression

    Sender RFC Adapter or the Sender File Adapter compress the payload of any spaces in between the tags or remove any spaces at the start and end of the payload.
    We need to pass the spaces as is in the message payload to the receiving system?
    Is there a way to do it in PI 7.1.

    Hi Vikrant,
    Preserving white spaces while reading a file from FTP
    NameA.fieldContentFormatting
    - Enter trim to remove all the leading and subsequent blanks for a value found. This is the default.
    - Specify nothing to ensure that the value remains unaltered.
    For RFC you need to check your payload to see whether spaces are coming from R/3 itself or not.
    Regards
    joel

  • Problem in Sender RFC adapter

    Hi all,
    Our scenarion is like this
    RFC -> XI -> File
    When we are calling the RFC ( inside a program ) from the client we are getitng a shortdump with the error ...
    'JCO.Server could not find server function 'STOCK_ENQUIRY_OUT'
    any idea where is the exact problem '?
    regards
    Goutam

    Have these basic checks;
    1. Import the RFC and activate the same in XI.
    2. Configuring of RFC adapter - /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    3. Troubleshooting - /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009

  • RFC Sender problem  between 46D and RFC adapter

    Hi,
    I have this simple integration scenario where I want to send data to a archiving system;
    SAP -> (tRFC) -> XI -> (MQ) -> BizTalk -> (MQ) Arch.syst.
    SAP side ***
    A Z-program using a Z func. like;
        CALL FUNCTION 'ZSD_DCF_SEND_TAG'
          IN BACKGROUND TASK
          DESTINATION 'XISYSTEM_TRFC_DCF'
          EXPORTING
            pt_filing_info = gt_filing.
        COMMIT WORK AND WAIT.
    XI side ***
    Both IR and ID is configured correctly, in the development environment everything works just great. I have created a test program where I can define how many calls I will do, looping over the func. call with a commit inside the loop - 500 or more msgs are ok.
    The integration scenario is transported to quality enviroment using CMS, and the RFC sender comm.ch. is configured accordingly.
    The problem in quality ***
    When sending just 1 msg, everything is just fine, message received and delivered to MQ.
    When sending >= 2 msgs, the 1 msg is always ok, BUT all others fails due to the following from Adapter monitor;
    RFC_HISTORY
    - Error: 2006-01-19 10:55:18 CET: com.sap.aii.af.rfc.afcommunication.RfcAFWException: lookup of alternativeServiceIdentifier via CPA-cache failed for channel 'RFCSender_XI0002' (02d4d30de3593874942ed0659add0827, party '', schema 'TechnicalSystem', identifier 'Q93#120')
    - OK: 2006-01-19 10:55:17 CET: Message processed for interface ZSD_DCF_SEND_TAG
    My sending system is Q93 CLI 505 so I can understand the error, BUT I cannot understand why the RFC adapter is saying the TechnicalSystem is Q93#120 - it should be Q93#505. My Q XI has client 120...
    It seems to me that the RFC adapter is kind of confused about the sender..
    I have created a OSS message and SAP has looged on and looked into it with both a XI expert and RFC expert without being able to answer - all is configured correctly.
    - The SLD config. for bus.system Q93 is ok -
    - The bus.system in ID is showing correct vaues for
    Adapter Specific Identifiers (SID Q93, client 505)
    - Both Dev. and Qual. environment are running on XI 3.0 SP 14 latest patch, RFC component version on the SAP side is identical between dev. and qual. SAP systems
    - It doesn't matter which gw I use (Q93 gw or XI gw), the error is persistent
    - It doesn't matter if I increase initial conn, max conn.
    I have also tried to use qRFC instead, but with the same result.
    Anyone using tRFC for asynch. communication from SAP to XI seeing something similar?
    Meanwhile, I will do RFC trace on GW and RFC Adapter on AE....
    Please, do not say SP15, oss msg for FAQ RFC adapter or links to RFCAdapter config....
    best regards
    Torstein

    Hi,
    SAP Note 730870 FAQ: XI 3.0 RfcAdapter Q.no 15
    <i>Q 15: Whats wrong when the error message "lookup of alternativeServiceIdentifier via CPA-cache failed" shows up while sending a RFC call to the RfcAdapter?
    A: A RFC sender channel is located beneath a service within the Integration Directory. Within this service choose "Service" -> "Adapter-Specific Identifiers". The values in the fields "R/3 System ID" and "Client" has to be maintained with the correct values of the system, that sends the RFC call to the RfcAdapter. It normaly only makes sense to have these values filled for services of type "Business System". If maintained in SLD, this fields will be filled automaticaly for services of type "Business System" and can be updated with the button "Compare with System Landscape Directory".</i>
    - Give correct appserver and gateway service details in XI.
    - Open the service holding the RFC adapter you are trying to use. On the top menu, goto Service -> Adapter Specific Identifiers..
    Regards,
    Prateek

  • Sender RFC Adapter AND Rec. File Adapter

    Hi
    Workflow of my scenario is like this :
    <b>SAP R/3 ---> Sender RFC Adapter ---> XI Server -
    > Rec. File Adapter -
    > Legacy System</b>
    I am using Async Inbound interface for this as I dont need any response back & I just need to create file.
    I am just picking some data from BAPI & creating a file on a folder in Legacy System.
    Now during execution, file is getting created but I am getting dump on SAP R/3 and even when I am using Async communication, response is coming back from Legacy Business System ( service ) & giving an error " <i>No Mapping Program Found</i> " in sxmb_moni.
    Kindly suggest how can I avoid getting response from Legacy System. Pls. take note again I am using Async Inbound Interface.
    Regards
    - Lalit -

    Hi Lalit,
    When your RFC is called from R/3 by default it would be in Sync mode. When this is in Sync mode it obviously will expect a response and where as in your scenario XI dose'nt give any response and there is no mapping for that and I think that is the reason you are getting that error.
    So when your Sender RFC is triggered it will like this in ABAP
    CALL Function "Function Name" <SM59 Destination>
    and this is Sync call. To make it Async i should be
    CALL Function "Function Name" IN BACKGROUND TASK <SM59 Destination>
    Hoep this helps
    Thanks,
    Prakash

  • Sender RFC Adapter-- XI-- File Receiver Adapter ?

    Dear Expert,
            we are on PI 7.0 & R/3 system 4.7E WAS < 6.20.  We have a scenario where in there are some huge downloads are required from R/3 to FTP File Location. For such scenarios Normally Poxy is suggested but Due to WAs Version limitation we cannot use Proxy. The other alternative is to use SENDER RFc adapter using RFC destination with XI. we have configured the RFC destination it is working fine.
    I am able to receive the message also in XI. But whenever i am running this RFC in R/3 it is giving me the shot dump as follows. :
    <b>call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryException:</b>
    The File is also getting written to the destination properly. But in XI also i get the following error.
    <b>  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">NO_MAPPINGPROGRAM_FOUND</SAP:Code>
      <SAP:P1>http://Test/Zbilldwd ZBILLDWD_FILE_IM</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Interface mapping http://Test/Zbilldwd ZBILLDWD_FILE_IM does not exist in runtime cache</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error></b>
    What could be the reason of this.? As well i am geting 3 error messages in XI.
    I have defined this interface as Inbound / Async Message interface with input message as output file structure. ( Is this configuration is OKAY ?)
    pl. help me to solve this error.
    Regards,
    Umesh

    HI,
    Check your configuration from the message it states that it can not find out the mapping program.
    Check the configuration Receiver and interface determination whether you are using the same which is designed in repository.
    Thanks and Regards,
    Chirag Gohil

  • Sender RFC Adapter - Data to be sent from R/3

    I am working on a scenario where I have to send data from an RFC-enabled function module from R/3 to a file server via XI. The entire scenario is asynchronous.
    Sender: RFC Adapter
    Receiver: File Adapter
    I have done all design and the configuration. Both communication channels are working. I have the RFC destination also set up correctly in R/3.
    However, when I run my ABAP program where the RFC-enabled function module is called, I get a shortdump with the message <b>"senderAgreement not found: lookup of binding via CPA-cache failed for".</b>
    Plus: " The error occurred during an RFC call to another system."
    Could someone kidly help?

    Hi,
    Follow these steps :
    1. import the ECC_ Server into ID if not done
    2. Refresh Cache : Tcode  SXI_CACHE
    3. Please check for Sender agreement config
    4. Check out the parameters when  R/3 calls back XI, it passes the SYS-ID and client number and checks the same in the Integration Configuration Under Business System Service-> Adapter Specific Identifiers. The R/3 System ID and the client Number
    Also check out these blogs..
    /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
    /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    regards
    Aashish Sinha
    PS : Reward points if helpful

  • RFC Adapter - Where to Register Rfc2XmbService (Sender System or XI ?)

    Experts,
    I have the following scenario:
    R3 --> RFC_ADAPTER --> XI --> SOAP --> THIRD_PARTY
    My specific question is, In which system do I need to register the Rfc2XmbService program. Is this done in the R3 system or in the XI system.
    If it is done in the R3 system then where is it done cause there is no J2EE administration tool in R3.
    Could someone explain exactly what this registration concept is.
    Thanks and appreciate any help in advance.
    - Ravi
    --- I have figured this one out already. The program needs to be registered in XI and Not the sender system.
    Thanks
    Message was edited by: ravi kumar

    Hello,
    the Rfc2XmbService registers itself when you activate the RFC adapter in the Configuration but you can preallocate it through the Visual Admin.
    Further by default are logging for sync calls not enabled, e.g. you don't see anything in SXMB_MONI.
    Therefore go to SXMB_ADM and the Integration Configuration option and under the RUNTIME specific option create an entry for
    RUNTIME LOGGING_SYNC 1 (0 is default).
    Also make sure that the rfc adapter is activate in the AdapterFramework overview. On the target system call transaction SMGW and go to logged on clients to see if you see the Rfc2Xmb Service. Then in SM59 of the R/3 system you should have an entry pointing to the Rfc2Xmb service and a test should give you an idea if it works.
    I'm doing R/3 4.6c -> XI 3.0 -> R/3 Enterprise about 20 BAPIs, no issue.
    I hope this helps.
    Stefan

  • RFC Adapter - Sender

    We are unable to configure a RFC Adapter as a Sender one. We are using Netweaver '04 ramp up CD's. The Sender Radio button is always disabled.
    Any ideas why this is happening?
    Thanks,

    XI3.0; Any solution to this problem??? I have the same...
    And at the other side (RFC-Receiver-CommunicationChannel) I get an exception "com.sap.aii.af.ra.ms.api.DeliveryException: RfcAdapter: receiver channel not in list of running clientPools";
    Probably the problems have the same reason, some missing configuration or installation? Any ideas?

  • 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

Maybe you are looking for