‎2007 Aug 15 10:28 PM
Hello Everyone
Iam using a BAPI to create a data in CRM inside a method. And i get an error when i use the BAPI_COMMIT inside the method. Its give me an error even if u use just COMMIT WORK.
Any solutions pls?
Thanks,
Suri
‎2007 Aug 15 10:31 PM
Hello,
Could you post the message error.
What happens if you DONT use commit?
Bye
Gabriel
‎2007 Aug 15 10:38 PM
‎2007 Aug 15 11:21 PM
Let me describe in detail.
My friend is facing this issue exactly.
He is using a BAPI to create Businee Partner, actually the commit works. When we use the COMMIT after the BAPI it creates the Businees Partner and updates the BUT000 table.
Now the BUT000 has two custom fields called ZFEIN and ZSSN. After the commit of the BAPI we capture the Business partner and update the BUT000 table with new ZFEIN and ZSSN value. And this does not work i.e it does not update the custom fields of the BUT000 table.
Sorry for posting the query wrong previously.
THanks,
Suri
‎2007 Aug 16 3:26 PM
Make sure that the create process is completed before you do an update. Put a break point at your update statement and check if an entry exists for the newly created business partner in the table BUT000. If it exists then, maybe you have to do an conversion exit (alpha) on the business partner number before the update process.
‎2007 Aug 17 8:00 PM
If the update to BUT000 is after the commit to the BAPI, you may have to do a separate commit for that later update unless an action or event occurs that causes an implicit database commit.
You may need to execute
COMMIT WORK.
or call function module DB_COMMIT.
Keep in mind that a database commit closes all open database cursors, which would affect an open select loops or OPEN CURSOR statements.
Good luck
Brian
‎2007 Aug 20 9:55 PM
Brian ,
When i use either of the below commit statements inside the BADI implementation method IF_EX_EXEC_METHODCALL_PPF~EXECUTE ,
COMMIT WORK
BAPI_TRANSACTION_COMMIT
DB_COMMIT
I get an pop-up error message reading "Adminstration Header For (GUID) not found".
We need a COMMIT WORK statement inside the implementation to update the Custom Fields of BUT000 table after the creation of the Business Partner using the standard BAPI "BAPI_BUPA_CREATE_FROM_DATA"
Please suggest if there is any work around to update the custom fields in BUT000 table.
Thanks,
Suri
‎2007 Aug 20 10:40 PM
‎2007 Aug 17 12:49 AM
Hi Suri,
most BAPI's do a test for a flag and if it is set they will perform a commit. This allows you to use the debugger to set this flag on so that the BAPI will perform the commit. This then means you can check to see if the BAPI is actually doing what you wanted it to.
Perhaps the BAPI is getting an error of some kind which would explain why the db changes are not saved.
Cheers
Graham