Skip to Content

JDBC Query SQL statement

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Jan 27, 2017 at 07:20 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 27, 2017 at 08:39 AM

    Thanks for your reply..

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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 27, 2017 at 09:38 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 27, 2017 at 11:39 AM

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

    Regadrs

    Ramesh

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 27, 2017 at 11:58 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 31, 2017 at 10:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded