Skip to Content
0

How update Retrieve(ORTI) use sdk

Dec 20, 2016 at 11:51 AM

52

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Edy Simon Dec 21, 2016 at 02:12 AM
2

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

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

Note that you use ServiceTypes.AssetRetirementService

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

Thank you, long sought

0

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.

0

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.

0

Thanks. I look for other options.

0
DIEGO LOTHER Dec 20, 2016 at 04:09 PM
0

Hi Pavel,

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

Kind Regards,

Diego Lother

Share
10 |10000 characters needed characters left characters exceeded