Skip to Content

Multiple SQL Statements in JDBC Sender Communication Channel in SAP PI/PO

Hi All,

I want to execute below SQL statements in JDBC Sender communication channel:

1) Delete Temp Table.

2) Select top 1000 records from Main Table and insert into Temp Table.

3) Select all entries from Temp Table.

4) Update Main Table status field for all entries in Temp table.

5) Delete Temp Table.

We are facing issues while updating records by using top 1000 records command, So we came up with above five steps.

Is it possible to do above five steps in SAP PI JDBC Sender Communication Channel?

If yes can you please provide steps. If it is possible using Stored procedure can you please help me on the same.

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 01, 2017 at 09:40 PM

    Hi Anvesh!

    As Inaki has already said, you can use stored procedure for your requirement.

    You use SQL statement like:

    SELECT fld1, fld2,... FROM StoredProcName().

    Inside that stored procedure select with update is performed and result recordset is returned.

    In this case you don't need to use update statement in sender adapter's settings.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 01, 2017 at 06:33 AM

    Hi Anvesh,

    First of all you should think if you really need a TEMP table in your scenario.

    If your DB vendor is Oracle i usually go with a stored procedure, doing it like i wrote in this thread https://archive.sap.com/discussions/thread/3706865

    Regards.

    Add comment
    10|10000 characters needed characters exceeded