Skip to Content

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

EXP Date Alert

Hello Experts

i am maintaining the batches in inventory for medicines now i want to generate an alert according to expiry date how should i design a query for doing such can u explain with example?

Former Member

You can try something like this:

SELECT T0.[ItemCode],T0.[BatchNum],  T0.[WhsCode], T0.[Quantity], T0.[ExpDate],
  datediff(d,getdate(),T0.[ExpDate] ) 'remaining days'
WHERE datediff(d,getdate(),T0.[ExpDate] )<100 and T0.[Quantity]>0

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