JDBC(Sender)-XI-RFC (Request) RFC (Response)-XI-JDBC(Receiver)

Hi All,
JDBC(Sender)-XI-RFC (Request)
RFC (Response)-XI-JDBC(Receiver).
Need some solution for sending email for successfully completion of scenario after updating SQL DB Table.
Let me explain the scenario:
We are pooling the SQL DB table to pull the records and map the records to RFC request parameters, after successful Posting the entries in R3 HR, RFC response contain the same with E (Error) S (Success) records status, we are updating the same in SQL DB table, I implemented the complete scenario without BPM with the help of module processor in Sending JDBC Adapter, scenario is working fine but now we have to send the successful mail to our support team with status contain Number of success, Error and total records as email.
I need the solution how to implement the same requirement in current scenario.
Is their way to do something with the RFC receiver adapter module addition to send the successful mail or generating Alert with all the description?
I am at PI 7.0 SP12 with HP unix box.
Thanks in Advance for creative idea
With Regards
Sunil

Hi Bhavesh,
Thanks for your help and your blog is really helpful. I implemented the UDF for generating Email Alert but this alert is generating before Updating the SQL Database, is their any way to generate alert after updating the SQL.
Actually in my scenario we are sending the data from SQL to R3 by RFC and again updating the SQL status whatever the RFC return, after successfully updating SQL we need to send success email to support people but if we are sending the email before updating the DB then their will be problem.
JDBC receiver after updating the SQL DB returns the response with No. of row updated but how to capture this response, if we can capture this response then we can send email through email adapter even their is one more problem, In my scenario I am counting the number of rows with status “S” and “E” and sending the same in alert email but if are sending email after updating the SQL DB where can hold the row count value and use it while sending the email.
Implemented the scenario without using BPM..i am using sender JDBC module processor for Syn-Asyn bridge.
Even I do not find the link to reward point. Please let me know how to do it.
With Regards
Sunil

Similar Messages

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

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

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

  • Can I configure JDBC Sender to process the RFC response message?

    Dear All,
    We're working on an integration scenario of synchronous messaging from database to RFC. Is there any way to update or insert the record(s) onto the source database according to the BAPI response?
    Any inputs are welcome. Many thanks for your time and support.
    Regards,
    Matthew

    Hi Chun,
    As far as I know you will not be able update the database back based on RFC response in a synchronous way though you have option of selecting BE in sender JDBC adapter.
    This is sentence from SAP training material...
    "In the case of a JDBC sender, the database table is queried via a SELECT statement. The message is by definition asynchronous hence the QoS should be set as EO or EOIO. "   
    The only option i can think of is JDBC Sender(async)->BPM->RFC(synch)->response mapping to JDBC receiver structure->JDBC receiver to update the table.
    Also check these threads...
    JDBC source in a Synchronous BAPI call.
    Re: JDBC Sender Synchronously?
    Anand
    Message was edited by: Anand Torgal

  • BPM Question: JDBC Sender to RFC to JDBC Receiver

    I have the following requirement:
    JDBC Sender Adapter (by nature Asynchronous) – SELECT multiple rows from a table
    To…
    RFC Receiver Adapter (Synchronous)
    To…
    JDBC Receiver Adapter (Synchronous) – UPDATE multiple rows in a table
    Then…
    IF <SAP:Error> XML is returned from the JDBC Receiver Adapter, I want to either issue a CCMS alert, or utilize the XI Email Adapter for error notification. 
    ELSE, if <root_response> XML is returned from the JDBC Receiver Adapter, do nothing.
    This obviously requires a BPM.  If I use the JDBC Receiver Adapter Asynchronously (with no error handling) this is a piece of cake.  But after trying to use it synchronously along with error handling logic, I am stuck.
    This issue that I am facing is how to logically handle the JDBC Receiver Adapter Response XML in the BPM.  I would like to know what I need to do in the BPM in order to issue a CCMS alert (and/or send a message through the XI Email Adapter) ONLY if the <SAP:Error> XML is returned. 
    Below are examples of the 2 types of response messages that I would receive back from the JDBC Receiver:
    Error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
      <!--  Call Adapter -->
      <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_OrderImport' (structure 'StatementName2'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint 'PK_SAP_OrderImport'. Cannot insert duplicate key in object 'SAP_OrderImport'.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Success:
      <?xml version="1.0" encoding="utf-8" ?>
      <root_response>
      <StatementName1_response>
      <update_count>1</update_count>
      </StatementName1_response>
      </root_response>
    I have searched SDN for a while but did not find anything that specifically addressed this.  I would appreciate any help…

    Hi,
    In ur BPM wrap the jdbc send step with a exception block. in the exception block define a control step to throw an alert.
    so when the jdbc step fails, the exception is caught and an alert is generated by the control step.
    cheers,
    naveen

  • Cant send msg to RFC Response

    Hi,
    I have RFC XI BPM Jdbc scenario, in which, I am raising an exception when database connection fails, and sending a message back to the RFC like "failed". But I am not getting any mapping error in the repository, but couldnot map at runtime....when I see in the Technical Workflow, I see "Mapping NOt found".
    Could you please help on this issue.
    Thanks,
    Raj.

    hi Raj,
    >>>>and sending a message back to the RFC like "failed".
    you need to map jdbc request to RFC.response
    in the <b>exception branch</b> to do the mapping correctly
    (this is the only way)
    remember to refresh the cache (SXI_CACHE)
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Inserting RFC Response to Tracking table using JDBC as a receiver

    Hi All
    I want to update my tracking table with the RFC response but the problem is I cant figure out he Target structure on my JDBC.
    Every time when testing on my http://xxxxxx:50000/mdt/channelmonitorservlet I get nothing on the  "Processing Details"
    I've configured my RFC Response as a sender (ASYN) and JDBC as a receiver, I do have RFC destination and it working fine.
    My is like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:RFC_JDBC_MT xmlns:ns1="http://yonela.com">
    <StatementName_response>
    <PI_JDBC_TBL ACTION="UPDATE">
    <TABLE>PI_JDBC_TBL</TABLE>
    <access>
    <TYPE></TYPE>
    </access>
    <key>
    <key><CARRID>AA</CARRID></key>
    </key>
    </PI_JDBC_TBL>
    </StatementName_response>
    </ns1:RFC_JDBC_MT>
    Any suggestion

    Hi,
    Use Insert in the action field instead of Update and try again.
    -Supriya.

  • Sending the SOAP request back in the SOAP response

    Hi,
    I have a requirement in which I need to update a database from the information I receive in a SOAP request. Now my database will respond back with the number of records that are updated. Now I need to send back a SOAP response which should have the details that I received in the SOAP request.
    Can anyone help me on how to send the SOAP request details back in the SOAP response again? I don't want to use a BPM to do this. Also I know that I can use a select statement to get the records that are updated in my response mapping program. Any options other than these?
    - Ram

    Hi Stish,
      I do have exactly the same need, just with the difference that I'm sendind data from JDBC as sender and RFC as receiver, the RFC receive an ID fot example and return some data as a response and I want to update the DB with that response but I dont know how to merge the ID from the request and the data from the response in order to send it back and update the DB. I'm willing to do it with BPM but I don't know how to keep the request and the response and then merge them into the new message that will be sent to the JDBC, can you give me some specific steps?
    Thanks in advance.
    Gustavo Balboa.

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

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

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

  • RFC , IDoc , XI and JDBC receiver communication channel--- Good Design

    Hi Experts,
    We have developed around 60+ interfaces on PI7.1 EHP1, in that 20 interfaces sending data to Data Base using JDBC receiver communication channel, 15 interfaces ABAP inbound proxy using XI adapter,10 Scenarios using IDoc receiver channel and 15 scenarios using RFC receiver channel.
    But I have created only one IDoc, XI , JDBC and RFC channel.
    Is it right idea/design or do I need to create more channels to handle multiple request.
    Please share your thoughts on this.
    Regards,
    JAM

    Hi,
    For XI,RFC and Idoc when it's pointing to one SAP system you don't need any further comm channels.
    For JDBC , if you are pointing to only one database you can use the same channel, if the target/databse changes you need more comm channels.
    Your Design is as per the standards.
    Regards,
    Sainath Chutke

  • RFC response no data

    Hi everyone,
    I am now doing a sync RFC in a xi integration process. The RFC returns blank response, but I have checked that the RFC request is right. What's more, I tried the same RFC module in the r/3 system using SE37, it works fine with response data. What is the problem? And is XI has a tool to debug calling rfc? Thanks!
    Regards,
    Nick

    Hi,
    1) First check if the RFC is working fine or not..
    2) If your RFC is working fine then the only problem in your scenario is with your input to RFC from XI..The problem will be the input that you are sending to RFC may not produce an output...
    Just check the case sensitivity of your input.
    Hope this helps you...If not give more details about your input.
    Regards,
    Sudheer.

  • RFC response is IT_RETURN instead of RETURN

    Hi All,
    I am working with Custom RFC when I am sending the request not getting any thing showing the error as "com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found".
    When executed in function builder SE37 working fine returning values table in IT_RETURN. Is it mandatory to maintain a RFC response as RETURN otherwise RFC Adapter won't understand?
    Could you please help me on this.
    Madhu

    Hi Madhu, good?
    Check note:
    #730870 - FAQ XI 3.0/ PI 7.0/ PI 7.1 RFC Adapter
        -> Q 10: What's about BAPIs?
    Also check the following threads:
    "Error when call RFC Function module in R/3
    "Error with call self-developed BAPI
    Regards,
    Caio Cagnani

  • File to RFC, and through RFC response i am trying to trigger the Mail adapt

    Hi All,
    Right now i am doing File to RFC, its working fine but now the requirement is when xi connect to ftp and picks the  file need to send one success mail after the file pickup and data sent to BW system again i need to send one mail and also error alerts to inbox.
    Till now i am not using BPM, can we do this without BPM pls let me know
    now i am trying to achieve this in File to RFC, and through RFC response i am trying to trigger the Mail adapter.
    or else  i need use only BPM pls share  the steps which i need to be configure.
    Am i correct or pls suggest me some idea to achive this and also pls share some smaple ones in BPM .
    Thanks in advance
    Venkat

    With BPm, follow this:
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Instead of receiving the response in file, use mail adapter
    Regards,
    Prateek

  • RFC Response Error in XI

    Dear team,
    In my SOAP to RFC scenario, Im facing the error.The is two message mappings in my scenario.
    One is between SOAP Req MT and RFC Import str . Second one is b/w RFC.Response and SOAP RESP MT. While Im testing with XMLSPY the request mapping is executed successfully. the RFC executes its functionality successfully in SAP[updating data in atransaction]. The RFC response should be "SUCCESS" or "FAILURE".*Even if we check RFc individually its working fine and giving response as SUCCESS / FAILURE* .
    BUT
    In my case I got the below error in MONI in Response message .The INBOUNDMESSAGE(CENTRAL)->Payload contains the below response. So obviously the response mapping failed in XI . Why im getting this error. BUT RFC functionlity working in SAP , but response getting error .
    Failure case:
    - <rfc:ZRFC_USAGE_DEC.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <Name>JCO_ERROR_XML_PARSER</Name>
      <Text>Expecting a tag to begin with '<' instead of '#', in "#F#A#I#L#U"</Text>
      </rfc:ZRFC_USAGE_DEC.Exception>
    SUCCESS case:
    - <rfc:ZRFC_USAGE_DEC.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <Name>JCO_ERROR_XML_PARSER</Name>
      <Text>Expecting a tag to begin with '<' instead of '#', in "#S#U#C#C#E"</Text>
      </rfc:ZRFC_USAGE_DEC.Exception>
    Thanks.
    -Drumi

    I have done cache refresh, cross checked MT strucures.
    SOAP Response   MT structure  is
    --->MT
    >REsponse
    RFC.REpsonse Structureis...
    --->RFC.RESPONSE
    >Response
    -Drumi

  • Wrong RFC-response filling with characters '#'

    Hi all,
    we have an XI scenario in which a Report use a synchronous RFC call to run a query on a DB table and return the resultset to the calling Report.
    Sync RFC call -> PI 7.0 -> JDBC Query (Select u2026 with ResultSet) -> PI 7.0 -> RFC Adapter
    Weu2019ve some troubles on the data returning from the resultset of the query, thatu2019s rightly filled, and the RFC-response structure because there are some '#' characters as values of the response fields.
    Weu2019ve loaded into the Message Mapping the instance of the resultset (rightly filled) and the test has run successfully, so perhaps the issue itu2019s regarding the RFC Adapter side.
    Now the mapping mapping is set up with constant values but not all the RFC-response fields are filled, infact there are some u2018#u2019 characters that break the values in more lines.
    Weu2019ve already run the full cache refresh on XI on the ABAP and Java side, also weu2019ve restarted the XI instances without results.
    Any ideas?
    Thanks in advance,
    GB

    If its due to the special characters that are popping in the result of query which does not seem to be valid for RFC response,
    1) try to make the RFC Destination Communication Setting as "Unicode"
    2) Check the data type of RFC Response structure could be the fields for which the data is mapped are of date/numeric, in that case RFC data type has to be changed.
    (you would have to reimport the RFC into PI i guess)
    3) If you feel you would not require these special character, you can filter the same in mapping.
    4) After all these if you are still struck and data types are rightly defined and rfc destination is rightly maintained for Unicode, then it i feel the problem resides in the RFC Adapter to convert the xml message into ABAP RFC Format using its metadata, in that case i recomend to change the scenario to Proxy from RFC where by the messages are routed by ABAP stack not by Java.

  • Getting RFC  response structure in XI

    All,
    I have a scanario like this,RFC>XI->file where i have to map RFC response to file.I have gone throungh some blogs for this.
    I am using RFC sender adapter.
    In my message mapping i have mapped RFC response to file structure and in my IM i have used RFC as sender interface.
    Is it fine?

    If your scenario is RFC - XI - File it is not the RFC responce but it is async RFC call.
    You call it RFC scenario when the scenario is
    send sys --- XI ----File
                      | |
                     RFC
    For a overview scenario of this scenario and structure creation have a look at my blog Impede Duplicate Files
    >>I am wonder how do we get RFC response from R3
    Both the Blogs that I replied has the sample ABAP code that is used to send the RFC message to XI.
    You can use the imported RFC in both the Message Mapping and the Interface Mapping
    Thanks
    SaNv...

Maybe you are looking for