Skip to Content

Existing Assets Update Using DI API

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 30 at 06:01 AM

    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

    Add comment
    10|10000 characters needed 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

  • May 02 at 10:29 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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