on 09-20-2010 10:07 AM
Dear Experts,
I try to generate one SAP query to find out the transfer quantity of stock (open balance & closing balance of stock). It got error when I try to execute it. Below is the query:
SELECT T0.[DocDate], T0.[InQty], T0.[OutQty], T0.[CalcPrice], T0.[TransType], T0.[Warehouse], T0.[JrnlMemo], T0.[BASE_REF], T0.[RevalTotal], T0.[Price], T0.[TransValue], T1.[ItemCode], T1.[ItemName],T2.[CardName], T3.[ItmsGrpNam] FROM OINM T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OITB T3 ON T1.ItmsGrpCod = T3.ItmsGrpCod INNER JOIN ODLN T2 ON T0.BASE_REF=T2.DocNum AND T0.TransType=T2.ObjType WHERE T3.[ItmsGrpNam] = 'Finished Goods' AND T0.[Warehouse] = 'FG01' AND (T0.[DocDate] >=[%0] AND T0.[DocDate] <=[%1]) AND (T0.[InQty]<>0 OR T0.[OutQty] <>0 OR T0.[Price]<>0) ORDER BY T0.Warehouse, T3.ItmsGrpNam, T1.ItemCode
I get the "Arithmetic overflow error converting expression to data type datetime" error message.
Anyone here can tell me what is it about?
Thanks.
Hi,
Try change to:
T0.[DocDate] Beteen [%0] AND [%1]
or
T0.[DocDate] Beteen '[%0]' AND '[%1]'
Have you got the date selection screen open before error message?
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please close your thread by mark it is answered since your problem solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried that no problem with your query. Have you tested by my way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
In your query where is the formula for opening balance??
Regards,
Bhavank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.