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

Open Dataset, Update in Update Task and DB_COMMIT

dean_hinson2
Active Contributor
0 Likes
5,662

Hello,

To increase the performance of a scan and update, I switched to the OPEN DATASET and FETCH with Package Size.

The update happens in an Update Task and then I use FM DB_COMMIT. However, I find the updates are not happening. After debugging, I find that the updates must not in done in Update Task.

I did some googling and I could not find any answers on why? Does anyone have a clue?

Regards, Dean.

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
5,596

Typo: it's not OPEN DATASET, it's OPEN CURSOR.

Read only

0 Likes
5,558

You are correct. My muli-tasking failed.

Read only

Sandra_Rossi
Active Contributor
5,595

So, you are updating the table via an update function module that you call with CALL FUNCTION '...' IN UPDATE TASK.

You must trigger the update task via COMMIT WORK.

NB: the update task is not triggered by using CALL FUNCTION 'DB_COMMIT' (i.e. executes a database commit) which is only sending a commit instruction to the database.

Read the ABAP Documentation which explains that COMMIT WORK does many things, the 3rd step being the update task, the 5th step being the database commit (https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapcommit.htm).

Read only

0 Likes
5,558

Will do.... Thank you.