cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI: JDBC Lookup

suwandi_cahyadi
Contributor
0 Kudos
383

Hi,

I want to do a JDBC lookup in CPI which then will determine the next process to be done with the main payload.

Here is my iFlow:

Basically

1. Step 1 will do a SFTP connection and get a file to be processed

2. Step 2, here I create a Content Modifier to prepare the SQL SELECT statement in the Message Body

3. Step 3, I use the JDBC adapter to execute the SELECT statement from step 2 and receive the lookup table

The problem here is, since the SQL statement in step 2 is stored in the Message Body, then the file content read from step 1 is overwritten from step 2.

My goal is to use the result of the JDBC call in step 3 to check against the file payload from step 1 then determine what the next step is. In another word, something similar to JDBC lookup.

So, the question is how to do JDBC lookup in CPI?

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

kc_kristris
Active Participant
0 Kudos

Hello Suwandi,

Put a groovy script in between to create the select query and store it in a property.

Regards,

Kris