Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DB Cursor and RFC question

Former Member
0 Likes
1,116

Hello everyone,

One question. Is there a way to work with db cursors via RFC calls? For example, I've to extract a huge table via a java program. So I've to call a FM and transfer 1000 datasets with each call of the FM. But how I can start with the last transfered line? I know with you use a cursor its no problem. But what happens if you call this FM via RFC with the cursor? I find now way to work with the cursor when I call the FM the second time.

Thanks for your help!

Regards Daniel

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
870

Pass the index number of the last record sent as a parameter from the sending system, then send it back on the next call. And so on...

3 REPLIES 3
Read only

Former Member
0 Likes
871

Pass the index number of the last record sent as a parameter from the sending system, then send it back on the next call. And so on...

Read only

Former Member
0 Likes
870

Have you tried to open cursor with 'with hold' option?

From SAP Help

<i>With one exception, a database LUW is concluded when you close a cursor either explicitly or implicitly. The WITH HOLD addition in the OPEN CURSOR statement allows you to prevent a cursor from being closed when a database commit occurs in Native SQL.

</i>

Read only

Former Member
0 Likes
870

Hi all,

Thx for all your answers. there is now solution to be sure to work with the db cursor over a rfc call. So don't try it, it's something like playing roulette

Regards,

Daniel

p.s.

sorry that I forgot to close this thread