Skip to Content
avatar image
Former Member

update GrossBuyPr in RDR1

Hi experts,

can i update GrossBuyPr from DI api? i am trying to find a way to update the field to get the right GrssProfit. So i can do it directly from sap but it is not updating when i'm doing it from the DI api? do you have any sugestions?

Best regards,

Suierica Bogdan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 28, 2017 at 01:57 PM

    Hi,

    Can you try this?

    Dim oCreditNote As SAPbobsCOM.Documents 
    oCreditNote = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes) 
    oCreditNote.DocObjectCode = SAPbobsCOM.BoObjectTypes.oCreditNotes 
    oCreditNote.GetByKey(11)
    oCreditNote.Lines.SetCurrentLine(0) 
    oCreditNote.Lines.GrossBase = -5 
    oCreditNote.Lines.GrossBuyPrice = 140
    RetVal = oCreditNote.Update() 
    
    If RetVal <> 0 Then 
    oCompany.GetLastError(lErrCode, ErrorMSG) 
    MessageBox.Show(lErrCode & " " & ErrorMSG)
    

    Kind regards,

    ANKIT CHAUHAN

    SAP SME Support

    Add comment
    10|10000 characters needed characters exceeded