cancel
Showing results for 
Search instead for 
Did you mean: 

Storedprocedure trigger using JDBC sender adapter.

Former Member
0 Kudos

Hi All,

How can i execute the storedprocedure using JDBC sender adapter. I need to trigger the storedprocedure once in every hour. so i would like to use the JDBC sender adapter. My question is what is the SQL i need use in the SQLstatement parameter..?? I don't want to send parameters and not expecting any return values. It should just trigger the procedure.

Thanks in adv.

Regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Muarli,

If you want no rows to be selected, then just make sure that the a dummy select statement is provided in your Stored Procedure and that this statement will not return anything.

like, select * from tab where id=NULL over say a PRIMARY KEY of the table.

You can manipulate the SELECT Statement not to return anything and it will work good.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Murali,

it is possible to execute a stored porcedure using a sender JDBC adapter.

Just Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.

This will have to be done for your SELECT statement in JDBC adapter. ALso, make the UPDATE as either TEST, if you dont want any updations or give an UPDATE statement for the UPDATE query.

Set the polling interval of your JDBC adapter to 1 hour and it will work like u want.

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Thanks for your response. I too gone thr.the document but i would like to know the exact SQL EXECUTE statement, how can i provide the storedprocedure as the parameter.

Regards,

bhavesh_kantilal
Active Contributor
0 Kudos

hi Murali,

<b>Execute StoredProcedureName(parameter1,parameter2,..parametern)</b>

But, everything here is static. You cannot make it Dynamic.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

i was trying with that command but i am getting Invalid SQL statement at adapter monitoring.

any suggestions..??

Regards,

bhavesh_kantilal
Active Contributor
0 Kudos

hi murali,

from the online documentation,

<b>The expression must correspond to the SQL variant supported by the relevant JDBC driver</b>

Just try to execute the same stored procedure from your Database client and use the query that you use in your database client to execute it from your JDBC sender adapter.

I guess this should work,

Regards,

Bhavesh