Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Crear oInvoices con Lines.AccountCode - Error: No matching records found [inv1.accCode]

Estimados, al momento de crear una factura y ponerle en la linea 'AccountCode' me aparece el siguiente error "No matching records found [inv1.accCode]".

he leído y al parecer este error es porque falta un dato, la verdad he probado llenando toda la linea pero aun no funciona.

Tal vez sea un error tonto pero realmente no logro encontrar el problema. Si alguien agradecería mucho su ayuda.

saludos

Muchas gracias

facturaPuc = (SAPbobsCOM.Documents)oDictucSA.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);

                facturaPuc.DocumentSubType = SAPbobsCOM.BoDocumentSubType.bod_InvoiceExempt;

               facturaPuc.PaymentGroupCode = 9;

                facturaPuc.Series = 0;

               facturaPuc.HandWritten = 0;

               facturaPuc.DocDate = System.DateTime.Today;

                facturaPuc.CardCode = "8962951-C0000";   ///*"8962951-C0000"*/ /*(string)rdrOFEPUC["cardCode"]/*"8962951-C0000"*/;

                facturaPuc.DocTotal = 20000;

               facturaPuc.VatPercent = 0.19;

                facturaPuc.DocCurrency = "$";

                facturaPuc.BPChannelCode = "";

                facturaPuc.ControlAccount = "";

              

                facturaPuc.Lines.DiscountPercent = 0;

                facturaPuc.Lines.AccountCode = "14131211"; /*al poner este dato es donde aparece el error :O*/

                facturaPuc.Lines.ItemCode = "002";

                facturaPuc.Lines.ItemDescription = "TEST";

                facturaPuc.Lines.PriceAfterVAT = 18000;

                facturaPuc.Lines.Quantity = 1;

                facturaPuc.Indicator = "32";

                facturaPuc.Lines.GrossProfitTotalBasePrice = 18000;

                facturaPuc.Lines.Price = 20000;

                facturaPuc.Lines.WarehouseCode = "01";

                facturaPuc.Lines.TaxCode = "IVA_EXE";

                facturaPuc.Lines.CommisionPercent = 0;

                facturaPuc.Lines.Rate = 0;

              // facturaPuc.Lines.DiscountPercent = 0;

                facturaPuc.Lines.TaxPercentagePerRow = 0;

                //facturaPuc.Lines.UoMCode = "Manual";

                //facturaPuc.Lines.SupplierCatNum = "002";

                //facturaPuc.Lines.PriceAfterVAT = 18000;

                facturaPuc.Lines.Currency = "$";

                //facturaPuc.Lines.CreditOriginCode = "000";

                //facturaPuc.CardCode = "TEST";

                //facturaPuc.Lines.Add();

               IF(facturaPuc.Add() != 0)

                {

                    Console.WriteLine(oDictucSA.GetLastErrorDescription());

                }

                else

                {

                    Console.WriteLine("OC numero " + oDictucSA.GetNewObjectKey().ToString() + " creada.");

                }

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question