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: 

Adding Depreciation term for asset master using BAPI_FIXEDASSET_CHANGE?

Former Member
0 Kudos

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

12 REPLIES 12

Former Member
0 Kudos

any help?

0 Kudos

Can you try passing following fields to BAPI1022_DEP_AREAS & DEPRECIATIONAREASX

ULIFE_YRS

ULIFE_PRDS

ODEP_START_DATE

0 Kudos

Hi Mohanty,

Thanks for your reply.

I have tried with above fields also. Even its not working. Its always changing the existing interval for depreciation area. Its not adding new interval for same dep.area with new key.

Please suggest me if any other parameters to be passed .

0 Kudos

Hi

Are you increasing the depreciation area number like if 01 exists then to create a new one you need to input 02.

Are you doing that ?

0 Kudos

Hi

I am not adding the new depreciation area. I just wanted to add new interval for the depreciation area. Please find below screen for the same.

0 Kudos

Hi Guys,

Please help me with any of solution for this. Its urgent for me.

Thanks.

0 Kudos

Hi,

I have not used this BAPI till today but looking at structure, can suggest something to try. Please try using 2 additional parameters FROM_DATE, TO_DATE in BAPI1022_DEP_AREAS and BAPI1022_DEP_AREASX. So i guess you will have 2 lines, one to close existing and second for fresh interval starting on next day.

Thanks,

Ashok Veer

0 Kudos

Hi -

Can you provide the menu path to the screen you provided in AS02. Note : I was referring to a different screen for the same AS02.

0 Kudos

Hi mohanty,

Open any asset in AS02->Depreciation tab->Double click on any of depreciation area(Example 01)->Click on more interval button at bottom->Again click on Add interval button .

Then it will ask From_date, after entering date, one interval will  add to  the depreciation area(01) like shown in screen shot i attached in above reply .

Thanks.

0 Kudos

Hi

Thanks for your reply. In my system, I am able to add interval manually in AS02 on the screen provided above, but data is not getting saved.

However, if you are able to save the new interval in your system manually in AS02 then try with FROM_DATE and TO_DATE in your structure DEPRECIATIONAREAS & DEPRECIATIONAREASX in the BAPI.

0 Kudos

Hi Mohanty,

Just a clarification that, your saying to insert FROM_DATE and TO_DATE in bapi structure DEPRECIATIONAREA and DEPRECIATIONAREAX .

In that case, i tried in your way. But its not allowing to insert and append those fields in BAPI structure. Even i tried with TIMEDEPENDENTDATA-FROM_DATE and TO_DATE. Its no use.

0 Kudos

Siva.

Did you get any solution? If you got, then please let me know.

I am also working on that. But didn't get any solution till now.

Thanks