Hi,
I'm trying to add new invoice using Java Connector:
IDocuments invoice =
SBOCOMUtil.newDocument(context.getCompany(), SBOCOMConstants.BoObjectTypes_Document_oInvoices);
invoice.setCardCode("D00001");
invoice.setDocDate(new Date());
invoice.setDocDueDate(new Date());
invoice.getLines().add();
invoice.getLines().setItemCode("0101009");
invoice.getLines().setQuantity(new Double(2.0));
invoice.getLines().setPrice(new Double(2.0));
int result = invoice.add();
and I get an exception:
com.sap.smb.sbo.wrapper.com.ComFailException: A COM exception has been encountered:
At Invoke of: Add
Description: Serwer wywolal wyjatek. (Server threw an exception)
at com.sap.smb.sbo.wrapper.com.Dispatch.invokev(Native Method)
at com.sap.smb.sbo.wrapper.com.Dispatch.invokev(Unknown Source)
at com.sap.smb.sbo.wrapper.com.Dispatch.callN(Unknown Source)
at com.sap.smb.sbo.wrapper.com.Dispatch.call(Unknown Source)
at com.sap.smb.sbo.api.Documents.add(Unknown Source)
Can anyone help me?
Thanks in advance
Marek Roszatycki