cancel
Showing results for 
Search instead for 
Did you mean: 

Batch wise inventory transfer Quantity to a particular Bin Location

former_member183246
Participant
0 Kudos

Hi Experts,

I would like to write query to get Batch wise inventory transfer to particular Bin Location.

- regards

vikas

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please refer thread http://scn.sap.com/thread/3462011

Thanks & Regards,

Nagarajan

former_member183246
Participant
0 Kudos

Hi Nagarajan,

Thanks for reply. the above link query gives multiple result.

I need the query which gives the result Batch wise Inventory Transfer to the Bin location

- regards

vikas

edy_simon
Active Contributor
0 Kudos

Hi Vikas,

The Query :


DECLARE @WTREntry int  = 1

SELECT T0."ObjType"

  , T0."DocEntry"

  , T1."DocLine"

  , T1."ItemCode" "ItemCode"

    , T3."DistNumber" "BatchNumber"

  , (T1.DocQty/Abs(T1.DocQty)) * T2."Quantity" Quantity

  , T2."BinAbs" "BinAbs"

  , T1."LocCode" "Whse"

  , T4."BinCode" "BinCode"

  , T1."LogEntry"

FROM OWTR T0 JOIN OITL T1 ON T0."DocEntry" = T1."DocEntry" AND T0."ObjType"  = T1."DocType" AND ISNULL(T1."DefinedQty",0)>0

  JOIN OBTL T2 ON T1."LogEntry" = T2."ITLEntry"

  LEFT JOIN OBTN T3 ON T2."SnBMDAbs" = T3."AbsEntry"

  LEFT JOIN OBIN T4 ON T2."BinAbs" = T4."AbsEntry"

WHERE  T0."DocEntry"  = @WTREntry

ORDER BY T0."DocEntry", T1."DocLine", T1."LogEntry"

Change the @WTREntry to your doc entry.

Note the negative qty mark the direction is out.

Positive qty mark direction in. If you need to get only the in, then filter the negative quantity.

Also note that the above assume a transfer from Bin to Bin.

Regards

Edy

former_member183246
Participant
0 Kudos

Thanks Edy,

I got what i want. it works for me.

- regards

vikas

Answers (0)