cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order Batch Allocation

Former Member
0 Kudos

In SAP B1, if i create a sales order for 10 batch controlled item and preallocate those batch numbers from a particular warehouse and bin, how can i find, via a query, what bins the batches were allocated from?

Below I have a query that tells me the batch to the warehouse level, but i cannot find a table that relates it down to a bin level.

SELECT T0.DocNum,T0.DocLine,T2.ItemCode,T2.DistNumber,SUM(T1.AllocQty) AllocQty, T0.LogEntry, rdr1.WhsCode FROM OITL T0

JOIN ITL1 T1 ON T0.LogEntry = T1.LogEntry

JOIN OBTN T2 ON T1.SysNumber = T2.SysNumber AND T0.ItemCode = T2.ItemCode

join rdr1 on rdr1.DocEntry = t0.DocNum

WHERE T0.DocType = 17 And T0.DocNum = '364' And T0.DocLine = '0'

GROUP BY T0.DocNum,T0.DocLine,T2.ItemCode,T2.DistNumber , T0.LogEntry, rdr1.WhsCode

HAVING(SUM(T1.AllocQty) <> 0)

can anyone provide the table that has the bins for this, or modify my query to return the bin as well?

thanks

Doug

Accepted Solutions (0)

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please check this thread

Thanks.

former_member205766
Active Contributor
0 Kudos

Hi Dough

Check the below discussion it may helps you

With Regards

Balaji Sampath

Former Member
0 Kudos

Hi Balaji

That thread discusses getting the batches, but it does not tie things to what BIN those batches are in.  That threads author, I think, was asking the same question I am.  If i allocate batches from a BIN, what table holds the bins that those batches are allocated from?