javainvoicesapb1sap-business-one-di-apir6025

Error R6025 on add Line on Invoice Document - SAP DiApi


While integrating invoices into SAP in my Java application on Windows, I am having the following error "R6025 - Pure virtual function call". However, my application runs on multiple clients in a single version and I have no problems with any of the clients, just this specific one!

During testing with the application in the client environment, I noticed that the error always happens when using the "add" to add the first line in the invoice.

invoiceV1.getLines().add(); // The error happens here!
System.out.println("THIS LINE NOT APPEARS ON CMD");
invoiceV1.getLines().setCurrentLine(lineNum);

............ SETTING LINE VALUES ..........

lineNum++;

Solution

  • As far as i know, you don't need to set the .add() on the first line. Try to put an if just to check if it is the first line or not.

    If that doesn't work, you could consider an enviroment error? Or some instalattion problem?