Problem with JDBC stored procedure

Hi...
We are implementing an interface from SAP r/3 4.7 to Oracle DB 9.0. On sender side we have used IDOC Adapter and on Receiver side we have used JDBC Adapter.
Here we are using stored procedures in JDBC Adapter. I have 2 stored procedures(one for header and one for items) and SISCSO.SISCSO01 IDOC.
Here we are getting following error in RWB for JDBC Receiver adapter....
<b>Error</b>
" Receiver Adapter v2112 for Party '', Service 'BS_ORADEV':
Configured at 2006-08-16 10:12:14 GMT+05:30
History:
- 2006-08-16 11:02:04 GMT+05:30: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PR_SPARES_VOR_PO_HDR_UPLOAD' (structure 'statement'): java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'PR_SPARES_VOR_PO_HDR_UPLOAD' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored ".
<b>My mapping file is like this.....</b>
<?xml version="1.0" encoding="UTF-8"?>
<ns0:TVS_MST_SPARES_ORDER xmlns:ns0="urn:tvsmotor:salesorder"><statement><PR_SPARES_VOR_PO_HDR_UPLOAD action="execute"><table>PR_SPARES_VOR_PO_HDR_UPLOAD</table><IN_DEALER_ID isInput="true" type="String">efde</IN_DEALER_ID><IN_SPARE_PO_NO isInput="TRUE" type="STRING">sdfsdf</IN_SPARE_PO_NO><IN_PO_DATE isInput="TRUE" type="STRING">12.12.2555</IN_PO_DATE><IN_ORDER_TYPE isInput="TRUE" type="STRING">23</IN_ORDER_TYPE><IN_REMARKS isInput="TRUE" type="STRING">Remark</IN_REMARKS><IN_SAP_SALE_ORD_NO isInput="TRUE" type="STRING">146546</IN_SAP_SALE_ORD_NO><IN_SAP_SALE_ORD_DT isInput="TRUE" type="STRING">12.12.2555</IN_SAP_SALE_ORD_DT><IN_TOT_VAL isInput="TRUE" type="STRING">2323</IN_TOT_VAL></PR_SPARES_VOR_PO_HDR_UPLOAD><PR_SPARES_VOR_PO_DTL_UPLOAD action="execute"><IN_DEALER_ID isInput="TRUE" type="STRING">efde</IN_DEALER_ID><IN_SPARE_PO_NO isInput="TRUE" type="STRING">sdfsdf</IN_SPARE_PO_NO><IN_PO_DATE isInput="TRUE" type="STRING">12.12.2555</IN_PO_DATE><IN_PART_NO isInput="TRUE" type="STRING">cfgdfw4w</IN_PART_NO><IN_ORDER_QTY isInput="TRUE" type="STRING">2</IN_ORDER_QTY><IN_PENDING_QTY isInput="TRUE" type="STRING">20</IN_PENDING_QTY><IN_RATE isInput="TRUE" type="STRING">2432</IN_RATE><IN_TAX isInput="TRUE" type="STRING">18</IN_TAX></PR_SPARES_VOR_PO_DTL_UPLOAD></statement></ns0:TVS_MST_SPARES_ORDER>
Please help me out with this error... tell me if more information is required.
Thanks,
Audumbar.

hi mario,
tell me one thing.... does case metter for stored procedure name? and even for the parameters used in stored procedure?
i have changed the case of stored procedure name... (its small in Oracle) but have not changed the case of parameters....
after changing the case also i m getting the following error....
" Receiver Adapter v2112 for Party '', Service 'BS_ORADEV':
Configured at 2006-08-16 10:12:14 GMT+05:30
History:
- 2006-08-16 14:18:19 GMT+05:30: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. <b>'pr_spares_vor_po_hdr_upload'</b> (structure 'statement'): java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00201: identifier <b>'PR_SPARES_VOR_PO_HDR_UPLOAD'</b> must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored "
Reply me as soon as possible.
Thanx,
Regards,
Audumbar
Message was edited by: Audumbar Pikle

Similar Messages

  • What is the problem with this Stored Procedure

    Hi ,
    What is the problem with this Stored Procedure ?Why is it giving errors ??
    CREATE or replace  PROCEDURE getEmpName
    *(EMP_FIRST OUT VARCHAR2(255))*
    BEGIN
    SELECT ename INTO EMP_FIRST
    FROM Emp
    WHERE EMPNO = 7369;
    END ;
    */*

    You don't specify precision in procedure arguments.
    (EMP_FIRST OUT VARCHAR2(255))should be
    (EMP_FIRST OUT VARCHAR2)Since you asked what's wrong with it, I could add that it needs formatting and the inconsistent use of upper and lower case is not helping readability.

  • Performance problem with java stored procedure

    hi,
    i developped a java class, then I stored it in Oracle 8.1.7.
    This class contains several import of other classes stored in the database.
    It works, but the execution perfomances are disappointing. It's very long. I guess, that's because of the great number of classes to load that are necessary for my class execution.
    I tried to increase the size of the java pool (I parameter 70 Mo in the java_pool_size parameter of the init.ora), but the performance is not much better.
    Has anyone an idea to increase the performance of this execution of my class ?
    In particular, is there a way to keep permanently in memory the java objects used by my class ?
    Thanks in advance
    bye
    [email protected]
    null

    before running Java, the database session needs to be Java enabled; this might be the reason why it is taking so long. If this is the case, you should see an improvement in subsequent calls, once a database session is Java enabled, other users can benefit from it.
    Kuassi
    I have some performance issue with java stored procedure. Hope some one will be able to help me out. I'm using java stored procedures in my application and basically these procedures are used to do some validation and form the XML message of the database tables. I have noticed that when I call the PL/SQL wrapper function, it is taking time to load the java class and once the class is loaded the execution is faster. Most of the time is spent for loading the class rather than executing the function. if I reduce the class load time, I can improve the performance drastically. Do any one of you know how to reduce the class load time. The following are the platform and oracle version.
    O/S: IBM AIX
    Oracle: 8.1.7

  • Problems with java stored procedure.

    I have a java stored procedure that uses a package called RmiJdbc
    which allows calling remote JDBC data sources from any java capable
    machine.
    I've loaded the RmiJdbc classes into oracle via the loadjava
    command and everything seems to come up valid.
    The stored procedure does a Class.forName() to get the driver
    registered, than attempts to connect to the remote RMI driver.
    The particular line it dies on is this (see the error below):
    c = DriverManager.getConnection("jdbc:rmi:" + rmiHost + "/" + url);
    A mangled version of this (minus the Oracle specific stuff) works
    from the command line correctly. Can somebody point me in a
    direction to figure out what's going on here?
    THanks,
    Eric
    Oracle9i Enterprise Edition Release 9.0.1.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.0.1.3.0 - Production
    ORACLE_HOME = /oracle/v901ee
    System name: HP-UX
    Node name: athena
    Release: B.11.00
    Version: A
    Machine: 9000/889
    Instance name: PASDB2
    Redo thread mounted by this instance: 1
    Oracle process number: 13
    Unix process pid: 7839, image: oracle@athena (TNS V1-V3)
    *** SESSION ID:(8.547) 2002-08-15 15:41:27.221
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    at sun.rmi.server.LoaderHandler$LoaderKey.<init>(LoaderHandler.java)
    at sun.rmi.server.LoaderHandler.lookupLoader(LoaderHandler.java)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java)
    at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java)
    at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputArray(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java)
    at sun.rmi.registry.RegistryImpl_Stub.lookup
    at org.objectweb.rmijdbc.RJConnection.<init>(RJConnection:83)
    at org.objectweb.rmijdbc.Driver.connect(Driver:135)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at TurnoverInfoPlusInterface.insertInterfaceRecords(TurnoverInfoPlusInterface:53)
    java.sql.SQLException: Error unmarshaling return; nested exception is:
    java.lang.NullPointerException
    at org.objectweb.rmijdbc.Driver.connect(Driver:140)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at TurnoverInfoPlusInterface.insertInterfaceRecords(TurnoverInfoPlusInterface:53)

    More info...I'm also seeing "ORA-03113: end-of-file on communication channel". I checked the user trace file and didn't get much help...it indicated an "exception signal: 11" and core-dump type stuff that had no meaning to me.

  • Problem with a stored procedure to search in a table

    h5.
    Hi,
    h5.
    As many people on the forum, I'm new on PL/SQL programming.
    h5.
    I'm trying to program a stored procedure that allow to search on my table fields with different parameters.
    h5.
    All this parameters doesn't need to be set, at least one.
    h5.
    I'm looking for the solution from 2 weeks ago.
    h5.
    I have looked everywhere
    h5.
    Could someone help me, please??
    h5.
    Here is my code:
    * HERE WE CREATE PACKAGE FOR THE CURSOR
    create or replace
    PACKAGE HOTEL_DEST_PKG
    IS
    /* Define the REF CURSOR type. */
    TYPE HOTEL_DEST_TYPE IS REF CURSOR;
    END HOTEL_DEST_PKG;
    * HERE WE CREATE OUR STORE PROCEDURE TO SEARCH
    create or replace
    PROCEDURE Search_Hotel (
    IdDocument IN number,
    MyFilter IN VARCHAR2,
    IdCountry IN number,
    DepartureDateFirst IN DATE,
    DepartureDateSecond IN DATE,
    HD_Cursor OUT HOTEL_DEST_PKG.HOTEL_DEST_TYPE)
    IS
    SQL_REQ VARCHAR2(5000);
    BEGIN
    /* all columns were entered */
    IF ((IdDocument > 0) OR
    ((MyFilter IS NOT NULL) AND (length(MyFilter) > 0)) OR
    (IdCountry > 0) OR
    (DepartureDateFirst IS NOT NULL) OR
    (DepartureDateSecond IS NOT NULL))
    THEN
    SQL_REQ := 'SELECT HOTEL_DESTINATION.*
    FROM HOTEL_DESTINATION
    WHERE 1=1';
    /* Search on the hotel id*/
    IF IdDocument > 0 THEN
    SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_ID = :IdDocument';
    ELSE
    SQL_REQ := SQL_REQ || ' AND :IdDocument IS NULL';
    END IF;
         /*Search on different indexed fields*/
    IF MyFilter IS NOT NULL AND LENGTH(MyFilter)>0 THEN
    SQL_REQ := SQL_REQ || ' AND CONTAINS(HOTEL_DESTINATION.HD_FILTER, :MyFilter)';
    ELSE
    SQL_REQ := SQL_REQ || ' AND :MyFilter IS NULL';
    END IF;
    /* Search on the hotel country id*/
    IF IdCountry > 0 THEN
    SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_CN_ID = :IdCountry';
    ELSE
    SQL_REQ := SQL_REQ || ' AND :IdCountry IS NULL';
    END IF;
    /* Search on the dates*/
    IF DepartureDateFirst IS NOT NULL THEN
    SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_DEPARTURE_DATE >= :DepartureDateFirst';
    ELSE
    SQL_REQ := SQL_REQ || ' AND :DepartureDateFirst IS NULL' ;
    END IF;
    IF DepartureDateSecond IS NOT NULL THEN
    SQL_REQ := SQL_REQ || ' AND HOTEL_DESTINATION.HD_DEPARTURE_DATE <= :DepartureDateSecond';
    ELSE
    SQL_REQ := SQL_REQ || ' AND :DepartureDateSecond IS NULL';
    END IF;
    OPEN HD_CURSOR FOR SQL_REQ USING IdDocument,
    MyFilter,
    IdCountry,
    DepartureDateFirst,
    DepartureDateSecond;
    END IF;
    END;
    * HERE WE CALL AND EXECUTE OUR STORE PROCEDURE TO SEARCH
    * ON WORD
    set serveroutput on
    DECLARE
         IDDOCUMENT NUMBER;
         MYFILTER VARCHAR2(200);
         IDCOUNTRY NUMBER;
         DEPARTUREDATEFIRST IN DATE;
         DEPARTUREDATESECOND IN DATE;
         HD_CURSOR OUT HOTEL_DEST_PKG.HOTEL_DEST_TYPE);
    BEGIN
    IDDOCUMENT := 0;
    MYFILTER := 'test';
    IDCOUNTRY := 0;
    DEPARTUREDATEFIRST := NULL;
    DEPARTUREDATESECOND := NULL;
    SEARCH_HOTEL(
    IDDOCUMENT => IDDOCUMENT,
    MYFILTER => MYFILTER,
    IDCOUNTRY => IDCOUNTRY,
    DEPARTUREDATEFIRST => DEPARTUREDATEFIRST,
    DEPARTUREDATESECOND => DEPARTUREDATESECOND,
    HD_Cursor => HD_Cursor
    -- Modify the code to output the variable
    --DBMS_OUTPUT.PUT_LINE('HD_Cursor = ' || HD_Cursor);
    END;

    You need to grant right on the table to the owner of the stored procedure directly (not via Role).
    When there are only rights via role everything is fine in sql, but it will not work in stored procedures, functions or packages.
    So as Table-Owner do:
    grant select on <table> to <procedure, package or function-owner>;Edited by: hm on 22.10.2010 08:49

  • Problem with a stored procedure (Error(4,1): PLS-00428: an INTO clause..)

    Dear Oracle Experts,
    I try to use the stored procedure below but get this error :
    "Error(4,1): PLS-00428: an INTO clause is expected in this SELECT statement"
    I don't have any clue what could be wrong with my syntax. INTO wouldn't make any sense at this task.
    Does someone of you know what's wrong with my Procedure ?
    Hope someone can help,
    best regards,
    Daniel Wetzler
    create or replace PROCEDURE AnalysisCompatibility (DATEBEGIN timestamp, DATEEND timestamp)
    AS
    BEGIN
    select Fs.*,Vs.Analysispriority,Vs.Compatibility Compatibility from SigFacts Fs
    inner Join Variables Vs On
    (Fs.Var_Ref=Vs.Var_Ref and Fs.Machines_Ref=Vs.Machines_Ref )
    where Fs.DT between DATEBEGIN and DATEEND
    and
    Vs.AnalysisPriority > 0
    or
    VS.Compatibility in (6,7,8,9,10,11,13,21,22)
    order by Fs.DT,Fs.Machines_Ref desc, Vs.AnalysisPriority;
    END AnalysisCompatibility;

    I have created a table (ATREPORT.TEST) that has has got the same column name and type of the query output and i still get error message
    PLS-00403 -- statement ATreport.TESt cannot be used as an into target, pls help
    DECLARE start_date DATE := to_date('01/09/2006' , 'DD-MON-YYYY');
    end_date DATE := to_date('30/09/2006' , 'DD-MON-YYYY');
    BEGIN
    SELECT t.SEC_SHORT_NAME, t.SEC_ISIN, t.SEC_NO,t.SEC_NAME, t.TRADE_DATE,
    t.PAYMENT_DATE,t.COUNTERPARTY, t.PRICE , t.NOMINAL ,
                        t.TRANSACTION_NO,t.CURRENT_VALUE_PC, t.CURRENT_VALUE_SC, t.PAYMENT_AMOUNT_PC,
                        t.PAYMENT_AMOUNT_SC,
                   ct.AMOUNT , ct.CURRENCY,
              sb.BUSINESS_CLASS_LEVEL_2 ,sb.BUSINESS_CLASS_LEVEL_2_NAME,
              sb.BUSINESS_CLASS_LEVEL_3 ,sb.BUSINESS_CLASS_LEVEL_3_NAME,
              sb.BUSINESS_CLASS_LEVEL_4 ,sb.BUSINESS_CLASS_LEVEL_4_NAME,
    sb.BUSINESS_CLASS_LEVEL_5 ,sb.BUSINESS_CLASS_LEVEL_5_NAME
    INTO ATREPORT.TEST
    from scdat.A_TRANSACTIONS t
    INNER JOIN scdat.A_COSTTAX ct     
         ON ct.TRANS_REF = t.TRANS_REF
    INNER JOIN scdat.A_SECS_BUSINESS_CLASS_TS sb
    ON sb.SEC_REF = t.SEC_REF           
    where t.TRADE_DATE >= to_char(start_date ,'DD-MON-YYYY')
    and t.TRADE_DATE < to_char(end_date ,'DD-MON-YYYY')
    and ct.COST_NAME = 'Broker commission'
    and sb.BUSINESS_CLASS_DEFINITION = 'FTSE';
    END;

  • Perfomance problem with java stored procedure

    hi,
    i developped a java class, then I stored it in Oracle 8.1.7.
    This class contains several import of other classes stored in the database.
    It works, but the execution perfomances are disappointing. It's very long. I guess, that's because of the great number of classes to load that are necessary for my class execution.
    I tried to increase the size of the java pool (I parameter 70 Mo in the java_pool_size parameter of the init.ora), but the performance is not much better.
    Has anyone an idea to increase the performance of this execution of my class ?
    In particular, is there a way to keep permanently in memory the java objects used by my class ?
    Thanks in advance
    bye
    [email protected]
    null

    Hello again,
    I read the documentation of 9i and found some hints about different TCP/IP socket handling of 9i and a standard JVM.
    There are some parts that give hints but I couldn't find a sample code to show how to handle the differences.
    Could anyone tell me how to handle the differences or give some links to sample code?
    Thanks
    Detlev

  • Problem with a Stored Procedure

    I created a SP. My SP is:
    Create or Replace Procedure sp_atualiza(val_ent in number,id_ent in integer)
    as
    begin
    update venda set valor = val_ent*valor
    where id_venda = id_ent;
    end sp_atualiza;
    Now into SQL*Plus I write:
    SQL>execute sp_atualiza(1.5,3)
    The message is: Procedure PL/SQL sucessfully(My windows is in Portuguese and I don't known to translate in english this message so well).
    If i run into Home XE, this message is: Invalid SQL statement.
    How can I do run a SP into Home and SQL*Plus of the XE?

    Bom Dia!
    EXECUTE is a SQL*Plus command - it doesn't work in most other tools (though some like TOAD do recognize it).
    In a pure SQL tool, you need to provide a true SQL or PL/SQL statement:
    BEGIN
       SP_ATUALIZA(1.5, 3);
    END;
    /I hope that helps
    Regards Nigel

  • Problem with JDBC results calling simple stored procedure in VC 7.0

    Hi all,
    I am building a simple VC model which calls a stored procedure on a JDBC database. I have created the system in the portal, defined the alias and user mapping, the connection test is fine and the VC "find data" lists my bespoke stored procedure.
    The stored procedure is :
    CREATE PROCEDURE dbo.dt_getBieUsers
    AS
    select * from dbo.emailuserlink
    GO
    When I test it using query analyser, it returns 3 records each with the two fields I expect - user and email address.
    I drag the model onto the workspace in VC and create an input form ( with just a submit button ). i drag the result port out to create a table. This has no fields in it.
    I build and deploy as flex and the app runs, I click the submit button and SUCCESS! I get 3 records in my table each with 2 fields. The data is all correct. The problem with this is the fields are determined at runtime it seems.
    I go back to the table and add 2 columns "email" and "address".
    i build and deploy and run the app. Again I get 3 records, but this time the contents of all of the rows is not data, but "email" and "address". The data has been replaced by the header texts in all of the rows.
    Can anyone help? Why isn't the data being put in my columns as I would expect?
    I tried to build and deploy the app as Web Dynpro rather than Flex to see if it was a bug in Flex. The application starts but when I click the submit button to run the JDBC stored procedure I get a 500 Internal Server Error
    com.sap.tc.wd4vc.intapi.info.exception.WD4VCRuntimeException: No configuration is defined for the entry JDBCFunction
        at com.sap.tc.wd4vc.xglengine.XGLEngine.createComponentInternal(XGLEngine.java:559)
        at com.sap.tc.wd4vc.xglengine.XGLEngine.getCompInstanceFromUsage(XGLEngine.java:362)
        at com.sap.tc.wd4vc.xglengine.XGLEngine.getCompInstance(XGLEngine.java:329)
        at com.sap.tc.wd4vc.xglengine.wdp.InternalXGLEngine.getCompInstance(InternalXGLEngine.java:167)
        at com.sap.tc.wd4vc.xglengine.XGLEngineInterface.getCompInstance(XGLEngineInterface.java:165)
    The JDBC connection I am using has a connection URL of jdbc:sap:sqlserver://localhost;DatabaseName=BIEUSERS
    and a driver class of com.sap.portals.jdbc.sqlserver.SQLServerDriver
    Can anyone solve my wierd problems?
    Cheers
    Richard

    Hi Richard,
    After you drag and drop the data service, right click on it and choose "Test data service". Then click on "Execute" and after you see the result on the right, click on "Add fields" button (inside the same window). Now you'll see that the fields are on the tabel. This is required only for JDBC data services, since this data (how the resultset is built) is not know in DT and it needs to be run firest - then analysed and only then you have to add the fields to the table).
    Regards,
    Natty

  • JDBC stored procedure not working in Weblogic 12.1.3

    Hi,
    We are migrating from WLS 12.1.2 to 12.1.3.
    We have a JDBC stored procedure which used to work correctly under 12.1.2. I understand that 12.1.2 uses ojdbc5/ojdbc6 jars (11.2.0.x). After migrating to 12.1.3, the stored procedure is not working.
    We have narrowed it down to the different between 12.1.2 using ojdbc5/6 and 12.1.3 using ojdbc7 jars, though we do not understand what the difference here is.
    Connection connection = getConnection();
    CallableStatement callableStatement = connection.prepareCall("{call RECEIPT_LOG (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
    callableStatement.registerOutParameter("PIO_RECEIPT_LOG_ID", java.sql.Types.INTEGER);
    callableStatement.setLong("PIO_RECEIPT_LOG_ID", 0);
    callableStatement.setString("PIO_DRAWER_NAME", request.getDrawerName());
    callableStatement.setString("PIO_DRAWER_FIRST_NAME", request.getDrawerFirstName());
    callableStatement.setString("PIO_DRAWER_OTHER_NAMES", "");
    callableStatement.setString("PIO_DRAWER_STREET_NO", "");
    callableStatement.setString("PIO_DRAWER_STREET", "");
    callableStatement.setString("PIO_DRAWER_LOCALITY", "");
    callableStatement.setLong("PIO_DRAWER_POSTCODE", 0);
    callableStatement.setString("PI_PAYMENT_TYPE", request.getPiPaymentType());
    callableStatement.setLong("PI_APPLICATION_ID", request.getApplicationId());
    callableStatement.setString("PI_PRIMARY_ID", request.getPiPrimaryId());
    callableStatement.setString("PI_SECONDARY_ID", request.getPiSecondaryId());
    callableStatement.setDouble("PI_AMOUNT", request.getPiAmount());
    callableStatement.setInt("PI_TAX_AMOUNT", 0);
    callableStatement.setNull("PI_VPC_TXNRESPONSECODE", java.sql.Types.VARCHAR);
    callableStatement.setInt("PI_VPC_TRANSACTIONNO", 0);
    callableStatement.setString("PI_VPC_MESSAGE", "");
    callableStatement.setString("PI_VPC_ACQRESPONSECODE", "");
    callableStatement.setString("PI_VPC_RECEIPTNO", "");
    callableStatement.setString("PI_VPC_BATCHNO", "");
    callableStatement.setString("PI_VPC_CARD", "");
    callableStatement.setString("PI_VPC_MERCHTXNREF", "");
    callableStatement.setString("PI_VPC_MERCHANT", "");
    callableStatement.setString("PI_VPC_ORDERINFO", "");
    callableStatement.setInt("PI_VPC_AMOUNT", 0);
    callableStatement.setString("PI_VPC_AUTHORIZEID", "");
    callableStatement.registerOutParameter("PO_RECEIPT_NO", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_SOURCE_ID", java.sql.Types.INTEGER);
    callableStatement.registerOutParameter("PO_PAYMENT_METHOD_TEXT", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_CREATE_COMMENT", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_ERROR_MESSAGE", java.sql.Types.VARCHAR);
    boolean isSuccessful = callableStatement.execute();
    Long receiptLogId = callableStatement.getLong("PIO_RECEIPT_LOG_ID");
    Here, when the callableStatement.execute() is fired, the isSuccessful is false and the output parameter receiptLogId is 0
    Any help appreciated.
    Regards,
    Rahul

    Hi All,
    We still haven't figured out what the problem is with JDBC when using ojdbc7.jar but, as an alternate solution we ported the code to Spring JDBC and got it working.
    Regards,
    Rahul

  • Help required in JDBC Stored Procedure

    Hi All,
    i have a requirement where i need to update the Database table using Stored Procedure from PI.
    I have the receiver JDBC channel and have done the mapping.
    The stored procedure has inputs of type NUMBER, VARCHAR2,DATE. in the message mapping i tried passing the same values in the type field, it throwed an error like UnSuppoted Format. Then i changed the type to integer for NUMBER and String for Varchar2 then also it is throwing an error like
    +java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PUT_XXXXX' ORA-06550: line 1, column 7: PL/SQL: Statement ignored +
    Can any please help with what type i need to send from PI to Stored procedure?
    Also, there two out type fileds defined in the Stored procedure..which i didnt create in my PI structure. Do we need to create that fileds in our structure?
    Please help me.
    Thanks,
    Hemanth.

    Hi Hemanth Kumar,
    I understand that you want to execute a stored procedure using JDBC receiver channel and looking at error message, you think there is an issue with type defined in Data Type.
    Now you need to debug step by step.
    Step 1:- In Interface Mapping Determination, do not refer to Operational Mapping (delete only OM from there, not the receiver Message Interface). By doing so, you are not call the OM (which refer to Graphical Mapping (MM refer to Data Type (which you think is wrong)). Note: As there is no OM, we need to send the exact payload required by receiver JDBC from Runtime Work Bench, for testing purpose.
    Step 2:- In receiver JDBC channel, change u2018Message Protocolu2019 from u201CXML SQL Formatu201D to u201CNative SQL Stringu201D. By doing this, you can do testing very fast; receiver JDBC channel will take only String. And we need to send the exact String which is needed by JDBC Stored Procedure. [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm]
    Step 3:- Now from RWB test the scenario. Payload should like this, please take help of Data base team to find the String which needs to send.
    EXECUTE PUT_uspAddress @City = 'New York'
    OR If you have access to the database, logon to it directly and try running the Stored Procedure.
    Step 4:- Now, you should have the string which executes the Stored Procedure correctly to go ahead. Your job is 60% done.
    Step 5:- Now, in receiver JDBC channel, change u2018Message Protocolu2019 from u201CNative SQL Stringu201D to u201CXML SQL Formatu201D. So that receiver JDBC channel will take only XML.
    Step 6:- So now, you have to construct equalant XML structure to String you got in Step 4.
    It may look like this [Link2|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7b72b2fde93673e10000000a114a6b/frameset.htm]
    <StatementName>
        <storedProcedureName action=u201D EXECUTEu201D>
           <table> PUT_uspAddress </table>
            < City [isInput=u201Dtrueu201D] type=SQLDatatype>val1</ City>
        </storedProcedureName >
      </StatementName>
    Step 7:- Now use the XML you have constructed in Step 6, to test the scenario from RWB. Try to correct if you come up with some errors. Your job is 90% done.
    Step 8:- Now, in Interface Mapping Determination refer back the Operational Mapping again, which contain the Message Mapping. Make sure that Message Mapping give the XML output same as XML you have developed in Step 6.
    FYI. 1. Whatever youu2019re sending, it will be converted to JDBC statement and will be executed on the database. logSQLStatement(JDBC Additional parameters sapnote_0000801367) will be show in logging not in payload.
    2. Most of the cases, type defined in Data Type has no control of what we can send in that element (except Date type). Let say, you can define an element u2018Ageu2019 as u2018numberu2019, but you can always send u201Casdfasdfu201D as input in Message Mapping.
    Regards,
    Raghu_Vamsee

  • JDBC/select/async statement to JDBC/stored procedure/sync call

    Hi
    We have JDBC/select/async statement to JDBC/stored procedure/sync call i.e sender and receiver are JDBC.
    PI has to pick all the the records of single internal order number at a time from sender system and upload to receiver JDBc,
    gets the response and routes to sender/insert statement.
    This should run only once per day.
    We will have multiple Internal orders daily, each order consisting of 10 to 20 records but only one IO related records has
    to upload to Receiver/JDBC
    What are the options available ?
    We have thought of following options
    1. SQL query is already to pick, but we have to pick records at one time daily. example: morning,evening or midnight.
       At that time it can pick multiple times but it should not pick through out day
    2. Is there any option in BPM so that we can group IO's at a time and upload ? If so what are the steps need to use
       Any additonal receive step need to be used to pick the records from the table.
    Thanks

    hi
    as i can understando you, you will receive mani IO and you must execute one IO in the receiver SP? if so, you can solve this usssing a ccBPM where you will have to create a mapping(0.N) where the source and the target structure will be the same, the diferrence will be in the occurrance of the target structure which will have to be 0.N (Tab signature in Message Mapping). then back to the ccBPM define a block with the property ForEach. this will  loop any times accord with the number of IO that you receive from the sender. as a result you will execute one SP for each IO.
    so, you ccBPM will be
    RS>TS>BLOCK(Multiline container and single container of source structure)>TS->SS
    RS:Receive Step
    TS:Trans. Step
    SS:Send Step
    Also the container will be:
    source--> type Abs
    source_multiline --> type Abs
    target -->type Abs
    Thanks
    Rodrigo P.
    Edited by: Rodrigo Alejandro Pertierra on Jun 24, 2010 4:54 PM

  • Pass a null value to a JDBC stored procedure call?

    pass a null value to a JDBC stored procedure call? Is this even possible? My DBA gave me a procedure to call that sometimes requires a null value. I don't think this is even possible.

    do you mind tell me how to resolve your problem?i using the setnull method,but it doesn't work.

  • I have a problem with JDBC Realm in Tomcat/Oracle/Win XP

    I have a problem with JDBC Realm in Tomcat.
    I have attached my server.xml file located in the
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
    The Problem is that when I login I get the user name and password prompt but it does not resolve.
    When I enter in the tomcat-users.xml password with memory realm uncommented it works fine.
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml
    Is there a cache or something I need to reset for the JDBC Realm to work?
    I have attached my tables and contents as well...
    Did I miss something????
    Thanks
    Phil
    server.xml
    <Server port="8005" shutdown="SHUTDOWN">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
    connectionName="testName" connectionPassword="testPass"
    userTable="users"
    userNameCol="user_name"
    userCredCol="user_pass"
    userRoleTable="user_roles"
    roleNameCol="role_name" />
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    </Host>
    </Engine>
    </Service>
    </Server>
    Tables
    create table users
    user_name varchar(15) not null primary key,
    user_pass varchar(15) not null
    create table roles
    role_name varchar(15) not null primary key
    create table user_roles
    user_name varchar(15) not null,
    role_name varchar(15) not null,
    primary key( user_name, role_name )
    select * from users;
    ----------------------+
    | user_name | user_pass |
    ----------------------+
    | tomcat | tomcat |
    | user1 | tomcat |
    | user2 | tomcat |
    | user3 | tomcat |
    ----------------------+
    select * from roles;
    | role_name |
    | tomcat |
    | role1 |
    select * from user_roles;
    -----------------------+
    | role_name | user_name |
    -----------------------+
    | tomcat | user1 |
    | role1 | user2 |
    | tomcat | tomcat |
    | role1 | tomcat |
    -----------------------+

    Jan 2, 2008 11:49:35 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Jan 2, 2008 11:49:35 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 734 ms
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
    Jan 2, 2008 11:49:35 AM org.apache.catalina.realm.JDBCRealm start
    SEVERE: Exception opening database connection
    java.sql.SQLException: oracle.jdbc.driver.OracleDriver
         at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:684)
         at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:758)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jan 2, 2008 11:49:36 AM org.apache.catalina.core.StandardContext resourcesStart

  • Need Help With a Stored Procedure

    Help With a Stored Procedure
    Hi everyone.
    I am quite new relative to creating stored procedures, so I anticipate that whatever help I could get here would be very much helpful.
    Anyway, here is my case:
    I have a table where I need to update some fields with values coming from other tables. The other tables, let us just name as tblRef1, tblRef2 and tblRef3. For clarity, let us name tblToUpdate as my table to update. tblToUpdate has the following fields.
    PlanID
    EmployeeIndicator
    UpdatedBy
    CreatedBy
    tblRef1, tblRef2 and tblRef3 has the following fields:
    UserName
    EmpIndicator
    UserID
    In my stored procedure, I need to perform the following:
    1. Check each row in the tblToUpdate table. Get the CreatedBy value and compare the same to the UserName and UserID field of tblRef1. If no value exists in tblRef1, I then proceed to check if the value exists in the same fields in tblRef2 and tblRef3.
    2. If the value is found, then I would update the EmployeeIndicator field in tblToUpdate with the value found on either tblRef1, tblRef2 or tblRef3.
    I am having some trouble writing the stored procedure to accomplish this. So far, I have written is the following:
    CREATE OR REPLACE PROCEDURE Proc_Upd IS v_rec NUMBER;
    v_plan_no tblToUpdate.PLANID%TYPE;
    v_ref_ind tblToUpdate.EMPLOYEEINDICATOR%TYPE;
    v_update_user tblToUpdate.UPDATEDBY%TYPE;
    v_created_by tblToUpdate.CREATEDBY%TYPE;
    v_correct_ref_ind tblToUpdate.EMPLOYEEIDICATOR%TYPE;
    CURSOR cur_plan IS SELECT PlanID, EmployeeIndicator, UPPER(UpdatedBy), UPPER(CreatedBy) FROM tblToUpdate;
    BEGIN
    Open cur_plan;
         LOOP
         FETCH cur_plan INTO v_plan_no, v_ref_ind, v_update_user, v_created_by;
              EXIT WHEN cur_plan%NOTFOUND;
              BEGIN
              -- Check if v_created_by has value.
                   IF v_created_by IS NOT NULL THEN
                   -- Get the EmpIndicator from the tblRef1, tblRef2 or tblRef3 based on CreatedBy
                   SELECT UPPER(EmpIndicator)
                        INTO v_correct_ref_ind
                        FROM tblRef1
                        WHERE UPPER(USERNAME) = v_created_by
                        OR UPPER(USERID) = v_created_by;
                        IF v_correct_ref_ind IS NOT NULL THEN
                        -- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
                             UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
                        ELSIF
                        -- Check the Other tables here????
                        END IF;
                   ELSIF v_created_by IS NULL THEN
                   -- Get the EmpIndicator based on the UpdatedBy
                        SELECT UPPER(EmpIndicator)
                        INTO v_correct_ref_ind
                        FROM tblRef1
                        WHERE UPPER(USERNAME) = v_update_user
                        OR UPPER(USERID) = v_created_by;
                        IF v_correct_ref_ind IS NOT NULL THEN
                        -- Update the Reference Indicator Field in the table TRP_BUSPLAN_HDR_T.
                             UPDATE TRP_BUSPLAN_HDR_T SET ref_ind = v_correct_ref_ind WHERE plan_no = v_plan_no;
                        ELSIF
                        -- Check the Other tables here????
                        END IF;
                   END IF;
              END;
         END LOOP;
         CLOSE cur_plan;
         COMMIT;
    END
    Please take note that the values in the column tblToUpdate.UpdatedBy or tblToUpdate.CreatedBy could match either the UserName or the UserID of the table tblRef1, tblRef2, or tblRef3.
    Kindly provide more insight. When I try to execute the procedure above, I get a DATA NOT FOUND ERROR.
    Thanks.

    Ah, ok; I got the updates the wrong way round then.
    BluShadow's single update sounds like what you need then.
    I also suggest you read this AskTom link to help you see why you should choose to write DML statements before choosing to write cursor + loops.
    In general, when you're being asked to update / insert / delete rows into a table or several tables, your first reaction should be: "Can I do this in SQL?" If you can, then putting it into a stored procedure is usually just a case of putting the sql statement inside the procedure header/footers - can't really get much more simple than that! *{;-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • ABAP down when i migo.

    the system is a new system.client800. i study on this system. when i first do the goods receive for the PO. But.when i post.the system did abap. the message is that: Runtime Errors         MESSAGE_TYPE_X Date and Time          2010.02.22 19:27:32 Sho

  • How to keep multiple applications open in one screen?

    I'd like to have several applications open at the same time, for example iTunes, Safari and Mail. But when I start a new program the one I was working in disappears from the screen.... How can I keep them resized on the screen....? Thanks for your he

  • QuickTime always has static noise while playing audio

    Every time I open an mp3 (or any audio file) in QuickTime, it plays a lot of static noise in the background.  These audio files work fine in other applications (iTunes, VLC, etc) so i know the problem lies with QuickTime.  I have tried re-installing

  • I have a macbook pro 2007 1,1. How much ram will it support?

    Anyone able to recommend how much and what type of RAM i will need for my 2007 macbook pro 1,1. 1.83 Ghz processor speed?

  • Display survey results in crm webclient's contact overview

    hello experts, could anyone give me a hint, if there is a SAP standard solution for displaying survey results in its appropriate telephone contact overview? Thanks in advance! Kind regards Andreas