Skip to Content
0

Existing Assets Update Using DI API

Apr 29 at 01:57 PM

51

avatar image

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

assetfields.png (52.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Kennedy T Apr 30 at 06:01 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
ANKIT CHAUHAN
May 02 at 10:29 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0

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

0