SELECT A.BASE_REF AS Docnum,

       A.DocLineNum,

       A.ItemCode,

       A. Dscription,

       T2.Quantity,

       t3.BinCode

FROM   [B1_OinmWithBinTransfer] A

       INNER JOIN OIGE B

            ON  B.DOCNUM = A.Base_ref

            AND CONVERT(VARCHAR, B.ObjType) = CONVERT(VARCHAR, A.Transtype)

       INNER JOIN IGE1 c

            ON  c.docentry = B.docentry

            AND a.itemcode = c.itemcode

       LEFT OUTER JOIN [dbo].[OBTL] T2

            ON  A.[InvPLMessageID] = T2.[MessageID]

       LEFT OUTER JOIN [dbo].[OBIN] T3

            ON  T3.[AbsEntry] = T2.[BinAbs]

Change the required table name according to the requirement..

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply