cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use RFC function module between open cursor and close cursor in SAP ABAP ?

Former Member
0 Kudos

Dear Experts,

I have requirement to update Ztable entries(Large Data) from one system to another system. By getting data in packet size, i have used open, fetch and close cursor statements.

for example i got 1,00,000 records in 1st loop, so I need to pass that 1,00,000 records to another system using one RFC function module.

but unfortunately after one loop it is closing the cursor.

Kindly Let me know is there anyway to update same .

Thanks,

Siva

Accepted Solutions (0)

Answers (1)

Answers (1)

Yes with 2 addition and restriction that commit should not be done and no other FM should be called within Fetch(again to prevent commit).

1- cursor with Hold --> Open Cursor with Hold @define_cursor for select statement

2. RFC FM with addition KEEPING LOGICAL UNIT OF WORK --> Call function function_name destination dname keeping local unit of work

0 Kudos

Hello Manish,

I have a scenario where i need to move data from BW to ECC using Cursor and RFC call FM.

have tried your suggestion but still the cursor is getting closed and on the second iteration getting error.

Could you pls elaborate how to write the code with example.

thanks in advance.