Reg: File to JDBC  using Stored procedure

Hi friends,
I have a scnario where i need to execute a storedprocedure on MS-SQL server 2005.
Scnario is sender file to Receiver JDBC.
Source format in is
  <?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_File_Out xmlns:ns0="http://relianceada.com/test/File_XI_JDBC">
- <Row>
  <Empno>1234</Empno>
  <Trip>34q53445</Trip>
  <status1>sdfgsdfg</status1>
  <Date>20090628</Date>
  </Row>
  </ns0:MT_File_Out>
receiver format is
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_JDBC_In xmlns:ns0="http://relianceada.com/test/File_XI_JDBC">
- <STATEMENT>
- <SP_SAP_XI_Test action="EXECUTE">
  <EmpNo type="Varchar">1234</EmpNo>
  <TripNo type="Varchar">34q53445</TripNo>
  <Status type="Varchar">sdfgsdfg</Status>
  <Date type="Date">20090628</Date>
  </SP_SAP_XI_Test>
  </STATEMENT>
  </ns0:MT_JDBC_In>
For reference Storedprocedure
alter procedure SP_SAP_XI_Test
@EmpNo Varchar(10),
@TripNo varchar(10),
@Status Varchar(10),
@Date Datetime
as
Begin
if exists(select '*' from SAP_XI_TEST where Empno = @Empno
and Date = @Date)
begin
     Update SAP_XI_TEST
     SET Trip = @TripNo,
     Status1 = @Status
     where Empno = @Empno
     and Date = @Date
end
Else
   begin
      Insert Into SAP_XI_TEST Values (@EmpNo,@TripNo,@Status,@Date)
   end
End
I can see sucessful message in sxmb_moni then when i check the CC monitoring i am getting this error.
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_SAP_XI_Test' (structure 'STATEMENT'): java.lang.IllegalArgumentException
Guide me what i missed.
Regards
Vijay

Hi,
Date field is causing the problem, check the format in DB and if necessary adjust it in Message mapping of XI. Also change the type of the field Date in Data type to xsd:string instead of xsd:date
Regards
suraj

Similar Messages

  • JDBC(using stored procedure) to RFC Scenario

    Hi
    I am doing JDBC(using stored procedure) to RFC Scenario
    While running the scenario i am getting the following error
    Database-level error reported by JDBC driver while executing statement 'EXECUTE EMU.EXTRACTRECON'. The JDBC driver returned the following error message: 'com.ibm.db2.jcc.a.SqlException: [ibm][db2][jcc][10100][10910] java.sql.Statement.executeQuery() was called but no result set was returned. Use java.sql.Statement.executeUpdate() for non-queries.'. For details, contact your database server vendor.
    Can anybody sortout my problem
    Regards
    sunilreddy

    Hi,
    i am doing the scenario file to rfc scenario.
    when i run my scenario xi system is picking the data from file system
    but rfc is not accepting the data.this is the error i am getting
    Delivery of the message to the application using connection RFC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Exception thrown in method process. The transaction is marked for rollback.: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback..
    so please any one give me the solution for that

  • Error while refreshing bqy file on workspace using stored procedure

    Hi,
    I am using stored procedure which returns ref-cursor. The report is running fine locally but on Workspace, while refresh, it gives the following error.
    An Interactive Reporting Service error has occurred.-SQL API: [SQLNumResultCols], SQL RETURN: [-1], SQL STATE: [HY010], SQL NATIVE ERROR: [0], SQL MESSAGE: [[Microsoft][ODBC Driver Manager] Function sequence error]
    (0)
    I have ODBC/ODBC connection set up at BI+ configurator.
    Thanks,
    Manish

    We also met this issue. Some guy told me this is a Hyperion limitation, is it true? I really need this function in Hyperion:(

  • SSRS adhoc (2005/2008) - Need to create Report Model (.smdl file) for adhoc using Stored procedure

    Hi All,
    I need to create Report Models using stored procedures. But whenever I am going to create data sources for same, I am just getting tables and views to use. Please see the screenshot below:
    Is there any way out to create data source based on stored procedure? Please help.
    Thanks in Advance
    Regards
    Kumud

    Hi Kumud,
    As per my understanding, it is not support to create a Datasource View (DSV) using stored procedures.
    In a DataSource View, only views, tables or named queries can be used. We can use stored procedures in a query. No parameterized queries, parameterized stored procedures or parameterized UDFs can be used in a DSV named query. You can try to using below approach
    to achieve what you are require:
    To build views in our relational source and add the views to the datasource view to proceed with modelling.
    There is a similar issue, you can refer to it.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22207c21-03c7-4e5a-bb67-0372f29220a3/sql-server-reporting-services-2008-creating-report-models-using-stored-procedures
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Read XML file into databased using stored procedure

    I need to read an xml file into my database using a stored procedure. I looked at a couple of tutorials, but I am kind of lost and am looking for some guidance. I will eventually need to only pull a handfull of the data in based on the USER ID. Any help will be greatly appreciated. I have been given a schema file and an example file of how the data will me sent to me. The schema file is below:
    <h1>Schema File</h1>
    <?xml version="1.0" encoding="utf-8"?>
    <!--Generated by Turbo XML 2.4.1.100. Conforms to w3c http://www.w3.org/2001/XMLSchema-->
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xsd:element name="root">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="Report">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="Biller" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Biller">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="BillerName" />
    <xsd:element ref="BillerIdNumber" />
    <xsd:element ref="PartnerInfo" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="BillerName">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="BillerIdNumber">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="PartnerInfo">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="PartnerName" />
    <xsd:element ref="PartnerVenderNumber" />
    <xsd:element ref="PartnerStreet01" />
    <xsd:element ref="PartnerStreet02" />
    <xsd:element ref="PartnerCity" />
    <xsd:element ref="PartnerState" />
    <xsd:element ref="PartnerZip" />
    <xsd:element ref="PartnerCountry" />
    <xsd:element ref="PartnerActive" />
    <xsd:element ref="PartnerContactName" />
    <xsd:element ref="PartnerEmailAddress" />
    <xsd:element ref="PartnerContactPhone" />
    <xsd:element ref="PartnerFaxNumber" />
    <xsd:element ref="PartnerUpdateUser" />
    <xsd:element ref="PartnerUpdateDate" />
    <xsd:element ref="PartnerDocColor" />
    <xsd:element ref="PartnerDocDistribution" />
    <xsd:element ref="PartnerDocPrinting" />
    <xsd:element ref="PartnerDocTiming" />
    <xsd:element ref="Delivery" maxOccurs="unbounded" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="PartnerName">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="PartnerVenderNumber">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="PartnerStreet01">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerStreet02">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerCity">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerState">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerZip">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerCountry">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerActive">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerContactName">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerEmailAddress">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerContactPhone">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerFaxNumber">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerUpdateUser">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerUpdateDate">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerDocColor">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerDocDistribution">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerDocPrinting">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="PartnerDocTiming">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="Delivery">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="DeliveryType" />
    <xsd:element ref="DeliveryContactName" />
    <xsd:choice>
    <xsd:element ref="ReceivingStreet01" />
    <xsd:element ref="ReceivingStreet02" />
    <xsd:element ref="ReceivingCity" />
    <xsd:element ref="ReceivingState" />
    <xsd:element ref="ReceivingZip" />
    <xsd:element ref="ReceivingCountry" />
    <xsd:element ref="DeliveryEmailAddress" />
    <xsd:element ref="DeliveryCompanyId" />
    <xsd:element ref="DeliveryUserId" />
    <xsd:element ref="DeliveryFormatType" />
    <xsd:element ref="SecureType" />
    <xsd:element ref="SecureQuestion" />
    <xsd:element ref="SecureAnswer" />
    <xsd:element ref="DeliveryFaxNumber" />
    </xsd:choice>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="DeliveryType">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="DeliveryContactName">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="DeliveryEmailAddress">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="SecureType">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="SecureQuestion">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="SecureAnswer">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="DeliveryFormatType">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="DeliveryCompanyId">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="DeliveryUserId">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="DeliveryFaxNumber">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ReceivingStreet01">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ReceivingStreet02">
    <xsd:complexType />
    </xsd:element>
    <xsd:element name="ReceivingCity">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ReceivingState">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ReceivingZip">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ReceivingCountry">
    <xsd:complexType mixed="true">
    <xsd:choice />
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <h1>Example File</h1>
    <?xml version="1.0" encoding="utf-8"?>
    <Report>
    <Biller>
    <BillerName>DONATO TEST BILLER</BillerName>
    <BillerIdNumber>999999999</BillerIdNumber>
    <PartnerInfo>
    <PartnerName>TEST TRADING PARTNER</PartnerName>
    <PartnerVenderNumber>999999999</PartnerVenderNumber>
    <PartnerStreet01 />
    <PartnerStreet02 />
    <PartnerCity />
    <PartnerState />
    <PartnerZip />
    <PartnerCountry />
    <PartnerActive />
    <PartnerContactName />
    <PartnerEmailAddress />
    <PartnerContactPhone />
    <PartnerFaxNumber />
    <PartnerUpdateUser />
    <PartnerUpdateDate />
    <PartnerDocColor />
    <PartnerDocDistribution />
    <PartnerDocPrinting />
    <PartnerDocTiming />
    <Delivery>
    <DeliveryType>EMAIL</DeliveryType>
    <DeliveryContactName>Kiran</DeliveryContactName>
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    </Delivery>
    <Delivery>
    <DeliveryType>SECURE</DeliveryType>
    <DeliveryContactName />
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    <SecureType />
    <SecureQuestion>Pet Name</SecureQuestion>
    <SecureAnswer>040698de9bf14ef87d8cbaf46b8ecddc</SecureAnswer>
    <DeliveryFormatType />
    </Delivery>
    <Delivery>
    <DeliveryType>CEO</DeliveryType>
    <DeliveryContactName />
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    <DeliveryCompanyId>WFADM618</DeliveryCompanyId>
    <DeliveryUserId>PAULSEN</DeliveryUserId>
    <DeliveryFormatType />
    </Delivery>
    <Delivery>
    <DeliveryType>FAX</DeliveryType>
    <DeliveryContactName>Kiran</DeliveryContactName>
    <DeliveryFaxNumber>4807244340</DeliveryFaxNumber>
    <DeliveryFormatType>PDF</DeliveryFormatType>
    </Delivery>
    <Delivery>
    <DeliveryType>DOC</DeliveryType>
    <DeliveryContactName />
    <ReceivingStreet01>2600 South Price Road</ReceivingStreet01>
    <ReceivingStreet02 />
    <ReceivingCity>Chandler</ReceivingCity>
    <ReceivingState>AZ</ReceivingState>
    <ReceivingZip>85248</ReceivingZip>
    <ReceivingCountry>United States</ReceivingCountry>
    </Delivery>
    <Delivery>
    <DeliveryType>DR</DeliveryType>
    <DeliveryContactName />
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    <DeliveryCompanyId>WFADM618</DeliveryCompanyId>
    <DeliveryUserId>PAULSEN</DeliveryUserId>
    <DeliveryFormatType />
    </Delivery>
    </PartnerInfo>
    </Biller>
    </Report>

    Try with a XMLTABLE function
    For example to Extract BillerName and BillerID
    with t as(select xmltype( '<?xml version="1.0" encoding="utf-8"?>
    <Report>
    <Biller>
    <BillerName>DONATO TEST BILLER</BillerName>
    <BillerIdNumber>999999999</BillerIdNumber>
    <PartnerInfo>
    <PartnerName>TEST TRADING PARTNER</PartnerName>
    <PartnerVenderNumber>999999999</PartnerVenderNumber>
    <PartnerStreet01 />
    <PartnerStreet02 />
    <PartnerCity />
    <PartnerState />
    <PartnerZip />
    <PartnerCountry />
    <PartnerActive />
    <PartnerContactName />
    <PartnerEmailAddress />
    <PartnerContactPhone />
    <PartnerFaxNumber />
    <PartnerUpdateUser />
    <PartnerUpdateDate />
    <PartnerDocColor />
    <PartnerDocDistribution />
    <PartnerDocPrinting />
    <PartnerDocTiming />
    <Delivery>
    <DeliveryType>EMAIL</DeliveryType>
    <DeliveryContactName>Kiran</DeliveryContactName>
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    </Delivery>
    <Delivery>
    <DeliveryType>SECURE</DeliveryType>
    <DeliveryContactName />
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    <SecureType />
    <SecureQuestion>Pet Name</SecureQuestion>
    <SecureAnswer>040698de9bf14ef87d8cbaf46b8ecddc</SecureAnswer>
    <DeliveryFormatType />
    </Delivery>
    <Delivery>
    <DeliveryType>CEO</DeliveryType>
    <DeliveryContactName />
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    <DeliveryCompanyId>WFADM618</DeliveryCompanyId>
    <DeliveryUserId>PAULSEN</DeliveryUserId>
    <DeliveryFormatType />
    </Delivery>
    <Delivery>
    <DeliveryType>FAX</DeliveryType>
    <DeliveryContactName>Kiran</DeliveryContactName>
    <DeliveryFaxNumber>4807244340</DeliveryFaxNumber>
    <DeliveryFormatType>PDF</DeliveryFormatType>
    </Delivery>
    <Delivery>
    <DeliveryType>DOC</DeliveryType>
    <DeliveryContactName />
    <ReceivingStreet01>2600 South Price Road</ReceivingStreet01>
    <ReceivingStreet02 />
    <ReceivingCity>Chandler</ReceivingCity>
    <ReceivingState>AZ</ReceivingState>
    <ReceivingZip>85248</ReceivingZip>
    <ReceivingCountry>United States</ReceivingCountry>
    </Delivery>
    <Delivery>
    <DeliveryType>DR</DeliveryType>
    <DeliveryContactName />
    <DeliveryEmailAddress>[email protected]</DeliveryEmailAddress>
    <DeliveryCompanyId>WFADM618</DeliveryCompanyId>
    <DeliveryUserId>PAULSEN</DeliveryUserId>
    <DeliveryFormatType />
    </Delivery>
    </PartnerInfo>
    </Biller>
    </Report>')xml from dual)
    select q.* from t,xmltable('/Report' passing t.xml columns
    BillerName varchar2(20) PATH
                          '/Report//Biller/BillerName')q
            BILLERNAME     BILLERID
         DONATO TEST BILLER     999999999

  • Idoc to Jdbc using stored procedure

    Greetings All,
      In my scenario i want to send the idoc from SAP system to SQL database using the stored procedure. I want ack back from JDBC adapter when the record is sucessfully inserted in DB table. There after i can update the status of idoc sent in source SAP system. Can anyone suggest me how to achive this since its seems to like a syncronous scenario. Can we achive this without stored procedure i.e. calling Insert_Update statement
    Many thanks,
    Sandip

    Hi,
    Go through this thread
    Re: XI IDoc Acknowledgement - Acknowledgement not possible status
    Regards
    Laxmi Bhushan

  • How to use Stored Procedures in JDBC sender side and receiver side

    Hello,
    Can anyone explain how to use stored procedures in configuring the scenario using JDBC adapter at bothe sides sender nad receiver..
    Thanks,
    Soorya

    Hi,
    Refer the below link:
    JDBC:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
    refer the below link which has all the associated action
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Chirag

  • How to use Stored Procedure Call in Sender JDBC adapter

    Hi All,
             Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
    Xier

    Hi Xler
    refer these links
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Also, you can check Sriram's blog for executing Stored Procedures,
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    /people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
    This blog might be helpfull on stored procedures for JDBC
    JDBC Stored Procedures
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Please go through these threads and see if it helps...
    Re: How to execute Stored Procedure?
    Re: Problem with JDBC stored procedure
    Thnaks !!

  • 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

  • HOW TO USE STORED PROCEDURES IN JASPERREPORTS(URJENT)

    Hi,
    i'm using jasperreports in struts based project. How to use stored procedures in jasperreports. pls send the solution urjent
    Thanks in advance
    ramesh

    Hi,
    Refer the below link:
    JDBC:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
    refer the below link which has all the associated action
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Chirag

  • Using Stored Procedures with TopLink / JPA : Success explanation

    For those who have to use Stored Procedures in TopLink this is my success history :
    To call an Stored Procedure from the persistence, we have to use the direct JDBC connection because my TopLink version ( Essentials 10g ) ? to date ( 10g ) does not have support for Stored Procedures.
    Here is my code :
    <address>{color:#0000ff} EntityManagerFactory JPAemfactory = null;{color}</address>
    <address>{color:#0000ff} JPAemfactory = Persistence.createEntityManagerFactory ("MyPersistenceUnit"); // this is the name of the persistence unit wrote in the persistence.xml file{color}</address>
    <address>{color:#0000ff} EntityManagerr MyEntityManager = JPAemfactory.createEntityManager ();{color}</address>
    bq. <address>{color:#0000ff}// creation of the stored procedure calling string .... one question mark for every param, output included \\ String sql = "{call SP_GETLISTATARIFAS(?,?,?,?,?)}"; \\ // We get the JDBC connection \\ oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl entityManager = (oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl) MyEntityManager; \\ UnitOfWorkImpl uow = (UnitOfWorkImpl)entityManager.getUnitOfWork(); \\ // we create a request to the unitofwork because if dont the connection will not exist \\ uow.beginEarlyTransaction(); \\ Connection conexion = ((UnitOfWorkImpl)uow).getAccessor().getConnection(); \\ {color}{color:#0000ff} \\ try { \\ // Creation of the call and we will identify the params as they are in the stored procedure definitiondefinidos \\ CallableStatement call = conexion.prepareCall(sql); \\ {color}</address>
    bq. <address>{color:#0000ff} \\ // params INPUT with their values \\ call.setString("pIDMCUPO", "125"); \\ call.setString("pCODIGOHOT", "8023"); \\ call.setString("pCODCANAL", "WEB"); \\ call.setString("pCODSUBCANAL", "HOTEL"); \\ {color}</address><address>{color:#0000ff} \\ // params OUTPUT \\ call.registerOutParameter("rRESULTADO", java.sql.Types.VARCHAR); \\ {color}</address><address>{color:#0000ff} \\ // execution \\ call.execute(); \\ {color}</address><address>{color:#0000ff} \\ // getting the response \\ mcontratos_out = call.getString("rRESULTADO"); \\ {color}</address><address>{color:#0000ff} \\ // closing the proc \\ call.close(); \\ {color}</address><address>{color:#0000ff} \\ } catch (SQLException ex) { {color}</address><address>{color:#0000ff} // something you do if there is an error \\ {color}</address><address>{color:#0000ff} \\ } {color}</address>
    Hope this helps all the people that have searched a lot like me.......

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • File to JDBC using JAVA Mapping

    Hello,
      Can u explain me about the above scenario of File to JDBC using JAVA Mapping.
       Iam new to XI explain above in detail.
    *Points will be Rewarded*
    Thanks&Regards,
    RavichandKone.

    HI,
    If your mapping is one to one then dont go for java mapping use graphical mapping.
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    Here are the link which will help you in writing the stored procedure:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    thnx
    Chirag Gohil

  • Why Dynamic Parameter is not working, when i create report using stored procedure ?

    Post Author: Shashi Kant
    CA Forum: General
    Hi all
    Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
    Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
    is not shown to me when i referesh the report for viewing the results.
    I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
    ============================================================================================
    1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
    Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
    Dynamic Parameters in Action
    My question is that whether dynamic parameter is working with storedprocedure or not.
    When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
    One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
    Please reply soon , it's urgent
    Regards
    shashi kant

    Hi Kishore,
    I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
    expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
    =lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
    As to the second issue, please try to use the following expression:
    =Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
    Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl  file with all the size properties to us by the following E-mail address?  It is benefit for us to do further analysis.
    E-mail: [email protected]
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to output various file types from a stored procedure

    Good morning, I would like to output to spreadsheet files like microsoft Excel, Lotus 123 or to a comma delimited text file from stored procedures. We run Oracle 8i and this report is accessed from an intranet site using stored procedures and the pl/sql web toolkit. The results would be more usefull in a spreadsheet format than web page(s). Can anyone give me a hint as to which process to follow to get the output. Thanks very much, Francois

    Probably best to try the PL/SQL SQL forum:
    http://forums.oracle.com/forums/forum.jsp?id=478021
    Some quick and easy pointers:
    * Take a look at the COM feature available from PL/SQL in 8i:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/win.920/a95499/toc.htm
    * Just write the file out as comma delimited using UTL_FILE and give it a file name of .csv. Quick scan on google gives this example:
    http://www.flash.net/~swilliam/PLunloadSQL.txt
    Mike.

  • Unable to run SSIS Package using Stored Procedure

    Hi Guys,
            I have create one simple SSIS Package(Move the first table record to second table).It will execute fine in locally.
    But, If i'm going call/execute .dtsx file using stored procedure. I'm getting Error. so please let me know the valuable solution.
    My Package Path : D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx
    Stored Procedure
    ================
    CREATE PROCEDURE SPEXECUTESSISPACKAGE
    @FILEPATH VARCHAR(8000)
    ,@STATUS VARCHAR(500) = NULL OUTPUT
    AS
    BEGIN
    DECLARE @SQLQUERY VARCHAR(8000)
    DECLARE @STATUSCODE INT
    SET @SQLQUERY = 'DTEXEC /FILE "'+ @FILEPATH +'"'
    SELECT @SQLQUERY AS 'SSIS FULL PATH'
    EXEC @STATUSCODE = master..xp_cmdshell @SQLQUERY
    SELECT @STATUSCODE AS 'STATUSCODE'
    IF @STATUSCODE <> 0
    BEGIN
    SET @STATUS = 'PACAKGE EXECUTE FAILED'
    PRINT @STATUS
    END
    ELSE
    BEGIN
    SET @STATUS = 'PACAKGE EXECUTE SUCCESS'
    PRINT @STATUS
    END
    END
    GO
    RUN
    ============================================================================
    EXEC SPEXECUTESSISPACKAGE 'D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx', NULL
    Error
    =============================================================================
    Microsoft (R) SQL Server Execute Package Utility
    Version 9.00.4035.00 for 32-bit
    Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
    NULL
    Started:  5:06:26 AM
    Error: 2014-11-14 05:06:26.07
       Code: 0xC0011007
       Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
       Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.
    End Error
    Error: 2014-11-14 05:06:26.07
       Code: 0xC0011002
       Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
       Description: Failed to open package file "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a package and the file cannot
    be opened or loaded correctly
    into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
    End Error
    Could not load package "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" because of error 0xC0011002.
    Description: Failed to open package file "D:\Temp\SSIS_TESTING\TESTSSIS\TESTSSIS\Package.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a package and the file cannot be opened
    or loaded correctly int
    o the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
    Source: {1244CD18-F96A-4DAD-8FC2-35F794015CA1}
    Started:  5:06:26 AM
    Finished: 5:06:26 AM
    Elapsed:  0.047 seconds
    NULL
    I'm getting Execte SSIS Package Status : 4
    ===================================
    4

    Two things to check
    1. The account executing the package has access to the path. If package is stored in different server you need to pass the UNC path (ie like \\machinename\...)
    2. Make sure the version of SSIS service is the same in both the servers ie where package is created/stored and where its getting executed. A lower version SSIS service will not be able to load and execute higher version package and it will throw you similar
    error messages as you posted above.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • Bridge in Photoshop Elements 6

    I have just brought a Canon 450d and discovered that I could not open the raw files with CS2 and that there was no available plug in. So I uninstalled CS2 and installed Photoshop Elements 6 and Lighthouse. I downloaded the new Raw Plug In for the cam

  • Multiple text indexes on a single database

    Hi, We want to enable text search on one of our databases. Due to the specificity of the database we want to use a custom thesaurus. I would like to know if there's a way to create different text indexes using different thesaurus and then specify the

  • Services not started in Visual Administrator

    Hi, I have problem with the some of the services. After I start the SAP J2EE Engine, I can see that most of the sevices are not started in "deploy" link. All the services get started when I manually start the application. I am working with NetWeaver0

  • How do I move or copy a shape layer's path to another layer?

    i'm looking how to apply an existing vector shape from a layer to another, before it was simple as hell just by alt + drag 'n drop from a layer to another. But now this command doesn't work anymore ? so how i can do it ? i need to simply apply a vect

  • How many VRF-Lite Routing Instances can a 6509-E with a 720-Sup module run?

    I know that in a 4500 style switch it supports a maximum of 64 VRF-lite routing instances. However what is the maximum amount of VRF-Lite routing instances can a 6509-E switch support with a Sup-720 sup module?