cancel
Showing results for 
Search instead for 
Did you mean: 

QUERIES inJDBC scenario

Former Member
0 Kudos

Hi,

I am working on FILE to JDBC scenario....I have tried INSERT query.

Now I want to try DELETE, UPDATE and SELECT queries.

What should be the changes???

What should be my datatypes at sender and receiver????

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

You can write any valid sql select query in Sender JDBC Communication channel, it will return all result that fulfill condition.

Use EMPNO in your sender data type to select those>2 value

Former Member
0 Kudos

I want an xml file as sender and JDBC as receiver.

So sender side if i give

EMPNO and TEXT.

At receiver side i have

STATEMENTNAME

->DETAILS

-


>ACTION SELECT

-


>TABLE EMPLOYEE

->KEY

-


>EMPNO

-


>COMPAREWITH (attribute) -


I want to know wat to map this with.

I want to return EMPNO greater than 100.

how should the mapping go????

Thank you

Answers (6)

Answers (6)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Where you are collecting selected response record, sending to a file?

You need 2 Message interface

1 File to JDBC request

2 JDBC response to File(If you are sending response to a file)

But to collect response into file u have to use module because file adapter is not synch.

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Use Sync JDBC to return value look these scenario.Where r u receiving response?(In any file).

You can also use JDBC look up.

Former Member
0 Kudos

Hi Dharamveer,

You had sent me a link for synchronous JDBC scenario.

In this scenario, what should be the Message Interface???

I have a source message and a target message, Request and Response.

When I say synchronous message interface, What should be the input message and output message.????

Hope you got my question.

Thanks...

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

If you use JDBC as Sender then your sender structure would be in format

<resultset>

<row>

<column-name1>value</column-name1>

<column-name2>value</column-name2>

<column-name3>value</column-name3>

</row>

<row>

<column-name1>value</column-name1>

<column-name2>value</column-name2>

<column-name3>value</column-name3>

</row>

</resultset>

Receiver JDBC Structure you have to Change Action

for delete action, there would not be any access column, you have to use pass key value to delete mattching record

look this help documentation

http://help.sap.com/saphelp_nw04s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm

Former Member
0 Kudos

Hi,

Check the blog

your scenario involves File and JDBC adapters and the file must be pulled from SAP R3 sys.

As SAP R3 is involved U can use ABAP proxies or RFC adapter(Sender) directly and the following blog may help U to configure RFC adapter(Sender) .

But if u want only File adapter to be used as sender then u can put the file from R3 into a FTP server and use File adapter(sender) to pick the file and post it to JDBC adaptet(receiver).

plz visit the below link , i hope it helps u...

regards,

Surya

Former Member
0 Kudos

Hello,

For INSERT and DELETE, we need to pass the key node to elminate duplicates and it will be maintained as a key.

Refer this link

http://help.sap.com/saphelp_nw04s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Regards,

Sreenivas

Former Member
0 Kudos

Hi ,

It depends on your operation.

You can use the same data types if your operation would be INSERT or UPDATE.You have to mention the INSERT or UPDATE in the action element.Even DELETE operation works in the similar manner.

If you want to use 'SELECT' operation at the receiver cide,you have to desing a synchronous scenario.For that you have to use different type after selecting the data from the target side.

Refer this blog for 'SELECT' query and also required data types.

Former Member
0 Kudos

Hi,

I did DELETE query.

Thanks for that link,

For SELECT query if i need to do greater than operation it returns true or false.

But i need the value of the greater input.

How do i fo this.

I want to try a query like this.

SELECT EMPNO, TEXT FROM EMPLOYEE WHERE EMPNO > 2;

how do i do this in the scenario???.

Especially mapping,

Thank you.