JDBC Sender Response Message as an XML SQL

Hi All,
I have a scenario as follows :
JDBC Sender <-> XI (synchronous) <-> ABAP Proxy.
I'm hoping that I can use XML SQL form at the JDBC Sender Response message, so I can update some fields at the database using the response message's data. But actually it's not working. Please advise whether it's applicable or not ? If it's not, is there any other way to do that ?
Thanks in advance,
Andy S

Andy,
Adding to the discussion here, JDBC sender adapter does not support Synchronous Processing .It supports only Asynch procesing and so, you would need a BPM inorder to update the database again with the ABAP Proxy response.
You would have a sender jdbc adapter polling over the db and getting the data, --> a receiev step in the BPM receives the data.
Next a send Synch Step makes the call to the ABAP Proxy and get the response.
You map this response to a JDBC receiver adapters data format on the basis of the action you need and then use a send step with a receierv JDBC adapter to update the DB.
Regards,
Bhavesh

Similar Messages

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • JDBC Sender Adapter Message format

    I am somenone who is new to SAP PI so please help me out in the format of datatype for JDBC SENDER Adapter ?

    Hi Rajesh
    The source xml structure for JDBC adapter is like below
    <resultset>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    </resultset>
    Then in the sender JDBC adapter, write the select and update query
    SQL statement for query: SELECT * FROM table WHERE processed = 0;
    SQL statement for update: UPDATE table SET processed = 1 WHERE processed = 0;
    processed is the indicator in the database.
    Check this link for details
    https://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

  • Synchronous Receiver JDBC adapter--response message empty

    My scenario is ABAP Proxt to JDBC synchronous case where I am calling a stored procedure "GetEmployer" to get the relevent data. There is no input data to the stored procedure, just need to call the stored procedure to return the records.
    In the SXMB_MONI I am getting the response message as empty with no records.
    In the communication channel monitoring it is showing successfully processed.
    Request Message :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_IRIS_SELECT_JDBC_REQ xmlns:ns0="XXXX">         <STATEMENT>
    <GetEmployer ACTION="EXECUTE"></GetEmployerList>        </STATEMENT>                      </ns0:MT_IRIS_SELECT_JDBC_REQ>
    Response Message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_IRIS_SEL_PRXY_RES xmlns:ns0="XXXX"> <STATEMENT_response></STATEMENT_response> </ns0:MT_IRIS_SEL_PRXY_RES>

    Hi All,
              If I am trying to test the configuration in the ID I am getting the following error.
    Runtime error      Unable to read the payload from the     message object 
    <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
    <Trace level="2" type="T">......attachment XI_Context not found </Trace>
    <Trace level="3" type="T">Mapping is already determined in the interface determination </Trace>
    <Trace level="3" type="T">Object ID of Interface Mapping 35933EB051F13E60906107DF6862E093 </Trace>
    <Trace level="3" type="T">Version ID of Interface Mapping 640C5B80B54311DCABA9F7BB0A126A22 </Trace>
    <Trace level="1" type="T">Interface Mapping http://XXX/employer_list</Trace>
    <Trace level="3" type="T">Mapping Steps 1 JAVA com/sap/xi/tf/_MM_EMPLOYERLST_ </Trace>
    I am getting the success flag in SXMB_MONI but getting no records in the JDBC response message. It is not throwing any error and the interface is running successfully.
    Could you please suggest some solution for this.
    Thx in advance
    Ravijeet Das

  • Group Tree: Error in Ajax response - message: missing } in XML expression

    Hi,
    We were using a previous version of Crystal libs and viewer. I wanted to get up to date with the latest jars and viewer so I downloaded and installed the version with Eclipse 3.4.1 and crystal development bundled together.
    I've copied the new jars from there into my existing project. I've also copied the folder cyrstalreportviewers into the project. We're using Tomcat 6.
    I've now got a problem with the Group Tree at the moment since I started using the latest libraries and crystal report viewers.
    My web.xml looks like this.
            <context-param>
              <param-name>crystal_image_uri</param-name>
              <param-value>/crystalreportviewers</param-value>
         </context-param>
         <context-param>
              <param-name>crystal_image_use_relative</param-name>
              <param-value>webapp</param-value>
         </context-param>
            <servlet id="CrystalReportViewerServlet">
              <servlet-name>CrystalReportViewerServlet</servlet-name>
              <display-name>CrystalReportViewerServlet</display-name>
              <servlet-class>
                   web.servlet.ReportingViewerServlet
              </servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
           <servlet-mapping id="CrystalReportViewerServletMapping">
              <servlet-name>CrystalReportViewerServlet</servlet-name>
              <url-pattern>/CrystalReportViewerHandler</url-pattern>
         </servlet-mapping>
    A request to the uri https://......../WebApp/CrystalReportViewerHandler?id=3
    The servlet doesn't do anything that seems to be uncommon. I can post more precisely what it does if needed.
    The report will load correctly, I don't get an error page asking if my crystalreportviewers/ path is accessable to the server.
    I get a parameter page asking for a value. I enter that and click OK.
    The viewer sends a POST request to my Servlet and is handled correctly.
    The report is then loaded.
    On the click of an item in the Group Tree it sends an Ajax POST request and I then get the following error:
    message: missing } in XML expression
    fileName: https://localhost:8080/WebApp/crystalreportviewers/allInOne.js
    lineNumber: 10
    stack: ()@:0
    eval("(\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n)")@:0
    ([object XMLHttpRequest])@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:10
    ([object Object],[object Object],[object XMLHttpRequest])@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:12
    ([object XMLHttpRequest])@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:10
    ()@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:10
    ([object XMLHttpRequest])@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:10
    ([object XMLHttpRequest])@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:10
    ([object Object],[object Event])@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:10
    ([object Event])@https://localhost:8080/WebApp/crystalreportviewers/allInOne.js:10
    name: SyntaxError
    Clicking on the Groups headers on the right hand pane work as expected. Although I notice they are not Ajax requests.
    I've spent a few days at this now and I feel like I'm running out of options but to revert back to the previous version we were using. I presume this works elsewhere so I've got to be doing something incorrectly with my setup.
    If anyone needs more info then please ask.
    Thanks,
    Patrick

    Hi Ted,
    Thanks for your reply.
    That's our own Servlet. It extends javax.servlet.http.HttpServlet
    doGet does the following stuff:
    Creates a ReportClientDocument.
    Sets the ReportAppServer to "inproc:jrc".
    Opens the report as read only.
    Gets the DBController and calls logon on it.
    Then calls replaceConnection.
    Adds some discrete param values.
    Creates a CrystalReportViewer.
    gets the report source from the report client document.
    sets the report source on the crystal report viewer.
    set own page to true.
    sets the report source in the session.
    The crystal Report Viewer then processes the Http Request.
    doPost:
    gets the report source from the session.
    creates a CrystalReportViewer.
    sets the report source on the crystal report viewer.
    set own page to true.
    The crystal Report Viewer then processes the Http Request.
    One thing I changed in there was the way the data source was changed. It used to loop through tables.
    Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
    newTable.setQualifiedName(qualifiedName);
    clientDoc.getDatabaseController().setTableLocation(origTable, newTable);
    Now it does this:
    DatabaseController dbController = clientDoc.getDatabaseController();
    dbController.logon(username, password);
    dbController.replaceConnection(new ConnectionInfo(), connectionInfo, null, DBOptions._useDefault);
    If you need more info please do let me know. Thanks for your help.
    Patrick

  • JDBC Sender adapter - message split

    All,
    Scenario:
    Oracle Stage table - PI - ECC or R3, (depending on a particular value the record goes to ECC or R3 to post a transaction).
    After the record is picked, flag is updated and depending on posting the transaction on SAP, the flag is updated in the stage table.
    With the JDBC sender adapter, multiple records are picked up depending on the select statement in the sender comm channel.
    I have the following rek.
    Now the message is in the AE, before the message enters IE, I would like to split the messages
    This would help me in resubmitting the failed (failed to post the transaction) records.
    Is there any way that I would be able to do it?
    Any guidence...
    reg

    Hi Naveen,
    An alternative way , instead of splitting the multiple record being picked up in a single poll,  you can control the number of records being picked. By using the following statement in the sender cc
    SELECT * FROM ....   UPTO ROWS <  20
    so that only 20 records are picked at a time. and resubmit the set of 20 in case it fails.
    You can go for this method if it suits your requirement.
    Regards,
    Shamly

  • How to send response message from Java mapping class? Please help!

    Hi Experts,
      I have a sync scenario
              -Req-->  -
    >
    SOAP           XI       RFC
              <Res--     <-----
      The Req message contains:
      <Order>
           <Orderid>100</Orderid>
           <Desc>Extrenal Order</Desc>
           <Qty>2500</Qty>
      </Order>
      Response message is:
      <Log>
         <LogTxt>Qty value cannot be more than 3 chars</LogTxt>
      </Log>
      In the XI I have to validate the input request message using a schema. For this I am writing a java mapping program using aii_map_api.jar.
    My requirement is that If the input message schema validation fails then I want to send a response message back to sender.
      How can I send a response message back to the sender in java mapping program?
    Kindly help with sample code example.
    Thanks
    Gopal

    Hi,
    First, I think PI 7.1 has this functionality and perhaps it comes in a SP for PI 7.0 and XI 3.0.  So first have a look at that before creating custom development.
    Second, if you use the java mapping, you will only have access to a request or response message.  I would advise using a custom java module in the module processor and insert this message in the sender communication channel.  This will allow you to validate request and send a response.
    Regards,
    Yaghya

  • Send error messages in DatabaseMail when SQL Job fails/succeeds

    Hi ,
    I have setup a profile and account for sending mail using DatabaseMail. I have a SQL JOB. If the job fails, I receive an Email.
    Till this point, everything works fine. This is what the email looks like :
    JOB RUN: 'GenerateJVForLabourAndOverheads_R11Testing' was run on 20-12-2012 at 10:10:50
    DURATION: 0 hours, 0 minutes, 0 seconds
    STATUS: Failed
    MESSAGES: The job failed. The Job was invoked by Schedule 58 (Execute SP). The last step to run was step 1 (Execute SP).
    Now what I want is, if the job fails for any reason, that error message should appear in the email message body.
    for example, FK_Constraint error , Conversion errors or any error that caused my sql job to fail.
    Is this possible ?
    Any help appreciated,
    Thanks,
    Lok..

     This is one way to do, assuming your job has 2 steps and step 1 does the main part.
    So,in your step 2 of the job, you can add the below code and 
    declare @body1 varchar(8000) 
    select top 1 @body1 = [Message] from msdb.dbo.sysjobhistory A INNER JOIN msdb.dbo.sysjobs B ON B.Job_id = A.Job_id
     where B.Name = <<JobNaMe>> and A.step_id =1 order by instance_id desc
     EXECUTE msdb.dbo.sp_send_dbmail @profile_name = <<YourMail profile>>
    ,@recipients = <<RecipeintEmail>>,@subject =<<Your subject>>,@body = @body1
     I guess, you can also  log the job step output to an outputfile and have it sent as an attachment to your mail... this might help if you have many steps in one job....
    HTH!!
    Please mark as 'Answer', if the solution solves your problem.

  • XML Incoming Invoices - Send response to Vendor for Failed Messages in XI

    In our system, Vendor are posting XML Invoices to XI using HTTP adapter and then XI is sending invoices to R/3 using IDOC adapter. Is there anyway I can send response message to vendors for the error out invoice messages in XI?
    Please help  me if someone has any information about it.
    Thanks in advance!
    Mrudula Patel

    Mrudula
    There are two types of errors you have take care of. One is technical error and the other application error.
    To sending technical errors like mapping error, you can use fault messages in XI.
    For application errors, you can use ALEAUDIT functionality from the receiver R/3 system, which you can map in to an asynchronous XML message as agreed between you and your vendor.
    It is a good practise to always send acknowledgements (both failure and success) to your vendor so that at the end of the day, the number of invoices matches on both systems (yours and your vendor's).
    Thanks
    KK

  • JDBC sender adapter can not get any message

    HI~
    I have a problem with my JDBC Sender which reads data from a SQL Server. Previously it was working fine but It is not Picking the records from the JDBC table.
    I have checked in RWB communication Channel monitoring there no any error or success messages but channel is showing healthy status only(Green).
    User's authorization and SQL statement is all right. I checked the SQL in the DB and there are some messages that should be processed.
    I also inactive and active the Comunication Channel.
    I also checked the LOCKING ADAPTER in Visual Administration is nothing.
    BUT the same configuration in DEV system are work perfectly.
    I don't want to restart XI,because is PRD system.

    Hi,
    1 ) What is exact audit log message ?
    2) Try fetching the count in SQL statement  if there are any valid records it will give the count.
        May for testing you can use <TEST> in update statement.
    3) Have you used taskTimeout parameter ?
    4) Are multiple channels polling on same table ?
    regards
    Ganga

  • Response message back to Third party vendor webservices

    Third party vendor sends messages to a webservice. The SOA application takes the message and puts it into a JMS topic through a mediator with asynchronous interface. All good so far, the system now needs to send a response back to the third party's webservice saying the message processing failed or was successful. For mediator, there are two concepts callback and response. What is the difference between callback and reponse. Which one should I use to send response message back to third party. Do I need OSB for this?
    Please suggest the approach for getting this implemented. I am fairly fresh to the SOA components and appreciate help in this regard. I hope I am making sense, if not feel free for more clarification. I am struck on this for atleast a week now.
    Thanks

    I am using the mediator component which does callback and response as per the SOA user guide. I am not sure, while sending response back to third party, should I be using callback or response. There are no use cases for asychronous interaction using jms topics in Oracle samples examples also.
    Looking forward for some help or suggestions
    Thanks

  • 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

  • Message Mapping Nested Structure to key node in JDBC XML SQL Structure

    Hello everybody,
    I'm facing the next problem, I have the following nested structure
    <ns0:MT_Irdoc_ArchivoNested xmlns:ns0="http://ref.pemex.com/PI/FI/ArchivoIrdoc">
       <Header id_consecutivo="">
          <Transaction/>
          <Header2/>
          <Header3/>
          <Header4/>
          <Header5/>
          <Detail>
             <Transaction/>
             <Detail2/>
             <Detail3/>
             <Detail4/>
             <Detail5/>
          </Detail>
       </Header>
       <NombreArchivo/>
    </ns0:MT_Irdoc_ArchivoNested>
    as you can see, Detail is a nested Node from Header Node, and Detail is with occurrence 0...unbounded, I need to generate a SELECT XML SQL Structure as follows
       <StatementName>
              <dbTableName action=u201DSELECTu201D>
                  <table>realDbTableName</table>
                  <access>
                     <col1/>
                     <col2/>
                     <col3/>
                  </access>
                  <key1>
                     <col4>val4</col4>
                     <col5>val5</col5>
                     <col6>val6</col6>
                  </key1>
              </dbTableName> 
       </StatementName>
    now my problem is that col4 and col6 are values mapped from Header fields values, and col5 mus be mapped from Detail2 field of Detail Nested Structure, and Detail is 0...unbounded so it can contain any number of values and must included in the key structure, I tried by mapping the Detail Node to the key1 node, so it will generate n numbers of key1 nodes to include in the query, and the Detail number of nodes are not constant so I can't generate key2, key3, keyn...., so what I need is to create n numbers of instances of key1 node, but the problem is that when the mapping try to generate the second instance of key1 node it gives an error in the fields that comes from Header structure, maybe I'm trying to solve my problem wrong, could anyone give some advices or direction?, thanks in advance.
    Regards,
    Julio Cesar

    Julio,
    After placing the below logic in the mapping editor
    Details2 > SplitByValue> col5
    Right click on the Details2 node and choose Context. By Default you will see Details, because Details2 is the child of Details node. I want you to choose the Parent of Details node, I believe that would be HeaderID, am I right?
    If you don't want to do that then,
    Details2 ---> Remove Context > SplitByvalue> col5 will do the trick!
    raj.

  • JDBC Adapter: J2EE server crashes while sending large messages

    We want to use the following scenario to transfer data from a MS SQL Server to SAP BW via XI:
    JDBC Sender Adapter – XI – SAP ABAP Proxy.
    All works fine with a small amount of data. But if the select statement delivers too many record sets and the size of the transformed XML payload is greater then 50 MB the J2EE server crashes. A complete restart is necessary. It seems to be am memory problem.
    Here are the entries from our log files:
    dev_server0
    [Thr 6151] Mon Jul 24 12:46:57 2006
    [Thr 6151] JLaunchIExitJava: exit hook is called (rc=666)
    [Thr 6151] **********************************************************************
    ERROR => The Java VM terminated with a non-zero exit code.
    Please see SAP Note 940893 , section 'J2EE Engine exit codes'
    for additional information and trouble shooting.
    [Thr 6151] SigISetIgnoreAction : SIG_IGN for signal 17
    [Thr 6151] JLaunchCloseProgram: good bye (exitcode=666)
    std_server0.out
    FATAL: Caught OutOfMemoryError! Node will exit with exit code 666java.lang.OutOfMemoryError
    Is this a general problem of the XI or a specific one of our configuration? Is it possible to transfer such large messages via XI? If not, is there a workaround for such scenarios?
    (Memory heap size of the J2EE server is 1024 MB.)

    > Hi Gil,
    >
    > i had nearly the same problems some times in praxis
    > and the mapping was the reason. Just change your
    > interface determination temporary, delete the mapping
    > and test again to find out if the mapping is the
    > reason.
    >
    > Regards,
    > Udo
    I have changed my interface determination so that no message mapping is used. The J2EE server still crashes.
    > Hi Gil,
    > This does sounds like a memory problem especially
    > when it comes to 50M message with a minimum XI sys
    > requierments...
    > To be sure you can check on the RWB for the
    > componnent monitoring at the JDBC adapters and look
    > for your adapter
    > look at the status of the adapter and the trace
    > there...
    Hi Nimrod
    In case of such an error I have no entries in channel monitor. So I can't see anything there. I have also no entries in message monitor of the RWB in this case. So I don't get any information with standard XI tools.
    > My reccomendation to you is to set the poll intervall
    > to a shorter period,this way you'll make sure you get
    > less records...I hope you have remembered to add  a
    > status/flag column on the table to be set after
    > selection so no duplicate records will be taken on
    > the second pools.
    >
    The problem is that the source of my data is not a simple SQL statement but a stored procedure. So I don't know exactly how many records will be delivered. A update command is not possible.

  • Response message timed out - JDBC adapter - PI 7.1

    Hi All,
    I have a synchronous Proxy <-> XI <-> JDBC scenario. The interface works fine in most of the cases, but when my proxy sends data to UPDATE the receiver SQL server 2000 with more than 1000 records, I do not find the response message in SXMB_MONI. But all the records have been successfully updated in SQL database. The response message in my case is the number of records that have been updated.
    Initially I got the message "Synchronous response expired" in RWB, and based on SAP note 791379 and 1078420 , I changed the xiadapter.inbound.timeout.default parameter from 180000 to 600000 and added the parameter 'sqlquerytimeout' in my receiver JDBC adapter configuration with value as 600 seconds.
    I have also enabled batch mode in my receiver adapter.
    Now my problem is I don't see any error message in RWB , but still in SXMB_MONI I am not able the response  message, but can see only the log version of my request message.
    Any idea on what needs to be done in this case ? Any help will be greatly appreciated.
    Regards,
    Sandeep

    Hello,
    Could you pease let us know how thiswas solved ?
    Same problem i am having.
    Thanks in advance

Maybe you are looking for

  • Scheduled Fax - Time off by one hour

    If I schedule a fax job on a remote computer and select "Send at" via the scheduler drop-down, it behaves differently in Tiger (10.4.6) than in Panther (10.3.9). In Panther, it works as I would expect. The default time is the current time, and when y

  • REP-57000 Error When Generating a Report in EXCEL format

    Hello All, We're encountering an error that says "REP-57000: Oracle Reports API - Internal error: Item: oracle.reports.definition.RWReport;Prop:34; Attr: ]] ...". The report works fine and is able to generate an EXCEL file when it retrieves around 3K

  • Pointer to void != pointer to function

    Hello C experts, this is a simple question about SunStudio's understanding of function pointers (it might have been asked before): Why is the following C code giving me a warning on all Sun compilers: # cat funcptr.c int main() {     void (*func)() =

  • Process for migrating CMSDK from one server to another

    All: We are in the process of migrating our CMSDK installation and database from one server to another. In doing so, we would like to retain our documents and folders and other custom objects that have been created till date. If there is a recommende

  • FindClass inconsistent behavior

    I am having a very strange problem with the JNI FindClass() method. When I call into my native code, it appears to work for a few times and then fails. I have the following function in my native code: jclass TAGObject::findClass(JNIEnv env, const cha