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

Problem with created assets via BAPI without COMMIT

Former Member
0 Likes
1,613

Hello,

I have created few assets using BAPI_FIXEDASSET_OVRTAKE_CREATE, but I didn't know that I need to call BAPI_TRANSACTION_COMMIT before every asset creation.

Now my code is running ok but I have a problem with the assets created when I forgot the commit instruction. The asset's aren't in the database but they are "somewhere" because I can't use the id's that of those assets aren't available.

How can I commit the work to get the assets fisically to the database??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
922

This is unfortunately a side effect of using number ranges (which I assume asset creation does). Even if the bapi does not do a commit, the number assigned has been used and you cannot use it again.

The asset in fact does not exist anywhere.

Rob

4 REPLIES 4
Read only

Former Member
0 Likes
922

up... I will reward!!!

Read only

0 Likes
922

If you r running BAPI through tcode BAPI or from SE37 then you will have to run BAPI_TRANSACTION_COMMIT FUNCTION as below.

display function and

GO TO Function module ->Test->Test Sequences

enter your BAPI function in first line and in second line enter

BAPI_TRANSACTION_COMMIT FUNCTION

after executing this you will get data in table.

Read only

Former Member
0 Likes
922

hi buddy ..

techinically if u dont commit and exit the transaction the default action is rollback... this mean none of the information has touch the database..

But the is a possability that such update program may exist in transaction SM13.. there you will find pending update program..

on first screen enter client and the user name of the person who run the transaction ..

No Points Plz

Read only

Former Member
0 Likes
923

This is unfortunately a side effect of using number ranges (which I assume asset creation does). Even if the bapi does not do a commit, the number assigned has been used and you cannot use it again.

The asset in fact does not exist anywhere.

Rob