Left join obin t6 on t5.BinAbs=t6.absentry and t6.whscode=t1.WhsCode Inner join oilm t4 on t1.docentry=t4.DocEntry and t1.LineNum=t4.DocLineNum and t4.TransType=67 and t4.LocCode=t1.WhsCode Left JOIN WTR1 T1 ON T0.DocEntry=T1.DocEntry )vw1 inner join (select t1.docentry,t1.linenum,t6.BinCode 'To Bin Location',t1.ItemCode ,t1.whscode FROM T0.DocEntry ,t1.docentry ,T0.ObjType,T0.DocNum Where t0.docentry=(replace with your parameter) Left join obin t6 on t5.BinAbs=t6.absentry -and t6.whscode=t1.FromWhsCod Left join obtl t5 on t4.MessageID=t5.MessageID Inner join oilm t4 on t1.docentry=t4.DocEntry and t1.LineNum=t4.DocLineNum and t4.TransType=67 and t4.LocCode=t1.FromWhsCod = T0.DocENtry and Direction = 0 and T3.BaseType = 67 and t3.BaseLinNum=t1.LineNum Inner join OUSR T2 on t0.UserSign=t2.USERID INNER JOIN WTR1 T1 ON T0.DocEntry=T1.DocEntry (SELECT DOCNUM FROM OWTQ WHERE T1.BaseEntry=OWTQ.DOCENTRY) AS BASEDOCNUM,T1.BaseQty as reqqty, T1.Dscription AS ITEMNAME,T1.unitMsr AS UOM,CONVERT(VARCHAR,T0.DocDate,103) AS TRNSFRDATE, T0.DocEntry AS DOCENTRY,t1.docentry as doc,CONVERT(DECIMAL,T0.ObjType) AS OBJTYPE,T0.DocNum AS DOCNUM,t1.linenum as line, ![]() Select vw1.*,vw2.,vw2.WhsCode from (SELECT T3., The below sql query display from and to bin location for batch and non batch items.Even if you have both batch and non batch items in same inventory transfer document,this query will work.you can also set this query as layout.you can add or replace the columns on your own.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |