cancel
Showing results for 
Search instead for 
Did you mean: 

Existing Assets Update Using DI API

0 Kudos

Hello Experts,

I am trying to update existing assets via DI API. I have attached a picture with the fields(circled in red) which I need to Update. Could you please help?

Thanks in advance,

Nikolas

Accepted Solutions (0)

Answers (2)

Answers (2)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Nikolas Kanellopoulos,

Depreciation Type can be updated as below:

SAPbobsCOM.Items oItem = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
oItem.GetByKey("TEST1234");
oItem.DepreciationParameters.SetCurrentLine(1);
oItem.DepreciationParameters.DepreciationType = "MV_DB";
int Update = oItem.Update();

However, I am not sure whether you are trying to update the "Fiscal Year" field or "Depreciation Area" field.

If it is "Fiscal Year", I am not able to understand in which scenario you would like to update this field. Since it is only showing the data in a specific year for an asset.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0 Kudos

Hi Ankit,

Thanks for your reply ! I would like to ask for something else. We have the following scenario:

I would like to change the depreciation type of the assets for just 2017.

How is this possible through DI API?

Thanks in advance,

Nikolas

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Nikolas Kanellopoulos,

Check whether it helps you or not?

SAPbobsCOM.Items oItem = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
oItem.GetByKey("TestAsset");
oItem.DepreciationParameters.SetCurrentLine(0);
oItem.DepreciationParameters.FiscalYear = "FY1718";
oItem.DepreciationParameters.DepreciationType = "SMLITY";
int Update = oItem.Update();

Kind regards,

ANKIT CHAUHAN

SAP SME Support

KennedyT21
Active Contributor
0 Kudos

Hi Nikolas Kanellopoulos

Have you tried with the Changing or Closing Fiscal Year https://help.sap.com/saphelp_sbo882ao/helpdata/en/9c/3cd5318495466faf7b8954f2ea33dc/frameset.htm

Regards

Kennedy

0 Kudos

Hello Kennedy T,

Thanks for your reply. However I need to create a DI-Addon that performs the changes mentioned above. Do you know where I can find code samples about this specific topic?

Regards

Nikolas