cancel
Showing results for 
Search instead for 
Did you mean: 

PI 730 - SOAP to Receiver JDBC (SQL Server )

former_member191528
Participant
0 Kudos

Hello All,

I am using SOAP to Receiver JDBC with backend as a View in SQL Server. The scenario is working fine. I am using SQL XML format on the receiver side.

Is there a way through PI that I can just ask for top 10 rows for the query without using Stored procedure. Its a basic select query with 3 KEY1 parameters.

Thanks,

Kiran

Accepted Solutions (1)

Accepted Solutions (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Kiran,

If I understand correctly, you want to create a new scenario (JDBC to SOAP). It is not related to already working interface (SOAP to JDBC).

To select top 10 records from JDBC, write a select statement in sender JDBC channel. I suggest to test the query directly on database using SQL client, first.

SQL SELECT TOP, LIMIT, ROWNUM

SELECT TOP 10 * FROM Customers where country = "Germany";

former_member191528
Participant
0 Kudos

Hi Raghu,

Its a SOAP to Receiver JDBC scenario. Now the requirement is to only pull top 10 rows from backend JDBC View. We initially built it to pull all rows for the selection but now they want only top 10 rows pulled from the backend.

Sorry for the confusion.

Thanks,

Kiran

RaghuVamseedhar
Active Contributor
0 Kudos

Kiran,

It seems, it is synchronous scenario (SOAP <-> PI <-> JDBC).

Receiver JDBC channel supports XML form of

SELECT col1,col2 FROM dbTableName WHERE col2=’val2old’

Defining a SELECT Statement - SAP Library

To retrieve top 10 records:-

You can try Native XML format. Note:- actual text SQL statement should be sent to receiver JDBC channel.

SELECT TOP 10 * FROM Customers where country = "Germany";

Defining XML Documents for Message Protocol Native SQL Format 

OR

You can request database team for stored procedure

Defining an EXECUTE Statement

former_member191528
Participant
0 Kudos

We ended up using a stored procedure with dynamic SQL where the number of rows are passed dynamically.

Answers (0)