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 is not happening properly sometimes....

Former Member
0 Likes
747

Hi All,

I am using the standard BAPI 'BAPI_DELIVERYPROCESSING_EXEC' in one of my code and this BAPI is called in LOOP of some internal table.

After the BAPI call return table is checked and if no error comes 'BAPI_TRANSACTION_COMMIT' (with wait = 'X') is used to commit.

My problem is that sometimes in production the Delivery is created and sometimes it is not created, and BAPI does not return any error.

So after the 'BAPI_TRANSACTION_COMMIT' another WAIT UP TO 2 SECONDs has been written and then it works perfectly, we monitored this for quite some times and we did not get any error. But again we removed the explicit WAIT statement and we saw some of the Deliveries are not created.

Now my internal table is becoming big in size there by putting WAIT for 2 Seconds is creating the performance issues, it is taking lot of time to complete the process.

Is there any way by which I can get rid of explicit statement.

Hi All,

I am using the standard BAPI 'BAPI_DELIVERYPROCESSING_EXEC' in one of my code and this BAPI is called in LOOP of some internal table.

After the BAPI call return table is checked and if no error comes 'BAPI_TRANSACTION_COMMIT' (with wait = 'X') is used to commit.

My problem is that sometimes in production the Delivery is created and sometimes it is not created, and BAPI does not return any error.

So after the 'BAPI_TRANSACTION_COMMIT' another WAIT UP TO 2 SECONDs has been written and then it works perfectly, we monitored this for quite some times and we did not get any error. But again we removed the explicit WAIT statement and we saw some of the Deliveries are not created.

Now my internal table is becoming big in size there by putting WAIT for 2 Seconds is creating the performance issues, it is taking lot of time to complete the process.

Is there any way by which I can get rid of explicit statement.

3 REPLIES 3
Read only

Former Member
0 Likes
681

I ran into this same problem before when calling a bapi. The solution that I found that worked was to insert this statement immediately before calling the bapi.

SET UPDATE TASK LOCAL.

That way you can eliminate the WAIT statement.

Regards,

Brenda

Read only

0 Likes
681

I have tried that also but it also failed sometimes.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
681

Try with RV_DELIVERY_CREATE instead