on 05-13-2014 10:38 PM
Estimados Expertos,
He creado un campo personalizado a nivel de linea en la solicitud de compra de servicio o articulos (SAP 9) y la idea es que me arroje un resultado de acuerdo a la diferencia de dias que resulta de la fecha del documento y la fecha necesaria. pero me despliega una ventana o ignora alguna de las condiciones...
Favor su ayuda, aquí dejo el query utilizado:
select
case when (DATEDIFF ( d, oprq.DocDate, Prq1.PQTReqDate)< =2)then 'Excepcional'
when (DATEDIFF ( d, oprq.DocDate, Prq1.PQTReqDate) between 3 and 14 )then 'Urgente'
when (DATEDIFF ( d, oprq.DocDate, Prq1.PQTReqDate)) >=15 then 'Normal'
end as 'U_Cond_REQ'
from OPRQ
inner join prq1 on OPRQ.docentry=PRQ1.docentry
where prq1.PQTReqDate= $[$38.540002123.1]
group by
Prq1.PQTReqDate,
oprq.DocDate
me resulto muy bien con este nuevo query para la solicitiud de compra articulo, sin embargo arroja malos resultados en la de servicio. Por favor ayuda
select
case when (DATEDIFF ( d, oprq.DocDate, Prq1.PQTReqDate)< =2)then 'Excepcional'
when (DATEDIFF ( d, oprq.DocDate, Prq1.PQTReqDate) between 3 and 14 )then 'Urgente'
else 'Normal'
end
from OPRQ
inner join prq1 on OPRQ.docentry=PRQ1.docentry
where PRQ1.PQTReqDate= $[$38.540002123.1]
group by
Prq1.PQTReqDate,
oprq.DocDate
saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Muchas Gracias, funcionando muy bien
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 | |
10 | |
9 | |
6 | |
3 | |
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.