cancel
Showing results for 
Search instead for 
Did you mean: 

How update Retrieve(ORTI) use sdk

Former Member
0 Kudos

Good day, i need help.I learned help, but did not understand how i can update the data in this table using SDK.

Accepted Solutions (0)

Answers (2)

Answers (2)

edy_simon
Active Contributor

Hi Pavel,

Use the AssetDocumentService to access this object

        Dim oCS As SAPbobsCOM.CompanyService = oCompany.GetCompanyService
        Dim oAS As SAPbobsCOM.AssetDocumentService = oCS.GetBusinessService(ServiceTypes.AssetRetirementService)
        Dim oAssetDoc As SAPbobsCOM.AssetDocument = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocument)
        Dim oAssetDocParm As SAPbobsCOM.AssetDocumentParams = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocumentParams)
        Dim oAssetLine As SAPbobsCOM.AssetDocumentLine = Nothing


        'Create a New Asset
        oAssetDoc = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocument)
        oAssetDoc.DocumentType = AssetDocumentTypeEnum.adtScrapping
        oAssetLine = oAssetDoc.AssetDocumentLineCollection.Add
        oAssetLine.AssetNumber = "MyAsset"
        oAssetLine.Quantity = 1
        oAssetDocParm = oAS.Add(oAssetDoc)


        'Get an existing AssetDoc 18 to update
oAssetDocParm As SAPbobsCOM.AssetDocumentParams = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocumentParams)<br>oAssetDocParm.Code
        oAssetDocParm.Code = 18
        oAssetDoc = oAS.Get(oAssetDocParm)
        oAssetDoc.Reference = "Test"

        oAS.Update(oAssetDoc)


Regards
Edy

edy_simon
Active Contributor
0 Kudos

Note that you use ServiceTypes.AssetRetirementService

Dim oAS As SAPbobsCOM.AssetDocumentService = oCS.GetBusinessService(ServiceTypes.AssetRetirementService)
Former Member
0 Kudos

Thank you, long sought

Former Member
0 Kudos

Do you know the case, can I have how to add record to an existing document (RTI2- field TransactionNumber(read only) )? maybe any solution?

ps. i neet to add in this table data user JE.

edy_simon
Active Contributor
0 Kudos

I dont think RTI2 can be added manually.
Those are the JE posted by SAP to dispose of the value of your asset by Depreciation Area.
You can manually create another JE and update your JE TransID to your own UDF in this document.

Former Member
0 Kudos

Thanks. I look for other options.

former_member185682
Active Contributor
0 Kudos

Hi Pavel,

I believe there is no object exposed for this table on the DI API.

Kind Regards,

Diego Lother