Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how can i show list of serial numbers with GRPO

I have received serial numbers using GRPO. i need to create a query showing,

PO Number, GRPO Number, docdate, item name, item price and serial number in between dates.

Can some one help me out please.

Tags:
replied

Check this,

Declare @from date

Declare @to date

Set @from =/* SELECT Max(T0.Docdate) FROM opdn  T0 WHERE T0.Docdate> */ '[%0]'

Set @to =/* SELECT Max(T0.Docdate) FROM opdn  T0 WHERE T0.Docdate> */ '[%1]'

select pr.docnum 'PO No',n.DocNum 'GRPO No' ,n.DocDate ,n.CardCode ,n.CardName , r.ItemCode ,r.ItemName ,r1.IntrSerial 'Serial No',n1.Price   from sri1 r

inner join osri r1 on r.SysSerial =r1.SysSerial and r1.ItemCode=r.ItemCode

  inner join pdn1 n1 on n1.DocEntry =r.BaseEntry and n1.ItemCode=r.ItemCode and n1.LineNum=r.BaseLinNum

inner join opdn n on n.DocEntry =n1.DocEntry left outer join opor pr on pr.docentry=n1.baseentry  and n1.basetype='22'

  where r.BaseType=20 and n.docdate> = @from and n.docdate<= @to

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question