2014 Nov 18 1:55 AM
Hi Experts,
My requirement is like this i am getting data from an external system and i am mapping that data in the SAP format. I am calling a Function module to update the required tables. In that function module two bapi's are being called for updating two table BP1012 & BP3100.
This functionality is inside a loop and the updation happens for each record.
First BP3100 bapi will be called and then BAPI_TRANSACTION_COMMIT and then BP1012 and BAPI_TRANSACTION_COMMIT.
For BP3100 data is getting updated as expected and for BP1012 COMMIT is not working for multiple iterations or multiple entries.
So i have thought of using BAPI_TRANSACTION_COMMIT outside the loop so that both tables will get updated at a time.
I am not sure whether this works or not. So, i need your help for achieving this and also wanted to know how the BAPI BUFFER will work in general and during this situation.
Waiting for your valuable information.
2014 Nov 18 4:16 AM
Hi Rakesh,
Yes, you can call it outside the loop. I don't think there's any trick involved, just call the FM and it will commit all DB changes.
Cheers,
Custodio
2014 Nov 18 5:36 AM
Hi Custodio,
Thank you very much for your quick response and it is very much helpful.
If you use bapi for creating entries in 4 different tables with n entries each and we will be using transaction commit at the end .... this will also work write.
I just wanted to know how the functionality of BAPI buffer will be.
Could you please help understand in detail.
2014 Nov 18 6:13 AM
Hi,
If the number of entries are more, for better results you can use commit for every 100 records. It will not exhaust the buffer size and it will not degrade the system performance also.