Receiver JDBC query

Hi Experts,
I would like to know can we find the Query in the PI system at runtime  if the JDBC channel is at the receiver end.
I am sending the values from SAP to database for updating the data.
Thanks,

Could you please let me know where exactly I can see the information in SXMB_MONI ?

Similar Messages

  • Doubt in query statement in receiver jdbc

    HI
    Again a doubt in XML format for receiver jdbc.
    I want to execute a query
    select sum(col1) sum(col2) from tablename where startdate <= tdate.
    My payload message looks like this
    <AggregateFn action="SQL_QUERY">
      <access>SELECT sum(Weight) FROM KmFuelTrace WHERE resourceno = '$resno$' AND startdate = '$sdate1$'</access>
    - <key>
      <resno compareOperation="EQ">CHILLED_02</resno>
      <sdate1 compareOperation="LT">06/08/2007</sdate1>
       </key>
      </AggregateFn>
    I am getting a error "Data type mismatch in criteria expression" .
    I have defined the datatypes correctly with DateTrans function . I think its the problem with access statement.
    How to give the selection criteria for non-text fields. (can i use same quotes and dollar combination for date field too) . Or is there any other mistake in the xml structure

    Aarthi,
    Try the following
    <AggregateFn action="SQL_QUERY">
    <access>SELECT sum(Weight) FROM KmFuelTrace WHERE resourceno = '$resno$' AND startdate = $sdate1$</access>
    - <key>
    <resno compareOperation="EQ">CHILLED_02</resno>
    <sdate1 compareOperation="LT">06/08/2007</sdate1>
    </key>
    </AggregateFn>
    Also check what us the date format that database uses and give the similar format.
    Regards,
    Sudharshan N A
    Message was edited by:
            Sudharshan Aravamudan

  • Receiver JDBC

    Hi
    the receiver JDBC structure
                                                                       occurence
    <statement1>   ----------------------------->                   1..unbound    or    1..1                               (1)
    <Table>            ----------------------------->                1..1 per statement always                             (2)
    <access>         ----------------------------->                  1..1 per statement always                             (3)
       <fld1></fld1>                                         
       <fld2></fld2>
    </access>
    <key> --------------------------------------->                   1..unbound    or  1..1                                       (4)                          
      <val1>
    </key>
    </statement1>
    <statement_response>  --------------->                        should be 1..unbound <b>if</b> statement request is 1..unbound (here statement1)
                                                                                    should be 1..1 <b>if</b> statement request is 1..1 (here statement1)                        (5)
    <row>                                       
    <row>
    </statement_response>
    -&gt; In which case we go for occurrence of statement (here statement1) = 1..unbound ??
    -&gt; if i need to select from one table do i need to use this as 1..unbound ?? Yes/No
    --&gt;each statement response (means all rows of that query) will come under row node with multiple occurrence Yes/No??
    --&gt;if i want to delete the rows from table where col= (value array) in this case i have to give key occurence as 1..unbound??Yes/NO
    --&gt;if i want to select all the data from one table..i no need any key..but as per sap help doc..if we dont specify the key the adapter will not accept and shows some error message...so i should some dummy key value..and need to compare with NEQ to NULL or space???
    --> If i want to select the data from JDBC using the receiver structure...can i declare all the field types as string in request and response structure..or it should match the data types of fields in data base..?? if so how it should be in select request and response structure??
    (1) (2) (3) (4) (5) are right or wrong..if wrong correct me..
    Thanks
    krish
    Edited by: murali krishna on Mar 24, 2010 5:30 PM

    Krish,
    Please see the below response
    Answer-1
    If you are selecting data from Different tables then you need to define Statement as 1.. Unbounded
    Answer- 2
    No. Since you are selecting data from one table - you can define it as 1..1
    Answer -3
    There will be only one Statement_Response per Statement. In other words if you have Multiple Statement in the Request , then you will have Multiple Statement(x)_Response
    So Under Statement_Response you will have Multiple Rows(for each record in the database) . YES - Row has to be 0.. Unbounded
    Answer- 4
    YES - You are correct
    Answer-5
    YES - you can define them all as a STRING. It shouldn't be a problem
    Hope it helps!
    Thanks!

  • Messages are in hold state due to one message at receiver JDBC adapter

    Hello,
    I am using a receiver JDBC adapter and trying to send an XML file which has an insert query to insert some data into the database i.e., Oracle 9i.
    Here at the receiver side due to one message (  which is in to be delivered state) all other messages are got hold and waiting for long time.
    I am getting the exceptions as this,
    JDBC Adapter processing failed with Error processing request in sax parser: Error when executing statement for table/stored proc. 'FSASMGR.XTBL_KL06_IINQUIRY' (structure 'REC01'): java.sql.SQLException: ORA-12899: value too large for column "FSASMGR"."XTBL_KL06_IINQUIRY"."CASE_TITLE" (actual: 81, maximum: 80)
    Exception caught when executing statement for table/stored proc. 'FSASMGR.XTBL_KL01_ISTAFF_MST' (structure 'REC1'):
    java.sql.SQLException: ORA-00001: unique constraint (FSASMGR.XTBL_KL01_ISTAFF_MST) violated
    Can anyone help me out in solving this issue.
    THanks,
    Soorya

    hi surya,
    jdbc channel tries a request for n number of times(no of rettries),if that request fails it will take up the following requests,its not like it will process a request forever.
    to be delivered will be resulting if reciever is down or network between XI and database server is bad.
    try to ping databse server from XI host system.
    if everything is fine then look at the channel configuration->advanced->no of retries of database transaction on sql server.
    just redue the count to 1 and recheck.
    Regards,
    rama Krishna

  • When would you write a stored procedure in sender/receiver jdbc adapter

    Hi Everybody
    Can you tell any situation where you would need to write a stored procedure in the query sql statement of sender/ receiver jdbc adapter instead of writing SELECT statement there
    why do we need to write stored procedures
    thanks and regards,
    Anitha

    Hi Anitha,
    why do we need to write stored procedures
    Some times a single SQL statement will not suffice for ur transactions....
    Say u want to access from 2 tables and update based on some condition..
    or nested select statement...
    or u want to update a 2 nd table based on the values from 1st table... etc..
    In those places it's preferable for going for a Stored Procedure.
    The Stored Procedure can be used in both Sender and Receiver JDBC Adapter.
    Still nt clarified do post..
    Babu

  • Using Stored procedure in sender or receiver jdbc adapter

    Hi All,
    Please let me know simple blogs for Stored procedure used in sender or receiver jdbc adapter to get data from 2-3 tables
    Thanks

    Hi
    To work with Store proceudres (SP) you have to create the SP's in database like Oracle, Mssql or Msaccess.
    Ususally the SP creations are done by database experts. For more info about "SP" try Googling!
    The below blog is about SP but not the one you expect!
    /people/itisha.alok/blog/2009/03/23/jdbc-stored-procedure-returning-multiple-resultsets
    Executing an Oracle Stored Procedure from Sender JDBC adapter
    Sender Adapter - -
    SP will contain the select Query alone or with it will contain insert, delete statement too.
    Receiver:
    SP will have insert or delete satement.
    Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    The below details are required  to configure the adapters
    Driver details
    database name
    Procedure name
    user name
    password,
    Regards
    Ramg

  • UPDATE statement in Receiver JDBC adapter

    Hi all,
    I would like to use UPDATE statement in my receiver JDBC adapter and would like to know how this UPDATE statement works in following case.
    1) If i have 10 records to be updated in database, whether Commit happens at the end of all 10 records updation OR it will be for every record update?
    Regards

    Hi,
    Then let me construct my query this way...
    i have 10 records that needs to be updated to database, say For Ex: 7 records are updated successfully and 8th record has issue in updating the table.
    In this case i would like to ROLLBACK entire 10 records with out committing any thing.
    So if i use your 2nd option, it should perform as i expected right?
    Regards

  • Specify Keys in Data Type for receiver JDBC adapter

    Hi guys,
    I have the following issue:
    In a proxy to JDBC scenario, I want to specify somehow the key values for the SQL statement in the data type that I define for the receiver JDBC adapter. Thus, I am using the following structure in data type:
    root
        Statement
               dbTable
               action
               table
               access
                      CustomerID
                      Name
                      HouseNo
               Key
                      CustomerID
    But in the SQL statement that is produced (I can see that in RWB, CC Monitoring, Audit Log), the "Key" segment is translated into "OR". E.g. UPDATE_INSERT ("A100" "Evaggelos Gkatzios" "El Alamein 19") OR ("A100")
    Do you have any ideas ?

    Hi,
    Its clear from the statement in RWB (in CC monitoring's auditlog) you are using UPDATE_INSERT as the action.
    Please correct me if this is OK. Now the interpretation of input xml file will be like this,
    If the input XML is in the following format
    <root>
    <Statement>
    <dbTable action=UPDATE_INSERT>
    <table>EXAMPLE</table>
    <access>
      <CustomerID>ABC</CustomerID>
      <Name>xyz</Name>
      <HouseNo>123</HouseNo>
    </access>
    <key>
      <CustomerID>DEF</CustomerID>
    </key>
    </dbTable>
    </Statement>
    </root>
    Resultant SQL after parsing the XML file will be,
    1. It will first check with the condition WHERE CustomerID = DEF. If it finds the record with this condition then it will update the record with CustomerID=ABC, Name =xyz & HouseNo=123.
    2. If it doesn't find any record with that CustomerID then, it will insert a new record with the same details.
    In auditlog, you will find two SQL statements like,
    1.UPDATE EXAMPLE SET CustomerID=ABC, Name =xyz & HouseNo=123 WHERE CustomerId=DEF
    2.INSERT INTO EXAMPLE VALUES(ABC,xyz,123)
    hope this has given clear information about your query,
    Regards,
    Soorya

  • Receiver JDBC Adapter for Count of records in Table

    Hi All,
    I am talking about Client Proxy to Receiver JDBC scenario.I've a requirement where i need to count the no of records created or updated in SQL server for particular transaction date.Question is- Is it possible to execute normal sql query to get the count or I need to write a stored procedure in SQL Server to be used by JDBC adapter.Please suggest with an example if possible.
    thanks for the help

    Hi.
    Pls check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    action= EXECUTE
    Edited by: Luis Ortiz on Aug 26, 2010 2:27 PM

  • QUESTION abt "SQL_DML" of the Receiver JDBC Adapter

    HI ALL,
    i hav a doubt abt "SQL_DML" of the Receiver JDBC Adapter.
    i wanna use two SQL Statements in the "SQL_DML" structure to manipulate two tables.
    i.e.
    <root>
      <stmt>
        <Customers action="SQL_DML">
          <access>
                          INSERT INTO Customers VALUES (u2019$NAME$u2019, u2019$ADDRESS$', '$KEYFIELD$u2019);
                          INSERT INTO Companys VALUES('$NAME$')    
          </access>
          <key>
            <NAME>Company</NAME>
            <ADDRESS>Street 3 </ADDRESS>
            <KEYFIELD>CO</KEYFIELD>
          </key>
        </Customers>
      </stmt>
    </root>
    BUT i cant ascertain if it permit like this writting above ??
    Requset help in this regards.
    Thx in advance.
    brian

    Hi,
    You need to have two different statements. Each for one insert query. Your query will come under access tag and palceholders under kay tag. Action will remain same as you have given, but under both statements.
    Ex:
    <root>
    <stmt1>
    <Customers action="SQL_DML">
    <access>
    INSERT INTO Customers VALUES (u2019$NAME$u2019, u2019$ADDRESS$', '$KEYFIELD$u2019);
    </access>
    <key>
    <NAME>Company</NAME>
    <ADDRESS>Street 3 </ADDRESS>
    <KEYFIELD>CO</KEYFIELD>
    </key>
    </Customers>
    </stmt1>
    <stmt2>
    <Customers action="SQL_DML">
    <access>
    INSERT INTO Companys VALUES('$NAME$')
    </access>
    <key>
    <NAME>Company</NAME>
    </key>
    </Customers>
    </stmt2>
    </root>
    Hope this helps.
    Regards,
    Siddhesh S.Tawate
    Edited by: siddhesh tawate on Apr 24, 2009 8:10 AM

  • Sender Abap Proxy -- Receiver JDBC , catch communication channel exceptions

    Hi All,
    I have a sender abap proxy and a receiver jdbc asynchronous interface.
    Now under some circumstances when I send some junk data for an update query(which satisfies metadata requirement but wrong primary key) it shows chequered flag in both XI and r/3.
    But in communication channel it shows error.
    Queries:
    1. How do I handle this.
    2. Since this is triggered from Abap wht will be subrc when method ends in this particular case.
    3. Is there any possibility of program goin into dump?
    Regards,
    Prem

    You can catch the exception in cx_ai_system_fault.
    http://help.sap.com/saphelp_nw70/helpdata/en/75/a55c3cff8ca92be10000000a114084/content.htm
    DATA:
    lo_mes TYPE REF TO
         [Client proxy class],
    l_sys_exc TYPE REF TO
            cx_ai_system_fault,
    l_app_exc TYPE REF TO
            cx_ai_application_fault.
    CREATE OBJECT lo_mes.
    TRY.
    CALL METHOD
      lo_mes->EXECUTE_SYNCHRONOUS
        EXPORTING
          OUTPUT    = ls_request
        IMPORTING
          INPUT     = ls_response.
    CATCH cx_ai_system_fault
                INTO l_sys_exc.
    * handle system error
        EXIT.
    CATCH cx_fault_1
                INTO l_app_exc.
    * handle application error 1
    CATCH cx_fault_n
                INTO l_app_exc.
    * handle application error n
    CATCH cx_ai_application_fault
                INTO l_app_exc.
    * handle other
    * application errors
    ENDTRY.
    Thanks,
    Beena.

  • Joins implementation receiver Jdbc Adapter

    Hi All
    I need  some suggestions on the following scenario
    Updation of a flag in a table where the column names in the WHERE clause are from two different tables in the same database.
    i.e
    UPDATE T1
    Set T1.flag =1
    where T1.columnA=value1 and T2.columnB=value2
    where T1 and T2 are two different tables in the same database,
    I want to accomplish this directly using UPDATE in JDBC receiver by using JOIN query in the structure.
    kindly reply
    thanks
    sd

    Hi Sd,
    You can execute an SQL statement directly in your Receiver JDBC adapter.
    Check this link for that,
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Check the part for STATEMENTNAME6 and also the example for that in the same link,
    Regards,
    Bhavesh

  • SELECT COUNT(*) WHERE Receiver JDBC?

    How can I do a SELECT COUNT(*) WHERE SQL statement with a Receiver JDBC?

    Hi,
    Refer this document - but if you have select query
    "All return values are returned in an XML structure."
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Hope this helps,
    Regards,
    Moorthy

  • JDBC 'Query Multiple to XML' throwing NullPointerException on LC Server

    Hi all...
    It seems that any attempt to perform a jdbc access from a deployed LCA (my process at this point only contains the JDBC 'query multiple to xml' operation) results in the following exception on the LC server (see below). The query and xml generation all seem to work ok from the Workbench. I can mail the lca upon request. Thanks.
    [4/28/08 17:10:15:557 EDT] 00000059 SystemOut O [Flex] [ERROR] Root cause: java.lang.NullPointerException
    at com.adobe.idp.dsc.jdbc.helper.SqlHelper.executeQuery(SqlHelper.java:85)
    at com.adobe.idp.dsc.jdbc.JDBCService.queryMultipleToXml(JDBCService.java:391)
    at sun.reflect.GeneratedMethodAccessor1517.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:181)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:134)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:336)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionCMTAdapter_ caf58c4f.doSupports(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:88)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:113)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:102)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:88)
    at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 0)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.idp.taskmanager.dsc.service.TaskManagerServiceImpl.renderForm(TaskManagerServic eImpl.java:3404)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:181)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:134)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.trans

    is your issue solved,if not mail me
    [email protected]

  • Table name in Receiver JDBC Adapter

    Hi All,
    I am using receiver JDBC adapter.
    But table name consist of " like BPC."#II" .
    After mapping table name becomes BPC.&quot;#II&quot; .
    I am getting error while pulling data from DB.
    Is the table name creating a problem.
    Please remedy of this if you have come across such scenario.
    Regards
    Piyush

    Hi Piyush,
    All that i could get from the SAP Help regarding JDBC Adapters are these links where i never found anything much regarding the table name.anyways just go through these links and see if you find anything useful.
    http://help.sap.com/bp_bpmv130/Documentation/Planning/XIUnicodeGuide030411.pdf
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm">Configuring the Receiver JDBC Adapter</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm">Mapping Lookups</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/content.htm">JDBC Adapter</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm">Configuring the Receiver JDBC Adapter - part 2</a>
    This is all i got from the help files, anyways you can also go through those links and see if you find anything else useful.
    - Escape Symbol for Apostrophe
    The apostrophe character (‘) is a reserved character in SQL syntax and is therefore replaced by an escape character if it occurs within value strings. This replacement character can be database-specific. Typical replacement characters are \’ or ’’(default value). If a character occurs that is invalid for the database being used, the adapter triggers an error message (an SQL exception) concerning the SQL syntax that is generated by the database.
    - Column Name Delimiter
    Depending on the database being used, column names can be enclosed by a special delimiter character, for example, if the names can contain special characters (such as ”). This character can be specified at this point. The default setting is no delimiter character. If a character occurs that i
    Also check if there are notes in the service market place related to the same.
    Regards,
    abhy
    Message was edited by: Abhy Thomas

Maybe you are looking for