• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling procedure with user defined IN & OUT parameters

 
Lalitha Vydyula
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have procedure in a package which I need to call from the JDBC. My problem is, that procedure take user-defined data types as IN parameters & gives user-defined OUT paramters. How do I call a procedure like this. Do I need to write the wrapper class. If so from where do I start, I mean I don't have any idea about writing wrapper classes. Its an urgent requirement. Help me please.

The procedure is like this..........

PROCEDURE AR_SUMMARY(p_cust_name IN hz_parties.party_name%TYPE,
p_chr_id IN okc_k_headers_b.ID%TYPE,
x_ar_summ_tbl OUT NOCOPY ar_summ_tbl_type,
x_excp_messageOUT VARCHAR2);
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can all be handled with the JDBC CallableStatement...

See the tutorial:
http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/callablestatement.html
[ April 04, 2006: Message edited by: stu derby ]
 
Lalitha Vydyula
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks stu derby. But what I was asking was, how do I call procedure with user-defined IN & OUT parameters. Below is the package spec which might help you uderstand my question more clearly.
----------------------
CREATE OR REPLACE PACKAGE FAM_AR_SUMMARY_PKG IS

TYPE ar_summ_rec_type IS RECORD (
CUST_NAMEhz_parties.party_name%TYPE,
CUST_ACCT_NOhz_cust_accounts_all.ACCOUNT_NUMBER%TYPE,
CUST_ACCT_BALNUMBER,
CUST_PAST_DUE_BALNUMBER,
CUST_UNAPP_REC_BALNUMBER,
CONTRACT_NOokc_k_headers_b.CONTRACT_NUMBER%TYPE,
ANN_DATEokc_k_headers_b.END_DATE%TYPE,
TOT_CONTRACT_VALUEokc_k_headers_b.ESTIMATED_AMOUNT%TYPE,
PAST_DUE_AMTNUMBER,
DAYS_PAST_DUENUMBER,
INV_PAST_DUENUMBER,
DEP_INV_BALNUMBER,
AMT_CREDITEDNUMBER);

TYPE ar_summ_tbl_type IS TABLE OF ar_summ_rec_type
INDEX BY BINARY_INTEGER;


PROCEDURE FAM_GET_AR_SUMMARY(p_cust_name IN hz_parties.party_name%TYPE,
p_chr_id IN okc_k_headers_b.ID%TYPE,
x_ar_summ_tbl OUT NOCOPY ar_summ_tbl_type,
x_excp_messageOUT VARCHAR2);

END FAM_AR_SUMMARY_PKG;

Please help me. Its an urgent requirement.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic