Hi Kalika,
Please try sample query for AR Credit memo data with serial Numbers.
SELECT T0.DocNum, T0.DocDate, T0.CardCode, T1.ItemCode, T1.WhsCode, T3.IntrSerial
FROM ORIN T0
INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry
left Outer join SRI1 T2 on T2.ItemCode = T1.ItemCode and T2.BaseType='14' and T2.BaseEntry = T1.DocEntry and T2.BaseLinNum = T1.LineNum
Left Outer JOIN OSRI T3 ON T2.SysSerial = T3.SysSerial and T3.ItemCode = T2.ItemCode
GROUP BY T0.DocNum, T0.DocDate, T0.CardCode, T1.ItemCode, T1.WhsCode, T3.IntrSerial
If you need data from Sales return you can replace
ORIN with ORDN
and RIN1 with RIN1
and left Outer join SRI1 T2 on T2.ItemCode = T1.ItemCode and T2.BaseType='14'
with
left Outer join SRI1 T2 on T2.ItemCode = T1.ItemCode and T2.BaseType='16'
Thanks
Unnikrishnan