Skip to Content
avatar image
Former Member

Internal Error - Draft to Invoice

Dear Experts,

Am trying to update Draft Document to Invoice . But am getting "Internal Error(-10)".

Here with I have attached Screenshot of my Draft Document and Source code for the same.

Kindly help us to Solve.

Am trying to change Warehouse code and UseBaseUnits in Draft, before converting to Invoice.

Dim ODrafts As SAPbobsCOM.Documents

ODrafts = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts)

If ODrafts.GetByKey(objRecset.Fields.Item("DocEntry").Value) = True Then


For i = 0 To ODrafts.Lines.Count - 1


      ODrafts.Lines.WarehouseCode = StrBranchCode

       ODrafts.Lines.UseBaseUnits = SAPbobsCOM.BoYesNoEnum.tNO



Retcode = ODrafts.Update()

Thanks in Adcance.



Draft_Invoice.JPG (56.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 26, 2015 at 08:33 AM

    Hi Senthil,

    internal erro -10 usually means that something was not found. Since you are only changing the warehouse I would double check what value StrBranchCode has ( and try it in client aswell ). Also check if there is a base unit defined in the items.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Maik Delly

      Dear Maik,

      Basically I have to change "UseBaseUnits" for BOM (sale bom) child items. SAP does not give option to change this in Client level. Only possible in DI API.



  • avatar image
    Former Member
    Oct 26, 2015 at 10:11 PM

    Have you tried when you removed this line? ODrafts.Lines.UseBaseUnits = SAPbobsCOM.BoYesNoEnum.tNO




    Add comment
    10|10000 characters needed characters exceeded