Skip to Content
avatar image
Former Member

Using PI - Calling a Function in Oracle

Hi,

I understand that the receiver JDBC adapter is capable of calling a stored procedure or a function in Oracle. I would like to call an Oracle function using the Receiver JDBC Adapter. How should my structure look like.

Thanks.

Krishnan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 11, 2008 at 05:09 PM

    Hi,

    From PI, How do I call a function in oracle. I am sure, it's not the same how we call a Stored Procedure. I am getting an error as stated above.

    Appreciate your help.

    Regards.

    Krishnan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 11, 2008 at 03:26 AM

    Hi,

    Try creating the structure same way as you create for Select query. Not sure it will work or not. You can try giving the function name as described in the thread link provided below. Here predefine Oracle function (to_date) is called, similarly you should be able to call your function as well.

    DATE/TIME datatypes and Oracle Database

    The other solution is to call a Stored Procedure which inturn will call your function.

    thanks

    amit

    reward point if solution is useful

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 11, 2008 at 03:24 AM

    Hi,

    I have created a structure like:-

    <STATEMENT>

    <FUNCTION action="EXECUTE">

    <FunctionName>myFunction</FunctionName>

    <SerialNo type="NUMERIC">1000001</record_count>

    <SerialDate hasQuot="NO" type="STRING">TO_DATE(&apos;07-10-2008 04:59:43&apos;,&apos;MM-DD-YYYY HH24:MI:SS&apos;)</SerialDate>

    </FUNCTION>

    </STATEMENT>

    I am getting the following error in the JDBC receiver adapter:-

    -


    com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'myFunction' (structure 'STATEMENT'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00221: 'myFunction' is not a procedure or is undefined ORA-06550: line 1, column 7: PL/SQL: Statement ignored

    -


    Thanks.

    Krishnan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 12, 2008 at 05:53 AM

    either you can create a stored proc. and call the function in it.

    rest is well known to you

    Add comment
    10|10000 characters needed characters exceeded