Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers