cancel
Showing results for 
Search instead for 
Did you mean: 

How to uses JDBC Adapter for the following scenario ?

former_member189387
Active Contributor
0 Kudos

Hi friends ,

Requirement is we have to read a MS_SQL server table and insert the values into the R3 System tabel using RFC Calls .

How to do this ? I new to XI .

My assumption is can i use the jdbc adapter for this ? How to use this ?

can you please provide the step by step information ?

Now SQL Server resides at 250 kms away from our SAP R3 system . At present i will use our local sql server .

How to work on this ?

I am expecting your reply asap

Regards .,

V.Rangarajan

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>>My assumption is can i use the jdbc adapter for this ? How to use this ?

can you please provide the step by step information ?

you can use sender jdbc adapter for that

>>>>Now SQL Server resides at 250 kms away from our SAP R3 system . At present i will use our local sql server .

this has nothing to do with the interface

if you have access to SQL server it can even be 10.000 kms away

Regards,

michal

former_member189387
Active Contributor
0 Kudos

Hi Michal ,

Thanks for ur reply. I need to insert the values in to the R3 Tables .

After the values are get inserted i have to go back to the sql server table and update those rows which are inserted in to the R3 table .

So I have to use again JDBC Receiver ? and RFC Sender ?

Can you please give your suggestion

Regards ,

V.Rangarajan

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Which SP are you on?

If XI SP 19 / Pi SP 10, you can avoid a BPM as per my reply in this thread,

https://forums.sdn.sap.com/click.jspa?searchID=3128709&messageID=3539067

If below SP 10, you would need a BPM with a Receiver JDBC adapter for the update.

Meanwhile, also note that the Sender JDBC adapter by itself has an Update Query option in it, you can consider if this would be sufficient and try to use this and make an Asynchronous call to the R3 system instead of this synchronous call .

Regards

Bhavesh

former_member189387
Active Contributor
0 Kudos

Hi Bhavesh ,

Thanks for ur reply .

Our XI is SP10 . I want insert the resultset (data ) which i read using jdbc sender adapter to r3 tables . How can i do this ? Can you please give me a brief idea about this ?

How can we handle exception .

1. Like if Database connection lost ?

2. While we are reading the data if connecction lost does it rollback ?

3. How can i schedule the sender adpter as it has to run at 8.00 am , 11.00 am and 3.00 pm like that .

Expecting ur reply asap.

Best Regards.

V.Rangarajan

Former Member
0 Kudos

Rangarajan,

>>1. Like if Database connection lost ?

2. While we are reading the data if connecction lost does it rollback ?

In case of sender JDBC adapter, the data will not be fetched during such conditions. Once the data base is up, the JDBC adapter will establish the connection if you have selected the parameter "Disconnect to Data base after processing each msg" in Advanced mode.

>>3. How can i schedule the sender adpter as it has to run at 8.00 am , 11.00 am and 3.00 pm like that .

You have the option of specifying polling interval. Give the value in seconds.

Regards,

Jai Shankar

bhavesh_kantilal
Active Contributor
0 Kudos

> Our XI is SP10 . I want

> insert the resultset (data ) which i read using jdbc

> sender adapter to r3 tables . How can i do this ?

> Can you please give me a brief idea about this ?

What exactly is the requirement? Do you want to update the R3 table or do you want to update the DB table. Can you provide the entire flow please.

How can we handle exception .

> 1. Like if Database connection lost ?

Is asynchronous call, XI will restart message automatically.

If synnchronous, no restart is possible and entire message has to be resent from the source.

> 2. While we are reading the data

> if connecction lost does it rollback ?

>

Yes, this will happen automatically.

> 3. How can i schedule the

> sender adpter as it has to run at 8.00 am , 11.00

> am and 3.00 pm like that .

Look into the blog "Adapter Scheduling Hail SP 19 " for this.

Regards

Bhavesh

former_member189387
Active Contributor
0 Kudos

Hi Bhavesh ,

The entire flow is

MSSQL <----


> SAPR3

This MSSQL resides in some other place . The entries from one table of this sql server has to read( as specified time ) interval and insert to r3 table (using RFC calls )

Once inserted to R3 tables we have to go back to SQL Server and update the rows which i inserted .The fields which i have to update in sql server is updatetime as current date and tag as 'no' . Can we do this updation while we are reading the data ?

I have to send mail to a person as this much rows are updated in R3 . If error occurs (like connection lost like that ) i have sent mail to a person .

Regards ,

V.Rangarajan

former_member189387
Active Contributor
0 Kudos

Hi Bhavesh ,

Can we use BPM for this ?

Regards.,

V.Rangarajan

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

1. Either use the Solution shown in my thread. You would need to construct the Appropriate Datatypes and Message types for the JDBC side and create the appropate RFC that will give the response status.

2. Send the response mapping fopr the JDBC updates.

3. In case of any Errors, you can use the XI alerts to trigger mails.

If you want more control, then you would need to use a BPM

Regards

Bhavesh

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Like pointed by Michal you will need to use a Sender JDBC adapter that willpoll over your database and pick the data from the Database as per your Select Qyuery.

More in this blog,

/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter

Distance to the XIserver never matters . I access my Client Server here in India when the server is in the US You would need Connectivity ofcourse, maybe dedicated links.

Regards

Bhavesh