Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Adding Depreciation term for asset master using BAPI_FIXEDASSET_CHANGE?

Hi Experts,

I am using bapi bapi_fixedasset_change to upload the excel data to add an interval at depreciation tab in AS02 transaction. (To stop depreciation for an asset master.)

My excel file contain structure as,(Asset number, comapny code, Depreciation are, Depreciation key, From date).

But using above bapi , i am able to change existing depreciation term , its not adding new depreciation term . My requirement is to add new interval below the existing interval.

Below is the code for bapi i had used.

  lwa_da-area = gwa_stop_asset-afabe.  " Depreciation area

lwa_da-dep_key = gwa_stop_asset-afasl. " Dep.key

APPEND lwa_da TO lt_da.

CLEAR lwa_da.

lwa_dax-area = gwa_stop_asset-afabe.

lwa_dax-dep_key = 'X'.

APPEND lwa_dax TO lt_dax.

CLEAR lwa_dax.

lwa_timedepdata-from_date = gwa_stop_asset-adatu. " From date

lwa_timedepdatax-from_date = 'X'.

CALL FUNCTION 'BAPI_FIXEDASSET_CHANGE'

EXPORTING

companycode      =  gwa_stop_asset-bukrs

asset                   = gwa_stop_asset-anln1

subnumber          = '0000'

timedependentdata          = lwa_timedepdata

timedependentdatax         = lwa_timedepdatax

IMPORTING

return = lwa_return

TABLES

depreciationareas          = lt_da

depreciationareasx         = lt_dax

* investment_support         =

* EXTENSIONIN =

.

IF sy-subrc = 0 AND lwa_return-type NE 'E'.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

* EXPORTING

* WAIT          = 'X'

* IMPORTING

* RETURN        =


Please help me how to insert new interval as depreciation term for as asset using above bapi.


Thanks

Siva

Former Member
Not what you were looking for? View more on this topic or Ask a question