JDBC receiver adapter - stored procedure response

I am on PI 7.11 and have the following scenario:
RFC->PI->JDBC
whereby the JDBC receiver access an Oracle db (unsure of that version) using a stored procedure "GET_ICBC_ID".
My issue is that I never seem to have any data back in PI on the JDBC response coming back from Oracle. ***
Here is the definition of that stored procedure in Oracle:
Stored Procedure Name: GET_ICBC_ID
  Parameters
                ICBCID    OUT VARCHAR2               <- Returned RACF ID (output)
                REQUESTOR IN VARCHAR2 default 'SAPHR'       <- Optional Requestor ID.
               COMMUNITY IN  VARCHAR2 default 'EMP'       <- Optional Community ID. 
Here is my JDBC call in to the stored procedure (sxi_monitor), which seems to be fine:
  <?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_racf_req xmlns:ns1="http://sap.com/xi/Z_SkillSoft">
- <Statement>
- <GET_ICBC_ID action="EXECUTE">
  <REQUESTOR isInput="true" type="VARCHAR">SAPHR</REQUESTOR>
  <COMMUNITY isInput="true" type="CHAR">EMP</COMMUNITY>
  </GET_ICBC_ID>
  </Statement>
  </ns1:MT_racf_req>
It appears as though the call into the JDBC is working, as the Oracle guys have shown me the logs (showing success) on the Oracle side.
This is my sxi_monitor entry (of that response message):
  <?xml version="1.0" encoding="utf-8" ?>
- <ns1:MT_racf_req_response xmlns:ns1="http://sap.com/xi/Z_SkillSoft">
  <Statement_response />
  </ns1:MT_racf_req_response>
Also when I look at some of the message properties I see:
  <SAP:MessageSizePayload>0</SAP:MessageSizePayload>
  <SAP:MessageSizeTotal>13243</SAP:MessageSizeTotal>
  <SAP:PayloadSizeRequest>0</SAP:PayloadSizeRequest>
  <SAP:PayloadSizeRequestMap>0</SAP:PayloadSizeRequestMap>
  <SAP:PayloadSizeResponse>179</SAP:PayloadSizeResponse>
  <SAP:PayloadSizeResponseMap>149</SAP:PayloadSizeResponseMap>
which I believe is saying that something came back in to PI as a response??  Not sure.
My Message Type definition is:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/Z_SkillSoft" targetNamespace="http://sap.com/xi/Z_SkillSoft">
   <xsd:element name="MT_racf_req_response" type="DT_racf_req_response" />
   <xsd:complexType name="DT_racf_req_response">
      <xsd:sequence>
         <xsd:element name="Statement_response" type="DT_statement_response" />
      </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="DT_statement_response">
      <xsd:sequence>
         <xsd:element name="ICBCID" type="xsd:string" />
      </xsd:sequence>
   </xsd:complexType>
</xsd:schema>
I have also tried inserting <row> between <Statement_response> and the ICBCID element.  Still no luck. 
I suspect something is wrong with my response message type definition, but am not seeing it. Also, am unsure how I can debug this - it appears as though Oracle side is fine, but nothing back into PI.
Any thoughts appreciated.
Keith

Thank you all for your response.  Some more info.:
- The stored procedure is a SELECT, so am thinking I shouldn't need the <update_count> tags mentioned.  Let me know if this assumption is incorrect.
- Because one field (ICBCID) is to be returned in the reponse, does it need to be passed in on the jdbc request ? Looking at the blogs I did not see them do that.  If so, with its IsOutput=true, or should it be IsInput=false or other? Also if it is to be passed in on the request, I guess I would set its value to a space so that the xml tag gets produced?
- Does the order of the request elements passed matter, i.e. if the ICBCID is to be passed on the request, should it be first or last in the list?  Does order of the 2 IsInput=true parameters matter (i.e. in relation to the Stored Procedure)?
- The Oracle version is 11.1, so pretty up-to-date.  Stored Procedures should work fine.
- What specifically is meant be 'resultset'?  Also, does <row> need to be added as a tag within the response xml?
Regards,
Keith

Similar Messages

  • JDBC Receiver Adapter - Stored Procedure - Error Illegal Parameter

    Hi experts,
    I have a problem with the next scenario:
    HTTP <-> XI -> JDBC
    XI sends the following message to JDBC Adapter in mode Receiver to execute a Stored Procedure in a Informix database:
    <ns0:mt_messageTestSP xmlns:ns0="urn:test">
      <statement>
        <hastus_exporta_dia action="execute">
          <fechaEnvio isInput="true" type="DATE">11/17/2008</fechaEnvio>
        </hastus_exporta_dia>
      </statement>
    </ns0:mt_messageTestSP>
    Note: The format that accepts the SP Informix in the field of type date is: MM/dd/yyyy
    The SP is running on an Informix database, and the parameter (fechaEnvio) that receive the SP is of type DATE. At runtime the SP does not run, and in the Component Monitoring of the Runtime Workbench I see the following error:
    Unable to execute statement for table or stored procedure. 'hastus_exporta_dia' (Structure 'statement') due to java.lang.IllegalArgumentException
    Any idea?
    Thanks,
    Jose.

    Hi,
        Check the date format...once again...
    In oracle date format is DD/MM/YYYY but if the same is sent from PI its throwing the error....
    but when i send the format as DD-Mon-YYYY its accepting and showing as DD/MM/YYYY in oracle tables
    so just try fetching the date field from the informix database and see how it is get converted into..and based on that send the format
    HTH
    Rajesh

  • JDBC Receiver adapter Stored procedure

    We are using stored procedure to insert/update the data into SQL database, for this I define data type  as below
    But the JDBC call is failing with error " com.sap.engine.interfaces.messaging.api.exception.MessagingException:
    Error processing request in sax parser: Error when executing statement for
    table/stored proc. 'insert_IDOCRec' (structure 'STATEMENT'):
    java.sql.SQLException: ERROR: Invalid XML document format for stored procedure:
    'type="<SQL-type>"' attribute is missing for element 'table' (Setting a
    SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)"
    Can you please help me why the JDBC call is failing with the above error.

    I think your struct is wrong,the right is following:
    DT_INSPLOT_JDBC_REC_REQ
              STATEMENT
                        insert_IDOCRec     Element     1..unbounded
                        action                    Attribute     xsd:string     required
                        table                     Element          xsd:string     1
                        field1                      Element    1
                             isInput               Attribute     xsd:boolean     required
                             type                 Attribute     xsd:boolean     required
                        field2                      Element    1
                             isInput               Attribute     xsd:boolean     required
                             type                 Attribute     xsd:boolean     required
    from the log you send to us, the struct miss the table element.

  • ** JDBC Receiver - Oracle Stored Procedure - Large Records - Performance

    Hi friends,
    In my File to JDBC scenario, I use Oracle SP. I designed my target structure as mentioned in help.sap.com. In this scenario, the Sender file sends large no. of records, we have to update those records in the Oracle table. As per this requirement, I did mapping. I tested one file with 4 records. In SXMB_MONI, mapping works fine. I have given below the target payload. The message is processed successfully. (Still I have not created SP in database I am unable to check for the updating of records in the table).
    My doubt is
    1) Whether the target payload is correct ?
    2) For each <STATMENT> tag, Will XI establish connectivity to JDBC and update the record ? If it is, in real time if we send large no. of records, ex: 50 thousand records, performance isssu will come or not?
    3) How to solve the problem as said in point 2. (LookUp procedure etc)
    Kindly reply friends. (If you  have faced this problem ... kindly reply how to solve this issue)
    Target Payload:
    <?xml version="1.0" encoding="utf-8"?>
    <ns1:PSABCL_Mumbai xmlns:eds="http://sdn.sap.com/sapxsl" xmlns:ns0="http://abc.xyz.com" xmlns:ns1="http://abc.xyz.com/ABCL/Finance">
    <STATEMENT>
    <SP_ABCL ACTION="EXECUTE">
    <IF_ROW_STAT>FOR_IMPORT</IF_ROW_STAT><CON_FST_NAME>John</CON_FST_NAME><CON_LAST_NAME>Test001915</CON_LAST_NAME><CON_MID_NAME>W</CON_MID_NAME>
    </SP_ABCL>
    </STATEMENT>
    <STATEMENT>
    <SP_ABCL ACTION="EXECUTE">
    <IF_ROW_STAT>FOR_IMPORT</IF_ROW_STAT><CON_FST_NAME>Josephine</CON_FST_NAME><CON_LAST_NAME>Walker</CON_LAST_NAME><CON_MID_NAME>Rose</CON_MID_NAME>
    </SP_ABCL>
    </STATEMENT>
    <STATEMENT>
    <SP_ABCL ACTION="EXECUTE">
    </SP_ABCL>
    </STATEMENT>
    <STATEMENT>
    <SP_ABCL ACTION="EXECUTE">
    </SP_ABCL>
    </STATEMENT>
    </ns1:PSABCL_Mumbai>
    Thanking You.
    Kind Regards,
    Jegathees P.

    Hi,
    The structure should be -
    <MsgType Name>
    <StatementName>
    <storedProcedureName action = "EXECUTE">
    <table>
    <List of Parameters isInput = "true" type = "STRING">
    Map the table node to the stored procedure name.
    Also,
    For each statement, XI would make a database call. For better performance, do not check the button in CC - Open a new connection to database for each message.
    Also another solution would be, collect all the data in the mapping to a comma or a pipe separated string in the mapping and have the statement node created only once. This way, though you have 5000 records, they all will be given to the SP in one DB call. you can also manage the mapping so that you will not send more the the X number of records to database in a single call. We are using an XML created in code in an UDF for this. The SP has to take care of stripping the comma or pipe separated values or the XML sent as a string input parameter.
    VJ

  • Multi-Mapping - JDBC receiver -  Multiple stored procedure - How to sequence?

    Hi Folks,
    We have 7.1 .Done multi-mapping , single source mapped to 5 different stored procedures.
    The challenge we are facing here is , these stored procedure is not working sequentially .
    i.,e  for e.g., 2nd Stored Procedure should start only when first Stores procedure completely finished its turn.
    But third procedure getting completed before1 st stored procedure completes .
    Highly appreciate if any views on this ? How to sequence and make sure second will start only when first SP complete  ?
    -- Shiva

    Hi ,
    Thanks for your reply. all stored procedures are asynchronous one.
    If we go for ccBPM , do we need to put wait step ?
    - Here we dont know how much time each procedure takes to complete. Requirement is another procedure has to start only when the previous one completes.
    --Shiva

  • JDBC RECEIVER -- conditional stored procedure

    Hi All,
               I have a situation where I need to call one stored procedure which returns to me if for a particular employee a record exists or not depending on that result I need to call further stored procedure. Can it be handled in one interface call. My scenario is :
    1. Source system  checks xxx database server to see if employee exists.
    Call GetEmplExsts stored procedure from xxx.
    2. Call the appropriate stored procedure from xxx depending on the status of the
    employee (if they already exist in xxx or not).
    Call CreatEmp stored proc if the employee does NOT already exist in xxx
    OR
    Call UpdatEmp stored proc if the employee already exists in xxx.
    Thx in advance
    Ravijeet

    hi
    i recommend you that create a sp with 3 condicions so you only do one call and is more easy to applicate in pi.
    for ex
    @@Exist char(2)
    exist = select existEmp from EMPLOYEE
    IF exist = "X" {
       execute updateEmp
    else{
    execute createEmp
    i dont remember too much how to define it in SQL :P
    Edited by: Rodrigo Pertierra on Feb 26, 2008 1:12 PM

  • XI/PI: jdbc receiver using stored procedure with arrays

    The company needs an interface to search for header data and detail to a legacy system.
    This interface from ERP  to legacy system is synchronous and uses stored procedure.
    The definition of the stored procedure is as follows:
    PROCEDURE
    Generar_Detalle_Vtas_Pagadas
        (p_cvendedor                 IN bdc_vendedores.cvendedor%TYPE,
        p_fdesde                   IN DATE,
        p_fhasta                     IN DATE,
        v_encabezado_ct           OUT encabezado_ct,
        v_detalle_vtas_pagadas_ct OUT detalle_vtas_pagadas_ct,
        err_num                 OUT NUMBER
    Data types used in stored procedure:
    TYPE encabezado_ct AS OBJECT
    ( CREGION         NUMBER(22),
      XREGION         VARCHAR2(50),
      CMERCADO        NUMBER(22),
      XMERCADO        VARCHAR2(50),
      CTVENDEDOR      VARCHAR2(5),
      XCTVENDEDOR     VARCHAR2(50),
      XDENOMINACION   VARCHAR2(15))
    TYPE detalle_vtas_pagadas_ct AS OBJECT
    (     CITEM           VARCHAR2(10),
          XIDENTIFICADOR  VARCHAR2(15),
          XCONTRATO       VARCHAR2(15),
          XVALOR          VARCHAR2(30),
          CCUENTA         VARCHAR2(15),
          FACTIVACION     DATE,
          XDOMINIO        VARCHAR2(30),
          CCED            VARCHAR2(20),
          XCLIENTE        VARCHAR2(161),
          CCPO            VARCHAR2(60) )
    As shown, this has three input parameters varchar and date respectively and has three output parameters, two of which are defined with a data
    type such as table and the other number.
    The problem is to define the signature of the stored procedure in XI when defining the data type request, the message type and mapping system
    legacy because the data type is not supported (tables: detalle_vtas_pagadas_ct,encabezado_ct  )

    FORM 2:
    defined as an array, but the error tells me that we need to define the attribute either input or output
    <?xml version="1.0" encoding="UTF-8"?>
         <ns0:MT_VtasPagadas_VYC xmlns:ns0="urn:VentasPagadas:VE_ALTASDEDCALIDAD_SD_VYC">
          <VtasPagadasRequest><Generar_Detalle_Vtas_Pagadas action="EXECUTE">
             <table>vyc.Vyc_Pack_Reportes_Sap.Generar_Detalle_Vtas_Pagadas</table>
             <p_cvendedor type="VARCHAR"></p_cvendedor>
             <p_fdesde type="DATE"></p_fdesde>
             <p_fhasta type="DATE"></p_fhasta>
             <v_encabezado_ct>
                 <CREGION isOutput="1" type="NUMERIC">X</CREGION>
                 <XREGION isOutput="1" type="VARCHAR">X</XREGION>
                 <CMERCADO isOutput="1" type="NUMERIC">X</CMERCADO>
                 <XMERCADO isOutput="1" type="VARCHAR">X</XMERCADO>
                 <CTVENDEDOR isOutput="1" type="VARCHAR">X</CTVENDEDOR>
                 <XCTVENDEDOR isOutput="1" type="VARCHAR">X</XCTVENDEDOR>
                 <XDENOMINACION isOutput="1" type="VARCHAR">X</XDENOMINACION>
            </v_encabezado_ct>
            <v_detalle_vtas_pagadas_ct>
                 <CITEM isOutput="1" type="VARCHAR">X</CITEM>
                 <XIDENTIFICADOR isOutput="1" type="VARCHAR">X</XIDENTIFICADOR>
                 <XCONTRATO isOutput="1" type="VARCHAR">X</XCONTRATO>
                 <XVALOR type="VARCHAR">X</XVALOR>
                 <CCUENTA isOutput="1" type="VARCHAR">X</CCUENTA>
                 <FACTIVACION isOutput="1" type="DATE">X</FACTIVACION>
                 <ICTA isOutput="1" type="VARCHAR">X</ICTA>
                 <CCED isOutput="1" type="VARCHAR">X</CCED>
                 <XCLIENTE isOutput="1" type="VARCHAR">X</XCLIENTE>
                 <CCPO isOutput="1" type="VARCHAR">X</CCPO>
            </v_detalle_vtas_pagadas_ct>
            <err_num isOutput="1" type="NUMERIC">X</err_num>
         </Generar_Detalle_Vtas_Pagadas>
      </VtasPagadasRequest></ns0:MT_VtasPagadas_VYC>
    Edited by: ymonasterio on Mar 31, 2010 4:48 PM

  • JDBC Sender With Stored Procedure & Context Handeling

    Hi All,
    In my scenario i am using stored Procedure in JDBC sender adapter for Fetching data,
    I am fetching data from 3 tables kepping a one key element Exampkle  <matnr> for each value in this <matnt> in table 1 i will fetch the corresponding records in table 2 and 3 ...
    how can i use context in mapping such a sender structure to hendle the emplty value ...give me some idea...
    if any one has come across such situation plz help me ....it very urgent .
    thanks
    Shakif

    Hi,
    Follow this
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    JDBC adapter
    /people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
    stored procedure
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    Helpful link
    http://help.sap.com/saphelp_nw04/helpdata/en/45/023c41325fa831e10000000a1550b0/frameset.htm
    Might help you..
    vasanth.

  • Synchronous  JDBC Receiver Adapter

    Hi,
    My requirement is JDBC--- XI --- JDBC (Sync) — JDBC.
    Let me be more precise about the above scenario.
    JDBC sender picks up a record from DB1 and sends to DB2 and gets a response from DB2 and send the response to DB3.
    I am sure this can be handled only through BPM.
    But my question will a JDBC Receiver adapter gets a response back to XI. If this is possible , can some one tell me how can I achieve it.
    Thanks
    Shaik

    <i>I am sure this can be handled only through BPM. </i>
    BPM required.
    <i>
    But my question will a JDBC Receiver adapter gets a response back to XI.</i>
    Yes.
    The weblog by Bhavesh would also b helpful.
    Regards,
    Prateek
    Message was edited by:
            Prateek Srivastava

  • JDBC Receiver Adapter - Call Stored Procedure

    Hi,
    I am using a JDBC receiver adapter to call a stored procedure in oracle.
    My target structure looks like:-
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <table>realStoredProcedureName</table>
    <serialDate hasQuot="NO" isInputType="true" type="date">TO_DATE('07-15-2008 08:00:11','MM-DD-YYYY HH24:MI:SS')</serialDate>
    <serialNo isInputType="true" type="NUMERIC">123456</serialNo>
    </storedProcedureName>
    </STATEMENT>
    The storedprocedure takes two input values and has one output value.
    The first parameter of the stored procedure is serialDate and the second input parameter is serialNo.
    I am getting an exception:-
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'storedProcedureName' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('07"</SAP:AdditionalText>
    Any ideas how to fix this issue.
    Thanks.
    Krishnan

    Hi Krishnan,
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <table>realStoredProcedureName</table>
    <serialDate hasQuot="NO" isInputType="true" type="date">TO_DATE('07-15-2008 08:00:11','MM-DD-YYYY HH24:MI:SS')</serialDate>
    <serialNo isInputType="true" type="NUMERIC">123456</serialNo>
    </storedProcedureName>
    </STATEMENT>
    The storedprocedure takes two input values and has one output value.
    The first parameter of the stored procedure is serialDate and the second input parameter is serialNo.
    I am getting an exception:-
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'storedProcedureName' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('07"</SAP:AdditionalText>
    In the XML structure you cannot use TO_DATE function . Please pass the DATE in the correct format which the Stored procedure can accept .  Get the out put what you expected from TO_DATE function and use that value in the structure.
    Regards,
    Kishore

  • JDBC receiver adapter to call MS SQLServer stored procedure with parameters

    We are trying to use the JDBC receiver adapter to call a stored procedure in MS SQLServer with parameters.  According to the help documentation for the JDBC receiver adapter for action=EXECUTE,  "The elements within the stored procedure are interpreted as parameters" and "The parameter names must be identical to those of the stored procedure definition".  The parameters within a MS SQLServer stored procedure are required to begin with the '@' symbol.  The element names within a XML document i.e. used to call the stored procedure can not contain a special character such as '@' in the first position.  For all of the tests we have done where the parameter name in the XML document omits the '@' character, the parameters are not being received by the stored procedure.  Is there a way around this  problem?
    Thank you,
    Harold

    Hello Harold - I am facing the EXACTLY SAME problem.Pls let me know how did you fix this problem ?
    This is the message I am passing on to the DB SP:
    <?xml version="1.0" encoding="UTF-8"?>
    <MRIRequestInbound>
       <StatementName>
          <prc_FC_InsertStagingJournalEntries action="EXECUTE"/>
          <JournalData isInput="true" type="STRING">
    <NewDataSet><Table ITEM = "" ENTITYID = "" PERIOD = "" ACCTNUM = "" DEPARTMENT = "" JOBCODE = "" AMT = "" REF = "" DESCRPN = "" ENTRDATE = "" BASIS = " " BALFOR = "N" REQUESTNUM = "" ACCTNAME = "" TYPE = "" DESCRPTN = "" GDEP_DESCRPN = "" GJOB_DESCRPTN = "" JOBTYPE = ""  /></NewDataSet>
    </JournalData>
       </StatementName>
    </MRIRequestInbound>
    Out of which,
    <NewDataSet> tag contains the value of the parameter in the SP. So, my value to the SP's parameter is :
    <NewDataSet><Table ITEM = "" ENTITYID = "" PERIOD = "" ACCTNUM = "" DEPARTMENT = "" JOBCODE = "" AMT = "" REF = "" DESCRPN = "" ENTRDATE = "" BASIS = " " BALFOR = "N" REQUESTNUM = "" ACCTNAME = "" TYPE = "" DESCRPTN = "" GDEP_DESCRPN = "" GJOB_DESCRPTN = "" JOBTYPE = ""  /></NewDataSet>
    Any clue ?
    Cheers,
    Amrish.

  • MS SQL Server Stored Procedure - JDBC Receiver Adapter

    Hi,
    I am calling a stored procedure in MS SQL Server using the JDBC Receiver Adapter.  The stored procedure takes 1 input parameter which is a VARCHAR field.  The stored procedure's input parameter and the input parameter are identical.  My target structure looks like:-
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <TABLE>SP_REPROCESS</TABLE>
    <input1 isInput="true" type="VARCHAR">1</input1>
    </storedProcedureName>
    </STATEMENT>
    I am getting the following error:-
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_REPROCESS' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
    Any suggestions.
    Thanks.
    Krishnan
    Edited by: Krishnan on Jul 17, 2008 7:07 AM
    Edited by: Krishnan on Jul 17, 2008 7:07 AM
    Edited by: Krishnan on Jul 17, 2008 7:48 AM

    hi,
    can anyone help me to fix this issue.
    In MONI, i am able to see the output xml as :-
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:REPROCESS_DATA_MT xmlns:ns0="http://abc.com/db/integration">
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <TABLE>SP_REPROCESS</TABLE>
    <input1 isInput="true" type="VARCHAR">1</input1>
    </storedProcedureName>
    </STATEMENT>
    </ns0:REPROCESS_DATA_MT>
    in the communication channel monitoring --> in the JDBC receiver channel, I am getting the following error:-
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_REPROCESS' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
    thanks.
    krishnan

  • How to modify oracle stored procedure for JDBC Receiver Adapter?

    Hi all.
    This is Urgent.
    Scenario is
      SELECT a TABLE with procedure and update column with it,
      then send data to SAP System with RFC Adapter.
    When I executed a sync bpm, scenario was finished internal error.
    Pls, let me know how to correct procedure using JDBC Receiver Adapter?
    Regrds all.
    Procedure Code -
    SET SERVEROUTPUT ON
    CREATE OR REPLACE PROCEDURE zwtn2
    IS
       v_seller_company      wtnivhd.seller_company%TYPE;
       v_invoice_no      wtnivhd.invoice_no%TYPE;
       v_report_date     wtnivhd.report_date%TYPE;
       v_customs_date     wtnivhd.customs_date%TYPE;
       v_ap_post_date     wtnivhd.ap_post_date%TYPE;
       v_gr_date          wtnivhd.gr_date%TYPE;
    CURSOR l_cursor IS
       SELECT seller_company,
              invoice_no,
              report_date,
              customs_date,
              ap_post_date,
              gr_date
         FROM wtnivhd
        WHERE wtn_send_flag = 'N'
          AND rownum < 31
    FOR UPDATE;
    BEGIN
       OPEN l_cursor;
       LOOP
         FETCH l_cursor
          INTO v_seller_company,
               v_invoice_no,
               v_report_date,
               v_customs_date,
               v_ap_post_date,
               v_gr_date;
         EXIT WHEN l_cursor%NOTFOUND;
         UPDATE wtnivhd
            SET wtn_send_flag = 'Y' 
           WHERE CURRENT OF l_cursor;
       END LOOP;
    CLOSE l_cursor;
    END zwtn2;

    Hi Alex,
    plz have a look to Runtime Workbench / Adapter Monitoring to find an error message.
    Regards,
    Udo

  • Store procedure in JDBC Receiver adapter

    Hi,
    I am calling stored procedure using jdbc reeciver adapter . showing below error. In oracle database it is under functions not in the procedure. functions and stored procedure are same? is it should be create under procedure?
    error message:
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'GET_ALL_SALESREPINFO' (structure 'statement'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00221: 'GET_ALL_SALESREPINFO' is not a procedure or is undefined ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    Sql query:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:TerritoriesAndSalesRepsRequest xmlns:ns1="http://allergan.com/TerritoriesAndSalesRepsServiceList/1.0">
    <statement><GET_ALL_SALESREPINFO action="EXECUTE">
    <P_REP_LOGIN isInput="1" type="VARCHAR">sdfsfd</P_REP_LOGIN>
    </GET_ALL_SALESREPINFO>
    </statement></ns1:TerritoriesAndSalesRepsRequest>
    oracle function
    DECLARE
         RETURN_VALUE BEACONDM_ETL.ACCT_TABLE_TYPE;
         P_ZIP_CODE VARCHAR2(2000) := '-';
    BEGIN
         RETURN_VALUE := BEACONDM_ETL.GET_ACCT_INFO(P_ZIP_CODE);
         --DBMS_OUTPUT.PUT('RETURN_VALUE: ');
         --DBMS_OUTPUT.PUT_LINE(RETURN_VALUE);
         DBMS_OUTPUT.PUT('P_ZIP_CODE: ');
         DBMS_OUTPUT.PUT_LINE(P_ZIP_CODE);
    END;
    GO
    DECLARE
         RETURN_VALUE BEACONDM_ETL.SALESREP_TABLE_TYPE;
         P_REP_LOGIN VARCHAR2(2000) := '-';
    BEGIN
         RETURN_VALUE := BEACONDM_ETL.GET_ALL_SALESREPINFO(P_REP_LOGIN);
         --DBMS_OUTPUT.PUT('RETURN_VALUE: ');
         --DBMS_OUTPUT.PUT_LINE(RETURN_VALUE);
         DBMS_OUTPUT.PUT('P_REP_LOGIN: ');
         DBMS_OUTPUT.PUT_LINE(P_REP_LOGIN);
    END;
    GO
    Please send me if you have any blogs for calling stored procedure using jdbc receiver adapter.

    Hi Madhu,
    >>>I am calling stored procedure using jdbc reeciver adapter . showing below error. In oracle database it is under functions not in the procedure. functions and stored procedure are same? is it should be create under procedure?
    Of course there is difference between Oracle functions & Stored procedures:
    Re: Populating DropdownByKey by accessing backend
    As far as i know and have configured and used Stored procedures with the JDBC adapter, it can be used with Oracle stored procedures (leave it to the experts to comment on the Oracle functions part). So if you change it to stored procedure then it should work fine.
    You may then define your Message structure as follows:
    http://help.sap.com/saphelp_nw73/helpdata/en/44/7b72b2fde93673e10000000a114a6b/content.htm
    And you may also like to refer the following blog on stored procedures:
    PI  JDBC Stored Procedure test scenario
    Hope this helps. Regards, Gaurav

  • JDBC receiver adapter for AS400-query time out due to Escape Symbol

    Hello,
    I am uisng JDBC receiver adapter for AS 400, When I execute query, the query needs to have arguments in the open and close single ticks ('    12345' )
    My XML pay load looks like this, which is RFC sender. Look at dcudcstmr in <i><b>(' 838912')</b></i>.  When receiver gets this message the ' (single quotes are disappeared.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_Cma_Customer_Select_Request xmlns:ns1="http://freemanco.com/xi/Get_Customer">
    - <Statement>
    - <LawsonCustomer action="SQL_QUERY">
      <access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <i><b>(' 838912')</b></i> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
      </LawsonCustomer>
      </Statement>
      </ns1:MT_Cma_Customer_Select_Request>
    On the Receiver JDBC adapter I have tried with different combinations of Escape Symbol for Aposrophe as follows
    <b>   \
       '</b>
    As you know this is related to epcape character, I get following error all the time. Looks like the query is not able to execute in the specified time. My question is how do I get single quote as part of query.
    <b>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( 100001) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr) 2007-09-20 15:56:42 Error Unable to execute statement for table or stored procedure. 'LawsonCustomer' (Structure 'Statement') due to java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000.. Setting message to status failed. 2007-09-20 15:56:42 Error The message status set to FAIL. 2007-09-20 15:56:42 Error Returning synchronous error message to calling application: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000</b>
    Any feedback or helpfull tips appreciated.
    Thank you,
    Balaji

    Raj,
    Thank you for the reponse. I am using UDF on sender to generate sql statement as you see in sender XML message. After the message reaching receiver, gets executed but no response from AS400 becasue of missing single quotes in the sql query executed.
    Sender XML sends
    <access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <u><b>(' 838912')</b></u> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
    Receiver executes as
    select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( <b><u>838912</u></b>) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)
    As you see the single quotes are missing. Like I said in previous posting I tried with following Escape Symbol for Aposrophe.
    Let me know if you need more information.
    Thank you,
    Balaji

Maybe you are looking for

  • Is it possible to export a video clip from DVD player to iMovie '09?

    If I load a homemade DVD onto my iMac using Disk Utility and then import either the entire disc or portions of the disc into iMovie, that works just fine. However I noticed that some clips are missing in iMovie, even though they are on the iMac in fo

  • No address

    I posted about this already but got no solution so here it goes again. When I go to type up an address in the TO line of a new email message I do not get a list of possible address matches to my letters as I enter them. I keep typing and the only thi

  • MacBook and Pro Tools

    I just ordered a black macbook with a 1gig ram in it and i was wondering if thats enough to run protools with at 192kbs. Also, has anyone run into any problems/mishaps with the program?

  • No sound using Isight

    My son and I are using 2 I books w/ tiger and did video chats using SBC dsl., on his end. All worked fine except the picture quality. Now he installed an airport express and has switched over to Broadband.We use the ichat applications on both end....

  • Preprocessing phase and Execution phase of DMO

    Hi experts, I have a question. Please tell me whether my understanding of DMO procedure steps of Preprocessing phase and Execution phase is right. I think as below.   Phase   sequence   Steps   whether users can   log on SAP system or can not   wheth