cancel
Showing results for 
Search instead for 
Did you mean: 

Any RFC callback example with the new connector?

Former Member
0 Kudos

Netters,

I am wondering if anyone has an example on the RFC callback feature that has been added to the new SAP .NET connector 2.0.

Thank you in advance for your help.

Pradeep

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

This feature came in lately so we don't have an example yet. This fundamental idea is simple:

-Create your client proxy.

-Create a server proxy with all methods in it that are called back.

- Remove the main sample function in server proxy implementation and implement all server functions.

- At runtime, create your client proxy instance and a server proxy instance.

- Set the server proxy instance to the "CallbackServer" property of the client proxy instance.

That's it.

Former Member
0 Kudos

Hi Reiner,

Thank you for your help. I will try it out.

I have a slightly different question. I have to fetch about 10+ million records via RFC. Unlike database servers, which provide streaming records, SAP RFCs are one time atomic calls. Obviously, I cannot fetch 10 million rows in one shot without brining the SAP server or the .NET client down. The way I was handling this before was to break my SELECT query into multiple queries (actually the same query with different WHERE clauses) and fetch data for one query at a time. It worked but is not elegent. I am thinking that using the RFC callback will be more elegent. The question I have is, do you see any problem with RFC callback to handle this? If you have any other suggestion, I'd appreciate your feedback.

Thank you in advance for your help.

Pradeep

reiner_hille-doering
Active Contributor
0 Kudos

What you plan to do sounds like a "Data Warehouse extractor". For such a task the best solution is a ABAP program that uses the "Multi DB Connect" feature: You can connect to a different DB (e.g. an extra SQL server) and, read some tables and store them into the external DB.

Former Member
0 Kudos

Hi Reiner,

I know this is a bit off-topic, but could you provide any documentation source of the mentioned "Multi DB Connect" Feature ?

Greetings

Peter

Former Member
0 Kudos

Hi Peter,

We ran into the same issue issue as you. We used two methods to controls how much data we push out. In the ABAP program we coded these two methods:

1) SELECT F1,F2,Fn INTO TABLE <tab_name> PACKAGE SIZE p_max

2) And for our biggest tables, which were about 6 mill+ we select out data using this command

OPEN CURSOR WITH HOLD c1 FOR

SELECT F1, F2, Fn...

Cheers!

former_member353432
Discoverer
0 Kudos

Bill,

I used the same method as you (ie. OPEN CURSOR and FETCH..) to return chunks of data, but my problem is that if I call this function via RFC, then the CURSOR doesn't stay open. Is there a way to keep the cursor open between RFC calls?

Thanks.

Christina