Skip to Content
0

JDBC Query SQL statement

Jan 27, 2017 at 05:39 AM

100

avatar image

Hi Experts,

I have a JDBC to RFC scenario in that I need to get data from JDBC to RFC.

Can some one help to create Query SQL Statement for below.

query-sql-stsement.jpg

Appreciate for your help.

Cheers

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Iñaki Vila Jan 27, 2017 at 07:20 AM
0

Hi Charan,

You should give us more details, like the DB vendor, if you want to access one or more tables, etc.

You have a begginer guide here

http://www.riyaz.net/sap/jdbc-adapter-configuration/1200/

You have to take into account this points:

- In sender JDBC you have to do the access to the DB at channel level.

- You need to have a field in table to act like a flag to know if the register has been read or not.

- In the channel level you have to set the SELECT and the UPDATE of that flag. The two sentences must have the same WHERE clause, in order to read and update always the same registers.

- Depending your DB vendor, the SELECT and UPDATE clause can be difficult to take the same registers, check for example this blog about ORACLE to take the same registers. I had to use finally a Stored procedure.

https://blogs.sap.com/2013/03/13/pi-jdbc-sender-adapter-some-learnings/

Regards.

Share
10 |10000 characters needed characters left characters exceeded
charan reddy Jan 27, 2017 at 08:39 AM
0

Thanks for your reply..

We are using SQL database for that need Query SQl statement.

Share
10 |10000 characters needed characters left characters exceeded
Supriya Parab Jan 27, 2017 at 09:38 AM
0

Hi Charan,

The select statement would be something like below:

Select item, Description, UOM, Quantity, DueDate, Plant from <tableName> where <where-clause>

Put the necessary where clause statement in above select statement; also, as already mentioned in previous post, ensure to write the relevant update statement so that same records will not be fetched in next select.

Regards, Supriya.

Share
10 |10000 characters needed characters left characters exceeded
charan reddy Jan 27, 2017 at 11:39 AM
0

It's a one way communication ... i think i dont required to write update statement

Regadrs

Ramesh

Share
10 |10000 characters needed characters left characters exceeded
Supriya Parab Jan 27, 2017 at 11:58 AM
0

Hi Charan,

Update statement is required to be written in sender JDBC channel to ensure that the same records are not pulled up when the channel runs next time. So it is necessary to mention update statement in the sender channel; this update statement is for one way commnunication.

Regards, Supriya.

Share
10 |10000 characters needed characters left characters exceeded
charan reddy Jan 31, 2017 at 10:12 AM
0

HI Supriya,

Is this Query statement works:-

Select item, Description, UOM, Quantity, DueDate, Plant from <tableName> where Quantity=169

Regards

Charan

,

HI Supriya,

Wrote the Query statement like:-

Select item, Description, UOM, Quantity, DueDate, Plant from <tableName> where Quantity=169

Will it work for sender JDBC to get the data from database?

Regards

Ramesh

Share
10 |10000 characters needed characters left characters exceeded