Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Re: Error when crediting an Invoice

$
0
0

Hi Greg,

Does this happens to all the invoices you are trying to credit ?

Since I have never used 2004, I can not say the difference from 2004-9.0

I can confirm though that the usage is not changed from 2005-9.1

 

One thing I can spot in your code is you are looping the Invoice Lines index and feed the index to

sapCredit.Lines.BaseLine = ii;


Note that the BaseLine should be the LineNum of the Invoice.


Can you try changing your code a little bit

for (int ii = 0; ii < sapInvoice.Lines.Count; ii++)

{

     sapInvoice.Lines.SetCurrentLine(ii);

    if ( ii > 0)

        sapCredit.Lines.Add();

    sapCredit.Lines.BaseEntry = sapInvoice.DocEntry;

    sapCredit.Lines.BaseLine = sapInvoice.Lines.LineNum;

    sapCredit.Lines.BaseType = (int)SAPbobsCOM.BoObjectTypes.oInvoices;

}

 

sapCredit.Lines.Add();      //Remove this line



Regards

Edy





Viewing all articles
Browse latest Browse all 8644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>