Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Execute Function in external ORACLE Database

Former Member
0 Kudos

Hi Gurus,

I'm working with Native SQL, trying to execute a function (NOT a procedure) present in an Oracle Database.

I have the DBCO table ready and the conection is working fine, but when I want to execute the function I get the following error (with short dump):

Database error text: "ORA-00900: invalid SQL statement"

Database error code: 900

Triggering SQL statement:

:VALIDO := cai_valido_i ? , ? , ? , ? , ? , ? )"

Looks like this is a syntax error when i'm trying to use the function. I try to call the function with EXECUTE PROCEDURE, but another error appear, saying that the procedure doesn't exist.

This is the function that I need to call in Oracle:

cai_valido_i

(ccai in number,

ccuit in number,

cfecha in date,

ccod_tc in number,

cpto_vta in number,

cnro in number) return number

I Hope somebody can help me with this.

Kind regards,

Roberto.-

2 REPLIES 2

Former Member
0 Kudos

Not sure how to call Functions but I executed procedures as below:

EXEC SQL PERFORMING <SAP_SUBROUTINE>.

SELECT <PROCEDURE>(

:<IN_PAR1>,

:<IN_PAR2>,

:<IN_PAR3>)

INTO :<OUT_PAR1>

FROM DUAL

ENDEXEC.

Thnaks,

Shashi Reddy

0 Kudos

Shashi Reddy,

thank you very much for your help!

Regards,

Roberto.-