I am developing a report Sales Invoice wise details with the data item “Item Ledger Entry” and have filtered entry type ‘Sale’.
Document No and External Document No of ILE are the Shipment No and PO No respectively. Now i have to put a field Invoice Number. Please suggest, how/where can i get it ?
Why you are using Item Ledger entry table for sales invoice details .You can user Sales invoice header and sales invoice line table for extracting the data. In these tables you will get the details including Invoice nO.
As a general rule of thump then you should never use the Sales Invoice Header or Line tables for anything, but to print out the invoice document. Always use the Item Ledger Entry, Value Entries or Cust. Ledger Entries. The reason is that the user can manually delete the Sales Invoice Header/Lines as soon as they have been printed at least once. And if that happens then the basic for your statistics (or in this case lookup) will fail to work.
FYI only. All companies run a bit differently but it may or may not work for you.
But we have two type of orders Regular & internet. So for our internet orders (1x ship & bill no backorders) the buyer gets a reference number upon purchase. When we import the order we populate this reference no. as the “order no”. BUT we also populate the “posting no.” & “shipping no” with the same values so it all matches. When this type of processing happens you will also notice the DOC no in the ILE’s now have the invoice# populating that field.
"If the entry was posted from a sales or purchase order, invoice or credit memo, the program automatically assigned the entry a number from the number series in thePosting No. Seriesfield on the sales or purchase header. If the Posting No. Series field was empty, the document number was copied from theNo.field on the posted sales or purchase document."
Basically there are ways to control what number appears in the “document no” in the ILE table.