How to know how many purchase order are used in single sales order

Hi All,

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.

Regards,

Shailesh

Have you interlinked the Sales order with Purchase order ?

Have you used Special Order functionality of Navision ?

Have you used Applied from Entry /Applied to Entry in Sales order ???

Thanks for the reply.

Yes i am using all three points which you have mention.

form where iam able to get the data of how many purchase order are use for single sales order.

Then from Posted Sales Invoice you can get this data.

Amol can you please tell the table name or table no. and the feild name .

Table no 112 & 113

iam not able find the PO number in this table , can you tell me which feild store this data.

Hi Shaliesh,

You said you have used above all three points then I think you can find out the fields

Hi Amol,

But right now i am unable to figure out can you help on this.

shailesh

What you cant figure out?

you can search in table for the above field and need to interlink the same

Hi Shailesh,

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.

Hi Jay,

Thanks for the reply,

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 .

Regards,

Shailesh

Did you check Special Order Purchase No. in Sales Line table?

I have check this special order purchase number as i have mention that it comes like according to item wise means repeated like this.

for eg item 1 po/12/13/001

item2 po/1213/001

item 3 po/1213/001

item4 po/1213/002

item5 po/1213/002

and i want data like this po/1213/001 and po/1213/002 .

is any feild in in sales line from where i get the only first value of PO.

regards,

Shailesh

You can check whether prev value and pres. value is same or not etc to get only one time…

We can give logic and fields which you can use but not the full solution including coding.

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.

Regards,

Shailesh

Sorry

try yourself…

ok i will try myself .

Hi Shailesh,

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.

Thanks

Sagar

Hi Manrti,

can you just give me hint, how to use this because iam unable to find the common feild between sales line table and the item application entry table.

Regards,

Shailesh