I have a query, i want to know how many purchase order are used to make single sales order. in NAV 2009 SP1, is there specfic feild from where i can count the number of purchase order, actully i have to make a report regarding this, how many Purchase order are associate with single sales order.
I assume that you are talking about a sales order that is already shipped (not/and invoiced). If positive, then I believe you could use the below tables:
110: Sales Shipment Header
32: Item Ledger Enteries
on tabel 110 filter on Order No. = to get the SS# (Sales Shipment No), then:
on tabel 32, filter on Document No. = <the SS# above> and read/count distinctly the LOT No.
jay my question is this , suppose i made single sales order(which is ship and invoiced) how many puchase oder has been used. i have to find out the list of the purchase order.
for eg:- SO/1213/001 - this is my sales order
and PO/1213/001 and PO/1213/002 are two different PO which i have use to make this Sales order by using Special order functionality.
Now if i go to sales line table i can find out these two PO(here it will according to item wise ) , so the PO number will be repeated, is there any feild in Sales line which make identify that this is the starting of the PO number, or any table which give idea that this is the so has link to that PO .
yes mohan i understand the concept which u are telling.
here i have write this code.
int= 0;
grecSalesLine.SETRANGE(grecSalesLine.“Document Type”,grecSalesLine.“Document Type”::Order);
grecSalesLine.SETRANGE(grecSalesLine.“Document No.”,grecSalesLine.“Document No.”);
IF grecSalesLine.FINDSET THEN
REPEAT BEGIN
ponumber := grecSalesLine.“Special Order Purchase No.”;
int := int +1 ;
if int = 1 then
if ponumber1<> ponumber then
ponumber1= ponumber;
UNTIL grecSalesLine.NEXT = 0;
END;
can you just give me little idea in this code where i can compare the previous value and the present value.
You can try using “Item Application Entry” table. you will get the details there what you want. from this table you can trace the purchase orders used for a single item doesn’t matter how many they are. Let me also tell you that using this table is somewhat more logical and difficult but you will surely find the solution from this table.