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

COMMIT WORK AND WAIT does not work

Former Member
0 Likes
1,560

Hi Guys,

I have this code below... but it seems that the commit work and wait in bapi_transaction_commit FM does not work... because sometimes the db updates sometimes not... though no error is generated...

note that during debug mode,,, everythings fine, update to database is complete... the inconsistency only occurs during the normal run of program...

Thanks a lot!

CALL FUNCTION 'BAPI_PROCORD_COMPLETE_TECH'

IMPORTING

return = i_messages

TABLES

orders = i_orders.

IF i_messages-type NE c_error.

REFRESH i_messages3.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

IMPORTING

return = i_messages3.

ENDIF.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,266

Hi Mark,

Try with COMMIT WORK AND WAIT 10 SECONDS

or try to increase the seconds if it still doesn't work.

Regards,

Atish

7 REPLIES 7
Read only

Former Member
0 Likes
1,267

Hi Mark,

Try with COMMIT WORK AND WAIT 10 SECONDS

or try to increase the seconds if it still doesn't work.

Regards,

Atish

Read only

0 Likes
1,266

Hi Atish,

Thanks a lot!

I've implemented a wait up to 60 seconds and it works fine but the problem now is that the performance of the program... it runs very slow...

Is there an alternative way to synchronously update the Db without the wait up to 60 seconds addition?

Thanks a lot for all the help... its highly appreciated...

Rgds,

Mark

Read only

0 Likes
1,266

Hi Mark,

Don't put time like 60 seconds.

5- 10 seconds is sufficient time for DB to store it. Don't think there is any other way to do this.

Regards,

Atish

Read only

0 Likes
1,266

HI Atish,,

Really appreciate your quick response...

But i've put 30 seconds and the problem still persist so i tried 60 and it works fine...

my problem now is how to explain the slowness of the performance of the program sicne there is no other option but to use the wait up to...

Thanks a lot!

Read only

0 Likes
1,266

Hi Mark,

Is it a online program or the batch program. If it is still not working with 30 seconds then you have to increase the time and mention that cleary to the end users about the performance.

Regards,

Atish

Read only

0 Likes
1,266

Hi Atish...

Thanks so much...

It is an online program... So I guess,,, I really need to make it clear to the end users...

Thanks a lot!

Read only

Former Member
0 Likes
1,266

Reward points..