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

FM

Former Member
0 Likes
804

hi expert,

when i used this function

module- BAPI_FIXEDASSET_CHANGE

it shows that data has been changed but when i saw in the DB table

its not chang, can you tell me why?

vijay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
773

Also one thing more to add to this... use it this way....

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.

In debug, the commmit happens automatically after every F5 and hence it actually works in debug.

Try to commit irrespective of the return structure.

Regards,

Jayant Sahu.

<b>Please reward if helpful</b>

5 REPLIES 5
Read only

Former Member
0 Likes
773

Hi vijay,

1. Since this is a bapi,

2. we have to use this FM

BAPI_TRANSACTION_COMMIT

(after calling your FM)

3. So that data is commited and saved.

(otherwise it won't get saved in database)

regards,

amit m.

Read only

Former Member
0 Likes
773

HI..

u need to call commit when using BAPI

FM :<b>BAPI_TRANSACTION_COMMIT</b>

Message was edited by:

Rammohan Nagam

Read only

Former Member
0 Likes
773

there are several possibilities for that.

- The BAPI might run in Background task and do the changes not instantly.

- when calling the BAPI there could be some update-flag you have to SET to enable the BAPI to really to the changes.

oh lol yeah and you might have forgotten to call the "BAPI_TRANSACTION_COMMIT" which will get the changes written down to the DB.

Message was edited by:

Florian Kemmer

Read only

Former Member
0 Likes
773

Hey Vijay have you used this function module along with that Bapi.

call function 'BAPI_TRANSACTION_COMMIT'

Also if youhave used.. please check the condition in whic you are using it... if the condition you have provided is not true it won't work..

Regards,

Jayant Sahu

<b>Please reward if helpful</b>

Read only

Former Member
0 Likes
774

Also one thing more to add to this... use it this way....

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.

In debug, the commmit happens automatically after every F5 and hence it actually works in debug.

Try to commit irrespective of the return structure.

Regards,

Jayant Sahu.

<b>Please reward if helpful</b>