cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender Adapter ---Stored Procedure Call

Former Member
0 Kudos

Hello All

I have a scenario JDBC--> PO 7.4 --->Proxy. We are using SAP PO 7.4 single stack SP 11.

To fetch the data from the SQL database , in sender JDBC adapter we are using the stored procedure ( as we are fetching the data from multiple tables  ). I am passing the parameters to the stored procedure in the quesry SQL statement as :

SAPsp_FetchData @ Area= 'XYZ' , @FromDate = '20150801',@Todate = '20150831'

The stored procedure ' SAPsp_FetchData' works fine with this statement BUT the issue is that I cannot pass the hardcoded value for @Area,@FromDate,@Todate. I want to know is there an option to pass the values for these parameters dynamically to fetch the data from the database ?

Regards

Vinoad

Accepted Solutions (0)

Answers (2)

Answers (2)

vinaymittal
Contributor
0 Kudos

Why don't you go for a synchronous Proxy to jdbc via synch/asynch bridge call the stored procedure dynamically via proxy with dynamic parameters and then send the response back to proxy

iaki_vila
Active Contributor
0 Kudos

Hi Vinoad,

In the sender JDBC adapter you can't pass values dynamically on the stored procedure. Your only option would be to have several sender JDBC adapters or to "transform" your scenario and to do for example a Proxy ECC - JDBC, in this way the ECC can elaborate the parameters. Depending your current receiver you can get your goal on the response directly on this new scenario or to another second scenario.

Regards.

Former Member
0 Kudos

Isn't there an option to use system date or any such function which gives the current system date which I could assign to "@Fromdate " parameter.

regards

Vinoad

vinaymittal
Contributor
0 Kudos

That depends on the the DB you are using for MySql you can use these functions in your query

NOW()Returns the current date and time
CURDATE()Returns Current Date

you can try to use these functions in your query so the date is taken at the DB level...

iaki_vila
Active Contributor
0 Kudos

Hi Vinoad,

If you use system functions or for example select sysdate from dual (oracle) i don't see any reason that avoids to work.

You can see it like if you was on a SQL command interpreter, if you can write it in one line (without external calls) and to get a response, it should work.

Even i could use a function, no only stored procedures, with this line:

DECLARE RESULT NUMBER; BEGIN RESULT := my_function(1); END;

Regards.