‎2006 Jun 23 2:02 PM
This is strange and I hope someone can assist me.
I'm calling BAPI BAPI_FIXEDASSET_CHANGE to update the serial number and Inventory number on an asset. Here is the code:
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = companycode
asset = asset
subnumber = subnumber
generaldata = generaldata
generaldatax = generaldatax
importing
return = l_bapiret2.
if l_bapiret2-type ne 'E'.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = l_bapiret2.
else.
call function 'BAPI_TRANSACTION_ROLLBACK'
importing
return = l_bapiret2.
endif.When I am in debug mode the BAPI updates the assets exactly the way it should. But when debugging is switched off the Asset is not updated.
Any assistance in solving this issue would be appreciated.
Regards
Message was edited by: Faaiez Sallie
‎2006 Jun 23 2:09 PM
Hi,
I Think the condition "if l_bapiret2-type ne 'E'." is not correct and hence the commit it not happening.
In debug, the commmit happens automatically after every F5 and hence it is working in debug.
Try to commit irrespective of the return structure.
Regards,
ravi
‎2006 Jun 23 2:09 PM
Hi,
I Think the condition "if l_bapiret2-type ne 'E'." is not correct and hence the commit it not happening.
In debug, the commmit happens automatically after every F5 and hence it is working in debug.
Try to commit irrespective of the return structure.
Regards,
ravi