2009 Mar 20 8:53 AM
Hi,
I am generating a report to create the equipments for both material and WBS BOM.
Once i created the equipments, i am trying to assign the Functional location and SuperiorEquipment for those equipments.
By using the following BAPI's
BAPI_EQMT_INSTALLFL - For functional location
BAPI_EQMT_INSTALLHR - Superior Equipments.
But when i cehcked in tcode IE03 after executing this BAPI's, i am not getting the functional location or superior equipment for all the equipments.
But in debugging mode, i am getting everything correctly.
I think this is the time delay issue and i tried with WAIT command also. Then also i am facing the same problem.
But sometimes i am getting the correct data.
Can anyone help me out on this.
Do i need to free the buffer after BAPI. If so, please tell me how to do that?
Thanks
Prabu
2009 Mar 20 9:39 AM
You should use commit command whenever any changes is being made to databse.
BAPIs for Controlling COMMIT and ROLLBACK
The transaction model (see Transaction Model for Developing BAPIs) stipulates that every BAPI which creates object instances or changes object data is responsible for database consistency.
The commands used to commit changes to the database or to reset changes (COMMIT and ROLLBACK), must not be executed by the BAPI itself, they have to be called directly from the external application program.
External programs can use the following service BAPIs for these calls:
u2022 BapiService.TransactionCommit
This method executes a COMMIT WORK command. When you call BAPIs in your program that change data in the R/3 System, you must then call this method to pass the changes to the database.
u2022 BapiService.TransactionRollback
This method executes a ROLLBACK WORK command. When you call BAPIs in your program that change data in the R/3 System, afterwards you must call this method to pass the changes to the database. This works provided that the BAPI BapiService.TransactionCommit has not already passed the changes to the database.
2009 Mar 20 9:41 AM
2009 May 21 12:51 PM