on 02-11-2015 2:05 PM
Hi,
I am trying to add AR Invoice using DI API, which have Batch and Freight in the Line in INV1.
I attached the Code I am using for DI API.
I am getting an Error while adding the DI API
Invoice Not Add : Internal error (-5002) occurred [الرسالة 131-183]
Please Help me with this, I serched this in SCN, but didnt get any solution.
Thnank You
Hi Vibin,
5002 normally means something is wrong with your data. From what I see you are adding always an empty line for every line object:
Add a new line in the beginning - BUT only if it is not the first element ( this already exists ).
for (int i = 0; i < 10; i++)
{
if (i > 0)
oInvoice.Lines.Add();
oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders;
oInvoice.Lines.BaseEntry = strDocEntry
oInvoice.Lines.BaseLine = oRecodSet_2.Fields.Item("LineNum").Value;
....
}
I don't think this is your problem here but could be .
Apart from that a minimal error reconstruction in DemoDB would make it much easier to help you. Also before adding the document use SaveToFile to see get the BO XML data -> add the same data in SBO client, get the XML of that document and compare.
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please check on the following SAP B1 SDK samples.
C:\Program Files\SAP\SAP Business One SDK\Samples\COM DI\VB.NET\05.OrderAndInvoice
Thanks & Regards,
Alvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
111 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.