By the way, I've seen
sapInvoice.Close();
sapOrder.Close();
invoiceDoc.Close();
in your code. After you add are you trying to close the document? Just leave it blank, DI API will automatically clean the session.
Try to remove them.
By the way, I've seen
sapInvoice.Close();
sapOrder.Close();
invoiceDoc.Close();
in your code. After you add are you trying to close the document? Just leave it blank, DI API will automatically clean the session.
Try to remove them.