Application Development 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: 

Problem facing in Assignments of functional location to Equipments

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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.

Former Member
0 Kudos

Use Commit work and wait.

Former Member
0 Kudos

solved