on 2008 Sep 21 11:46 AM
Hi Experts,
I am having a problem in Query....Actually I have Upgraded SAP To 2007.After these upgradation the Queries in which the selection Criteria for Posting Date is given is not working properly.
Example:-
SELECT T0.[DocNum], T0.[Status], T0.[U_Priority], T0.[DueDate], T0.[PostDate], T0.[ItemCode], T0.[PlannedQty], T0.[CmpltQty], T0.[RjctQty], ( T0.PlannedQty-T0.CmpltQty- T0.RjctQty) as 'Open Qty',T0.U_TimeReq, (((T0.PlannedQty-T0.CmpltQty- T0.RjctQty)*T0.U_TimeReq)/60) as 'Total Time Reqd',T0.[U_TimeReq], T0.[U_SHOP], T0.[U_FCName] FROM OWOR T0 WHERE (T0.Series = '31' or T0.Series = '130') AND T0.[Status] = '[%0]' or T0.DueDate >= '[%1]' and T0.DueDate <= '[%2]' or T0.PostDate >= '[%3]' and T0.PostDate <= '[%4]' or T0.[U_SHOP] = [%5] or T0.[U_FCName]=[%6] or T0.[ItemCode] =[%7].
Regards-
Mona.
Request clarification before answering.
Hi Mona,
in your query sample, there is no table WOR1 where the last condition i.e. t0.itemcode, it is not valid field in the table OWOR. I mean it is available in the table WOR1. so you must include it in the query sample. I modified your query but I delete the UDF fields because I am not having enough time to create them :
SELECT T0.DocNum, T0.Status, T0.U_Priority,
T0.DueDate, T0.PostDate, T0.ItemCode,
T0.PlannedQty, T0.CmpltQty, T0.RjctQty,
( T0.PlannedQty-T0.CmpltQty- T0.RjctQty) as
'Open Qty',T0.U_TimeReq,
(((T0.PlannedQty-T0.CmpltQty- T0.RjctQty)*T0.U_TimeReq)/60)
as 'Total Time Reqd',T0.U_TimeReq, T0.U_SHOP,
T0.U_FCName FROM OWOR T0 inner join wor1 t1 ON T0.DocEntry = T1.DocEntry WHERE (T0.Series = '31' or
T0.Series = '130') AND T0.Status = '[%0]' and
(T0.DueDate >= '[%1]' and T0.DueDate <= '[%2]')
or (T0.PostDate >= '[%3]' and T0.PostDate <= '[%4]')
and T1.ItemCode ='[%7]'.
Try to test the query but prior to test, add both of UDFs you made. If resolved, pls assign me point.
Rgds,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
39 | |
8 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.