on 06-24-2013 12:39 PM
Hi Guys,
We have Scenario from JDBC to IDOC.We are using Oracle DB,at the database side we have a stored Procedure and inside the Procedure we are accessing multiple table.
My query is how can we excecute a stored procedure by using EXECUTE at the sender JDBC.I wrote the query as :
EXECUTE name.Packagename.Storedprocedurename.
But it is giving error like: Invalid SQL statememnt.
Can anyone please on this??
Dear Sahiti,
Jdbc to Idoc we have map the fields according to the requirement but i will show you sample image files and given fileds are also mapping fields in the table or sender side structure.
Select Query:
select ERDAT,VBELN,VBELN1,MATNR,TRAID,KWMENG,KBETR,KUNNR,WERKS, TO_CHAR(PRINTSTAMP,'MM/DD/YYYY HH:MI:SS AM') PRINTSTAMP,EXTRA1,EXTRA2,EXTRA3,EXTRA4,EXTRA5 from ORDERTABLE where STATUS='N'
Update Query:
UPDATE ORDERTABLE SET STATUS='E', XI_READ=to_date(to_char(sysdate,'DD/MM/YYYY HH24:Mi:SS'),'DD/MM/YYYY HH24:MI:ss') WHERE STATUS='N'
Thanks
Regards,
Kiran Polani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
You can't achieve this with normal stored procedure for Oracle DB.
Please refer to the following threads......might be helpful to you.
http://scn.sap.com/thread/330212
http://scn.sap.com/thread/1574165
BR,
Anirban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
in cc channel parameter query sql statement u can wrote select statement Like
select * from table ( stored procedure name)
And
Update Sql statement means use <TEST>
IT will be work....
Rerards
srikanth k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
have a look how you can achieve what you want:
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhoshi,
Please check whether your procedure has multiple select statements or not. Multiple Selects in a stored procedures are not probably allowed to call from Sender JDBC driver.
/AB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhoshi,
Please check this link:
Hope it helps!
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have a look to the documentation below, under "Query SQL Statement":
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Santhoshi,
Which Oracle version you are using? Oracle versions(8,9) not supports stored procedure. oracle 10g support stored procedure.but you have to use table function. to execute stored procedure.
Thanks & Regards,
Pavan
Hi,
We are using Oracle 10g.Alreday at the database side they had wote the stored procedure.But from PI side they were asking to execute the stored procedure.And from the block i get to know that : we Cannot pass dynamic values as input to the stored procedure.But in our scenario we have to pass the valjes dynamically so how could we acheive this.
Hi Santhoshi,
I worked earlier this type of scenario before, We tried to call the stored procedure from PI, but we failed (because their data base is Oracle). Then we suggested this approach.
1)Ask DB team to create view that the contains the output of Stored procedure.
2)Sender JDBC channel will pick the records from view.
Thanks & Regards,
pavan
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.