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

Update Function module on commit work

Former Member
0 Likes
1,859

Hi Experts,

I have used the bundling technique using function modules to insert the data in the database table.To be more precise, I am using an update function module to insert the data in the DB table and calling the Commit work as soon as after calling the update function module.Also, i am using the select query to pull the data that i have saved and to display it on the screen.

But, some times although the data is saved the DB upon commit, the select query is failing to pull the same data.

I am not understanding what is happening.

Example Code.

call update function module

commit work.

select on the db table with the data saved  ( at this point , some times select is failing i.e sy-subrc <> 0 )

display the result using ALV.

Thank in advance,

Ravi.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
716

Since you're not using local updates (SET UPDATE TASK LOCAL), using COMMIT WORK leads to an asynchronous update.

Since as per your requirement you need to have a synchronous update you've to use COMMIT WORK AND WAIT.

BR,

Suhas

2 REPLIES 2
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
717

Since you're not using local updates (SET UPDATE TASK LOCAL), using COMMIT WORK leads to an asynchronous update.

Since as per your requirement you need to have a synchronous update you've to use COMMIT WORK AND WAIT.

BR,

Suhas

Read only

Former Member
0 Likes
716

Hi Ravi,

Please use FM: CONVERSION_EXIT_ALPHA_INPUT for all the key fields before saving into DB.

Regards/Ali