cancel
Showing results for 
Search instead for 
Did you mean: 

Error -5002 : 540000155 - XML document does not conform to schema

morozco
Explorer

Hi Experts!

When try to cancel Electronic Invoice by DI-API, i has this error:

ErrorCode; -5002 and Description: 540000155 - XML document does not conform to schema; contact format provider for support.

My code is:

SAPbobsCOM.Documents oDOC = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);

 oDOC.GetByKey(850); 

SAPbobsCOM.Documents oCancelDocument = oDOC.CreateCancellationDocument();

 oCancelDocument.DocDate = new DateTime(2019, 2, 12);
 
 oCancelDocument.EDocGenerationType = SAPbobsCOM.EDocGenerationTypeEnum.edocNotRelevant;
 
 
int iRet = oCancelDocument.Add();
if (0 == iRet)
 {
         Console.WriteLine("Invoice Canceled DocNum: {0}  ", oDOC.DocNum);
}
 else
 {
       Console.WriteLine("Error Cancell process: ErorCode: {0} . ErrorDescription: {1} ", oCompany.GetLastErrorCode().ToString(),oCompany.GetLastErrorDescription().ToString());
 }

I use Elctronic Invoice for Mexico.
SAPbobsCOM DI API Version 9.0.0.0

SAP Version 9.2 PL 10 HF 2

Any one knows this issue?

Thanks and Regards
Miguel

Accepted Solutions (0)

Answers (1)

Answers (1)

morozco
Explorer

This issue is resolved in version 9.3 PL09