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 problems after commit

Former Member
0 Likes
485

Hi all,

I am using the functional module BAPI_PROCORDCONF_CANCEL for cancelling the confirmation order.After that if it is successfull i am comminting using

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = c_x.

after this immediately checking in AFWL table for the cancelled confiramtion order. Select statement is returning sy-subrc - 4.since entry is not found in the table.suppose if use wait up to 5 seconds after callling bapi_transaction commit.entry is found in the table AFWL.By this it is understood its taking time to update in the table.I want to avoid this wait statement is there any alternate way ( Avoiding DO and ENDDO ).Can any body guide me on this.

Thanks in advance.

Siva

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
427

Hi Siva,

In your case it makes sense to use the wait flag as 'X', as this marks it as a synchronous update(while a blank signifies an asynchronous update - read the documentation on this).

I guess you can try to set the update task as local using statement "SET UPDATE TASK LOCAL" before the FM call, so that the update is done by the same work process.

Also i don't see a table AFWL in my system, is the table name correct - anyways check if the table is buffered by any chance(i am sure that it is not).

In case if there is any other pending tasks in your programs flow, which can be executed between "COMMIT" and "SELECT" i would suggest that you do this here.

Failing all of the above, you might have to go with a DO ENDO.

Regards,

Chen

Edited by: Chen K V on Apr 14, 2011 11:07 AM

2 REPLIES 2
Read only

Former Member
0 Likes
427

Directly use COMMIT WORK.

or if u want to use BAPI_TRANSACTION_COMMIT then do NOT pass WAIT . By default Wait should be blank.

With Regards,

Raju

Read only

Former Member
0 Likes
428

Hi Siva,

In your case it makes sense to use the wait flag as 'X', as this marks it as a synchronous update(while a blank signifies an asynchronous update - read the documentation on this).

I guess you can try to set the update task as local using statement "SET UPDATE TASK LOCAL" before the FM call, so that the update is done by the same work process.

Also i don't see a table AFWL in my system, is the table name correct - anyways check if the table is buffered by any chance(i am sure that it is not).

In case if there is any other pending tasks in your programs flow, which can be executed between "COMMIT" and "SELECT" i would suggest that you do this here.

Failing all of the above, you might have to go with a DO ENDO.

Regards,

Chen

Edited by: Chen K V on Apr 14, 2011 11:07 AM