Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Stored Procedure issue in receiver JDBC synchronous scenario

$
0
0
Dear Experts,

 

Below is the description of the Stored Procedure for my requirement which has 1 input and 7 output.

 

CREATE OR REPLACE PROCEDURE emp_det_proc

(

    p_emp_id IN NUMBER,

    cur_det OUT sys_refCURSOR

)

aS

BEGIN

    OPEN cur_det FOR

    SELECT * FROM EMP_PERSON_VIEW

        WHERE id = p_emp_id;

END emp_det_proc;


Inside the procedure , we can see that Select query is done on a VIEW which has some 7 column and these are the output. The data type description of the ID is VARCHAR2 in Oracle Database 11g VIEW, that's why I maintained VARCHAR in Constant mapping at SAP-PI side.

 

I am maintaining all the column name present in the view for my JDBC request structure with isOutput and type.

 

Below is my JDBC request.

 

<?xml version="1.0" encoding="UTF-8" ?>

 

-<ns0:MT_ECCJDBC_EmpStrdProc_JDBCReq xmlns:ns0="urn:empdet:sap:jdbc:storedprocedure">

 

 

-<Statement>

 

 

-<emp_det_proc action="EXECUTE">

 

 

<table>emp_det_proc</table>

 

 

<ID isInput="true" type="VARCHAR">200178</ID>

 

</emp_det_proc>

</Statement>

</ns0:MT_ECCJDBC_EMPStrdProc_JDBCReq>

 

I tested with other XSD type like INT/CHAR/ but with the same error.

 

Unable to execute statement for table or stored procedure. 'emp_det_proc' (Structure 'Statement') due to java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'EMP_DET_PROC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

 

1. I observed that the Key field ID is maintained as NUMBER in Stored Procedure but in the VIEW it is maintained as VARCHAR2.

 

Could anyone help me to solve the issue  with any suggestions?

 

Regards

Rebecca


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>